DIDs

Create and manage DIDs owned by the cloud agent

Dids are a core component of the Cloud Agent, they are the identifiers that the cloud agent uses when engaging in DI operations (e.g. issuing VCs).

Create a DID

The Cloud Agent service supports multiple DID types (DID methods) to be created. All DIDs are created with the createDid mutation, with different inputs depending on the DID method. A private human readable and searchable alias can be assigned to DIDs for record-keeping purposes.

Cheqd DID

did:cheqd DIDs can be created by the cloud agent and written permanently to the cheqd ledger as a production-ready DID. The network parameter determines whether the DID is created on testnet or mainnet.

mutation MyMutation {
  createDid(
    input: {
      alias: "MyCheqdDID"
      createCheqdDidOptions: {
        network: TESTNET
      }
    }
  ) {
    did
    alias
    methodData {
      ... on CheqdDidMethodData {
        network
      }
    }
    createdTimestamp
    primary
  }
}

Key DID

Alternatively, did:key DIDs are a basic no-cost DID that the cloud agent can create, ideal for development. The keyType parameter determines which cryptographic key type is used for the DID.

Set a primary DID

A Cloud Agent DID can be set the 'primary' DID for the agent, unsetting any existing primary DID. Setting a primary DID is purely for referential and record-keeping purposes when interacting with the Cloud Agent.

Update a DID

A DID's metadata, including its alias and archived status can be updated.

View DIDs

DIDs created by the cloud agent can be listed, using pagination and filtering options. This query returns a nextToken which can be passed into the same query in order to fetch subsequent pages.

Alternatively, a single DID can be viewed, referenced by its unique identifier.

The current primary DID for the agent can be viewed with a standalone query.

Last updated