Before you can create an encrypted Status List for charging for Credentials, you need to create a DID which is used to link the Status List on-ledger. Use the API in the page below to create a DID:
Using this API will encrypt the bitstring of the Status List, meaning that a set of Payment Conditions will need to be met in order to access the Status List contents.
/credential-status/create/unencrypted
Using this API will create a regular Status List on-ledger, where the contents of the Status List are visible to any users who queries the blockchain.
For the purpose of this tutorial, we will assume the user is creating an encrypted Status List. For unencrypted Status Lists, follow the tutorial here.
Step 4: Create encrypted Status List
Using the /credential-status/create/encrypted API, users have two options for creating an encrypted Status List on-ledger:
Filling out a simple form using the application/x-www-url-form-encoded option on the Swagger UI.
Compiling a Status List payload yourself using the application/json option on the Swagger UI.
Update an existing encrypted StatusList2021 credential status list.
post
/credential-status/update/encrypted
Authorizations
Query parameters
statusActionenumrequired
The update action to be performed on the encrypted status list, can be revoke, suspend or reinstate
Options: revoke, suspend, reinstate
Body
didstring urirequired
DID of the StatusList2021 publisher.
statusListNamestringrequired
The name of the StatusList2021 DID-Linked Resource to be updated.
indicesinteger[]required
List of credential status indices to be updated. The indices must be in the range of the status list.
statusListVersionstring
Optional field to assign a human-readable version in the StatusList2021 DID-Linked Resource.
symmetricKeystringrequired
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource.
feePaymentAddressstring
The cheqd/Cosmos payment address where payments to unlock the encrypted StatusList2021 DID-Linked Resource need to be sent.
Option 1. Choose from a few variables and we will compile the Status List for you
This is the easiest way to create encrypted Status Lists on cheqd and is recommended for users who are not overly familiar with compiling JSON objects.
Using the application/x-www-url-form-encoded option on the Swagger UI, users are able to choose between the following variables and options to create an encrypted Status List on-ledger:
statusPurpose (required)
revocation (creates a Status List where each entry refers to revocation status)
suspension (creates a Status List where each entry refers to suspension status. Note that suspended Credentials may become unsuspended).
did (required)
Enter the Decentralized Identifier (DID) of the Status List publisher created in Step 2. For example:
This is the name of your Status List. This will also need to be kept consistent for all future updates of the same Status List. For example:
employmentCredentialRevocationList
feePaymentAddress (required)
The cheqd payment address where payments to unlock the encrypted StatusList2021 DID-Linked Resource need to be sent. For example:
cheqd1qs0nhyk868c246defezhz5eymlt0dmajna2csg
feePaymentAmount (required)
The amount in CHEQ tokens to unlocked the encrypted StatusList2021 DID-Linked Resource. For example:
100
feePaymentWindow (required)
Time window (in minutes) within which the payment to unlock the encrypted StatusList2021 DID-Linked Resource is considered valid. For example:
10
length (optional)
The length of the Status List to be created. The default and minimum length is 140000 which is 16kb. For example:
140000
encoding (optional)
The encoding format of the encrypted StatusList DID-Linked Resource to be created.
base64url
base64
hex
statusListVersion (optional)
A user set value to represent the version of the Status List. For example:
1.0
alsoKnownAs (optional)
A user set field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from. For example:
https://www.foo.com
From this request, cheqd Studio will automatically create and publish an encrypted Status List to the ledger with set Payment Conditions required to be met to unlock.
Option 2. Publish a JSON payload yourself
Instead of using simple form variables, you can create an encrypted Status List using a JSON payload yourself using the application/json option on the Swagger UI.
Request format
An example of the JSON payload needed to be submitted is below:
The table below expands on some of the required parameters:
Parameter
Example value
Description
"feePaymentAddress"
"cheqd1xl5wccz667lk06ahama26pdqvrkz5aws6m0ztp"
This specifies the cheqd address to which the payment fee should be sent. This address is associated with the User who wants to charge for Credential Status
"feePaymentAmount"
"1000"
This defines the amount of the payment fee in CHEQ which the Issuer will charge for a third party to unlock the Credential Status.
The amount may be up to 2 decimal points, e.g. "1000.25".
"feePaymentWindow"
"10"
The amount of time, in minutes, after making the payment in which a Verifier is able to unlock an encrypted resource.
Step 5: Hit the API
Once the Issuer has populated the requisite information for the encrypted Status List request, they can use the API below to submit it to the ledger.
Update an existing encrypted StatusList2021 credential status list.
post
/credential-status/update/encrypted
Authorizations
Query parameters
statusActionenumrequired
The update action to be performed on the encrypted status list, can be revoke, suspend or reinstate
Options: revoke, suspend, reinstate
Body
didstring urirequired
DID of the StatusList2021 publisher.
statusListNamestringrequired
The name of the StatusList2021 DID-Linked Resource to be updated.
indicesinteger[]required
List of credential status indices to be updated. The indices must be in the range of the status list.
statusListVersionstring
Optional field to assign a human-readable version in the StatusList2021 DID-Linked Resource.
symmetricKeystringrequired
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource.
feePaymentAddressstring
The cheqd/Cosmos payment address where payments to unlock the encrypted StatusList2021 DID-Linked Resource need to be sent.
Note: The only encrypted element is the "encodedList" element. This provides the Verifier sufficient information to be able to make the payment back the the Issuer and to fulfill the Access Control Conditions, without being able to see the contents of the Status List itself.