Charge for Status List
Creating an encrypted Status List 2021 Resource using cheqd Studio
Last updated
Creating an encrypted Status List 2021 Resource using cheqd Studio
Last updated
To create an encrypted Verifiable Credential Status List v2021 with a set of Access Control Conditions, an Issuer will need to follow the steps below:
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
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:
When creating a Status List, a user will have the following options:
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.
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.
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:
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.
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.
An example of the JSON payload needed to be submitted is below:
The table below expands on some of the required parameters:
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.
The following code snippet shows an example of an encrypted Status List response format, which will be published to the ledger:
Note: it is important to save the response, including the "encryptedSymmetricKey
" locally, as this will be used for updating encrypted Status List operations.
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.
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.
Set up your account
Set up your account with cheqd Studio and log in to start using the APIs.
Create an Issuer DID
Create a W3C conformant DID on cheqd using the did:cheqd
DID Method.
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be updated.
List of credential status indices to be updated. The indices must be in the range of the status list.
Optional field to assign a human-readable version in the StatusList2021 DID-Linked Resource.
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource.
The cheqd/Cosmos payment address where payments to unlock the encrypted StatusList2021 DID-Linked Resource need to be sent.
"cheqd1qs0nhyk868c246defezhz5eymlt0dmajna2csg"
Amount in CHEQ tokens to unlock the encrypted StatusList2021 DID-Linked Resource.
Time window (in minutes) within which the payment to unlock the encrypted StatusList2021 DID-Linked Resource is considered valid.
The request was successful.
true
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be updated.
List of credential status indices to be updated. The indices must be in the range of the status list.
Optional field to assign a human-readable version in the StatusList2021 DID-Linked Resource.
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource.
The cheqd/Cosmos payment address where payments to unlock the encrypted StatusList2021 DID-Linked Resource need to be sent.
"cheqd1qs0nhyk868c246defezhz5eymlt0dmajna2csg"
Amount in CHEQ tokens to unlock the encrypted StatusList2021 DID-Linked Resource.
Time window (in minutes) within which the payment to unlock the encrypted StatusList2021 DID-Linked Resource is considered valid.
The request was successful.
true