The issuer generates and issues credentials based on subject data provided by the owner. According to the relationship between the issuer and the owner, credentials can be divided into self-proclaimed and third-party credentials. The issuer of a self-proclaimed credential is its owner, that is, individuals issue credentials encapsulated with individual information for themselves; a third-party credential is issued by a DID other than the owner - that is, the credential is encapsulated by a third party, such as a trusted institution, according to the data provided by the owner.
The constructor generates the issuer, with doc as the DID document of the issuer and signKey as the authentication key used by the DID to sign the credential. If not specified, the default key is used by default.
public issueFor(did: DID| string): VerifiableCredential.Builder;
The issuer specifies for whom the credential should be issued. After the VerifiableCredential.Builder object is obtained, more attributes of the credential are set according to various methods provided by VerifiableCredential.Builder.
DID is the owner of the credential to be issued.
public async seal(storepass: string): Promise<VerifiableCredential>;
VerifiableCredential.Builder provides a method to encapsulate the content of the credential, and storepass refers to the storepass in the DID store of the issuer.