Create a DID
Last updated
Was this helpful?
Last updated
Was this helpful?
These instructions will help developers create DIDs on cheqd using the DID Registrar.
Any framework for creating keys and signing payloads, such as Veramo CLI;
cheqd DID Registrar
5 minutes!
Figure 1: Swagger UI for DID Registrar
This tutorial will be using the Veramo CLI for Key management. Setup the cli following this tutorial
Enter the below command in the cli
Go to "cheqd helpers" in our Registrar Driver here and click "try it out" in the top right corner.
Select the following options:
Select VerificationMethodType
Select MethodSpecificAlgo
Select network
Enter the publicKeyHex value generated in the previous step
Figure 2: Creating a DID payload from template
Copy the didDoc
field from the output.
Use /create
to publish the DID
Paste the contents of didDoc
from the previous step in the didDocument
field of the /create
api body
Click on execute to perform the request
This response requests an action
for you to sign the serialized payload again in a CLI. This is a security feature which means you are not passing your private key to the Registrar. Note down the serialized payload, jobId from the response
Sign the serialized payload in your CLI with the below command
Fill in the prompts
keyRef: Enter the kid of the keyPair generated in the first step
algorithm: Ed25519
data to sign: Paste the serialized payload from the previous step
enconding: Select base64
NOTE: If there are n verification methods for the controller then n signatures are required to publish a DID.
Copy the Result value from the response.
Use the /create
api again
Create the payload using the following values
jobId
secret
signingResponse
verificationMethodId
signature
Click on Execute
The state in didState should be finished
in the response, the DID is created successfully
You can check your DID on the universal resolver or by going to https://resolver.cheqd.net/1.0/identifiers/{yourDID}