Create a DID
Create a did:cheqd DID using the Credo Agent.
This tutorial shows you how to create a cheqd DID using your configured Credo Agent, and how to publish the associated DID Document to the cheqd ledger.
โ ๏ธ Prerequisites
Before you begin:
โ Ensure your Credo agent is correctly configured with the
@credo-ts/cheqd
moduleโ Youโve set up a
cosmosPayerSeed
for publishing to the cheqd networkโ You're connected to the correct network (
mainnet
ortestnet
)
Method Overview
Credo supports two approaches to creating a DID:
Option 1 โ Manually construct a full DID Document
Use when you want full control over the DID structure and already have key(s) in your wallet.
Option 2 โ Auto-generate the DID Document
Use when you want Credo to create the DID Document from a key you specify in secret
.
Create DID
Parametersโ
method
*:cheqd
secret
options
*didDocument
Option 1: Create a DID from a full DID Document
First, generate a key pair:
Use that key to construct and register the DID Document:
๐ Make sure the
publicKeyBase58
matches the key in your wallet. The DID will be written to thetestnet
unless you specify"mainnet"
inoptions.network
.
Option 2โ
If you donโt want to manually build a DID Document, you can let Credo handle it based on your input key type and ID.
๐ Credo will generate the DID Document using the key referenced in
secret
and publish it to the network.
Whatโs Next?
Now that your DID is live on the cheqd network, try:
Create DID-Linked Resource
Associate DID-Linked Resources to your DID using Credo.
Issue Verifiable Credentials
Issue Credentials using your cheqd DID using Credo.
Last updated
Was this helpful?