Issue a Verifiable Credential referencing an Encrypted Status List and index within the Credential Body.
Issue Verifiable Credential with Encrypted Bitstring Status List Resource
There is a specific transaction type for issuing Verifiable Credentials that reference encrypted Status List Resources.
Step 1: Create an encrypted Status List on-ledger
Follow the tutorial here to create an encrypted Bitstring Status List Resource on cheqd.
Charge for Status List
Create an encrypted Status List on cheqd with payment conditions, unlockable on payment of CHEQ
Step 2: Choose index number for Credential
Each encrypted Status List is a bitstring, where each bit represents a Credential which is either revoked or unrevoked (or suspended or unsuspended).
Users should maintain and manage a list of which Credentials match with which specific bitstring indices to be able to revoke or suspend Credentials in the future, and to avoid collisions.
When issuing a Credential, you have the choice of whether to manually specify an index for the Credential within the bitstring, or randomly generate an index number anywhere in the bitstring, or within a given range.
Step 3: Construct Credential Payload with Status List
When constructing the payload for issuing a Credential just specify the purpose and the encrypted status list name.
The following parameters may be included:
Parameter
Value
Optional
"statusPurpose"
"message"
No
"statusListName"
string
No
"statusListVersion"
string
Yes
"statusListIndex"
string
Yes
"statusListRangeStart"
string
Yes
"statusListRangeEnd"
string
Yes
"indexNotIn"
Array
Yes
Below are a set of examples of how these parameters may be included in Credential payload files for different purposes:
Example Request Format: Random Bitstring IndexExample Request Format: Bitstring index within a given rangeExample Request Format: Bitstring including omitted bitsExample Request Format: Specified Bitstring index
Ensure that the "statusPurpose" is message and "statusListName" is the same as the existing Status List on-ledger, created in Step 1.
Step 4: Execute the transaction
Once you have constructed your payload file, and have saved it as a JSON file, use the transaction below to issue the Verifiable Credential.
Response format
If the transaction is successful, you will get returned a formatted Verifiable Credential, including a populated "credentialStatus" section.