Create Identity Keys and Subject DIDs

Issuers may want to create identity keypairs for multiple reasons, such as for signing payloads or for creating did:key DIDs.

Create an identity key pair.

This endpoint creates an identity key pair associated with the user's account for custodian-mode clients.

post

/key/create

Authorizations
Query parameters
typestring · enum

Key type of the identity key pair to create.

Options: Ed25519, Secp256k1
Responses
curl -L \
  --request POST \
  --url '/key/create' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "kid": "text",
  "publicKeyHex": "text",
  "type": "Ed25519"
}

There is also an option to fetch an identity keypair by inputting a Key ID (kid) as a request format.

Fetch an identity key pair.

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.

get

/key/read/{kid}

Authorizations
Path parameters
kidstringrequired

Key ID of the identity key pair to fetch.

Responses
curl -L \
  --url '/key/read/{kid}' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "kid": "text",
  "publicKeyHex": "text",
  "type": "Ed25519"
}

Creating a Subject DID

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.

Last updated

Was this helpful?