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 Credential Service 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 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 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 on the Swagger UI, 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.
Set up your account
Set up your account with cheqd Credential Service and log in to start using the APIs.