Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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.
Update a did:cheqd DID from Credo Agent
Follow these instructions to update a did:cheqd DID from Credo Agent.
To update a DID Document, fetch the body of the DID Document you want to change from the DID Resolver, make the relevant updates and pass it as the parameter
did
*
didDocument
*: The updated DID Document
options
secret
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.
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.
To issue Verifiable Credentials, the issuer will have to first create a Schema and then a Credential Definition.
⚠️ Before you begin...
Make sure you've correctly configured the Credo agent with cheqd.
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 here.
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.
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.
If you want to learn more about what Verifiable Credentials and Presentations are, please go over to our learning site here.
Below are a list of alternatives for using Credentials with cheqd support. Each offers a different set of protocols and underlying technical capabilities.
Learn about Verifiable Credentials and Presentations
Setup Credo Agent
Before you get started, you need to setup your Credo Agent.
Issue Credentials
Issue Verifiable Credentials signed by cheqd DIDs using Credo.
Present Credentials
Present Verifiable Credentials using Credo.
cheqd Studio
Our API product enables users to use cheqd's functionality with minimal complexity and easily integrate APIs into existing apps.
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.
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
.
Using and the , 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 is recommended.
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.
To enable revocation, the options
must contain the revocation flag, and the size of the revocation registry. Also, ensure that a Tails Server is configured for the issuer.
"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.
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>
resourceId
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
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.
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.
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.