Issue a Verifiable Credential
This tutorial offers step-by-step guidance on how to issue a verifiable credential
⚠️ Before you begin...
The subject (holder) of this credential will be an off-ledger
did:keyDID. The rationale for using off-ledger DIDs when issuing a credential is because the fact that they aren't persisted on ledger means they cannot be correlated or tracked to specific users/individuals.
This allows a user to have multiple
did:keyidentities, and the identifier/handle they reveal when sharing a Verifiable Credential is context-dependent and better for privacy.
The issuer of the credential, on the other hand, uses an on-ledger
did:cheqdDID since this needs to be publicly-accessible and cryptographically verifiable.
Normally, the credential holder will provide a
did:keyDID they have generated themselves (usually done in the background by apps they are using). So, this step typically isn't done by a credential issuer.
For the purpose of this tutorial though, we recommend you create a
did:keysubject DID for the later steps.
Start credential generation using:
veramo credential create --json
You'll be presented with an multiple options select:
Learn about different types of Verifiable Credentials📚If you want to learn more about different types of verifiable credentials please go over to our learning site here.
Select which Issuer DID stored in your local storage you'd like to issue the credential from, e.g.,
The assumption here is that you've either created the issuer DID or stored the DIDDoc by querying it.
Select which subject DID from your local agent storage the credential should be issued to, e.g.,
This could the subject DID created in Step 1.
This is currently free-text. However, you can hit Enter to use
VerifiableCredentialas the default credential context.
The claim type can be thought of as the label in a form field. It can denote the purpose/attribute being stored in the credential.
For example, the claim type
namecould refer to the name of an individual.
Enter the value of the claim type. For example, you specified
nameas the claim type, the value could be
In this tutorial, we will create a credential with only a single name-value pair.
JSON/JWT credentials with DIDs anchored on cheqd are currently not revocable, so please choose
Noat this step.
At this last step, Veramo CLI generates the credential based on the inputs above.
Note: The human-readable JSON body below is purely for easier parsing by developers/applications. The proof is encoded as JWT or JWS at the bottom of the credential, which can be decoded to reconstruct the entire credential.
"type": ["VerifiableCredential", "Profile"],
Note that the JSON is unordered so the output of the fields could be in a different order
You can save the generated Verifiable Credential, as you can later use it to verify the credential cryptographically or generate presentations to show the credential to others.