Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Learn how to set up your account on cheqd Studio.
The user is required to Log In to our cheqd Studio portal and then access their API key to authenticate with our APIs. The API key guards the API from unauthorized access and is required for both testing production environments.
Head to our cheqd Studio and click Get Started.
cheqd Studio uses a third party service called LogTo to handle user authentication and login. This allows users to create new accounts as well as sign in using their email, Google single sign-on, or Discord login.
Get started with our tutorials for cheqd Studio functionality.
You will be able to get started for free on our free trial, but following the expiry of the free trial, users need to sign up for a paid billing plan. cheqd Studio billing uses Stripe as a payments processor and users will need to input their card information to initiate a billing plan.
Dive into cheqd's product and identity functionality
cheqd is a purpose-built network for decentralised identity. This documentation site provides technical and product information for all identity features & functionality on the cheqd network.
cheqd maintains an array of products and packages with varying levels of integration complexity to allow its partners and customers to have a variety of ways of plugging into cheqd's identity functionality. Via these different packages, customers and partners can create cheqd DIDs, DID-Linked Resources, Status Lists, Trust Registries and Schemas, as well as use cheqd's Credential Payments model, with different levels of integration effort and flexibility.
There are three core ways of integrating and building with cheqd:
cheqd's identity functionality is fully standards compliant, ensuring interoperability and no vendor lock-in. cheqd's tooling and different product offerings offer a variety of building blocks for any Trusted Data Market.
If you want to utilise cheqd DIDs or DID-Linked Resources within applications without a specific cheqd integration, you can incorporate a Universal Registrar or Universal Resolver driver to support did:cheqd alongside other commonly adopted DID methods.
cheqd Studio is the easiest route to get started with cheqd's identity functionality, or for testing with very low integration effort. Using simple REST APIs, it is possible to integrate cheqd Studio in a few lines of code.
Under the hood, cheqd Studio utilises the Veramo SDK cheqd Plugin, providing the most feature complete set of functionality and tooling.
If you'd rather build a deeper integration using a Software Development Kit (SDK) or lower level package, we've created a simple diagram to show how our packages are structured below.
cheqd supports a wide array of standards and protocols via different Software Development Kits (SDKs) and integrations.
One of cheqd's primary motives is to make itself accessible to the widest set of identity applications possible. To accomplish this, cheqd has built a flexible set of packages and tooling to accommodate its identity capabilities into a broad set of external SDKs and applications.
These can be represented through the visual below:
The cheqd Discord is our primary chat channel for the open-source community, software developers, and node operators.
Please reach out to us there for discussions, help, and feedback on the project.
Setup your wallet to receive credentials.
cheqd Studio currently is setup to work with the Verida Wallet. In 2024, we will be building compatibility with a full suite of other digital identity wallets.
On the "Profile" tab, you will see your did:vda
address under the section "DID".
For example: "did:vda:testnet:0xD7477C4a75143Af16A967381d09650A533Bd0DD7"
Credentials stored with the credential schema will automatically be rendered in the Verida Wallet as a credential. This custom display includes:
A scannable QR code
The profile icon of the Verida DID that issued / signed the credential
A tick of approval indicating the credential has been verified
Users may exhaust their usage limits in their cheqd Studio billing plan, but may want to continue using the Studio before their usage limits refresh. Therefore, users can manually top up their account with CHEQ tokens to use any APIs that involve a ledger-write, e.g:
Creating, Updating or Deactivating DIDs
Creating unencrypted or encrypted Status Lists
Creating Trust Registries
Creating other DID-Linked Resources
The following API can be used to fetch the new account information:
customer_id
is used as an identifier for the particular customer using cheqd Studio. It is generated as a sub-field of the JWT token used in the authorization header.
cheqd_account
is used to pay for identity transactions on either testnet
or mainnet
. A cheqd account is automatically generated when a new customer_id
is generated.
Users will need to add our token, CHEQ, to their cheqd_account
on mainnet
in order to be able to use the ledger-based identity functionality on cheqd Studio, such as creating DIDs and DID-Linked Resources.
If you need to add CHEQ tokens to your cheqd Studio cheqd_account
, there are a few steps you need to follow:
Once you have successfully created an account and have topped up your CHEQ tokens, you are ready to get started!
Get started with our tutorials for cheqd Studio functionality.
API keys are unique data strings used to authenticate a user and enable access to privileged operations on cheqd Studio APIs. All cheqd Studio APIs use API keys as the mechanism to authenticate client requests. Your API key should be kept confidential and secure at all times.
Authentication is required for all API requests; without it, the requests will fail.
All API requests must be made over HTTPS.
Because our API keys allow access to cheqd Studio APIs, you must keep them secure at all times.
Ensure your API key is always stored securely as soon as it is initially generated.
Make sure to copy your API key into a secure place, such as a Password Manager.
Never share it or record it in a publicly accessible medium (client-side code, public repositories, etc.).
Caution: If you lose secure control of your API keys, your entity may not be able to access your created DIDs, DID-Linked Resources or Credential Payments.
Follow the tutorial here to get started with your cheqd Studio account.
Navigate to the "Developers" tab on cheqd Studio and select "Create an API Key". You are able to choose the expiry date of the API key, and it will automatically be set to expire 1 year from the current date.
Navigate to the "APIs" tab and copy/paste your API key into the API key box towards the top of your page. This will enable you to authenticate with the cheqd Studio APIs, allowing users to use cheqd Studio APIs within their existing Billing Plan and usage limits.
Get started with our tutorials for cheqd Studio functionality.
Create DIDs and identity keys using cheqd's DID Method (did:cheqd)
A Decentralized Identifier "DID" is a globally unique identifier that does not require a centralized registration authority because it is registered with distributed ledger technology or other form of decentralized network.
There are many different ways to create DIDs on cheqd, with options for easy integration (e.g. cheqd Studio) and more bespoke integrations (e.g. Credo and Veramo). Below are a list of options for creating cheqd DIDs.
The easiest way to start creating DIDs is with our product cheqd Studio, allowing users to build and create did:cheqd
DIDs using REST APIs.
DIDs created using cheqd Studio use the did:cheqd
DID Method. This is fully defined below, as well as the associated ledger-write fees:
Developer guide for running the cheqd Studio.
This standalone service uses an in-memory database with no persistence, and therefore is recommended only if you're managing key/secret storage separately.
Construct the postgres URL and configure the env variables mentioned above.
POSTGRES_USER
: Username for Postgres database
POSTGRES_PASSWORD
: Password for Postgres database
POSTGRES_MULTIPLE_DATABASES
: Database names for multiple databases in the same cluster, e.g.: "app,logto"
. This sets up multiple databases in the same cluster, which can be used independently for External Veramo KMS or LogTo service.
Then, make the Postgres initialisation scripts executable:
Then, run the LogTo service to configure the LogTo application API resources, applications, sign-in experiences, roles etc using Docker Compose:
Then, start the service using Docker Compose:
When upgrading either the external Veramo KMS or LogTo, you might need to run migrations for the underlying databases.
For example, to run cheqd Studio app migrations on an existing Postgres database (for external Veramo KMS):
Or to run LogTo migrations on an existing Postgres database:
Learn about DIDs If you want to .
If you want to run the application without any external databases or dependent services, we provide to spin up a standalone service.
The in the same folder contains all the environment variables necessary to configure the service. (See section Configuration above.)
Spinning up a Docker container from the is as simple as the command below:
Configure the environment variables in the :
Configure the environment variables in the with the settings described in section above.
Configuring LogTo is outside the scope of this guide, and we recommend reading to familiarise yourself.
Configure the environment variables in the with the settings described in section above. Depending on whether you are using external Veramo KMS only, LogTo only, or both you will need to have previously provisioned these services as there are environment variables in this file that originate from Postgres/LogTo.
You can run just the migration scripts using defined in the Compose file.
To build your own image using Docker, use the provided.
cheqd Studio
Click here to sign up for a cheqd Studio plan to get started with creating API keys.
API keys
Create a new API key to authenticate with the cheqd Studio APIs.
DIDs and Identity Keys
Create did:cheqd
DIDs for credential issuers and for DID-Linked Resources
Trust Registries
Create an end-to-end trusted ecosystem, using Trust Chains to build a full Trust Registry.
Payments
Create commercial models for verifiable credentials, such as verifier-pays-issuer
Status Lists
Create status lists, including Status List v2021 and Token Status List
Credentials
Issue any type of credential, including SD-JWT, VCDM and AnonCreds via our partners, including trust registries, status lists and payments.
Resources
Create custom resources for policies, presentation definitions, schemas and visual representations of credentials
Create Decentralised Identifiers (DIDs)
Fully W3C DID Core conformant Digital identifiers for establishing a root of trust in a given ecosystem. Utilising cheqd's DID method (did:cheqd).
Build Trust Registries
Create industry-leading trust registries, using chains of Verifiable Accreditations, to secure your identity ecosytem.
Charge for Credentials
Setup encrypted Status Lists and other Resources with Payment Conditions to unlock, allowing issuers to set a price for verifying a Credential Status.
Issue Credentials and Presentations
Fully W3C VC Data Model conformant Verifiable Credentials for establishing trust. Supporting JSON, JSON-LD, SD-JWT and AnonCreds through cheqd APIs and via cheqd's Partners.
Create Status Lists on-ledger
Sophisticated and first-of-its-kind cryptographically verifiable on-ledger files for establishing Trust and Reputability in a Verifiable Credential, utilising DID-Linked Resources.
Create DID-Linked Resources
Digital resources, leveraging the cryptographic verifiability of DIDs and patterns of DID Core to anchor schemas, trust registries, status lists and more.
DID Registrar (and Universal Registrar Driver)
Low complexity
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
DID Resolver (and Universal Resolver Driver)
Low complexity
Service for resolving cheqd DIDs and DID URLs. Feature complete with query-based DID URL dereferencing. Full integration and driver within the Universal Resolver.
Get started with cheqd Studio
Click here to start your journey with cheqd Studio, create your account and begin using cheqd's underlying functionality.
DIDs and Identity Keys
Create did:cheqd
DIDs for credential issuers and for DID-Linked Resources
Trust Registries
Create an end-to-end trusted ecosystem, using Trust Chains to build a full Trust Registry.
Payments
Create commercial models for verifiable credentials, such as verifier-pays-issuer
Status Lists
Create status lists, including Status List v2021 and Token Status List
Credentials
Issue any type of credential, including SD-JWT, VCDM and AnonCreds via our partners, including trust registries, status lists and payments.
Resources
Create custom resources for policies, presentation definitions, schemas and visual representations of credentials
Set up your account
Get started with cheqd Studio, setting up your account and selecting a Billing Plan.
DIDs and Identity Keys
Create did:cheqd
DIDs for credential issuers and for DID-Linked Resources
Trust Registries
Create an end-to-end trusted ecosystem, using Trust Chains to build a full Trust Registry.
Payments
Create commercial models for verifiable credentials, such as verifier-pays-issuer
Status Lists
Create status lists, including Status List v2021 and Token Status List
Credentials
Issue any type of credential, including SD-JWT, VCDM and AnonCreds via our partners, including trust registries, status lists and payments.
Resources
Create custom resources for policies, presentation definitions, schemas and visual representations of credentials
Resolve a DID to fetch the associated DID Documet
A user is able to input a DID (string) as a request format and resolve the DID to fetch the associated DID Document, DID Resolution Metadata and DID Document metadata.
Create a DID using the did:cheqd method
To create a cheqd DID (did:cheqd
) and associated DID Document there are two ways of building the payload for the request:
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Using the /did/create
API, users have two options for creating a did:cheqd
DID and associated DID Document on-ledger:
Filling out a simple form using the application/x-www-url-form-encoded
option within an API client of your choice.
Compiling a DID Document body yourself using the application/json
option within an API client of your choice.
This is the easiest way to create DIDs on cheqd and is recommended for users who are not overly familiar with compiling DID Documents.
Using the application/x-www-url-form-encoded
option, users are able to choose between the following variables to compile your DID:
From this request, the Credential Service will automatically create and publish a DID and associated DID Document to the ledger and return it as a response.
Instead of generating a DID Document using simple parameters, you can create a fully formatted DID Document yourself. Before, submitting a manually created DID, you will need to have created a set of identity keys to input the key material into the DID document.
Use the /key/create
API to generate a new keypair within the Credential Service key management store. Copy the "publicKeyHex".
To simplify this process of formatting a DID Document using your own keys, we've created a Helper Tool in our DID Registrar here. Simply paste in your publicKeyHex and choose the variables to compile your DID Document template.
Within the /did/create
JSON payload, paste the response of your DID Document template, with your own signing keys.
Request format:
Hit execute on the API below to create your did:cheqd
DID and associated DID Document.
After creating a DID or multiple DIDs, users can list all the created DIDs associated with their account. Using the /did/list
API.
Below are a list of alternatives for creating cheqd DIDs.
Issuers may want to create identity keypairs for multiple reasons, such as for signing payloads or for creating did:key
DIDs.
There is also an option to fetch an identity keypair by inputting a Key ID (kid) as a request format.
cheqd Studio currently supports two types of subject
DIDs:
did:key
did:vda
With the former, you can follow the did:key specification to create a subject DID based on a generated keypair.
With the latter, you can setup your did:vda subject DID on your Verida wallet. Using cheqd Studio, you will be able to send credentials to your Verida wallet and use it to store and securely back them up.
Update or deactivate a DID
Users are able to update DID Documents for various reasons, such as to include a new section or to rotate the Verification Method keys within the DID Document.
With the /did/update
API, users are able to input either:
The section of the DID Document they would like to update; or
The full updated DID Document body.
Users are also able to deactivate DID Documents to prevent further updates and to provide client applications the relevant information that the DID Document is no longer actively used.
A /did/deactivate
request must be signed by all of the Verification Method keys listed in the DID Document.
Verify presentations on cheqd Studio.
A Verifiable Presentation is a collection of multiple Verifiable Credentials that are being presented by a holder
to a verifier
. In addition to checking whether the Credentials are untampered, Verifiable Presentation verification also checks that the holder
subject DID is valid.
To verify a Credential, you can either pass the full VP-JWT string or a JSON object. These can be either obtained from a Verifiable Presentation presented to the user.
The user is able to set verification parameters to filter whether they want to verify certain aspects of a Presentation, including:
Use the API below to verify a Presentation
Issue conformant W3C Verifiable Credentials over REST API
Using the /credential/create
API, it is possible to issue Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code.
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can issue a Verifiable Credential, you need to create an Issuer DID which is used to sign the Credential payload. Use the API in the page below to create an Issuer DID:
Again, before you issue a Verifiable Credential, you need to know to whom you are issuing it. If you need to create a Subject DID, you can take a look at the page here:
Within the JSON object of the API request, you will need to input the issuer
and subject
information, as well as the attributes
which you want to issue in the Credential. You may also want to add additional fields such as a credentialSchema
.
Users have two options for compiling the Credential bodies and issuing Verifiable Credentials:
Filling out a simple form using the application/x-www-url-form-encoded
option within an API client of your choice.
Compiling a Credential body yourself using the application/json
option within an API client of your choice.
This is the easiest way to issue Credentials and is recommended for users who are not overly familiar with compiling JSON objects.
Using the application/x-www-url-form-encoded
option, users are able to choose between the following variables and options to issue Verifiable Credentials:
Below are a set of examples of alternative input parameters for users to specify the bitstring index of the issued Credential. The bitstring index is where exactly the issued credential will map to within the Status List. This should be noted and stored by the issuer to keep a record of which issued credentials are active, revoked or suspended:
Ensure that the "statusPurpose"
and "statusListName"
is the same as the existing Status List on-ledger.
Instead of using simple form variables, you can issue a Verifiable Credential using a JSON payload with the application/json
option.
Below is an example of the request format for issuing a Verifiable Credential using a custom JSON payload, including some of the possible parameters:
Execute the API below to issue a Verifiable Credential, signed by your issuer DID.
Below are a list of alternatives for using Credentials with cheqd support. Each offers a different set of protocols and underlying technical capabilities.
t
Verify a Credential using cheqd Studio.
Once you have issued your credential and have a JWT as part of the credential proof, you can use the /credential/verify
API to check that the JWT has not been tampered.
The user is able to set verification parameters to filter whether they want to verify certain aspects of a Credential, including:
Simply paste the JWT or the full credential body into the request field of the /credential/verify
API, and the API will give you a response including the following verification policies:
Whether the Credential has been tampered
Whether the Credential has a valid issuance date
Whether the Credential has expired
Whether the Credential Status is valid
Using cheqd's innovative DID-Linked Resource module, cheqd is able to support decentralized and scalable Verifiable Credential revocation and suspension. Using this API, the user is able to choose whether they would like to publish the revocation status to the cheqd ledger or elsewhere.
It is best practice for issuers to keep a record of the Credentials they have issued, including the "statusListIndex
" of the Credentials. From this record system, issuers should be able to fetch either the full Credential Body or the JWT proof of the Credential they want to revoke.
When revoking a Credential, issuers can decide whether they want to publish an updated Status List on-ledger, with the revoked credential index updated in the bitstring. The parameter below can be changed to reflect this:
Paste the Credential Body or JWT into the API below and execute the API to revoke the Credential.
Learn how to issue and manage Verifiable Credentials and Presentations.
Verifiable Credentials are a tamper-evident data format for asserting a set of claims about a subject. You can issue and verify Verifiable Credentials and Presentations without building complex integrations, using our simple cheqd Studio APIs.
There are many different ways to issue verifiable credentials signed by DIDs anchored on cheqd, with options for easy integration (e.g. cheqd Studio) and more bespoke integrations (e.g. Credo and Veramo). Below are a list of options for issuing credentials with cheqd underneath:
You can use SaaS products from our partners to create best-in-class credential ecosystems, built on cheqd
cheqd supports all four major digital Credential types via its selection of SDKs and APIs. Below you can learn about these Credential formats:
Depending on what type of credentials you want to use, choose the SDK that suits your tech stack:
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the .
This is the DID of the Credential issuer, created in . This needs to be a did:cheqd
DID. For example:
This is the DID of the Credential subject, created in . This needs to be a did:key
or did:vda
DID. For example:
These are the claims or attributes attested to within the Verifiable Credential. This must be a JSON object, following the . For example:
This is an optional property that defines semantic information about the Credential, conforming to the . For example:
This is an optional property that defines information about the type of Verifiable Credential, conforming to the . For example:
This is an optional property that defines information about the expiration date of a Verifiable Credential, conforming to the . For example:
Note that this is the same for and for . For example:
To verify a Credential, you can either pass the full Credential body or the JWT proof. These can be either obtained from a or from a Verifiable Presentation presented to the user.
Learn about Verifiable Credentials and Presentations
If you want to learn more about what
Make sure you've , then you can start to:
Set up your account
Set up your account with cheqd Studio and get your API key to start using the APIs.
Credo
Credo is an SDK which supports the European Architecture and Reference Framework (ARF) standards as well as AnonCreds with full cheqd support for DIDs.
Veramo
The Veramo SDK Plugin supports JSON, JSON-LD credentials as well as cheqd Credential Payments in an SDK.
Walt.id Community Stack
Walt.id Community Stack is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support.
DID Registrar
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
cheqd Cosmos CLI
Cosmos CLI which directly communicates with the cheqd network. This should only be used for testing environments.
JSON based JWT Verifiable Credential (spec)
✔️
✔️
✔️
✔️
✔️
JSON-LD Verifiable Credential (spec)
✔️
✔️
✔️
✔️
✔️
AnonCreds (spec)
❌
✔️
✔️
❌
❌
Selective Disclosure-JWT Credential (spec)
❌
✔️
✔️
⌛(roadmap)
✔️
SD-JWT
Selective Disclosure JWT (SD-JWT) is the most commonly adopted credential format for European Digital Identity Ecosystems, allowing users to selectively disclose which attributes they would like to share in a presentation.
AnonCreds
AnonCreds is a credential format maintained by the Hyperledger Foundation, with functionality for zero knowledge proofs (ZKPs) and selective disclosure.
Users are also able to suspend Verifiable Credentials. The difference between revocation and suspension is that suspended Credentials may be unsuspended at a future date; whereas, revoked credentials are permanently revoked.
It is best practice for issuers to keep a record of the Credentials they have issued, including the "statusListIndex
" of the Credentials. From this record system, issuers should be able to fetch either the full Credential Body or the JWT proof of the Credential they want to suspend.
When suspending a Credential, issuers can decide whether they want to publish an updated Status List on-ledger, with the suspended credential index updated in the bitstring. The parameter below can be changed to reflect this:
Paste the Credential Body or JWT into the API below and execute the API to suspend the Credential.
If a Credential has been suspended, and an Issuer wants to unsuspend the Credential to make it once again valid, the Issuer can reinstate a suspended Credential.
It is best practice for issuers to keep a record of the Credentials they have issued, including the "statusListIndex
" of the Credentials. From this record system, issuers should be able to fetch either the full Credential Body or the JWT proof of the Credential they want to unsuspend.
When unsuspending or reinstating a Credential, issuers can decide whether they want to publish an updated Status List on-ledger, with the unsuspended credential index updated in the bitstring. The parameter below can be changed to reflect this:
Paste the Credential Body or JWT into the API below and execute the API to unsuspend the Credential.
Learn how cheqd's Credential Payments work
Build your knowledge about how cheqd's Credential Payment model works, including setting Access Control Conditions, and privacy-preserving payment flows.
Using cheqd Studio, you can get started setting up your encrypted Status Lists with Access Control Conditions below:
t
Understand how to issue a Verifiable Credential including an encrypted Status List in the body.
Issuers are able to add encrypted Status Lists to the body of the Credential if they have previously created an Encrypted Status List on-ledger.
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:
Follow the tutorial here to create an encrypted Status List with a set of Payment Conditions to unlock:
Follow the instructions within the /credential/create
API below to format and issue a Verifiable Credential.
Ensure that the "statusListName
" and "statusPurpose
" are the same as the Status List created in Step 3. This makes sure that if the Credential Status is changed, for example, if it is revoked or suspended, the correct Status List will be updated.
How a Verifier pays an Issuer to decrypt an encrypted Status List
cheqd Studio supports payments for verifying Credential Status. This is an innovative feature that is also commonly known as cheqd's Payment Rails. Using the API in this tutorial, there are multiple ways for a Verifier to pay an Issuer to unlock and verify a Credential's status.
A Verifier will need a cheqd Studio account to take advantage of the /credential-status/check
API and easily use cheqd's Credential Payments. Make sure you are set up and are logged in, using our guide below:
Using the /credential-status/check
API, users have two options for checking whether a particular Credential index is revoked or suspended:
Filling out a simple form using the application/x-www-url-form-encoded
option on the Swagger UI.
Compiling the JSON transaction yourself using the application/json
option on the Swagger UI.
This is the easiest way to check whether a particular credential index is revoked or suspended.
Using the application/x-www-url-form-encoded
option on the Swagger UI, users are able to choose between the following variables to compile your DID:
To automatically make a payment to an Issuer in order to verify an encrypted Status List, there is an additional variable:
If there is sufficient CHEQ in the account of the Verifier, this will automatically make a payment to the Issuer and meet the Access Control Conditions.
In the same action, the Credential Service will perform a verification check on the Credential Status and pay the issuer the fee specified in the Payment Conditions.
The response format below will indicate clearly whether the check is successful and whether the Credential index in question is revoked / suspended or not.
If a Verifier does not want to automatically pay the Issuer using the API, they can choose to make a manual payment to unlock the Credential Status information to build a higher level of trust within the Credential presented to them.
If a Verifier wants to unlock access to the Resource, to gain access to additional information about a Credential presented to them, such as the Credential Status, firstly, the Verifier will be presented Credential, including a link to the Status List within the "credentialStatus"
section of the Credential body.
Through following the link in"credentialStatus"
section of the Credential body. the The Verifier will be directed to an on-ledger Resource, identifiable through a DID URL, for example:
This on-ledger Resource will contain:
An encrypted potion of the Resource, such as a Status List bitstring. identified by the "encodedList"
property.
Unencrypted metadata about the Resource, including the issuers' payment address "feePayerAddress"
and and the Payment Conditions, "feePaymentAmount"
and "intervalInSeconds"
.
This gives the verifier requisite information they need in order to pay the Issuer to unlock the Credential Status. You can learn more about Access Control Conditions below.
Using one of cheqd's supported wallets, Verifiers can make a payment of the amount specified in the "feePaymentAmount"
to the "feePayerAddress"
.
This payment should be made in CHEQ.
Note that the "feePaymentAmount"
may be specified in ncheq. This is lowest denomination of the CHEQ token, "nano" CHEQ which is 1 x 10^-9 CHEQ.
cheqd Studio will perform a verification check on the Credential Status and pay the issuer the fee specified in the Payment Conditions.
Note the "intervalInSeconds
" which is the amount of time after making the payment that the Verifier has to hit the API and request access to the encrypted Status List.
The response format below will indicate clearly whether the check is successful and whether the Credential index in question is revoked / suspended or not.
Alternatively, if Verifiers have made the payment manually they can also use the /credential/verify API in the tutorial below:
Understand how cheqd's Payment Rails work with Access Control Conditions
The Access Control Conditions outlined in this section establish a secure and structured framework for unlocking encrypted Status Lists and other DID-Linked Resource.
By employing a combination of Decentralised Identifiers (DIDs), DID-Linked Resources, encryption, and timed payment mechanisms, these access control conditions safeguard the integrity of the Resource, promote transparency, and control access to its data.
For Credential Payments, the predominant Access Control Condition is a payment made from the Verifier of a Credential back to the Issuer.
The payment conditions outlined in the code snippet below define the payment requirements that must be met to access and interact with an encrypted Resource. These are written into a payload.json
file when a create Status List transaction is made to the ledger (see section below on creating an encrypted Status List).
These conditions are established to ensure that authorized entities or users contribute a specified fee before gaining access to the Resource.
The parameters within the payment conditions are defined as follows:
"type"
"timelockPayment"
Indicates that a timelock payment mechanism is employed. Currently, this is the only type that is supported.
"feePaymentAddress"
"cheqd1xl5wccz667lk06ahama26pdqvrkz5aws6m0ztp"
Specifies the cheqd address to which the payment fee should be sent. This address is associated with the entity managing the Status List (Issuer) and who will receive the payment.
"feePaymentAmount"
"147603000000000ncheq"
Defines the amount of the payment fee. In this case, the fee is specified in the smallest unit of CHEQ, (ncheq).
"intervalInSeconds"
3153600000
Sets the duration of the timelock interval, measured in seconds. The verifier must make the payment within the specified time frame relative to a particular block-time on the cheqd blockchain. If the payment is successfully confirmed within this interval, the Verifier's access to the Resource is granted. However, if the payment claim is made outside of this window, it may be considered invalid, and the verifier's access to the Resource may be denied.
By including these payment conditions in the Status List Payload, the ledger enforces a financial gate from verifiers seeking access. Additionally, the timelock mechanism adds a layer of time-based verification to the payment process. With the timelock, the payment can only be made in a specific time-interval from the latest block-time on the cheqd network. This ensures that historical payments cannot be used to meet the access control conditions, and fresh payments need to be made to access the Resource, helping to maintain the integrity of the payment and access process.
If a Payment Condition is set upon creation of a Status List or other Resource, this will populate an Access Control Condition which is broadcasted across series of nodes to monitor whether the conditions have been met. The Access Control Condition uses query language to directly fetch information from the cheqd ledger, and is fully derived from the inputs made into the Payment Condition.
Each of these conditions are defined as follows:
"conditionType"
"cosmos"
Specifies the type of condition being employed, indicating that the access control condition is related to the Cosmos blockchain ecosystem
"path"
"/cosmos/tx/v1beta1/txs?events=transfer.recipient='cheqd1xl5wccz667lk06ahama26pdqvrkz5aws6m0ztp'&events=transfer.amount='147603000000000ncheq'&order_by=2&pagination.limit=1"
Defines the query path to retrieve specific transaction events from the cheqd blockchain. It filters transactions with a recipient address and amount matching certain criteria, orders the results, and limits the query to one transaction.
"chain"
"cheqdMainnet"
Specifies the blockchain network (chain) being used, indicating that the condition applies to the cheqd Mainnet.
"method"
"timelock"
Specifies the access control method being utilized, which is a timelock mechanism.
"parameters"
"latest"
Provides parameters for the access control method. In this case, it refers to the "latest" state on the blockchain
"key"
"$.tx_responses.*.timestamp"
Specifies the key path within the transaction responses to extract the timestamp of the transaction.
"comparator"
"<="
This checks if the extracted timestamp is less than or equal to the provided value.
"value"
"3153600000"
Defines the value (in seconds) against which the extracted timestamp is compared. This value represents a time interval.
Once an Access Control Condition has been set, the decryption keys are sharded between an array of nodes to prevent any single node or few malicious nodes from decrypting the data. This comprehensive setup ensures secure and controlled access to the specified resource based on specified criteria and events from the cheqd blockchain.
Using cheqd Studio, you can get started setting up your encrypted Status Lists with Access Control Conditions below:
The /credential-status/update/encrypted
API enables users to update the indices of a Status List or rotate the encryption keys. This may be useful for revoking Credentials in bulk, rather than submitting individual /credential/revoke
requests.
When a new encrypted Status List resource is published, this will also encrypt the latest version with a new set of encryption keys. This may therefore be used to rotate encryption keys, even if the listed indices are kept the same.
Creating an encrypted Status List 2021 Resource using cheqd Studio
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:
"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.
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.
Establish end-to-end trust using cheqd's trust registry infrastructure
Trust Registries enable a Relying Party to determine the authenticity and authorization of a legal entity within a digital credential ecosystem. Trust Registries are crucial to establish for production environments, because they allow relying parties to make informed decisions on whether to trust the credentials they receive.
cheqd has pioneered a industry-leading trust registry solution, allowing users to create hierarchical chains of trust, with each trust registry entry being DID-Resolvable.
cheqd supports multiple Trust Registry Data Models, using its flexible DID and DID-Linked Resource architecture. Users should familiarise themselves with each Trust Registry approach before getting started with our APIs.
Learn about a data model below:
Start building with our cheqd Studio APIs and configure a trust registry for your digital credential ecosystem:
cheqd's Trust Registry model can work in conjunction with the Eclipse Foundation's TRAIN implementation for establishing secure Roots of Trust and Trust Registry policy resolution.
Verifiable Credentials (VCs) are, in most cases, issued by legal entities. The purpose of Verifiable Credentials is to provide the Relying Party that receives the credentials a Level of Assurance (LoA) that the attributes and claims within the credential are legitimate. However, it is not currently easy to determine whether a legal entity issuing a credential is in fact the entity they claim to be, and not, a fraudulent misrepresentation of that legal entity. This is the challenge that Trust Infrastructure and Trust Registries are positioned to solve.
Note: This Trust Registry challenge is a significant problem for the digital credential industry, and often inhibits the technology reaching a production stage of readiness.
At present, legal entities that issue credentials have no mechanism to establish that they are trustworthy; thus, Relying Parties may not recognise the DIDs signing the Verifiable Credentials they receive. To fully establish trust, Relying Parties need to know who issued the VCs, whether the issuer is recognised as trusted within a particular governance framework, and who accredited the issuer for the purpose of issuing the credential.
To solve this industry-wide challenge, cheqd introduces a Verifiable Trust Infrastructure, that directly complements the model created by EBSI. Within cheqd's Trust Infrastructure, users can create hierarchical chains of trust "Trust Chains" that together encapsulate a "Trust Registry" for a given ecosystem.
The Trust Infrastructure Model also includes permissions and policies set via "Verifiable Accreditations" and an overall "Governance Framework". Herein, permissions govern the scope of , while policies are used to define who made the accreditation; which Trust Framework is followed; and, the legal basis of the credential.
cheqd Trust Infrastructure users make the whole Verifiable Trust Model publicly available by registering it as a collection of DID-Linked Resources on cheqd. cheqd's Trust Infrastructure therefore enables verifiers to automatically resolve and establish trust in hierarchies of trust without needing to know each organisation directly, using industry-standard resolution mechanisms defined in the W3C DID-Core and the DID Resolution Spec.
There are many terms used within this guide, and as such, familiarise yourself or refer back to the concepts within the glossary below:
-
Accreditation Policy
Part of a Verifiable Credential, using the termsOfUse
section to reference the parentAccreditation in the Trust Chain
DID
Decentralised Identifier
Legal entity identifier for Trust Registry, cannot be natural person in context of Trust Infrastructure
GA
Governance Authority
The legal entity or consortia responsible for writing the Governance Framework. In many instances the Governance Authority is also a Root TAO
GF
Governance Framework
A policy document outlining the purpose, roles, scopes and permissions for a given ecosystem using the Trust Infrastructure.
Root TAO
Root Trusted Accreditation Organization
Legal entity governing the whole trust chain
TAO
Trusted Accreditation Organization
Legal entity governing a trust chain segment
-
Trust Chain
Hierarchy of Verifiable Accreditations. Multiple Trust Chains may comprise a Trust Registry.
TI
Trusted Issuer
Legal entity participating in a trust chain as an issuer
-
Trust Infrastructure
The overall set of technical and governance components to establish end-to-end trust.
-
Verifiable Accreditation
Type of on-ledger Verifiable Credential that is specifically used for establishing governance permissions and policies
-
Verifiable Trust Model
Permissions with policies to either accredit, or to attest
cheqd's Trust Registry model is predicated on the notion of a trust hierarchy, which is conceptually very similar to traditional Public Key Infrastructure (PKI). Specifically, the model relies on a Root of Trust from which trusted relationships can be established.
In our model, each organisation in the trust hierarchy is able to issue Verifiable Accreditations to other entities, conveying a set of permissions or scopes that determine what the recipient entity is permitted to do.
The following diagram show how a Root TAO accredits two TAOs lower in the hierarchy:
where:
Root of Trust (rTAO) DID:
Controls Verifiable Accreditations (VAs) issued from rTAO to TAOs.
Accredited Org (TAO) DID:
Controls Verifiable Accreditations (VAs) issued from TAOs to Trusted Issuers.
Trusted Issuer DID:
Issues Verifiable Credentials with Issuance Policies
Verifiable Credentials
Issued including the Issuance Policies in the TermsOfUse
section of the data model.
Issued to Digital Identity Wallet of user or organisation, which can be later verified up the entire trust chain.
As shown in the diagram above, legal entities can play the following roles:
Root Trusted Accreditation Organisation (Root TAO)
Trusted Accreditation Organisation (TAO)
Trusted Issuer (TI)
A Trust Chain should contain all three roles, even if one single DID would represent all three roles. The roles must be RTAO, TAO, and TI, where only TI may issue domain-specific Verifiable Credentials.
The Root TAO is the owner of a Trust Chain, responsible for the governance of the whole Trust Chain. Root TAOs may:
accredit itself to govern or issue domain-specific Verifiable Credentials
accredit TAOs to govern a segment of the Trust Chain
accredit a Trusted Issuer to issue domain-specific Verifiable Credentials
revoke an accreditation from a legal entity that is participating in the Trust Chain
The RTAO permission is defined by VerifiableAuthorisationForTrustChain
, and the policies are contained in termsOfUse
as TrustFrameworkPolicy
.
A TAO governs an accredited segment on behalf of the RTAO. It may:
accredit itself to issue domain-specific Verifiable Credentials
accredit another TAO to govern a segment of the Trust Chain
accredit a Trusted Issuer to issue domain-specific Verifiable Credentials
revoke accreditation from a legal entity that was accredited by the TAO
The TAO permission is defined by VerifiableAccreditationToAccredit
, and the policies are contained in termsOfUse
as AccreditationPolicy
.
A Trusted Issuer represents the Issuer in a Trust Chain. It may issue domain-specific Verifiable Credential types defined by the received accreditation.
Note that issuers may issue Verifiable Credentials outside the Trust Chain, but these are not associated or recognised by a Root TAO and therefore contain no weight within the Trust Chain's governance framework.
The TI permission is defined by VerifiableAccreditationToAttest
, and the policies are contained in termsOfUse
as AccreditationPolicy
. When the Trusted Issuer is using their accreditation to issue a domain-specific VC, the issued domain VC must contain a termsOfUse
property with AttestationPolicy
type, which links to the Trusted Issuer's accreditation and into Root TAO's accreditation, where both are located in TIR.
The Governance Framework Policy is a document, written by a Governance Authority, that defines requirements that must be met for the Trust Ecosystem. These requirements may include security, legal, operational, or functional requirements and may relate to regulation, directives, national policy, or similar documents.
All Trust Model policies are located in the termsOfUse
property of the corresponding Accreditation or credential that contains the permissions related to the policy.
Accreditations are certifications of being qualified to accredit or attest. Accreditations are attribute-driven and are always restricted to domain-specific credential types. These restrictions cannot be extended. For example, if a legal entity is accredited to accredit Issuers of diploma VCs, they may only pass this or a subset downstream of the hierarchy. Depending on the accreditation, the accredited legal entity may govern (accredit) or issue (attest), but always within the Trust Model and the accredited boundaries.
Each Verifiable Accreditation is also associated with an AccreditationPolicy
in the termsOfUse
section of the credential. This Policy links to the parent or root accreditation to enable verifiers to traverse the trust registry.
All Verifiable Credentials are attestations of something. Any issuer may issue credentials (default), while accredited Trusted Issuers may issue domain-specific VCs with the accreditation, by attaching the AttestationPolicy
into termsOfUse
.
End Users (legal entities or natural persons) can accumulate multiple Verifiable Credentials from one or many Trust Models.
Credential Payments brings a significant evolution to the Verifiable Credentials landscape, allowing verifiers to directly pay issuers to unlock Credential Status information. Underneath the hood, we've engineered a robust and secure payment flow that streamlines the end-to-end payment process, with accuracy, speed, and cryptographic integrity.
Create encrypted Status Lists on-ledger, and pay to unlock the Access Control Conditions in CHEQ, using our cheqd Studio Payments APIs:
Build your understanding of How Credential Payments work, including Access Control Conditions and how the model preserves privacy.
Below are a list of alternatives for using Credential Payments.
Trust Registries are referenced within Accreditaiton Policies in the Verifiable Credential body. This enables Relying Parties to traverse the trust chain and verify that the issuer, accrediting entity (TAO) and Root of Trust (rTAO) are all legitimate entities.
Within the body of the Verifiable Credential, issuers will need to configure the termsOfUse
section to reference DIDs or DID URLs of trust registry entries, for example:
Users are able to issue Verifiable Accreditations to determine the validity of the accreditation, as well to traverse the trust chain to a root of trust.
Make sure you have already created at least one Verifiable Accreditation that you are able to query in the verify API.
As a Trusted Accreditation Organisation (TAO), it is possible to accredit Sub-Trusted Accreditation Organisations (SubTAOs) to issue Verifiable Accreditations or Verifiable Attestations.
The Verifiable Accreditation should include:
Root TAOs can set permissions under which TAOs must abide. This creates a level of codified governance for the trust ecosystem.
Whereby:
The Root TAO can also set polices known as the AccreditationPolicy
within the termsOfUse
section of the Verifiable Accreditation.
Whereby:
Create, update and fetch Status Lists on cheqd, stored as a DID-Linked Resources
Status Lists are generally sets of indices which can be used to mathematically derive whether an issued Credential has been revoked, suspended or is still valid. Status Lists are crucial for verifier applications to determine whether to accept a credential, presented by a holder.
There are many different ways to create status lists on cheqd, with options for easy integration (e.g. cheqd Studio) and more bespoke integrations (e.g. Credo and Veramo). Below are a list of options for creating cheqd DIDs.
There are two predominant Status List formats supported in cheqd Studio. Please choose a Status List type below to get started.
Update indices in Status List
The /credential-status/update/unencrypted
API enables users to update the indices of a Status List. This may be useful for revoking Credentials in bulk, rather than submitting individual /credential/revoke
requests.
Issue Verifiable Accreditations as DID-Linked Resources
Users are able to issue Verifiable Accreditations as DID-Linked Resources on-ledger, which may be used to verify whether a particular recipient of an accreditation is accredited to issue a certain type of credential, under the scope of a particular governance framework. This implementation on cheqd builds on the principles of the EBSI Trust Chain model, using DID-Linked Resources to create a more standardised format for storing, retrieving and dereferencing to trust registry entries.
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can create a Verifiable Accreditation, you need to create a DID which is used to link to one or multiple Verifiable Accreditations on-ledger. Use the API in the page below to create a DID:
Verifiable Accreditations are JSON objects that take the form of the Verifiable Credential data model. There are three types of Verifiable Accreditation:
For each accreditation type, the user will need to use a different request format for the API.
For a trusted ecosystem, these attestations are required to trace the legitimacy of a credential issuer to a root-of-trust.
For a trusted ecosystem, these attestations are required to trace the legitimacy of a credential issuer to a root-of-trust.
Owing to the design of DID-Linked Resources, following the creation of the a Verifiable Accreditation, users are able to reference the specific version, or create a query to always fetch the latest version of the Accreditation.
Using a DID Resolver or the search DID endpoint, users can find the DID URL and unique resourceId of the Verifiable Accreditation. The unique resourceId allows users to specify this exact version of the Accreditation.
In the DID Document Metadata, users should find "linkedResourceMetadata", like the following snippet:
Here, the "resourceURI
" specifies the DID URL of the specific Verifiable Accreditation that was created.
In order to reference the latest version of the Verifiable Accreditation, the following construction needs to be used:
did:cheqd:<namespace>:<resourceCollectionId>?resourceName=<resourceName>&resourceType=<resourceType>
For example:
did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit
In order to reference the Verifiable Accreditation at a particular point in time, the following construction needs to be used:
did:cheqd:<namespace>:<resourceCollectionId>?resourceName=<resourceName>&resourceType=<resourceType>&resourceVerionTime=<XMLDateTime>
For example:
did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=OxfordUniversityAccreditation&resourceType=VerifiableAccreditationToAccredit&resourceVersionTime=2023-02-22T06:58:18.61Z
Figure 1: Graphic showing the StatusList2021 bitstring
The issuer keeps a bitstring list of all Verifiable Credentials it has issued. The Status List is usually published by the issuer in the format of its own Verifiable Credential. This Verifiable Credential is generally hosted publicly on a centralised server or domain to enable third-party read-access.
Create Status List 2021 Resource on cheqd.
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can create a Status List, 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 the /credential-status/create/unencrypted
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 within an API client of your choice.
Compiling a Status List payload yourself using the application/json
option within an API client of your choice.
This is the easiest way to create unencrypted 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, users are able to choose between the following variables and options to create an unencrypted Status List on-ledger:
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:
Once the Issuer has populated the requisite information for the unencrypted Status List request, they can use the API below to submit it to the ledger.
Token Status List is a specification from the Internet Engineering Task Force, using JSON or CBOR encoded sets of bits and wrapping these as either a JSON Web Tokens (JWTs) or CBOR Web Tokens (CWTs), to comprise a full status list.
The specification may be found below:
The /credential-status/search
API allows users to search for specific entries of a Status List on the cheqd network. For example, if there are multiple Status Lists associated with the same DID, the search functionality allows applications to make requests only to a specified Status List.
Users are able to filter by:
Execute the filters from Step 1 on the API below:
Understanding cheqd's API product offering, cheqd Studio
cheqd Studio is a set of guides, tutorials and APIs to help users establish an end-to-end trusted ecosystem for digital credentials.
Using REST APIs, customers can build cheqd's trust infrastructure into existing applications. All of cheqd’s existing open-source libraries remain available, and cheqd Studio does not necessitate developers to switch their SSI stack in their entirety, but allows them to build into their existing tooling, for example alongside APIs such as the Universal Resolver.
With cheqd Studio, there are multiple ways it can be deployed and hosted to support clients with different requirements.
This mode is the most simple for users, allowing cheqd to custody both Cosmos AND Identity keys in Veramo KMS. This means that manages both ledger-writes and signing identity transactions on behalf of the customer.
To ensure this is highly secure, we have deployed an instance of a Veramo Key Management Store (KMS) which uses a Postgress DB (TypeOrm) to store Cosmos AND identity keys in one encrypted table, so it cannot be read in plaintext. This design allows us to segment different customers' keys securely and efficiently.
Within Custodian mode, we also enable clients to toggle
Client-managed mode gives the cheqd Studio user the ability to utilise their own identity keys for signing identity transactions, while still allowing cheqd Studio to manage the CHEQ account keys for writing to the cheqd network. This mode is intended to be used for more production environments where the user signs each identity transaction independently, affording a greater level of security and control to the client.
Full client-managed mode is still in development and we will update this documentation as and when it becomes available
Below are a list of alternatives for integrating with cheqd. Each offers a different set of protocols and underlying technical capabilities.
Credo is an SDK which and regular Verifiable Credentials natively with cheqd support.
Walt.id SSI Kit is an SDK that supports the standards for identity, with full cheqd support.
The Status List v2021 supported in cheqd Studio utilise to represent whether a Verifiable Credential has been suspended/revoked or not. A bitstring can be thought of as a long list of 1s and 0s, where, if the binary value of the position in the list is 1 (one), the is revoked, if it is 0 (zero) it is not revoked.
Each issued Credential correlates with a position and index on the bitstring, so that a verifier will be able to correlate the value within the Credential against the public bitstring to ascertain whether the Credential has been revoked or not, using a as well as a .
cheqd stores each Status List and subsequent entries on-ledger as versions. This has notable benefits, including the provenance, legitimacy and security of the Status List. For a full list of benefits, see .
Users are able to create entries on-ledger, in order to revoke or suspend Verifiable Credentials. This is a derivation from the core spec made by cheqd to support a more decentralized and resilient approach to storing Status Lists.
When , a user will have the following options:
For the purpose of this tutorial, we will assume the user is creating an unencrypted Status List. For encrypted Status Lists, .
Enter the Decentralized Identifier (DID) of the Status List publisher . For example:
cheqd Studio directly leverages our , making a wide array of features available from launch, including:
We use similar techniques to Password Managers such as and to ensure that even if the database were to be compromised, the keys would remain encrypted and unusable.
We use a self-hosted version of , which supports OpenID Connect. Theoretically, these values could also be replaced with or any other OpenID Connect identity provider.
Default role update using : LogTo supports webhooks to fire of requests to an API when it detects certain actions/changes. If you want to automatically assign a role to users, a webhook is recommended to be setup for firing off whenever there's a new account created, or a new sign-in.
Under the hood, cheqd Studio leverages our for its identity functionality. Check out our to understand how cheqd Studio fits together with our other Open Source packages.
Our objective in building DID-Linked Resources on cheqd is to improve the way resources are stored, referenced and retrieved for our partners and the broader SSI community, in line with the existing .
Full discussion and details on the
Verify Credential
Verify a W3C Verifiable Credential using the cheqd Studio APIs.
Access Control Conditions
Familiarise yourself with how the Payment gating and Access Control Condition logic works.
Privacy Considerations
Understand how privacy is preserved throughout the Credential Payments flow.
Charge for Status List
Set your payment conditions and encrypt a Status List 2021 Resource.
Issue Credential with Encrypted Status List
Issue a Verifiable Credential referencing an encrypted Status List in the Credential body.
Verifier pays Issuer
Pay an Issuer directly in CHEQ, meeting the Access Control Conditions. Verify the Credential to view the Status information.
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.
Charge for Status List
Create an encrypted Status List on-ledger with Payment Conditions to unlock, to charge for unlocking Status Lists.
Issue Credential
Issue a W3C conformant Verifiable Credential using the cheqd Studio APIs.
Set up your account
Set up your account with cheqd Studio and log in to start using the APIs.
Understanding Access Control Conditions
Learn what different Payment Conditions mean and how they affect a Verifier when verifying Credentials.
Charge for Status List
Set your payment conditions and encrypt a Status List 2021 Resource.
Issue Credential with Encrypted Status List
Issue a Verifiable Credential referencing an encrypted Status List in the Credential body.
Verifier pays Issuer
Pay an Issuer directly in CHEQ, meeting the Access Control Conditions. Verify the Credential to view the Status information.
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.
Issue Verifiable Accreditation
Issue Verifiable Accreditations between DIDs on the cheqd Network, to accredit the DID to perform a certain action.
Verify Verifiable Accreditation
Verify Verifiable Accreditations to determine whether a DID is trustworthy, and is accredited by a Root of Trust
RTAO -> TAO
Learn about how Root TAOs can accredit other TAOs in the trust ecosystem with permissions and Trust Framework Policies.
TAO -> SubTAO
Learn about how TAOs can accredit other SubTAOs in the trust ecosystem with permissions and Accreditation Policies.
TAO - TI
Learn about how TAOs can accredit Trusted Issuers to issue credentials within the trust ecosystem, using permissions and Accreditation Policies.
Referencing Trust Registry within a Verifiable Credential
Learn how a Trusted Issuer can reference a Trust Registry in an issued credential, enabling a relying party to traverse the Trust Chain.
Issuer
DID of the TAO
did:cheqd:testnet:a2b675de-33d0-4044-8183-0d74f210cceb
Subject
DID of the SubTAO that is being accredited
did:cheqd:testnet:e66a9416-d03e-4ced-95e3-07af16e25bc5
Credential Subject
A set of structured permissions around what credentials the SubTAO is accredited to issue, and in which jurisdiction.
See below
Terms of use
A set of policies setting out the scope of Trust Chain for Relying parties to validate against.
See below
schemaId
Schema of the Verifiable Accreditation that the SubTAO is accredited to issue themselves
types
Types of Credential that the SubTAO is accredited to issue
limitJurisdiction
Permission that the TAO can set to limit the jurisdictional scope of the credentials issued in the ecosystem
type
Must be AccreditationPolicy
parentAccreditation
The DID URL of the Accreditation issued by another TAO or the Root TAO to the TAO
rootAuthoroisation
The DID URL of the Root of Trust Verifiable Authorsation
trustFramework
Name of Governance Framework set by the Governance Authority
trustFrameworkId
URL linking to where the written Governance Framework is stored
Verifiable Authorisation for Trust Chain
This Accreditation authorises the recipient to issue Accreditations with reference to a particular governance framework.
Verifiable Accreditation to Accredit
This Accreditation verifies that an organisation has the permissions needed to accredit other organisations for issuing a particular type of Verifiable Accredittion.
Verifiable Accreditation to Attest
This Accreditation verifies that an organisation has the permissions needed to issue Verifiable Credentials, defined by a particular schema.
"issuerDid"
Yes
The DID of the Issuer of the Accreditation
"subjectDid"
Yes
The DID of the Recipient of the Accreditation
"schemas"
Yes
A schema or multiple schemas that the recipient is accredited to issue
"format"
Optional
Defaults to "jwt" but may also be "json-ld"
"accreditationName"
Yes
Name of the accreditation which is used for chronological versioning of the accreditation.
"trustFramework"
Yes
A URL that points to an Ecosystem Governance Framework
"trustFrameworkId"
Yes
The name of the Ecosystem Governance Framework
"credentialStatus"
Optional
An object detailing the status information of the Accreditation
"issuerDid"
Yes
The DID of the Issuer of the Accreditation
"subjectDid"
Yes
The DID of the Recipient of the Accreditation
"schemas"
Yes
A schema or multiple schemas that the recipient is accredited to issue
"format"
Optional
Defaults to "jwt" but may also be "json-ld"
"accreditationName"
Yes
Name of the accreditation which is used for chronological versioning of the accreditation.
"parentAccreditation"
Yes
A URL or DID URL of Accreditation of the Issuer demonstrating capacity to issue this Accreditation.
"rootAuthorization"
Yes
A URL or DID URL of the root authorization governing the ecosystem
"credentialStatus"
Optional
An object detailing the status information of the Accreditation
"issuerDid"
Yes
The DID of the Issuer of the Accreditation
"subjectDid"
Yes
The DID of the Recipient of the Accreditation
"schemas"
Yes
A schema or multiple schemas that the recipient is accredited to issue
"format"
Optional
Defaults to "jwt" but may also be "json-ld"
"accreditationName"
Yes
Name of the accreditation which is used for chronological versioning of the accreditation.
"parentAccreditation"
Yes
A URL or DID URL of Accreditation of the Issuer demonstrating capacity to issue this Accreditation.
"rootAuthorization"
Yes
A URL or DID URL of the root authorization governing the ecosystem
"credentialStatus"
Optional
An object detailing the status information of the Accreditation
Create Status List v2021
Create a Status List v2021 on cheqd as a DID-Linked Resource
Update Status List v2021
Update a Status List v2021 to revoke/suspend credentials
Check Status List v2021
Check whether a specified indices is revoked, suspended, unsuspended or valid
Search Status List v2021
Search for specific entries in the Status List, traversing its history
As a Trusted Accreditation Organisation (TAO), it is possible to accredit Trusted Issuers (TIs) to issue Verifiable Attestations.
The Verifiable Accreditation should include:
Issuer
DID of the TAO
did:cheqd:testnet:e66a9416-d03e-4ced-95e3-07af16e25bc5
Subject
DID of the Trusted Issuer that is being accredited
did:cheqd:testnet:f6e731f0-5bfb-429b-b2c7-e65a951d7b5e
Credential Subject
A set of structured permissions around what credentials the Trusted Issuer is accredited to issue, and in which jurisdiction.
See below
Terms of use
A set of policies setting out the scope of Trust Chain for Relying parties to validate against.
See below
Root TAOs can set permissions under which TAOs must abide. This creates a level of codified governance for the trust ecosystem.
Whereby:
schemaId
Schema of the Verifiable Accreditation that the SubTAO is accredited to issue themselves
types
Types of Credential that the SubTAO is accredited to issue
limitJurisdiction
Permission that the TAO can set to limit the jurisdictional scope of the credentials issued in the ecosystem
The Root TAO can also set polices known as the AccreditationPolicy
within the termsOfUse
section of the Verifiable Accreditation.
Whereby:
type
Must be AccreditationPolicy
parentAccreditation
The DID URL of the Accreditation issued by another TAO or the Root TAO to the TAO
rootAuthoroisation
The DID URL of the Root of Trust Verifiable Authorsation
trustFramework
Name of Governance Framework set by the Governance Authority
trustFrameworkId
URL linking to where the written Governance Framework is stored
Once created, issuers of Verifiable Credentials may want to reference resources within the body of issued Verifiable Credentials.
As mentioned in the section on Context for Resources, this may be useful for referencing:
Schemas;
Status lists;
Trust registries;
Visual Representations of Verifiable Credentials;
Documents; or
Logos
within the contents of Verifiable Credentials themselves.
Below is an example of a Verifiable Credential for an IIW event ticket which includes a fully qualified DID URL for the schema and logo, using resources on-ledger.
The schema in the above Credential dereferences to the following data:
This guide provides common errors and potential fixes for them if you encountered errors when setting up Veramo CLI.
@cheqd/did-provider-cheqd
This error typically happens when the version of did-provider-cheqd
is incompatible with the version of Veramo CLI being used.
This can happen if you didn't use the npm -g
("global") flag when installing the packages, and have a conflicting package version for any of the required packages in the folder where you executed this command from.
To verify if this is the case, check the version number of globally-installed NPM packages. Your list may be shorter or longer than this list, but pay close attention to the @cheqd/did-provider-cheqd
and @veramo/cli
versions.
Compare and contrast this from the output from the same folder where the command failed without the --global
/ -g
flag:
In this example above, you'll see that the version of the @veramo/cli
package is not the same one as the global one. This could equally happen with the @cheqd/did-provider-cheqd
version.
Doing a global install for both packages will ensure that you've got the correct packages, regardless of which folder the agent.yml
file is kept in.
This error is thrown if the cosmosPayerMnemonic
value is set to an incorrect number of words (it should either be 12 or 24 words), or if it's left to the default value of 'your cosmos payer mnemonic'
.
Note: You can use the same mnemonic for both mainnet and testnet, since the same account address has separate balances on different networks.
Heads-up: Even if you're trying it on testnet
you still need to put cosmosPayerMnemonic
for your mainnet
(You can use the same cosmosPayerMnemonic
). Otherwise, you will still be getting the same error as above when you run veramo config check -f agent.yml
.
wget -c https://raw.githubusercontent.com/cheqd/did-provider-cheqd/main/agent.yml
command is giving you errorsFirst, create agent.yml
file at root
directory level.
Second, go to this url, copy everything from there and paste it in your agent.yml
file. And you're good to go. 😉
If you're looking to use the Veramo CLI with cheqd or develop a proof-of-concept application, use the official Veramo CLI setup guide.
Node version recommended Nodev16
. You can install Node here
This step is exactly as described in Veramo CLI docs:
Note: Depending on your system permissions, you might be prompted for additional permissions. Add sudo
to the beginning of the command in case that happens.
Verify the installation was correct. Command below should output latest version of veramo you installed.
did-provider-cheqd
packageInstall the did-provider-cheqd
NPM package in a similar fashion:
You can check all of your NPM package versions by running the command:
agent.yml
configuration fileDownload the agent.yml
file that contains the configuration for cheqd network to be used with Veramo CLI.
You can do this in terminal through:
Note: Alternatively, you can also fetch this by cloning the did-provider-cheqd
repository.
agent.yml
file in an editor to customise the configYou can open the agent.yml
in a text editor/IDE of your choice to edit a few mandatory settings.
In terminal, you can edit the agent.yml
file using an editor like nano
:
Make sure you provide the actual relative/absolute path to the file.
By default, the did-provider-cheqd
package has a default SQLite database password, but it's a good idea to modify and change this to a new key unique to your install.
Take the key generated and replace the value under dbEncryptionKey
in the agent.yml
file.
In order to be able to read/query did:cheqd
entries from the ledger, you need to configure a REST API endpoint for a cheqd DID Resolver instance.
The default value is set to resolver.cheqd.net
, which is an instance of the cheqd DID Resolver hosted by the cheqd team. This DID Resolver instance can handle requests for did:cheqd:mainnet
as well as did:cheqd:testnet
namespaces.
If you want, you can replace the url
property with a different REST API endpoint for a different instance of the cheqd DID Resolver.
Note: This configuration is an advanced step and not recommended for most users. Skip it and continue to the next step in most cases, unless you know why you want to switch the resolver interface.
If you plan on interacting with multiple DID methods using Veramo CLI, you can alternatively query did:cheqd
using a Universal Resolver instance instead. This allows your CLI configuration to handle any DID method supported by Universal Resolver.
Firstly, comment out the custom did-cheqd-resolver
entry and uncomment the universal-resolver
entry. This tells Veramo CLI to use the Universal Resolver interface for did:cheqd
.
Also comment out this section for the did-cheqd-resolver
:
Finally, uncomment and configure the universal-resolver
interface:
In order to add cheqd-testnet to your Keplr extension, please follow the following instructions:
Go to Axelar to add a custom network, then replace everything with cheqd-testnet json configuration below.
While reading/querying from the cheqd ledger incurs no cost, if you want to create/update a DID to cheqd ledger, you need to pay transaction fees for the ledger writes.
You need to configure this in under didManager
section as shown above, where you'll need to edit:
cosmosPayerMnemonic
: Mnemonic associated with your cheqd/Cosmos SDK account. This is only stored locally, and the mnemonic is used to reconstitute the account address and keys used to pay for the transaction.
rpcUrl
: For both did:cheqd:mainnet:
as well as did:cheqd:testnet:
sections, you can specify a Cosmos SDK RPC endpoint. This endpoint is where transactions are sent to. By default, this is populated with rpc.cheqd.net
(for mainnet) and rpc.cheqd.network
(for testnet), but you can can modify this to a different hosted RPC endpoint for cheqd or even your own local/private RPC endpoint.
defaultProvider
: The default cheqd network is set to did:cheqd:testnet
to allow developers to test out network functionality. However, if you prefer, you can switch this out to did:cheqd:mainnet
instead.
agent.yml
file and exitMake sure all your edits above are persisted and saved to a file that you can access.
Once you've completed Step 2 above, verify that your Veramo configuration is accurate using the following command. If your configuration is correct, you should get a success message like the one below.
If the
config check
throws an error, check out our troubleshooting guide for Veramo CLI setup to see common errors and fixes.
Now that your Veramo CLI installation is successfully set up to work with cheqd, try following our tutorials for creating a new DID or querying existing DIDs.
Create a DID-Linked Resource associated with a cheqd DID over REST API
Using the /resource/create
API, users are able to create custom DID-Linked Resources, including:
Schemas
Credential Definitions
Trust Registries
Status Lists
Logos associated with DIDs
Governance files
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can create a DID-Linked Resource, you need to create a "parent" DID which is used to link the Resource on-ledger. Use the API in the page below to create a DID:
DID-Linked Resources can be any type of file or content that is below ~45kb in size.
For the purpose of an example, lets use an AnonCreds schema (JSON file) as the resource:
Save this file locally and call it something like resource.json.
Prepare a file with resource and encode it into base64, base64url
or hex
. On Unix systems, you can use the following command input:
Expected output:
Resources are grouped by having identical names and types. This means if you want to create a new version of the same Resource, you will need to specify the same name and type in the following request.
Update a Token Status List JWT or CWT as a new DID-Linked Resource
Create a JWT or CWT file with the updated indices and bits for the updated Status List.
Save this file locally and call it something like statusListTokenUPDATED.json
Note that each JWT or CWT must be below ~45kb in size.
Prepare a file with resource and encode it into base64, base64url
or hex
. On Unix systems, you can use the following command input:
Expected output:
To create a new version you must use the same "name" and "type" for your resource, and ensure that the new Token Status List resource is being created underneath the same DID as your initial DID. You will also need to be logged into the same cheqd Studio account that you used to create the initial Token Status List to have access to the keys to sign the update.
For Token Status Lists, the "type" MUST be: "TokenStatusList"
.
For example:
In self-sovereign identity (SSI) ecosystems, “resources” are often required in tandem with W3C Verifiable Credentials, to provide supporting information or additional context to verifiers receiving Verifiable Presentations.
For example, common types of resources that might be required to issue and validate Verifiable Credentials are:
Schemas;
Status lists;
Trust registries;
Visual Representations of Verifiable Credentials;
Documents; or
Logos
Schemas describe the fields and content types in a credential in a machine-readable format. Prominent examples of this include schema.org, Hyperledger Indy schema objects, etc. You can think of them as a template for what is included in a Verifiable Credential.
Below is an example of a schema.org residential address with full URLs:
This might also take the form of evidence schemes, which describe additional information about the processes used to validate the information presented in a Verifiable Credential in common, machine-readable format.
Prominent examples of this include Schema.org, Hyperledger AnonCreds SCHEMA
objects, etc.
Status lists allow recipients of a Verifiable Credential exchange to check the status of a credential for validity. Prominent examples of this include the W3C Status List 2021
specification, Hyperledger AnonCreds Revocation, etc.
Trust registries enable recipients of a Verifiable Credential exchange to check that the Decentralized Identifier of the issuer is listed in a trusted registry. This provides a level of assurance in the authenticity of the issuer. Examples of Trust Registries include the ToIP Trust Registry Specification, EBSI Trust Registry API, etc.
Although Verifiable Credentials can be exchanged digitally, in practice most identity wallets want to present “human-friendly” representations. Examples of this include the Overlays Capture Architecture (OCA) specification, Apple Wallet PassKit (".pkpass
"), Google Wallet Pass, etc. A resource, using something like Overlay Capture Architecture (OCA) may enable a credential representation to be shown according to the brand guidelines of the issuer, internationalisation (“i18n”) translations, etc.
Figure 1: Overlays Capture Architecture Specification Version 1.0.0
Such visual representations can also be used to quickly communicate information visually during identity exchanges, such as airline mobile boarding passes.
Figure 2: Mobile boarding passes in Apple Wallet showing different visual styles (source: British Airways media centre)
In the example above from British Airways, the pass at the front is for a “Gold” loyalty status member, whereas the pass at the back is for a “standard” loyalty status member. This information can be represented in a Verifiable Credential, of course, but the example here uses the Apple Wallet / Google Wallet formats to overlay a richer display.
While it’s useful to have digital credentials that can be verified cryptographically, the reality is that there are often occasions when a quick “visual check” is done instead. For example, when at an airport, an airline staff member might visually check a mobile boarding pass to direct people to the correct queue they need to join. The mobile boarding pass does get scanned at points like check-in, security, boarding etc., to digitally read the information, other scenarios where this is not done are equally valid. However, most Verifiable Credential formats do not explicitly provide such “human-friendly” forms of showing the data held in a credential.
More broadly, there are other types of resources that might be relevant for companies beyond SSI vendors, that want a way to represent information about themselves in an immutable and trustworthy way.
Many companies require documentation such as Privacy Policies, Data Protection Policies or Terms of Use to be made publicly available. Moreover, Trust over IP (ToIP) recommends making Governance Frameworks available through DID URLs, which would typically be a text file, a Markdown file, PDF etc.
Companies may want to provide authorised image logos to display across different websites, exchanges or block explorers. Examples of this include key-publishing sites like Keybase.io (which is used by Cosmos SDK block explorers such as our own to show logos for validators) and “favicons” (commonly used to set the logo for websites in browser tabs).
The current uses for resources are therefore very broad across the SSI ecosystem, and in addition, for other companies that may want to use DIDs to reference relevant information on ledger. For this reason, it is essential that the SSI community strengthens the way that resources are stored, referenced and retrieved in SSI ecosystems.
In our demo for IIW, we showed an IIW logo as a resource on-ledger, being used within the body of a Verifiable Credential. In the JSON below, you will be able to see the resources being used in both the "@context" and "logo" sections.
By clicking the image below, you will see that this is actually being pulled and resolved from the cheqd ledger:
There are multiple approaches to decentralised identity which rely on centralised infrastructure across different technical layers. Decentralised Identifiers (DIDs): are often stored on ledgers (e.g., cheqd, Hyperledger Indy, distributed storage (e.g., IPFS in Sidetree), or non-ledger distributed systems (e.g., KERI). Yet, DIDs can be stored on traditional centralised-storage endpoints (e.g., did:web, did:git.
The issue of centralisation affects resources providing extra context and information to support Verifiable Credentials. These resources, such as schemas and revocation lists, are often stored and referenced using centralised hosting providers.
Using centralised hosting providers to store resources may have a significant difference in the longevity and authenticity of Verifiable Credentials. For example, a passport (which typically has a 5–10 year validity) issued as a Verifiable Credential anchored to a DID (regardless of whether the DID was on-ledger or not) might stop working if the credential schema, visual presentation format, or other necessary resources were stored off-ledger on traditional centralised storage.
DIDs could be tampered by compromising the hosting provider: DIDs and DID Documents ("DIDDocs") stored at a centralised web endpoint can be compromised and replaced by malicious actors.
Hosting providers could unilaterally cease to host particular clients: Hosting providers could terminate accounts due to factors such as non-payment of fees, violation of Terms of Service, etc.
Single point-of-failure in resiliency: Even for highly-trusted and sophisticated hosting providers who may not present a risk of infrastructure being compromised, a service outage at the hosting provider can make a DID anchored on their systems inaccessible.
Even for highly-trusted and sophisticated hosting providers who may not present a risk of infrastructure being compromised, a service outage at the hosting provider can make a resource anchored on their systems inaccessible.
The high centralisation of cloud providers and history of noteworthy outages clearly demonstrates why we should not host resources on centralised cloud storage in production environments. In Q1 of 2022, the three largest players in the cloud (AWS, Google Cloud, Microsoft Azure) dominated with 65 per cent in nearly all regions (outside of China).
Figure 3: Breakdown of global cloud provider market share (source: CoinTelegraph)
Beyond cloud providers, there are other events that exemplify the issuers relying on larger players. The Facebook outage of 2021 (shown in the graph below) took down apps that used “Login with Facebook” functionality. This highlights the risks of “contagion impact” (e.g., a different Facebook outage took down Spotify, TikTok, Pinterest) of centralised digital systems — even ones run by extremely-capable tech providers.
Figure 4: Graph showing drop in Facebook traffic from their global service outage in 2021 (source: Kentik)
Likewise, with decentralised identity, there has been excellent work to decentralise, with standards that remove the need for centralised intermediaries — notably around Verifiable Credentials and the decentralised trust provided by DID Authentication. Yet, all of this excellent work may be eroded in practice, unless every component of an SSI ecosystem is able to maintain an equivalent level of decentralised trust. Resources are currently an area that has been centralised for the sake of convenience.
"Link rot" happens when over time, URLs become inaccessible, either because the endpoint where the content was stored is no longer active, or the URL format itself changes. The graph below from an analysis by The New York Times of linkrot shows degradation over time of URLs.
Figure 5: Linkrot analysis over 1996-2019 by New York Times (source: Columbia Journalism Review / New York Times)
For this reason, keeping an up-to-date version of the links themselves is crucial. Furthermore, a study of link rot found at least 66.5% of links to sites in the last 9 years are dead. This can have an adverse impact on the digital longevity of Verifiable Credentials if there’s “link rot” in the resources necessary to process the credential. For this reason, projects such as The Internet Archive’s Wayback Machine exist to snapshot digital ephemera before they are lost forever.
Figure 6: Pie chart showing root causes of link rot (source: Ahrefs)
This illustrates that link rot can affect a significant proportion of links in a relatively small amount of time, and once again, looking at how resources are currently stored in SSI ecosystems, if the resource locations are moved and the links are broken, the Verifiable Credentials relying on these resources become unusable. Therefore, resources, once defined, should be architected to be used and referenced indefinitely, without being changed.
Finally, the centralised way that resources are currently stored and managed is not immutable, and as a result, it is liable to tampering. For example, if a hosting provider is compromised, or if malicious actors are working for the company, resources may be changed and previous resource versions may be purged from the central database.
As we move towards a new web infrastructure with Web 3 (and beyond…), and as more projects leverage blockchain and distributed ledgers, it’s important not to port the previous issues of the web, and instead find novel ways to better manage information, with longevity in mind. This is why at cheqd, we have decided to redesign the way resources are captured on the ledger.
Solutions that do currently store schemas on ledger (e.g., Hyperledger Indy) don't have semantic linkage between old and new versions. In this instance, current ledgers allow new versions to be made but don't offer an easy way for client apps to discover linkages as they evolve over time.
We took the following design principles into consideration, along with an explanation of how we addressed them:
Built using existing, familiar DID Core Spec patterns: Wherever possible, our design attempts to utilise existing patterns and behaviours within the W3C DID Core specification (such as the use of DID URLs to identify resources), instead of trying to implement proprietary/custom approaches. We believe that similar designs could be adopted by other DID methods if they choose.
Protection against linkrot for long-term retrieval: Any Resource stored on-ledger is replicated across multiple nodes.
If any individual node or endpoint is down, lookup requests can be sent to any other node on the network.
In a catastrophic scenario where the network itself stops to exist, e.g., companies shutting down, getting acquired etc the on-ledger data can still be restored by digital archivists using ledger snapshots. A practical example of this is how Cosmos Hub makes historical chain archives available which can be restored. While this can be cumbersome, we wanted to design for this as a fail-safe.
Extensible by default: Our objective was to build a flexible design pattern that allowed developers to define and extend their own resource types. Trying to control what kinds of resources could be written to ledger would make the ledger-side logic complex. Instead, we opted for a design where the cheqd ledger acts agnostically to store resources, as long as correctly authorised, as a permanently-accessible endpoint.
Design for DID-spec "dumb" as well as DID-spec "smart" client applications: Many approaches in this space assume that client applications must be adept at parsing DIDDocs and resolving complex inter-DIDDoc relationships. We saw describing resources using DIDDocs as metadata about the resource which could be independently-parsed by "smart" client applications; while also providing a fallback approach for "dumb" client applications. We internally considered this as "What if an identity wallet understood how to parse JSON, but didn't understand the DID Core spec?"
Version controlled: The ability to evolve a resource over time is critical for identity use cases. As described above, examples of this include when identity document schemas change, logos evolve, etc. Current approaches (such as Hyperledger Indy CredDefs) deal with this by creating entirely new, unlinked resources. We designed to make it easy, using existing DID Core specification techniques, so that client applications could query "What was the version of a resource with this name on this date/time?"
Make re-use of resources simple: We liked the concept of Schema.org in the sense that it promotes a common, machine-readable specification. Therefore, our design allows for patterns where the controllers of a DID can reference resources created by other DID owners/controllers, e.g., referencing a pre-existing schema. Taking this line of thought further, it allows for an arbitrary depth of how resources can be nested, as long as they are discoverable/resolvable.
Notalltypes of resources should be stored on a ledger...but can be made discoverable through similar design patterns: Distributed ledgers are great for redundancy, but the cost of this duplication (in terms of storage required by node, block size, transaction finality speeds, etc) can be quite significant. For instance, a distributed ledger is probably not the best storage and retrieval mechanism for a video file (which can run into many GBs/TBs); or even a PDF larger than a few MBs. cheqd network restricts the block size for an individual block to ~200 KB. This can be updated via an on-ledger vote, but the trade-off of asking node operators to provision ever-expanding storage would be not ideal. Our design therefore restricts the file/payload size of on-ledger resources (in our case, ~190 KB - giving enough room for transaction data besides the resource itself), while allowing the same techniques below to be used for describing off-ledger resources. E.g., our first DID on cheqd network references a 7+ MB image accessible via IPFS. We recognise and accept that DID owners/creators may choose to use their own centralised/decentralised storage, and the design patterns described below accommodate that.
Learn more about the technical details on learn how we have architected DID-Linked resources, and how we achieve these design principles.
Querying Status List entries or indices
Using the /credential-status/check
API, users are able to query specific Credential indices within a Status List to ascertain whether the Credential is revoked, suspended or currently valid.
Using the /credential-status/check
API, users have two options for checking whether a particular Credential index is revoked or suspended:
Filling out a simple form using the application/x-www-url-form-encoded
option on the Swagger UI.
Compiling a DID Document body yourself using the application/json
option on the Swagger UI.
This is the easiest way to check whether a particular credential index is revoked or suspended.
Using the application/x-www-url-form-encoded
option on the Swagger UI, users are able to choose between the following variables to compile your DID:
To automatically make a payment to an Issuer in order to verify an encrypted Status List, follow the tutorial here:
Instead of using simple parameters, users can submit a JSON payload to the same effect using the application/json
option on the Swagger UI. For example:
Execute the API request using the API below:
Search and query for DID-Linked Resources
The /resource/search
API allows users to search for specific entries of a Resource on the cheqd Network. For example, if there are multiple Resources associated with the same DID, the search functionality allows applications to make requests only to a specified Resource.
As a Root of Trust (RTAO) entity, it is possible to accredit Trusted Accreditation Organisations to issue Verifiable Accreditations or Verifiable Attestations.
The Verifiable Accreditation should include:
Issuer
DID of the Root of Trust (RTAO)
did:cheqd:testnet:8ea036da-f340-480d-8952-f5561ea1763c
Subject
DID of the TAO that is being accredited
did:cheqd:testnet:a2b675de-33d0-4044-8183-0d74f210cceb
Credential Subject
A set of structured permissions around what credentials the TAO is accredited to issue, and in which jurisdiction.
See below
Terms of use
A set of policies setting out the Governance Framework for the ecosystem
See below
Root TAOs can set permissions under which TAOs must abide. This creates a level of codified governance for the trust ecosystem.
Whereby:
schemaId
Schema of the Verifiable Accreditation that the TAO is accredited to issue themselves
types
Types of Credential that the TAO is accredited to issue
limitJurisdiction
Permission that the RTAO can set to limit the jurisdictional scope of the credentials issued in the ecosystem
The Root TAO can also set polices known as the TrustFrameworkPolicy
within the termsOfUse
section of the Verifiable Accreditation.
Whereby:
type
Must be TrustFrameworkPolicy
trustFramework
Name of Governance Framework set by the Governance Authority
trustFrameworkId
URL linking to where the written Governance Framework is stored
The example below shows a Verifiable Accreditation that is issued by an rTAO to a TAO, specifying a schema under which the recipient is able to use for issuing their own accreditations.
For all Verifiable Accreditations, the accreditations are stored as DID-Linked Resources (DLRs), linked to the DID of the Accreditor. This means that the Accreditations are publically available, fully DID resolvable and are signed by the authentication
keys within the DID Document of the Accreditor.
To issue a Verifiable Accreditation, follow the tutorial below:
Create a Token Status List JWT or CWT as a DID-Linked Resource
Users are able to create Token Status List entries on-ledger, which may be used to represent whether a Verifiable Credential is active, inactive or suspended. This implementation on cheqd is a derivation from the core spec made by cheqd to support a more decentralised and resilient approach to storing Token Status Lists.
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can create a Status List, 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:
Token Status Lists are JWT or CWT files that reference lists of bits formatted in JSON or CBOR.
Save this file locally and call it something like statusListToken.json
Note that each JWT or CWT must be below ~45kb in size.
Prepare a file with resource and encode it into base64, base64url
or hex
. On Unix systems, you can use the following command input:
Expected output:
DID-Linked Resources are grouped by having identical names and types. This means if you want to create a new version of the same Resource, you will need to specify the same name and type in the following request.
For Token Status Lists, the "type" MUST be: "TokenStatusList"
.
For example:
Ensure that you link this Token Status List to the DID that you created in step 3. This will sign the resource with the same verification method keys in your DID Document, ensuring cryptographic integrity and Controllership of the Status List.
As a DID-Linked Resource, the Token Status List will have a fully resolvable DID URL which can be referenced within the body of Verifiable Credentials, and queried by verification policies to establish the status of the specific credential.
Owing to the design of DID-Linked Resources, following the creation of the Token Status List, users are able to reference the specific version, or create a query to always fetch the latest version of the Token Status List.
Using a DID Resolver or the search DID endpoint, users can find the DID URL and unique resourceId of the Token Status List. The unique resourceId allows users to specify this exact version of the Token Status List.
In the DID Document Metadata, users should find "linkedResourceMetadata", like the following snippet:
Here, the "resourceURI
" specifies the DID URL of the specific Token Status List that was created.
In order to reference the latest version of the Token Status List, the following construction needs to be used:
did:cheqd:<namespace>:<resourceCollectionId>?resourceName=<resourceName>&resourceType=<resourceType>
For example:
did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=DegreeCredentialStatus&resourceType=TokenStatusList
In order to reference the Token Status List at a particular point in time, the following construction needs to be used:
did:cheqd:<namespace>:<resourceCollectionId>?resourceName=<resourceName>&resourceType=<resourceType>&resourceVerionTime=<XMLDateTime>
For example:
did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=DegreeCredentialStatus&resourceType=TokenStatusList&resourceVersionTime=2023-02-22T06:58:18.61Z
This tutorial offers step-by-step guidance on how to create a subject DID to be used for a holder that will receive a Verifiable Credentials.
⚠️ Before you begin...
It is also easily managable by a client agent as a full ledger backup for the writing of a DID / DID Doc is not required, thereby making it easily reproducable in a client environment.
This off-ledger DID, of type did:key
, is used for the recipient of the Verifiable Credential and Verifiable Presentation using:
did:key
provider and KMSSelect did:key
as the provider when prompted as well as a key management system (KMS) to use (default is local
).
The KMS is stored in a local SQLite database.
This is the nickname for your DID, which will be managed by Veramo KMS. Providing a memorable alias will help reference this for future uses, e.g., Alice off ledger DID
.
Once you have entered this, you will receive a response in a table, e.g:
If you got the table above, your off-ledger did:key
has been created
Using UUIDs, we can have a high level of confidence that no two identical resource IDs will ever be created. This is important for ensuring the integrity and uniqueness of each individual resource.
Figure 1: DID-linked Resource DID URL path
This will be explained further in the section on DID URL dereferencing to fetch a resource.
Resources are organised into groups called "Collections". Each DID may have an associated Collection, and the Collection ID is derived from the unique identifier of the DID.
Collections can store any type of Resource, but for the purpose of this documentation we will focus on the use case where the Collection is used for storing a set of schemas.
The most important concept used in this design is that each on-ledger Collection is identified using a DID and is described using a DID Document.
The DID Document acts as metadata, providing information about the Collection, such as who is able to update it, when it was created and what are the latest and deprecated versions of Resources within the Collection.
For example, the following DID:
did:cheqd:mainnet:1f8e08a2-eeb6-40c3-9e01-33e4a0d1479d
will derive the Collection ID: 1f8e08a2-eeb6-40c3-9e01-33e4a0d1479d
Figure 2: Relationship between a DID and Resource Collection
A Collection is created using a createResource
transaction, and specifying the Collection ID as the same identifier as that of the parent DID.
To create a "DID-Linked Resource", you must already have created a 'parent' DID, from which the Collection ID can be derived. When you carry out the createResource
transaction, you must:
Generate a new, unique UUID for the Resources
Specify the same Collection ID as the unique identifier of the parent DID
Sign the createResource
transaction with the Verification Method keys of the parent DID.
This is shown in the diagram below:
Figure 3: Relationship between a DID and DID-linked Resource
Example of createResource
transaction using Veramo SDK:
Multiple, DID-Linked Resources can be stored in a Collection, for example, this could be different versions of the same Resource over a period of time or semantically-linked resources. This enables unique resources to be stored directly on-ledger and be retrievable through DID resolution and dereferencing.
Once you have created a resource, the DID Document will automatically reference the resource and the collection within the didDocumentMetadata
in a newly defined section called linkedResourceMetadata
.
This relationship is shown in the diagram below:
Figure 4: DID Document metadata with DID-linked Resource metadata
For simplicity, we will focus on the use case where a Resource is a schema. The same logic used in fetching schemas from the ledger can be applied to any of the aforementioned types of Resources.
The syntax of a Resource metadata for a single schema is as follows:
The following list defines which specific parameters a resource request format may contain:
The following list defines which specific parameters a resource response format may contain:
Let’s take a look at a fully resolved output response for a DID with a Collection and single associated Resource:
Let’s take a look at a fully resolved output response for a DID with a Collection and multiple associated Resources:
Collections are identified by a Collection ID which is a unique identifier of the linked, parent DID. Within the DID Document Metadata of the Collection DIDDoc, the Linked Resource metadata describes Resources within this Collection:
Note that the Linked Resource output above does not show the actual data / schema attributes when displaying all Resources in this Collection. It only shows Resource metadata.
This logic prevents GetResourceCollection
requests returning large quantities of data, which may be stored across multiple Resources within a Collection.
In order to fetch the actual data, it is necessary to query the specific Resource, rather than the entire Collection.
As shown in the examples above, there may be previous and next versions of the Resource ID.
Whenever a Resource is updated, a new UUID must be generated. The new Resource references the older version, so the UUID is effectively a version number.
Importantly, the collectionId,
resourceName
and the resourceType
of the Resource must remain the same.
For example, a Resource with the name PassportSchema
must always have the same name and resource type to be considered for previous/next version linking.
This could be used, for example, to find the version active at a particular point in time:
Fetching resources using DID resolvers and DID URLs is hugely desirable. Up until this point, we have shown resources identified using path-based syntax.
However, query-based syntax should also be enabled to allow more granular and specific searches within a particular Collection.
IMPORTANT: DID URL queries should be fully qualified so that they uniquely identify a single resource, or single resource version unless expressly specified.
A Decentralized Identifier "DID" is a globally unique identifier that does not require a centralized registration authority because it is registered with distributed ledger technology or other form of decentralized network.
Below are a list of alternatives for creating cheqd DIDs.
t
When you try to generate keys
along with DIDDoc
template using command below
If you encounter an error below
Unexpected token v in JSON at position 1
Create a .json
file (e.g. name it something like identity-keys-on-the-fly-with-did-docs.json
in same working directory level).
Copy and paste the content from below into your newly created .json
file. You can choose from any of the inputs and arguments below:
For example:
Then, instead of passing it as argument, we'll pass it as a file. Use command below to do it.
The above command will output something like this (i.e. a template DID DOC with the keys)
Then you can go back to your payload.json
file (if you didn't have one you can simply create one manually, and paste content below as template) which should be something like this at first.
Then you're going to update keys
and document
section of it (payload.json
) with keys
and didDoc
you generated in above step.
After populating keys
and document
section. Your payload.json
file should look something like this:
Assuming you have enough ncheq
tokens inside your wallet, you can now run the command below to create your DID.
If the above cmd
resulted something like this:
Account does not exist on chain. Send some tokens there before trying to query sequence.
This means you don't have enough tokens in your wallet.
After successfully creating your DID, you should see something like this:
Notice, controllerKeyId
is now the publicKeyHex
you generated the firstly. i.e did is know associated to you via publickKeyHex
or you're the controller of this the DID you created. 😄
Follow these instructions to update an existing did:cheqd
entry on cheqd ledger.
⚠️ Before you begin...
Construct your payload.json
file like this:
Where importantly:
denom
: ncheq (smallest denomination classification)
amount
: 10000000000 (This is 10 CHEQ by default and will not work with a different value)
Then try running the command below to deactivate the did
:
Follow these instructions to create a new DID and publish the associated DID Document on cheqd ledger.
⚠️ Before you begin...
You can use the following command in your CLI to create your DIDDoc and associated identity keys:
You can pass the payload of the inputs and arguments as a file rather than inline using:
You can reuse this example file:
Within this command, you are able to choose from the following inputs below to produce different types of DIDDocs:
Once you have submitted the command above, you should receive a DID Document draft template, including a set of identity keys, including your chosen inputs and arguments. You can find an example of this output below:
payload.json
filesThe below examples show the variation in syntax for different verification method key types in the DIDDoc payload file itself. Note that each key type has a slightly different output.
kms
(default local
): Key Management System (KMS) to be used for storage.
alias
: A human-friendly alias for the DID. Only used locally when referencing operations in Veramo CLI.
document
: Full body of the DID Document
versionId
: (optional): Custom versionId for the DID Document. If this is not set manually, then a UUID will be automatically generated for the DID Document version.
keys
: Keys used to sign the DIDDoc. These must match the ones specified in the DIDDoc, otherwise an error will be thrown.
fee
amount
: An array of coins, coins are represented as an object with 2 fields
denom
: ncheq (smallest denomination classification)
amount
: 50000000000 (This is 50 CHEQ by default and will not work with a different value)
gas
: Each transaction must specify the maximum amount of gas it may consume.
payer
(optional): The cheqd fee payer address
granter
(optional): The cheqd fee granter address, Provided the grantee has an allowance by the granter
If you do not specify the --argsFile
, you can also paste a JSON inline argument object by using the --argsJSON
flag followed by the JSON payload.
Follow these instructions to query a DID from cheqd ledger.
⚠️ Before you begin...
Use veramo did resolve <did>
to resolve a DID. For example:
TIp: If you have followed along the process of creating a did. You can put your did instead.
The output should look like the following:
⚠️ Before you begin...
credential verify
functionInstead of piping the file like above, you can also verify the credential using the raw credential or JWT as follows:
Then enter the JWT or entire JSON credential including the JWT.
If the credential can be verified correctly, the response will be:
Credential verification is done by decoding the JWT proof and checking if it's tampered or not. Feel free to test this yourself by tampering with the jwt
contents in the credential:
If you belive you did everything right(created a verifiable credential and you did not tamper it), and for some reason you're getting
First, make sure you are using a node
with version 16
or above.
Second, change Veramo CLI version to @veramo/cli@latest -g
as previous versions cause few issues in verification. This will override the previous version you have installed.
Run command below to verify your JWT credential.
⚠️ Before you begin...
presentation verify
functionIf you have the generated Verifiable Presentation stored, pass it to the presentation verify
function:
If the verification is successful, you'll receive this response:
If you belive you did everything right(created a verifiable presentation and you did not tamper it), and for some reason you're getting
First, make sure you are using a node
with version 16
or above.
Second, Change veramo cli version to @veramo/cli@latest -g
as previous versions cause few issues in verification. This will override the previous version you have installed.
Run command below to verify your JWT presentation.
Follow these instructions to:
Generate identity keys on-the-fly WITH a draft DIDDoc
Generate standalone identity public/private keypairs
Convert identity key pairs generated using Veramo agent to other key encoding formats
⚠️ Before you begin...
Instead of creating identity keys standalone, you can generate them along with a DIDDoc template. This makes it far easier to handle different inputs and arguments, such as generating DID Docs with different key types.
You can use the following command in your CLI to create your DIDDoc and associated identity keys:
You can pass the payload of the inputs and arguments as a file rather than inline using:
You can reuse this example file:
Within this command, you are able to choose from the following inputs below to produce different types of DIDDocs:
Once you have submitted the command above, you should receive a DID Document draft template, including a set of identity keys, including your chosen inputs and arguments. You can find an example of this output below:
If you want to use identity keys outside of Veramo CLI, you can convert keys from one format to another.
For example, if you would like to convert from hex
to base64
, you can use the following generic approach:
This works with other encoding conversion libraries (i.e. multiformats
).
Getting started with Payment Rails for Verifiable Credentials
Credential Payments brings a significant evolution to the Verifiable Credentials landscape, allowing verifiers to directly pay issuers to unlock Credential Status information. Underneath the hood, we've engineered a robust and secure payment flow that streamlines the end-to-end payment process, with accuracy, speed, and cryptographic integrity.
Below are a list of alternatives for using Credential Payments.
Veramo SDK plugin supports two major digital Credential types. Below you can learn about these Credential formats:
Below are a list of alternatives for using Credentials with cheqd support. Each offers a different set of protocols and underlying technical capabilities.
Understand cheqd's SDK suite and choose the best fit for your project.
cheqd has integrated into a series of SDKs to enable third parties to create DIDs and resources, issue and verify Verifiable Credentials, using cheqd DIDs, DID Documents and Schemas.
cheqd is continually integrating into different software development kits to suit the needs of different partners and their clients.
Below is a comparison between our three initial supported SDKs, Veramo SDK for cheqd, Credo (formerly Aries Framework JavaScript) and Walt.id's SSI Kit.
This tutorial offers step-by-step guidance on how to issue a verifiable credential
⚠️ Before you begin...
did:key
subject DIDNormally, the credential holder will provide a did:key
DID 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.
Start credential generation using:
You'll be presented with an multiple options select:
Select which Issuer DID stored in your local storage you'd like to issue the credential from, e.g., did:cheqd:mainnet:zAXwwqZzhCZA1L77ZBa8fhVNjL9MQCHX
Select which subject DID from your local agent storage the credential should be issued to, e.g., did:key:z6Mkktr27VZ7TTFoTsD9p79JwtGnQDgJWKGrxJ79quE7M5Yx
.
This could the subject DID created in Step 1.
This is currently free-text. However, you can hit Enter to use VerifiableCredential
as 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 name
could refer to the name of an individual.
Enter the value of the claim type. For example, you specified name
as the claim type, the value could be Alice
.
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 No
at 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.
Note that the JSON is unordered so the output of the fields could be in a different order
To create an encrypted Verifiable Credential Status List v2021 with a set of Access Control Conditions, an Issuer will need to:
Compile a payload.json
file with requisite Access Control Conditions;
Submit a create Status List
transaction the the ledger.
Below are examples of encrypted Status List Payload files:
The provided code snippets above show two Status List Payload files for both Revocation and Suspension.
The Payload files are a crucial configuration element that establishes Payment Conditions for unlocking a Status List Resource. Let's break down the components of this code to understand how it achieves this access control mechanism:
Once an Issuer has compiled the Payload file, they can submit this to the ledger using the following transaction:
The ledger will acknowledge that this StatusList bitstring should be This indicates to the ledger that the Resource should be fully encrypted and only be decrypted upon the set conditions being met.
The following code snippet shows an example of an encrypted Status List broadcast on-ledger as a DID-Linked Resource:
Importantly, 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.
By utilizing cryptographic operations, specifying payment requirements, and ensuring data encryption, this configuration enhances the security, integrity, and controlled access to the Status List, aligning with the principles of decentralized and secure identity management.
Walt.id Community Stack is an SDK that supports the standards for identity, with full cheqd support.
"DID-Linked Resources" are identified with a with a that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "resource ID". Through the "resource ID" or a set of DID URL query parameters, applications are able to persistently access a digital resource on the cheqd network.
Make sure you've correctly for Veramo CLI
We chose to use for the holder because the specification has a lot synergy with cheqd did method, .
Using also keeps holder DIDs off-ledger. This is very important for the privacy and data protection of the holder. If holder DIDs and DIDDocs were stored on-ledger, this could constitute a risk where data written within the DIDDoc could not be removed in line with a holder's right to be forgotten.
Creating a subject DID can be achieved through both the Veramo CLI, or directly through an application that has been setup to read and write to the cheqd ledger, using the Veramo SDK for cheqd.
The file used for the Veramo SDK for cheqd has a preloaded local key management system which is bootstrapped along with the CLI.
"Resources" are identified with a with a that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "resource ID".
Note that the Collection ID may take the syntactical form of a 'Hyperledger Indy' DID identifier or may be a . This is described in the .
Any (colloquially known as "file type") is allowed as an on-ledger Resource. The only restriction is that the Resource should fit within a block, which de-facto restricts it to ~190KB to fit within the ~200KB block limit. Any files larger than this are recommended to be stored and linked via long-term immutable file discovery mechanisms such as .
A based on the file extension of provided resource file. This makes it much simpler to maintain, since there is no list of file types that the cheqd ledger needs to gatekeep.
For more information about the particulars of requests and responses, please refer to our .
To enable combined resolution/dereferencing behavior, cheqd are defining multiple query-based parameters to fetch resource
or associated metadata. If a specification supports these parameters, and if a using that method includes the parameter with a valid value, then when a resolver calls the associated using that , the VDR returns the identified digital resource, not the .
Learn about DIDs If you want to learn about what
Learn about DIDs If you want to learn about what
This guide provides common errors and potential fixes for them if you encountered errors when .
You can go to cheqd's to get your account some test tokens.
Make sure you've correctly for Veramo CLI
If you would like to fetch the deactivated DIDDoc, execute the resolve
command as outlined . You can check if didDocumentMetadata
has the deactivated
flag set to true.
Make sure you've correctly for Veramo CLI
The first step is generating a template for your DID Document, including a new DID and associated public/private key pair. This process also aligns with method 1 .
It is important to note that this step does not create your DID on ledger, but it generates your identity keys as a draft DID Document for you to use in the on-ledger transaction in .
You can then use this template to populate your payload.json
file in .
After running the above command, if you see an unexpected error, follow our to fix it. A common error is:
Once you have created a template for your DIDDoc and generated your keys, and before creating a DID on-ledger, you will need to prepare the payload.json
file. This file can be saved where ever you choose, but the location must be specified in the create DID command used in . (By default, it will be saved under the project root directory.)
You should copy and paste the output of as an initial starting template for your payload.json
file.
Note that transaction fees are paid by the cheqd account set in the agent.yml
configuration file, . Each of cheqd's on-ledger identity transactions has a fixed fee, . If your account has insufficient balance the transaction will fail.
If your transaction is successful, you'll receive a success message along with the transaction details. You can on-ledger.
If you are using testnet, you can top-up your testnet balance using our .
You can also configure your Keplr wallet to .
If you are using mainnet, you can .
Check out our to see common errors and fixes.
Make sure you've correctly for Veramo CLI
DID queries are passed and handled using . You can also check out the API endpoints exposed by the DID Resolver to understand how this can be fetched/consumed outside Veramo CLI.
This tutorial offers step-by-step guidance on how to verify a , encoded as a , a
Make sure you've correctly for Veramo CLI
This tutorial assumes you have so that it can be cryptographically verified as untampered.
If you have the stored in a file, say, cred.json
, pass it to the credential verify
function:
Look into through Verifiable Presentations.
This tutorial offers step-by-step guidance on how to verify a .
Make sure you've correctly for Veramo CLI
The cryptographic verification in this tutorial will be based on JWT proof of a .
Make sure you've correctly for Veramo CLI
After running the above command, if you see an unexpected error, follow our to fix it. A common error is:
You can generate identity keys standalone in a plug-and-play format for future use in or transactions.
Learn about Verifiable Credentials and Presentations
If you want to learn more about what
Make sure you've correctly for Veramo CLI
The subject (holder) of this credential will be an off-ledger DID. 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:key
identities, and the identifier/handle they reveal when sharing a is context-dependent and better for privacy.
The issuer of the credential, on the other hand, uses since this needs to be publicly-accessible and cryptographically verifiable.
For the purpose of this tutorial though, we recommend you for the later steps.
jwt
for , encoded as a , a
lds
for , encoded as a , a
Learn about different types of Verifiable Credentials
If you want to learn more about different types of verifiable credentials
The assumption here is that you've either or .
is a major element of cheqd's roadmap.
You can save the generated Verifiable Credential, as you can later use it to or to others.
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.
Learn more about DID-Linked Resources
Understand the context and technical composition of cheqd's DID-Linked Resources.
Verifier pays Issuer
Understand how a Verifier pays an Issuer to decrypt an encrypted Status List and verify a Credential Status.
DID-Linked Resources
Learn about cheqd's approach to implementing DID-Linked Resources
Issue Verifiable Accreditation
Issue a Verifiable Accreditation to start a trust registry on cheqd
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:key
Alice off ledger DID
did:key:z6MkjxdqDUWoudesywsGYbzGozUeVYiYVArdoqPcMV6m6MG4
resourceUri
A string or a map that conforms to the rules of RFC3986 URIs which SHOULD directly lead to a location where the resource can be accessed from. For example: dic:cheqd:mainnet:46e2af9a-2ea0-4815-999d-730a6778227c/resources/0f964a80-5d18-4867-83e3-b47f5a756f02
resourceCollectionId
A string that conforms to a cheqd-supported unique identifier format. For example a UUID: 46e2af9a-2ea0-4815-999d-730a6778227c
resourceId
A string that uniquely identifies the resource, cheqd uses UUIDs. For example a UUID: 0f964a80-5d18-4867-83e3-b47f5a756f02
resourceName
A string that uniquelt names and identifies a resource. This property, along with the resourceType below, can be used to track version changes within a resource.
resourceType
A string that identifies the type of resource. This property, along with the resourceName above, can be used to track version changes within a resource. Not to be confused with media type.
resourceVersion
(Optional) A string that identifies the version of resource. This property is provided by the client and can be any value
alsoKnownAs
(Optional) An array that describes alternative URIs for the resource.
resourceUri
A string or a map that conforms to the rules of RFC3986 URIs which SHOULD directly lead to a location where the resource can be accessed from. For example: dic:cheqd:mainnet:46e2af9a-2ea0-4815-999d-730a6778227c/resources/0f964a80-5d18-4867-83e3-b47f5a756f02
resourceCollectionId
A string that conforms to a cheqd-supported unique identifier format. For example a UUID: 46e2af9a-2ea0-4815-999d-730a6778227c
resourceId
A string that uniquely identifies the resource, cheqd uses UUIDs. For example a UUID: 0f964a80-5d18-4867-83e3-b47f5a756f02
resourceName
A string that uniquelt names and identifies a resource. This property, along with the resourceType below, can be used to track version changes within a resource.
resourceType
A string that identifies the type of resource. This property, along with the resourceName above, can be used to track version changes within a resource. Not to be confused with media type.
resourceVersion
(Optional) A string that identifies the version of resource. This property is provided by the client and can be any value
alsoKnownAs
(Optional) An array that describes alternative URIs for the resource.
mediaType
A string that identifies the IANA-media type of the resource.
created
A string that identifies the time the resource was created in XML date-time.
updated
(Optional) A string that identifies the time the resource was updated in XML date-time.
checksum
A string that may be used to prove that the resource has not been tampered.
previousVersionId
(Optional) A string that identifies the previous version of the resource.
nextVersionId
(Optional) A string that identifies the next version of the resource.
Create cheqd DIDs (ADR)
✔️
✔️
✔️
✔️
cheqd Credential Payments
✔️
❌
❌
✔️
JSON based JWT Verifiable Credential (spec)
✔️
❌
✔️
✔️
JSON-LD Verifiable Credential (spec)
✔️
✔️
✔️
✔️
AnonCreds (spec)
❌
✔️
❌
✔️
Selective Disclosure-JWT Credential (spec)
⌛(roadmap)
✔️
✔️
✔️
Create on-ledger Schema (ADR)
✔️
✔️
❌
✔️
Create Credential Definition (spec)
❌
✔️
❌
✔️
DIDComm v1.0 (spec)
✔️
✔️
❌
✔️
DIDComm v2.0 (spec)
✔️
✔️
❌
✔️
DID Exchange Protocol (RFC 0023)
❌
✔️
❌
✔️
Agent Connection Protocol (RFC 0160)
❌
✔️
❌
✔️
Out of Band Protocol (RFC 0434)
❌
✔️
❌
✔️
Self Issued OpenID Provider v2 (OIDC-SIOP) (spec)
⌛(roadmap)
✔️
✔️
❌
OpenID for Verifiable Credential Issuance (spec)
⌛(roadmap)
✔️
✔️
❌
OpenID for Verifiable Credential Presentations (spec)
⌛(roadmap)
✔️
✔️
❌
Status List v2021 Revocation (spec)
✔️
❌
✔️
✔️
Token Status List
❌
✔️
✔️
✔️
AnonCreds Revocation Registry Definitions (spec)
❌
✔️
❌
✔️
AnonCreds Status List Entries (spec)
❌
✔️
❌
✔️
Issue Credential Protocol (RFC 0036)
❌
✔️
❌
✔️
Issue Credential Protocol V2 (RFC 0453)
❌
✔️
❌
✔️
DIF Presentation Exchange (spec)
✔️
✔️
✔️
✔️
Aries Present Proof 2.0 (spec)
❌
✔️
❌
✔️
DID-Linked Trust Registries
⌛(roadmap)
❌
❌
✔️
"kms"
"local"
This indicates that a local Key Management System (KMS) is being used for cryptographic operations, ensuring secure key handling.
"issuerDid"
"did:cheqd:testnet:322761ea-587d-454a-a955-745200301b99"
Specifies the issuer's Decentralized Identifier (DID), uniquely identifying the entity responsible for managing and issuing verifiable credentials.
"statusListName"
"status-list-2021-encrypted"
Names the Verifiable Credential Status List, providing context for its purpose.
"statusPurpose"
"revocation"
Defines the purpose of the status list. This can be either revocation or suspension.
"encrypted"
true
Indicates that the Verifiable Credential Status List, crucially, is encrypted, enhancing data privacy and security. This can be either true or false (unencrypted).
"paymentConditions"
[...]
Describes the payment conditions required for accessing the status list. In this case, a timelock payment mechanism is used, specifying the fee payment address, amount, and interval.
"returnSymmetricKey"
true
Specifies that the symmetric key for decrypting the status list will be returned.
"chain"
"cheqdTestnet"
Specifies whether the encrypted keys should be broadcast on cheqdMainnet
or cheqdTestnet
"network"
"serrano"
Specifies the network where the sharded decryption keys will be stored (across Lit Protocol)
This tutorial offers step-by-step guidance on how to create a Verifiable Presentation.
⚠️ Before you begin... Make sure you've correctly configured the cheqd plugin's agent settings for Veramo CLI
A Verifiable Presentation is a way a credential holder can generate cryptographicall-verifiable proof that they are in posession of the identity keys (e.g., did:key
) the credential was issued to.
This is important because just the Verifiable Credential and its JWT proof, on its own, is susceptible to replay attacks where intercepted Verifiable Credentials could be played back.
The process of creating a Verifiable Presentation is one way of addressing these security concerns.
Begin the process of creating a Verifiable Presentation using:
Specify the subject identity key to be used for signing Verifiable Presentation, e.g., chosen holder did:key
.
Tag
for the Verifiable PresentationHit Enter to accept the default at this step
Select how many verifiers will need to be able to verify the presentation.
This can be the same as the Verifiable Credential, or a sub-section of it. Choose Enter for default.
Select the DID of the verifier from the options presented. In a very simplistic scenario, the verifier could be the same as the issuer, e.g., a scenario where the holder returns a period of time to show they were issued a credential.
You can select one or more Verifiable Credentials to bundle up into the Verifiable Presentation.
After these choices are made, the Verifiable Presentation will be displayed in JSON format along with JWT proof.
Save this output in the folder you have been using throughout, saving as pres.txt
.
You will need to call on this to verify the presentation in the next step.
In a real-world usage scenario, the Verifiable Presentation output generated above would be electronically (e.g., as API messages) or non-electronically (e.g., encoded to a QR code) shared with the verifier/recipient.
Verifiers/recipients would then be able to verify the Verifiable Presentation to check cryptographically the contents are untampered.
Follow the instructions for issuing a Verifiable Credential here, including the credentialStatus
information, as shown in the example below:
Where the values within the credentialSubject field are as follows:
id
A specific DID URL dereferencing to the actual status of the Credential
type
The type
property MUST be StatusList2021Entry
statusPurpose
The purpose of the status entry MUST be a string. While the value of the string is arbitrary, the following values MUST be used for their intended purpose: revocation or suspension
statusListIndex
The statusListIndex
property MUST be an arbitrary size integer greater than or equal to 0, expressed as a string. The value identifies the bit position of the status of the verifiable credential.
statusListCredential
The statusListCredential
property MUST is a DID URL to a statusList Resource. When the URL is dereferenced, the resulting Resource MUST have type
property that includes the StatusList2021Credential
value.
The following process, or one generating the exact output, MUST be followed when validating a verifiable credential that is contained in a cheqd StatusList Resource.
Let credentialToValidate be a verifiable credentials containing a credentialStatus
entry that is a StatusList2021Entry, associated with an entry in a bitstring.
Let status purpose be the value of statusPurpose
in the credentialStatus
entry in the credentialToValidate.
Verify all proofs associated with the credentialToValidate. If a proof fails, return a validation error.
Verify that the status purpose matches the resourceType
value in the StatusList2021 Resource.
Let compressed bitstring be the value of the encodedList
property of the StatusList2021 Resource.
Let credentialIndex be the value of the statusListIndex
property of the bitstring in the StatusList2021 Resource.
Generate a revocation bitstring by passing compressed bitstring to the Bitstring Expansion Algorithm.
Let status be the value of the bit at position credentialIndex in the revocation bitstring.
Return true
if status is 1, false
otherwise.
Follow these instructions to update an existing did:cheqd
entry on cheqd ledger.
⚠️ Before you begin...
Make sure you've correctly configured the cheqd plugin's agent settings for Veramo CLI
Before updating the DID, you will need to prepare the updated DIDDoc and parameters for the transaction in an payload.json
file.
This file can be saved whereever you choose, but the location must be specified in the create DID command used in Step 2. (By default, it will be saved under the project root directory.)
kms
(default local
): Key Management System (KMS) to be used for storage.
did
: The did
that resolves to your DIDDoc
.
alias
: A human-friendly alias for the DID. Only used locally when referencing operations in Veramo CLI.
document
: Full body of the DID Document including updated sections.
versionId
: (optional) Custom versionId for the DID Document. If this is not set manually, then a UUID will be automatically generated for the DID Document version.
keys
: Keys used to sign the DIDDoc. These must match the ones specified in the DIDDoc, otherwise an error will be thrown.
fee
amount
: An array of coins, coins are represented as an object with 2 fields
denom
: ncheq (smallest denomination classification)
amount
: 25000000000 (This is 25 CHEQ by default and will not work with a different value)
gas
: Each transaction must specify the maximum amount of gas it may consume.
payer
(optional): The cheqd fee payer address
granter
(optional): The cheqd fee granter address, Provided the grantee has an allowance by the granter
Note that transaction fees are paid by the cheqd account set in the
agent.yml
configuration file, setup here. Each of cheqd's on-ledger identity transactions has a fixed fee, the pricing for cheqd DIDs and DID-Linked Resources can be found here. If your account has insufficient balance the transaction will fail.
Use the command below to construct and broadcast update transaction.
So, let's try to update service
section of our DIDDoc
. Then, your payload.json
file will look like this.
Note, that we are updating a service
section of in our DIDDoc
.
After you have updated the payload.json
file, run the command below to update the did
:
If you would like to fetch the updated DIDDoc body following the successful DID update result, execute the resolve
command as outlined here. You can check if service
section of DIDDoc
has been updated.
DID update operations can be complicated, especially when changing or updating keys, using multiple keys etc. Understand the design of the cheqd DID method and Verification Relationships in the W3C DID Core specification to understand the logic that is applied in these scenarios.
Create Verifiable Credential Status List v2021 on cheqd
The Status List 2021 Specification indicates that it may be desirable to store the actual StatusList using something like a Content Distribution Network to lessen the load on the server maintained by the issuer to return a result in real-time.
Using cheqd's Resource Module, the same benefits may be achieved. In fact, storing a StatusList as an on-ledger Resource is a much better application of technology than using a Verifiable Credential for the same purpose.
By storing a StatusList on the cheqd Network as a Resource, it creates a much more resilient and decentralised mechanism for storing and maintaining the revocation/suspension status of Verifiable Credentials. The benefits of using the cheqd Resource module over traditional centralised architecture are detailed here.
Moreover, cheqd's Resource Module enables individual Resources to be referenced and retrieved using a DID URL in conformance with DID Core. This is being standardized at the Trust over IP Foundation within a specification called DID URLs for Digital Resources.
Using the cheqd Resource module, the same content and semantics of StatusList2021 can be replicated, with additional benefits of enabling DID Resolvers to fetch the contents of the StatusList.
You can follow the tutorial to create a DID and DID Document here.
Let's assume that the following DID is created.
Prepare a file with the StatusList2021 bitstring encodedList
and encode it into base64
, following the same generate algorithm as in the Status List2021 Specification.
Note: The uncompressed bitstring MUST be at least 16KB in size to maintain herd privacy for the holder.
UUIDs are used to identify Resources. On Unix systems, the uuidgen
tool can be used to generate a new UUID.
Where the fields within the payload have the following meaning:
collectionId
The unique identifier of the parent DID, to link the Resource to a particular DID
id
A UUID for the resource, to enable it to be specifically referenced and fetched
name
This must be a unique name indicating the type
of Status List,
but also a qualifying name for the List. For example: ExampleStatusList2021
resourceType
This must indicate the statusPurpose.
This value should be either: StatusList2021Revocation or StatusList2021Suspension
data
Base 64 encoded file containing the full bitstring for the StatusList
Note: If an issuer wants to create multiple StatusLists within the same Collection, they must have unique and distinct names.
Once created, the StatusList2021 Resource will be associated with the parent DID, and referenced in the DID Document Metadata as follows:
An issuer may want to regularly update the bitstring whenever there is a certain amount of revocation status updates. The issuer will therefore need to create a new version for the initial StatusList2021 Resource.
Resources with the same Collection ID and name are grouped into version sets. Each resource in such a set has a link to the previous version (except the first version) and the next version (if it's not the most recent version).
To create a resource and mark it as a new version within a particular group, it is necessary to use the same collection-id, name
and type
as in the previous version. Links between versions will be created automatically.
New versions have dedicated unique IDs and can be referenced and retrieved as any other resources.
For example:
Resulting in the following metadata syntax:
Create a DID using the did:cheqd method from Credo Agent
Follow these instructions to create a new DID from Credo Agent and publish the associated DID Document on cheqd ledger.
⚠️ Before you begin...
Make sure you've correctly configured the Credo agent with cheqd.
method
*: cheqd
secret
options
*
didDocument
Provide a DID Document payload according to the w3c did core specification in the request body. This is possible when the keys corresponding to the verification methods provided in the DID Document are already created in the wallet
If a DID Document is not passed to the registrar, it requires the secret parameter with a verificationMethod to construct the DID Document.
Follow these instructions to create a new DID-Linked Resource on cheqd mainnet or testnet.
⚠️ Before you begin...
Make sure you've correctly configured the cheqd plugin's agent settings for Veramo CLI
Follow this tutorial to generate keys and create a DID.
DID-Linked Resources can be any type of file or content that is below ~200kb in size.
For the purpose of an example, lets use an AnonCreds schema (JSON file) as the resource:
Save this file locally and call it something like resource.json.
UUIDs are used to identify DID-Linked Resources. On Unix systems, the uuidgen
tool can be used to generate a new UUID:
Prepare a file with resource and encode it into base64
. On Unix systems, you can use the following command input:
Expected output:
You will need to paste the output of the Base64 into the data
field of the payload.json
file as shown in step 5.
Once you have saved your Resource file locally, you can copy the path and enter it in the file
field of the payload.json
file as shown in step 5.
Before carrying out a Resource transaction, you will need to prepare the payload.json
file. This file can be saved wherever you choose, but the location must be specified in the create Resource command. (By default, it will be saved under the project root directory.)
kms
(default local
): Key Management System (KMS) to be used for storage;
payload
: Resource definition
collectionId
: The last fragment of the corresponding DIDDoc
id
: Use output from the previous step here
name
: Arbitrary human-readable string used to identify the resource
resourceType
: Resource type, such as CL-Schema
, JSONSchema2020
, etc
version
: (Optional) client-given resource version
alsoKnownAs
: (Optional) alternative URI(s) provided for the resource
data
: (Optional) base64 encoded data of resource file
signInputs
: Keys used to sign the corresponding DIDDoc. These must match the ones specified in the DIDDoc, otherwise an error will be thrown
verificationMethodId
: Verification method ID from DIDDoc where key is published
keyType
should match values that you used to create the DIDDoc
privateKeyHex
should match values that you used to create the DIDDoc
file
: (Optional) path to resource file
fee:
amount
: An array of coins, coins are represented as an object with 2 fields
denom
: ncheq (smallest denomination classification)
amount
: See section below on fees
gas
: Each transaction must specify the maximum amount of gas it may consume.
payer
(Optional): The cheqd fee payer address
granter
(Optional): The cheqd fee granter address, Provided the grantee has an allowance by the granter
The Payload file can include a Resource passed either as a file or a base64 encoded string:
The maximum file size for a resource is roughly 46KB which may require a gas fee of up to 2000000.
The fee for a resource transaction changes depending on the file type being passed to the ledger. Currently there are three different variations on the fee:
Note that transaction fees are paid by the cheqd account set in the
agent.yml
configuration file, setup here. If you do not specify a fee in the transaction, the ledger will automatically deduct the appropriate fee from the account set in youragent.yml
configuration. Each of cheqd's on-ledger identity transactions has a fixed fee, the pricing for cheqd DIDs and DID-Linked Resources can be found here. If your account has insufficient balance the transaction will fail.
If you do not specify the --argsFile
in the previous step, you can also paste a JSON inline argument object by using the --argsJSON
flag followed by the JSON payload.
Follow these instructions to create a new DID and publish the associated DIDDoc on cheqd ledger.
⚠️ Before you begin...
Make sure you've correctly configured the cheqd plugin's agent settings for Veramo CLI
Follow this tutorial to generate keys and create a DID.
Follow this tutorial to create the first version of the resource.
Follow exactly the same steps as the first resource. Note that to create a new resource version which belongs to the same set as a previous resource, in the you must specify the same:
collectionId
name
resourceType
Each resource in such a set has a link to the previous version (except the first version) and the next version (if it's not the most recent version).
New versions have dedicated unique IDs and can be referenced and retrieved as any other resources.
Follow the same tutorial as for resource creation, but use the same collectionId,
name
and resourceType
as for the previous Resource version.
cheqd Cosmos CLI
Cosmos-native CLI for creating transactions on cheqd. Should be used for testing purposes only.
The Verifiable Credential Status List v2021 Specification is a working document from the W3C to support a privacy-preserving, space-efficient, and high-performance mechanism for publishing status information such as suspension or revocation of JSON and JSON-LD Verifiable Credentials.
Using DID-Linked Resources, we have been able to natively support Status List 2021 on cheqd directly.
The Status List 2021 Specification utilises bitstrings to represent whether a Verifiable Credential has been suspended/revoked or not. A bitstring can be thought of as a long list of 1s and 0s, where, if the binary value of the position in the list is 1 (one), the verifiable credential is revoked, if it is 0 (zero) it is not revoked.
Figure 1: Graphic showing the StatusList2021 bitstring
Each issued Credential correlates with a position and index on the bitstring, so that a verifier will be able to correlate the value within the Credential against the public bitstring to ascertain whether the Credential has been revoked or not, using a validate algorithm as well as a bitstring expansion algorithm.
The issuer keeps a bitstring list of all Verifiable Credentials it has issued. The StatusList is usually published by the issuer in the format of its own Verifiable Credential. This Verifiable Credential is generally hosted publicly on a centralised server or domain to enable third-party read-access.
cheqd stores each Status List and subsequent entries on-ledger as DID-Linked Resource versions. This has notable benefits, including the provenance, legitimacy and security of the Status List. For a full list of benefits, see the context for creating DID-Linked Resources.
Below are a list of alternatives for creating cheqd Status Lists.
Paying an Issuer to unlock a Credential Status
A Verifier may need to pay an Issuer to unlock Status information about the presented Credential. Without meeting the payment conditions, the Verifier will not be able to ascertain whether the Credential has been revoked (or suspended) or not.
A Verifier can choose to make a payment to the Issuer if they want to obtain this extra Credential Status information to build a higher level of trust within the Credential presented to them.
If a Verifier wants to unlock access to the Resource, to gain access to additional information about a Credential presented to them, such as the Credential Status, firstly, the Verifier will be presented Credential, including a link to the StatusList within the "credentialStatus"
section of the Credential body.
Through following the link in"credentialStatus"
section of the Credential body. the The Verifier will be directed to an on-ledger Resource, identifiable through a DID URL, for example:
This on-ledger Resource will contain:
An encrypted potion of the Resource, such as a Status List bitstring. identified by the "encodedList"
property.
Unencrypted metadata about the Resource, including the issuers' payment address "feePayerAddress"
and and the Payment Conditions, "feePaymentAmount"
and "intervalInSeconds"
.
This gives the verifier requisite information they need in order to pay the Issuer to unlock the Credential Status. You can learn more about Access Control Conditions below.
Using one of cheqd's supported wallets, Verifiers can make a payment of the amount specified in the "feePaymentAmount"
to the "feePayerAddress"
.
This payment should be made in CHEQ.
Note that the "feePaymentAmount"
may be specified in ncheq. This is lowest denomination of the CHEQ token, "nano" CHEQ which is 1 x 10^-9 CHEQ.
Once the Verifier makes a payment of the specified amount in the payment conditions back to the Issuer, the Access Control Conditions will be met.
Note the "intervalInSeconds"
which indicates how long after making the payment the Verifier has to verify the Credential.
The Verifier should input the presented Credential into a payload file, including the parameter:
"fetchList": true
This indicates that the Verifier wants to claim that they have met the Access Control Conditions, and for the nodes to query whether the Access Control Condition has been met. For example:
Using the Veramo CLI. Verifiers can submit the following transaction, alongside the payload file to verify the Credential:
If successful, the Verifier will obtain the keys to decrypt the Status List and access the Credential Status information. The Verifier will receive a response indicating whether the Credential:
Is verified and untampered
Has been revoked (or suspended) or not
This provides the Verifier the full information to make a trust decision, having paid the Issuer for the Credential Status information.
A Decentralized Identifier "DID" is a globally unique identifier that does not require a centralized registration authority because it is registered with distributed ledger technology or other form of decentralized network.
Learn about DIDs If you want to learn about what DIDs are, please go over to our learning site here.
Below are a list of alternatives for creating cheqd DIDs.
Issue Verifiable Credential with Encrypted Status List 2021 and index
There is a specific transaction type for issuing Verifiable Credentials that reference encrypted Status List Resources.
Follow the tutorial here to create an encrypted Status List 2021 Resource on cheqd.
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.
As mentioned above, when constructing the payload for your Credential, including the encrypted Resource, you have a choice of how you would like to specify the index.
The following parameters may be included:
"statusPurpose"
"revocation"
or "suspension"
No
"statusListName"
string
No
"statusListVersion"
string
Yes
"statusListRangeStart"
number
Yes
"statusListRangeEnd"
number
Yes
"statusListVersion"
number, or set of numbers
Yes
Below are a set of examples of how these parameters may be included in Credential payload files for different purposes:
Ensure that the "statusPurpose"
and "statusListName"
is the same as the existing Status List on-ledger, created in Step 1.
Once you have constructed your payload file, and have saved it as a JSON file, use the transaction below to issue the Verifiable Credential.
If the transaction is successful, you will get returned a formatted Verifiable Credential, including a populated "credentialStatus"
section.
Node.js - v16 or v18
Node.js or React Native project.
For more details, check Credo Getting Started guide.
When using cheqd method with Credo, there are a few extra dependencies that need to be installed. We need to install the @credo-ts/cheqd
package, which implements the needed interfaces for the agent.
To enable react-native support we need to follow the steps below:
In the package.json
file add the below code snippet, which replaces the cosmjs dependencies with the cosmjs-rn packages.
Using NPM overrides
or Yarn resolutions
we can point the cosmjs
packages to cosmjs-rn
.
After that, we need to add a buffer polyfill
Then, create a shim.js file with the below code snippet
import shim.js
file into your file where the App is imported.
After installing the dependencies, we can register the cheqd module on the agent by adding the below code snippet to the agent constructor.
The cosmosPayerSeed
can be a 32-bit seed value or mnemonic. It can be managed using the Keplr wallet, which is available as a mobile app or browser extension for Chrome and Safari. Keplr enables users to create accounts, exchange tokens, etc. To setup Keplr wallet for cheqd follow this tutorial.
Now that your Credo agent is successfully set up to work with cheqd, try following our tutorials for creating a new DID or issuing Verifiable Credentials.
Update a did:cheqd DID from Credo Agent
Using the createResource cheqd api agents are able to create custom DID-Linked Resources, including:
Trust Registries
Status Lists
Logos associated with DIDs
Governance files
did
*
name
*
resourceType
*
id
*
data
* : Text, Base64 string or an object
alsoKnownAs
version
The resolveResource function in the cheqd API allows agents to resolve DID-Linked Resources in two ways:
By resourceId
By resourceName
and resourceType
Additionally, both conventions support the following query parameters:
To fetch a specific resource version: resourceUrl?version=<versionId>
To fetch the closest resource version for a given time: resourceUrl?resourceVersionTime=<epoch time>
To issue Verifiable Credentials, the issuer will have to first create a Schema and then a Credential Definition.
⚠️ Before you begin...
When you have a registered (or imported) a DID on the network and in your wallet, you can register a schema. Registering a schema requires four fields: issuerId
, name
, version
and attrNames
. It is important to note that the issuerId
must be the same as a DID in your wallet.
After registering a schema, a credential definition can be registered based on the schema. The credential definition, amongst more things, binds the schema to a specific issuer. Schemas can be reused between issuers, but a credential definition is specific to an issuer. In a credential definition revocation can also be specified. This section will not go in-depth about revocation.
The request body must contain the credential_definition
object with the Issuer DID and the Schema ID created in the previous steps.
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the .
Credo is an SDK which as well as regular Verifiable Credentials natively with cheqd support.
Walt.id SSI Kit is an SDK that supports the standards for identity, with full cheqd support.
"DID-Linked Resources" are identified with a with a that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "resource ID". Through the "resource ID" or a set of DID URL query parameters, applications are able to persistently access a digital resource on the cheqd network.
Make sure you've correctly configured .
In order to register a schema and credential definition, a DID must be added to the agent first. This can be done by calling agent.dids.create()
, but this does require an endorser DID to be present as the submitterDid
. This is optional, if you have created a DID from the agent before as described .
To enable revocation, the options
must contain the revocation flag, and the size of the revocation registry. Also, ensure that a is configured for the issuer.
Learn about Verifiable Credentials and Presentations
If you want to learn more about what
Create Status List
Create a Status List on-ledger as a DID-Linked Resource using Veramo
Status List within a Verifiable Credential
Issue a Verifiable Credential with a cheqd Status List within the body.
cheqd Studio
Our API product enables users to use cheqd's functionality with minimal complexity and easily integrate APIs into existing apps.
DID Registrar
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
Understanding Access Control Conditions
Learn what different Payment Conditions mean and how they affect a Verifier when verifying Credentials.
Create DID
Create an Issuer DID using the did:cheqd DID method.
Update DID
Update a did:cheqd DID.
Deactivate DID
Deactivate a did:cheqd DID.
cheqd Studio
Our API product enables users to use cheqd's functionality with minimal complexity and easily integrate APIs into existing apps.
DID Registrar
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
ACA-Py
ACA-Py plugin supports full cheqd support for DIDs as well as Verifiable Credentials.
Veramo
The Veramo SDK plugin supports JSON, JSON-LD credentials as well as cheqd Credential Payments in an SDK.
Walt.id SSI Kit
Walt.id SSI Kit is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support.
cheqd Cosmos CLI
Cosmos CLI which directly communicates with the cheqd network. This should only be used for testing environments.
Charge for Status List
Create an encrypted Status List on cheqd with payment conditions, unlockable on payment of CHEQ
Create a DID
Create an Issuer DID using the did:cheqd DID method.
Issue a Verifiable Credential
Issue a Verifiable Credential using Credo signed by a cheqd DID.
It is possible to present Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code. This process enables secure and trustworthy sharing of verifiable credentials within the Credo framework and cheqd ecosystem.
Use any supported method to create a connection with the Holder. Automated out-of-band protocol is recommended. You can follow the same steps as described in Issue a Verifiable Credential.
After connection is established, the Verifier can send a proof request to the Holder.
Holder can get the stored credentials from own wallet and format a proof to send to the Verifier.
When we want to send a proof, we have to listen to incoming proof requests and handle accordingly. In this example we do not have any user interaction, but is likely that your application would have a user-interface which would display the request.
For more tutorials and examples, visit Credo Docs.
Resolve a DID Document by DID identifier. Also supports DID Resolution Queries as defined in the W3C DID Resolution specification.
DID identifier to resolve.
did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
Return only metadata of DID Document instead of actual DID Document.
Unique UUID version identifier of DID Document. Allows for fetching a specific version of the DID Document. See cheqd DID Method Specification for more details.
3ccde6ba-6ba5-56f2-9f4f-8825561a9860
Returns the closest version of the DID Document at or before specified time. See DID Resolution handling for did:cheqd
for more details.
1970-01-01T00:00:00Z
This directive transforms the Verification Method key format from the version in the DID Document to the specified format chosen below.
Query DID Document for a specific Service Endpoint by Service ID (e.g., service-1
in did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1
). This will typically redirect to the Service Endpoint based on DID Resolution specification algorithm.
service-1
Relative reference is a query fragment appended to the Service Endpoint URL. Must be used along with the service
query property above. See DID Resolution specification algorithm for more details.
/path/to/file
This endpoint creates an identity key pair associated with the user's account for custodian-mode clients.
Key type of the identity key pair to create.
This endpoint fetches an identity key pair's details for a given key ID. Only the user account associated with the custodian-mode client can fetch the key pair.
Key ID of the identity key pair to fetch.
The DID of the issuer of the status list.
The purpose of the status list. Can be either revocation or suspension.
The name of the StatusList2021 DID-Linked Resource.
This endpoint returns the DID-Linked Resource for a given DID identifier and resource identifier.
DID identifier
did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
Fetch a DID-Linked Resource by Resource ID unique identifier. Since this is a unique identifier, other Resource query parameters are not required. See DID-Linked Resources for more details.
3ccde6ba-6ba5-56f2-9f4f-8825561a9860
Filter a DID-Linked Resource query by Resource Name. See DID-Linked Resources for more details.
cheqd-issuer-logo
Filter a DID-Linked Resource query by Resource Type. See DID-Linked Resources for more details.
CredentialArtwork
Filter a DID-Linked Resource query by Resource Version, which is an optional free-text field used by issuers (e.g., "v1", "Final Version", "1st January 1970" etc). See DID-Linked Resources for more details.
v1
Filter a DID-Linked Resource query which returns the closest version of the Resource at or before specified time. See DID-Linked Resources for more details.
1970-01-01T00:00:00Z
Request integrity check against a given DID-Linked Resource by providing a SHA-256 checksum hash. See DID-Linked Resources for more details.
dc64474d062ed750a66bad58cb609928de55ed0d81defd231a4a4bf97358e9ed
Return only metadata of DID-Linked Resource instead of actual DID-Linked Resource. Mutually exclusive with some of the other parameters.
Resolve a DID Document by DID identifier. Also supports DID Resolution Queries as defined in the W3C DID Resolution specification.
DID identifier to resolve.
did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
Return only metadata of DID Document instead of actual DID Document.
Unique UUID version identifier of DID Document. Allows for fetching a specific version of the DID Document. See cheqd DID Method Specification for more details.
3ccde6ba-6ba5-56f2-9f4f-8825561a9860
Returns the closest version of the DID Document at or before specified time. See DID Resolution handling for did:cheqd
for more details.
1970-01-01T00:00:00Z
This directive transforms the Verification Method key format from the version in the DID Document to the specified format chosen below.
Query DID Document for a specific Service Endpoint by Service ID (e.g., service-1
in did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1
). This will typically redirect to the Service Endpoint based on DID Resolution specification algorithm.
service-1
Relative reference is a query fragment appended to the Service Endpoint URL. Must be used along with the service
query property above. See DID Resolution specification algorithm for more details.
/path/to/file
Using AnonCreds and the Issue Credential V2 Protocol, it is possible to issue Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code. By following the following steps, you can effectively issue verifiable credentials using Credo Agent integrated with the cheqd ecosystem.
Use any supported method to create a connection with the Holder of the credential. Automated out-of-band protocol is recommended.
The Issuer agent will create a new connection invite for the Holder. This is needed to securely communicate between the Issuer and the Holder agents.
The above request will have an invitation
in the response. Holder will have to copy that invitation and pass URL as invitationUrl
in the following code:
Generate a credential offer and send to the holder, informing them about the available credential and its attributes.
When we want to accept a credential, we have to listen to incoming credentials and handle accordingly. In this example we do not have any user interaction, but is likely that your application would have a user-interface which would display the credential. When receiving a credential offer you can get the values from credentialExchangeRecord.credentialAttributes
.
This endpoint creates a DID and associated DID Document. As input, it can take the DID Document parameters via a form, or the fully-assembled DID Document itself.
Network to create the DID on (testnet or mainnet)
Algorithm to use for generating the method-specific ID. The two styles supported are UUIDs and Indy-style Base58. See cheqd DID method documentation for more details.
Type of verification method to use for the DID. See DID Core specification for more details. Only the types listed below are supported.
It's a list of special objects which are designed to build the actual service. It's almost the same as in DID Core specification, but instead of id
it utilises idFragment
field for making the right id
for each service. !!! WARN. Cause swagger-ui does not handle x-ww-form based arrays correctly, please frame all your services in brackets while using swagger UI. !!!
[{"idFragment":"service-1","type":"LinkedDomains","serviceEndpoint":["https://example.com"]}]
The unique identifier in hexadecimal public key format used in the verification method to create the DID.
["https://www.w3.org/ns/did/v1"]
This endpoint creates a DID and associated DID Document. As input, it can take the DID Document parameters via a form, or the fully-assembled DID Document itself.
Network to create the DID on (testnet or mainnet)
Algorithm to use for generating the method-specific ID. The two styles supported are UUIDs and Indy-style Base58. See cheqd DID method documentation for more details.
Type of verification method to use for the DID. See DID Core specification for more details. Only the types listed below are supported.
It's a list of special objects which are designed to build the actual service. It's almost the same as in DID Core specification, but instead of id
it utilises idFragment
field for making the right id
for each service. !!! WARN. Cause swagger-ui does not handle x-ww-form based arrays correctly, please frame all your services in brackets while using swagger UI. !!!
[{"idFragment":"service-1","type":"LinkedDomains","serviceEndpoint":["https://example.com"]}]
The unique identifier in hexadecimal public key format used in the verification method to create the DID.
["https://www.w3.org/ns/did/v1"]
This endpoint updates a DID Document. As an input, it can take JUST the sections/parameters that need to be updated in the DID Document (in this scenario, it fetches the current DID Document and applies the updated section). Alternatively, it take the fully-assembled DID Document with updated sections as well as unchanged sections.
DID identifier to be updated.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
Service section of the DID Document.
Verification Method section of the DID Document.
{"controller":"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0","id":"did:cheqd:testnet :7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1","publicKeyBase58":"BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt","type":"Ed25519VerificationKey2018"}
Authentication section of the DID Document.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
This input field contains either a complete DID document, or an incremental change (diff) to a DID document. See Universal DID Registrar specification.
{"@context":["https://www.w3.org/ns/did/v1"],"id":"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0","controller":["did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"],"verificationMethod":[{"id":"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1","type":"Ed25519VerificationKey2018","controller":"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0","publicKeyBase58":"z6MkkVbyHJLLjdjU5B62DaJ4mkdMdUkttf9UqySSkA9bVTeZ"}],"authentication":["did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"],"service":[{"id":"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1","type":"LinkedDomains","serviceEndpoint":["https://example.com"]}]}
This endpoint deactivates a DID Document by taking the DID identifier as input. Must be called and signed by the DID owner.
DID identifier to deactivate.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
This endpoint verifies the Verifiable Presentation generated from credential(s). As input, it can take the Verifiable Presentation JWT as a string or the entire Verifiable Presentation itself.
If set to true
the verification will also check the status of the presentation. Requires the VP to have a credentialStatus
property.
When dealing with JSON-LD you also MUST provide the proper contexts. * Set this to true
ONLY if you want the @context
URLs to be fetched in case they are a custom context.
If set to true
allow to verify credential which based on deactivated DID.
Verifiable Presentation to be verified as a VP-JWT string or a JSON object.
Provide an optional verifier DID (also known as 'domain' parameter), if the verifier DID in the presentation is not managed in the wallet.
Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.
Custom verification policies to execute when verifying presentation.
This endpoint issues a Verifiable Credential. As input it takes the list of issuerDid, subjectDid, attributes, and other parameters of the credential to be issued.
DID of the Verifiable Credential issuer. This needs to be a did:cheqd
DID.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
DID of the Verifiable Credential holder/subject. This needs to be a did:key
DID.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
JSON object containing the attributes to be included in the credential.
{"name":"Bob","gender":"male"}
Optional properties to be included in the @context
property of the credential.
["https://schema.org/schema.jsonld","https://veramo.io/contexts/profile/v1"]
Optional properties to be included in the type
property of the credential.
["Person"]
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
2023-06-08T13:49:28.000Z
Format of the Verifiable Credential. Defaults to VC-JWT.
jwt
Optional credentialStatus
properties for VC revocation or suspension. Takes statusListName
and statusListPurpose
as inputs.
{"statusPurpose":"revocation","statusListName":"employee-credentials"}
Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
{"type":"IssuerPolicy","id":"http://example.com/policies/credential/4","profile":"http://example.com/profiles/credential","prohibition":[{"assigner":"https://example.edu/issuers/14","assignee":"AllVerifiers","target":"http://example.edu/credentials/3732","action":["Archival"]}]}
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
{"type":"ManualRefreshService2018","id":"https://example.edu/refresh/3732"}
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
{"type":["DocumentVerification"],"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231","verifier":"https://example.edu/issuers/14","evidenceDocument":"DriversLicense","subjectPresence":"Physical","documentPresence":"Physical","licenseNumber":"123AB4567"}
This endpoint issues a Verifiable Credential. As input it takes the list of issuerDid, subjectDid, attributes, and other parameters of the credential to be issued.
DID of the Verifiable Credential issuer. This needs to be a did:cheqd
DID.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
DID of the Verifiable Credential holder/subject. This needs to be a did:key
DID.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
JSON object containing the attributes to be included in the credential.
{"name":"Bob","gender":"male"}
Optional properties to be included in the @context
property of the credential.
["https://schema.org/schema.jsonld","https://veramo.io/contexts/profile/v1"]
Optional properties to be included in the type
property of the credential.
["Person"]
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
2023-06-08T13:49:28.000Z
Format of the Verifiable Credential. Defaults to VC-JWT.
jwt
Optional credentialStatus
properties for VC revocation or suspension. Takes statusListName
and statusListPurpose
as inputs.
{"statusPurpose":"revocation","statusListName":"employee-credentials"}
Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
{"type":"IssuerPolicy","id":"http://example.com/policies/credential/4","profile":"http://example.com/profiles/credential","prohibition":[{"assigner":"https://example.edu/issuers/14","assignee":"AllVerifiers","target":"http://example.edu/credentials/3732","action":["Archival"]}]}
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
{"type":"ManualRefreshService2018","id":"https://example.edu/refresh/3732"}
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
{"type":["DocumentVerification"],"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231","verifier":"https://example.edu/issuers/14","evidenceDocument":"DriversLicense","subjectPresence":"Physical","documentPresence":"Physical","licenseNumber":"123AB4567"}
This endpoint verifies a Verifiable Credential passed to it. As input, it can take the VC-JWT as a string or the entire credential itself.
If set to true
the verification will also check the status of the credential. Requires the VC to have a credentialStatus
property.
When dealing with JSON-LD you also MUST provide the proper contexts. Set this to true
ONLY if you want the @context
URLs to be fetched in case they are a custom context.
If set to true
allow to verify credential which based on deactivated DID.
Verifiable Credential to be verified as a VC-JWT string or a JSON object.
Custom verification policies to execute when verifying credential.
This endpoint revokes a given Verifiable Credential. As input, it can take the VC-JWT as a string or the entire credential itself. The StatusList2021 resource should already be setup in the VC and credentialStatus
property present in the VC.
Set whether the StatusList2021 resource should be published to the ledger or not. If set to false
, the StatusList2021 publisher should manually publish the resource.
Verifiable Credential to be revoked as a VC-JWT string or a JSON object.
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.
This endpoint suspends a given Verifiable Credential. As input, it can take the VC-JWT as a string or the entire credential itself.
Set whether the StatusList2021 resource should be published to the ledger or not. If set to false
, the StatusList2021 publisher should manually publish the resource.
Verifiable Credential to be revoked as a VC-JWT string or a JSON object.
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.
Set whether the StatusList2021 resource should be published to the ledger or not. If set to false
, the StatusList2021 publisher should manually publish the resource.
Set whether the StatusList2021 resource should be published to the ledger or not. If set to false
, the StatusList2021 publisher should manually publish the resource.
Verifiable Credential to be revoked as a VC-JWT string or a JSON object.
The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.
This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.
The purpose of the status list. Can be either revocation or suspension.
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be checked.
Credential status index to be checked for revocation or suspension.
Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.
This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.
The purpose of the status list. Can be either revocation or suspension.
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be checked.
Credential status index to be checked for revocation or suspension.
Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.
This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.
The purpose of the status list. Can be either revocation or suspension.
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be checked.
Credential status index to be checked for revocation or suspension.
Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.
The update action to be performed on the encrypted status list, can be revoke, suspend or reinstate
The update action to be performed on the encrypted status list, can be revoke, suspend or reinstate
The update action to be performed on the encrypted status list, can be revoke, suspend or reinstate
The update action to be performed on the unencrypted status list, can be revoke, suspend or reinstate
{"did":"did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e","statusListName":"cheqd-employee-credentials","indices":[10,3199,12109,130999]}
This endpoint creates an unencrypted StatusList2021 credential status list. The StatusList is published as a DID-Linked Resource on ledger. As input, it can can take input parameters needed to create the status list via a form, or a pre-assembled status list in JSON format. Status lists can be created as either encrypted or unencrypted; and with purpose as either revocation or suspension.
The purpose of the status list. Can be either revocation or suspension. Once this is set, it cannot be changed. A new status list must be created to change the purpose.
{"did":"did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e","statusListName":"cheqd-employee-credentials","length":140000,"encoding":"base64url"}
This endpoint creates an unencrypted StatusList2021 credential status list. The StatusList is published as a DID-Linked Resource on ledger. As input, it can can take input parameters needed to create the status list via a form, or a pre-assembled status list in JSON format. Status lists can be created as either encrypted or unencrypted; and with purpose as either revocation or suspension.
The purpose of the status list. Can be either revocation or suspension. Once this is set, it cannot be changed. A new status list must be created to change the purpose.
{"did":"did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e","statusListName":"cheqd-employee-credentials","length":140000,"encoding":"base64url"}
This endpoint creates a DID-Linked Resource. As input, it can take the DID identifier and the resource parameters via a form, or the fully-assembled resource itself.
DID identifier to link the resource to.
Encoded string containing the data to be stored in the DID-Linked Resource.
Encoding format used to encode the data.
Name of DID-Linked Resource.
Type of DID-Linked Resource. This is NOT the same as the media type, which is calculated automatically ledger-side.
Optional field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from.
Optional field to assign a human-readable version in the DID-Linked Resource.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
This endpoint creates a DID-Linked Resource. As input, it can take the DID identifier and the resource parameters via a form, or the fully-assembled resource itself.
DID identifier to link the resource to.
Encoded string containing the data to be stored in the DID-Linked Resource.
Encoding format used to encode the data.
Name of DID-Linked Resource.
Type of DID-Linked Resource. This is NOT the same as the media type, which is calculated automatically ledger-side.
Optional field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from.
Optional field to assign a human-readable version in the DID-Linked Resource.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.
The purpose of the status list. Can be either revocation or suspension.
DID of the StatusList2021 publisher.
The name of the StatusList2021 DID-Linked Resource to be checked.
Credential status index to be checked for revocation or suspension.
Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.
This endpoint creates a DID-Linked Resource. As input, it can take the DID identifier and the resource parameters via a form, or the fully-assembled resource itself.
DID identifier to link the resource to.
Encoded string containing the data to be stored in the DID-Linked Resource.
Encoding format used to encode the data.
Name of DID-Linked Resource.
Type of DID-Linked Resource. This is NOT the same as the media type, which is calculated automatically ledger-side.
Optional field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from.
Optional field to assign a human-readable version in the DID-Linked Resource.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
A Decentralized Identifier "DID" is a globally unique identifier that does not require a centralized registration authority because it is registered with distributed ledger technology or other form of decentralized network.
Learn about DIDs If you want to learn about what DIDs are, please go over to our learning site here.
Below are a list of alternatives for creating cheqd DIDs.
ACA-Py Plugin with cheqd support
Aries Cloud Agent Python (ACA-Py) serves as a foundational tool for developing Verifiable Credential (VC) ecosystems. It functions at the second and third layers of the Trust Over IP framework and supports multiple credential formats and protocols. As part of the Open Wallet Foundation, ACA-Py's capabilities can be expanded with runtime-loaded plug-ins. Explore a diverse range of plug-ins in the ACA-Py Plugins repository.
ACA-Py now includes support for the Cheqd DID method, facilitating integration with Cheqd's decentralized identity ecosystem. Developers can utilize Cheqd for DID creation, resolution, and operations like issuing and verifying AnonCreds credentials. This offers an easy transition from the decommissioned Sovrin network to a modern, scalable alternative without disrupting existing workflows. Cheqd is fully supported in ACA-Py for issuing Verifiable Credentials, creating Credential Schemas, and Credential Definitions.
AnonCreds using cheqd are facilitated using the cheqd AnonCreds Object Method.
The Cheqd plugin now supports dynamic DID registration using the Universal Registrar. This eliminates the need for separate configurations for different DID methods—users simply need to run the appropriate driver.
Unified DID Support: Allows multiple DID method registrations (not just Cheqd) through a single interface.
Streamlined Setup: Reduces configuration complexity by dynamically handling DID registrations.
Seamless Interoperability: Integrates effortlessly with supported DID methods.
For further configuration and usage examples, refer to the Universal Registrar GitHub repository.
Update a did:cheqd DID from ACA-Py Agent
Follow these instructions to update a did:cheqd DID from ACA-Py Agent.
⚠️ Important...
Your wallet must have the key(s) which were generated when the DID was created, without them signing will fail.
To update an existing DID, you must pass the did
id and the complete didDocument
in the request body. The main field that is updated using this method os the service
object of the DID.
Deactivate a did:cheqd from ACA-Py Agent
Follow these instructions to deactivate a did:cheqd DID from ACA-Py Agent.
⚠️ Important...
Your wallet must have the key(s) which were generated when the DID was created, without them signing will fail.
To deactivate an active DID, pass the did
id in the request body, with any additional options
that you may have configured.
Before you begin, ensure you have a DID registrar and resolver running.
For testnet, you can use the Universal Registrar (with cheqd DID registrar driver) and a resolver.
For mainnet, you must run your own cheqd DID registrar driver with the correct mnemonic configuration. Details are provided below.
All sample configs and docker-compose files are available here.
To enable DID registration on Cheqd, you must deploy the Cheqd DID Registrar driver as a dedicated service. The fastest way to run the Cheqd Registrar driver is using the published docker image, for other options or to build your own container, check the GitHub repository.
Add the following under services
section of your docker-compose file.
Set the environment variables.
Run the driver.
The Cheqd Registrar must be run as driver-did-cheqd
because the Universal Registrar is configured with that name by default.
The Universal Registrar allows dynamic DID registration for multiple DID methods, including Cheqd. Setting it up ensures seamless DID creation without manual configurations for different DID methods. The fastest way to run the Universal Registrar is using the published docker container, for other options check the Universal Registrar GitHub repository.
Add the following under services
section of your docker-compose file.
Start the Universal Registrar Service.
Confirm that the Cheqd Driver properties are correct and matches your settings.
To run your own DID Resolver, the following settings must be added to your docker-compose file
Add the following under services
section of your docker-compose file.
Run the resolver.
Cheqd ACA-Py Plugin supports configuring the Universal Registrar and DID Resolver URLs via a plugin-config.yml
file. These settings define how the agent interacts with the Cheqd network for DID operations.
plugin-config.yml
:Update the URLs if you have your hosted versions or using the Universal Resolver.
The Cheqd plugin only works with the askar-anoncreds
wallet type. Askar-anoncreds is the preferred wallet due to its support for AnonCreds and enhanced security features.
When starting ACA-Py, ensure that the wallet-type
is set to askar
. Example:
Using PostgreSQL as a wallet storage backend is recommended for scalability and data persistence.
Install PostgreSQL and create a database for ACA-Py.
Configure ACA-Py to use PostgreSQL, add the following to ./configs/settings.yml
:
Start ACA-Py with PostgreSQL-backed wallet storage.
Example Dockerfile:
Build the ACA-Py Agent docker image with the plugin.
Deploy the agent. Sample docker-compose is below.
Where all the plugin settings are populated in ./configs/settings.yml
, a sample file is here.
Run the Agent.
Now that your ACA-Py agent is successfully set up to work with cheqd, try following our tutorials for creating a new DID or issuing Verifiable Credentials.
"DID-Linked Resources" are identified with a did:cheqd
Decentralized Identifier with a Universally Unique Identifier (UUID) that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "resource ID". Through the "resource ID" or a set of DID URL query parameters, applications are able to persistently access a digital resource on the cheqd network.
Create a DID using the did:cheqd method from ACA-Py Agent
Follow these instructions to create a new DID from ACA-Py Agent and publish the associated DID Document on cheqd ledger.
⚠️ Before you begin...
Make sure you've correctly configured the cheqd plugin's agent settings for ACA-Py.
For wallet storage, utilise a Postgres database to ensure key persistence, enabling future updates to the DID.
Populate the various options
and features
in the JSON request body and call the API to create the DID.
These are the variables that can be passed in the Body:
After creating a DID or multiple DIDs, users can list all the created DIDs associated with their wallet. Using the /wallet/did
API.
Create DID
Create an Issuer DID using the did:cheqd DID method.
Update DID
Update a did:cheqd DID.
Deactivate DID
Deactivate a did:cheqd DID.
cheqd Studio
Our API product enables users to use cheqd's functionality with minimal complexity and easily integrate APIs into existing apps.
DID Registrar
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
Credo
Credo is an SDK which supports the European Architecture and Reference Framework (ARF) standards as well as AnonCreds with full cheqd support for DIDs.
Veramo
The Veramo SDK plugin supports JSON, JSON-LD credentials as well as cheqd Credential Payments in an SDK.
Walt.id SSI Kit
Walt.id SSI Kit is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support.
cheqd Cosmos CLI
Cosmos CLI which directly communicates with the cheqd network. This should only be used for testing environments.
cheqd Agent Setup
Setup the ACA-Py agent with cheqd plugin.
Create cheqd DIDs
Use the agent to create cheqd DIDs.
Issue a Credential
Issue a verifiable credential using ACA-Py agent.
Create a DID
Create an Issuer DID using the did:cheqd DID method.
Issue a Verifiable Credential
Issue a Verifiable Credential using ACA-Py signed by a cheqd DID.
Understanding DLRs
More details about DID-Linked Resources on Cheqd.
Understanding AnonCreds
More details about AnonCreds Object Method.
Create Schema
Create an AnonCreds Schema.
Create Credential Definition
Create an AnonCreds Credential Definition
Understand how privacy is protected throughout the payment flow
cheqd's implementation of Credential Payments uses encrypted DID-Linked Resources (such as a Status Lists), with Payment Conditions required to unlock. Learn about cheqd's Access Control Condition logic below:
There are multiple areas within this flow where privacy needs to be maintained:
Status List construction: Credential information within Status List should not constitute Personally Identifiable Information (PII).
Verifier pays Issuer: Any payment for decrypting a Status List should not be correlatable to a Holder presenting or sharing a Credential.
The Status List 2021 Specification, which cheqd encrypts with payment conditions, utilises bitstrings to represent whether a Verifiable Credential has been suspended/revoked or not. A bitstring can be thought of as a long list of 1s and 0s, where, if the binary value of the position in the list is 1 (one), the verifiable credential is revoked, if it is 0 (zero) it is not revoked.
This works by tying each issued Credential with a position and index on the bitstring, so that a Verifier will be able to check the value within the Credential against the public bitstring to ascertain whether the Credential has been revoked or not, using a validate algorithm as well as a bitstring expansion algorithm.
As part of the bitstring construction. there is a minimum bitstring length of 131,072 entries (16kb uncompressed). Moreover, in this string, the indexes that are not specified are randomised between revoked and unrevoked. This means that there will never be a bitstring with a single entry, or a small amount of entries.
Using this type of construction, the privacy of the Holder is protected through "Herd Privacy" because there is no way that a third party can externally view the Status List and can correlate indices with a particular individual's credential without direct knowledge of a Holders' credential index.
The Verifiable Credential Status List v2021 specification expands on these privacy considerations.
As part of the Access Control Condition setup, the Issuer can set a single payment fee for meeting the Access Control Conditions and decrypting a particular Status List.
Through setting a flat price for decryption, there is no price variation from checking one persons' credential status versus another's. This means that for a particular Status List, all payments on the network will be made at the same price.
Once again, this creates a layer of "Herd Privacy" for the Holder, since the Credential index itself is decoupled from the payment fee. Therefore. while transactions will be visible on the network, there will be no way for a third party to surveil the network or draw conclusions about who's Credential status is being checked.
If there was a variation in the price per Credential status check within the same status list, this would be more likely to become correlatable, alongside other information, back to a specific individual.
We will continue to improve and assess the privacy considerations as we roll out Credential Payments. Some areas we believe there may be scope for privacy leakage are as follows:
Holders' Credential index is doxxed: If a Holder has a particular Credential index doxxed, as well as a link to the status list, there may be scope to monitor the Credential Status of that individual, through a payment. However, third parties will not know when that Holder is using their Credentials.
Issuer creates single entry Status List with specific unlock price: If an Issuer does not use our preset Status List length and creates their own resource with a single or few entries, they may provide a higher likelihood of doxxing when an individual uses their Credential. This is why cheqd, and the specification, has enforced a minimum Status List length.
Access Control Conditions
Understand how cheqd gates encrypted resources using payment conditions and Access Control logic.
Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.
If set to true
the verification will also check the status of the accreditation. Requires the VC to have a credentialStatus
property.
If set to true
allow to verify accreditation which based on deactivated DID.
DID of the Verifiable Accreditation holder/subject. This needs to be a did:key
DID.
did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92
DID URL of the Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.
did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
DID of the Verifiable Accreditation holder/subject
did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
Unique resource identifier of the Verifiable Accreditation
398cee0a-efac-4643-9f4c-74c48c72a14b
Resource name of the Verifiable Accreditation
cheqd-issuer-logo
Resource type of the Verifiable Accreditation
CredentialArtwork
The list of schemas the subject DID is accredited for.
Custom verification policies to execute when verifying Accreditation.
Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.
Select the type of accreditation to be issued.
DID of the Verifiable Accreditation issuer. This needs to be a did:cheqd
DID.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
DID of the Verifiable Accreditation holder/subject. This needs to be a did:cheqd
DID.
did:cheqd:testnet:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
The list of schemas the subject DID is accredited for.
Unique name of the Verifiable Accreditation.
JSON object containing the attributes to be included in the Accreditation.
Optional properties to be included in the @context
property of the Accreditation.
["https://schema.org/schema.jsonld","https://veramo.io/contexts/profile/v1"]
DID URL of the parent Verifiable Accreditation, required for accredit/attest operation.
DID URL of the root Verifiable Accreditation, required for accredit/attest operation.
Name or Type of the Trust Framework, required for authorise operation.
Url of the Trust Framework, required for authorise operation.
Optional properties to be included in the type
property of the Accreditation.
["Person"]
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
2023-06-08T13:49:28.000Z
Format of the Verifiable Accreditation. Defaults to VC-JWT.
jwt
Optional credentialStatus
properties for VC revocation or suspension. Takes statusListName
and statusListPurpose
as inputs.
{"statusPurpose":"revocation","statusListName":"employee-credentials"}
Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
{"type":"IssuerPolicy","id":"http://example.com/policies/credential/4","profile":"http://example.com/profiles/credential","prohibition":[{"assigner":"https://example.edu/issuers/14","assignee":"AllVerifiers","target":"http://example.edu/credentials/3732","action":["Archival"]}]}
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
{"type":"ManualRefreshService2018","id":"https://example.edu/refresh/3732"}
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
{"type":["DocumentVerification"],"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231","verifier":"https://example.edu/issuers/14","evidenceDocument":"DriversLicense","subjectPresence":"Physical","documentPresence":"Physical","licenseNumber":"123AB4567"}
Verida wallet
Download the Verida wallet to receive credentials issued by cheqd Studio to a did:vda
address.
DID Write Pricing
Click here to understand the price of DIDs and other resources on cheqd, compared to other identity networks.
Veramo SDK plugin for cheqd identity functionality
Veramo SDK is a modular and pluggable client app SDK for decentralised identity and SSI applications. Our Veramo plugin - the @cheqd/did-provider-cheqd
NPM package - enables developers to interact with the cheqd ledger using Veramo SDK.
This package includes Veramo SDK Agent methods for use with the Veramo CLI NPM package. It can also be consumed as an NPM package outside Veramo CLI for building your own applications with NPM.
The package's core functionality is borrowed from Veramo Core NPM package and extends this to include cheqd ledger functionality, such as creating and managing DIDs.
Utilise cheqd's identity functionality through the Veramo SDK Plugin by installing the Veramo CLI and getting started below:
We chose to build a cheqd plugin into Veramo SDK for a few key reasons.
Design Principles — The Veramo SDK was designed to be highly flexible and modular making it highly scalable and fit for a lot of complex workflows. As a result, we felt it offered a route to minimise how much needs to be built from scratch. Through its flexible plug-in system, it’s easy to pick and choose which plug-ins are most beneficial, plus it’s possible to add in our custom packages where required which we knew would be necessary from Cosmos-based transactions.
Developer Experience — The Veramo SDK has been designed in a way that offers a fast end-to-end process. Ultimately, at cheqd, we want to reduce the amount of time our team spends on SDKs and so we can maintain our focus on building ledger functionality (i.e. building our implementation of the revocation registry and the credentials payment rails).
Attractive & Simple CLI — The Veramo core API is exposed by its CLI which makes it easy to create DIDs and VCs directly from a terminal or local cloud agent.
Platform Agnostic — The Veramo packages run on Node, Browsers and React & React Native right out of the box.
Veramo provides an excellent foundation for clients that want to build verifiable data applications. This is because Veramo Core, the Veramo CLI and any specific plugins are available as NPM packages, enabling:
Identity functionality to be carried out through a native CLI interface; or
Identity functionality to be integrated directly into client applications through NPM packages.
Using the DID-Provider-cheqd package, we have also been able to reuse identity functionality and abstract the complexity of cheqd/SDK and cheqd Network in less complex packages.
did:cheqd
-specific functionalitydid-provider-cheqd
is the first Veramo SDK plug-in that utilises the DID Manager Update method to offer a full-body DIDDoc update for a DID on cheqd ledger, rather than individual field update transactions used more commonly in other DID methods such as did:ethr
.
New DID creation can also be done by passing a full-body DIDoc payload in JSON, rather than having to assemble the document field-by-field.
Learn how to configure and setup Veramo CLI for working with cheqd network
Our Veramo CLI setup guide provides step-by-step instructions on how to configure your installation for cheqd network
Figure 1: Veramo SDK for cheqd architecture with components (editable Draw.io version)
did-provider-cheqd
consumes functionality that exists within the @cheqd/sdk
NPM package in a way that complies to the Veramo AbstractIdentifierProvider
. (You don't need to call this package separately as it's already included as a dependency in package.json
.)
This package works alongside other base Veramo packages:
The @cheqd/sdk
package adds Cosmos SDK specific functionality such as signing transactions, paying for ledger fees, etc.
For identity-related keys, this plugin uses Veramo's Key Management System (KMS) to manage keys for create and update operations.
Find out about other Veramo plug-ins in their official documentation.
Our Veramo SDK Plugin natively supports the following Credential formats:
We provide a quick-start setup guide for working with cheqd network using Veramo CLI.
You can use our Veramo plugin in non-CLI contexts as well, for example, for integrating into custom applications
Depending on the type of application you are looking to develop, you will need to install a different set of packages.
For other applications, see:
Setup Veramo CLI
Set up the Veramo CLI and required packages to use the Veramo SDK Plugin for cheqd.
Create Decentralised Identifiers (DIDs)
Create fully W3C conformant Decentralised Identifiers (DIDs) on cheqd.
Issue Credentials and Presentations
Issue fully W3C conformant Verifiable Credentials and Presentations
Charge for Credentials
Gate encrypted Status Lists with CHEQ using Payment Conditions.
Create Status Lists
Create Verifiable Credential Status List v2021 on-ledger, using DID-Linked Resources
Create DID-Linked Resources
Create a variety of DID-Linked Resources, including schemas, status lists and trust registries on cheqd.
JSON (JWT)
JSON Web Token (JWT) Credentials are a simple way to transmit Trusted Data as a JSON object.
JSON-LD
JSON-LD (Linked Data) Credentials are a richer data format, allowing applications to follow embedded links to other pieces of Linked Data across the web.
Credo, formerly Hyperledger Aries Framework JavaScript (AFJ), with cheqd support
Credo is a framework written in TypeScript for building SSI Agents and services that aims to be compliant and interoperable with the standards defined in the European Architecture and Reference Framework.
The Aries Framework JavaScript project has recently been rebranded to "Credo" and was moved from the Hyperledger Foundation to the Open Wallet Foundation.
In the recent months, Credo has heavily been expanding into a more modular and "less specific" framework. The integration with cheqd is a prime example of this, being the first true showcase of anchoring AnonCreds on non-Indy ledgers. Supporting more credential formats, ledgers and DID methods is crucial and essential to the continual development of Credo. cheqd is now fully supported in Credo and can be used for the issuance of Verifiable Credentials as well as the creation of Credential Schemas and Credential Definitions.
AnonCreds using cheqd are facilitated using the cheqd AnonCreds Object Method.
Aries Framework JavaScript supports the following Credential formats:
cheqd Agent Setup
Setup the cheqd agent to start being able to use cheqd inside Credo.
Create cheqd DIDs
Use the cheqd DID module to start being able to create cheqd DIDs.
Issue a Credential
Issue a digital Credential using a cheqd DID.
SD-JWT
Selective Disclosure JWT (SD-JWT) is the most commonly adopted credential format for European Digital Identity Ecosystems, allowing users to selectively disclose which attributes they would like to share in a presentation.
AnonCreds
AnonCreds is a Zero-Knowledge Credential format, offering full Holder privacy and selective disclosure.
JSON-LD
JSON-LD (Linked Data) Credentials are a richer data format, allowing applications to follow embedded links to other pieces of Linked Data across the web.
DID of interest
{"value":"did:peer:WgWxqztrNooG92RXvxSTWv"}
Key type to query for.
{"value":"ed25519"}
DID method to query for. e.g. sov to only fetch indy/sov DIDs
{"value":"key"}
Whether DID is current public DID, posted to ledger but current public DID, or local to the wallet
{"value":"wallet_only"}
Verification key of interest
{"value":"H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"}
DID to update
did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86
^(did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)([?][^#]*)?|did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)/resources/([a-z,0-9,-]{36,36})([?][^#]*)?)$
DID Document to update
{"authentication":["did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1"],"controller":["did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86"],"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86","service":[{"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#service-1","type":"MessagingService","serviceEndpoint":["https://example.com/service"]}],"verificationMethod":[{"id":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86#key-1","type":"Ed25519VerificationKey2018","controller":"did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86","publicKeyMultibase":"z6Mk..."}]}
Additional configuration options
{"network":"testnet"}
DID to deactivate
did:cheqd:testnet:099be283-4302-40cc-9850-22016bcd1d86
^(did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)([?][^#]*)?|did:cheqd:(testnet|mainnet):(?:(?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))*:)*((?:[a-zA-Z0-9]{21,22}|([a-z,0-9,-]{36,36}))+)/resources/([a-z,0-9,-]{36,36})([?][^#]*)?)$
Additional configuration options
{"network":"testnet"}
Walt ID SSI Kit with cheqd support
SSI Kit is an Open Source SDK from walt.id which supports cheqd functionality, and other identity networks, via REST API calls or through a native CLI tool.
Walt.id run multiple SaaS offering for customers with varying levels of support and integration requirements.
In order to be able to onboard the did:cheqd
on testnet and mainnet, SSIKit relies on a cheqd universal registrar deployed on walt.id infrastructure. The DID will be created using a key imported into or also created with SSIKit.
SSI Kit natively supports the following Credential formats:
"DID-Linked Resources" are identified with a did:cheqd
Decentralized Identifier with a Universally Unique Identifier (UUID) that acts as a permanently-accessible link to fetch the resources from the cheqd ledger. We refer to this as the "resource ID". Through the "resource ID" or a set of DID URL query parameters, applications are able to persistently access a digital resource on the cheqd network.
Below are a list of alternatives for creating cheqd DID-Linked Resources.
Create a DID
Create a fully conformant DID using SSI Kit.
Issue a Credential
Issue a fully W3C conformant Credential using walt.id CLI or over REST API.
Verify a Credential
Verify a fully W3C conformant Credential using SSI Kit.
SD-JWT
Selective Disclosure JWT (SD-JWT) is the most commonly adopted credential format for European Digital Identity Ecosystems, allowing users to selectively disclose which attributes they would like to share in a presentation.
JSON (JWT)
JSON Web Token (JWT) Credentials are a simple way to transmit Trusted Data as a JSON object.
JSON-LD
JSON-LD (Linked Data) Credentials are a richer data format, allowing applications to follow embedded links to other pieces of Linked Data across the web.
Create DID-Linked Resource
Create a custom DID-Linked Resource for a schema, Trust Registry or other persistent data file.
Create Status List
Create an on-ledger Status List associated with a DID.
Understanding DID-Linked Resources
Detailed guide explaining the context and technical composition of DID-Linked Resources on cheqd.
DID Resolution and DID URL Dereferencing
Architecture decision record explaining the different parameters for fetching DID Document data on cheqd, including DID-Linked Resources
cheqd Cosmos CLI
Cosmos-native CLI for creating transactions on cheqd. Should be used for testing purposes only.
cheqd Studio
Our API product enables users to use cheqd's functionality with minimal complexity and easily integrate APIs into existing apps.
DID Registrar
Simple setup for building cheqd DIDs into existing applications using REST APIs, building into the Universal Registrar.
Credo
Credo is an SDK which supports the European Architecture and Reference Framework (ARF) standards as well as AnonCreds with full cheqd support for DIDs.