Decentralised-Identifiers

The following DID management functions are available:

List DIDs

The /v1/did endpoint lists the available DIDs.

curl -X 'GET' \
  'https://core.ssikit.walt.id/v1/did' \
  -H 'accept: application/json'

E.g. List the available DIDs.

curl -X 'GET' \
  'https://core.ssikit.walt.id/v1/did' \
  -H 'accept: application/json'

Load DID

The /v1/did/{id} endpoint loads a DID specified by:

  • id - path parameter (required) - the DID url string

curl -X 'GET' \
  'https://core.ssikit.walt.id/v1/did/{id}' \
  -H 'accept: application/json'

E.g. Load the DID = did:key:z6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z.

curl -X 'GET' \
  'https://core.ssikit.walt.id/v1/did/did%3Akey%3Az6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z' \
  -H 'accept: application/json'

Delete DID

The /v1/did/{id} endpoint deletes the DID by:

  • id - path parameter (required) - the DID url string

curl -X 'DELETE' \
  'https://core.ssikit.walt.id/v1/did/{id}' \
  -H 'accept: application/json'

E.g. Delete the DID = did:key:z6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z.

curl -X 'DELETE' \
  'https://core.ssikit.walt.id/v1/did/did%3Akey%3Az6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z' \
  -H 'accept: application/json'

Create DID

The /v1/did/create creates a DID.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '<request-body>'

The method and keyAlias properties are common for all did-method requests, method being required, while keyAlias - optional (if not specified, a new key will be automatically created using the default algorithm according to the did-method). The method-dependent options have default values, if not specified otherwise. Below are the available properties by did-method.

{
    "method": "key",
    "keyAlias": "string",
    "useJwkJcsPub": "boolean"
}
  • useJwkJcsPub (default) - false - specifies whether to create a did:key using the jwk_jcs-pub multicodec (code: 0xeb51)

E.g. Create a DID using the key method and automatically generate a new key.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "method": "key"
}'

Resolve DID

The /v1/did/resolve resolves a DID url string to a DID document.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/resolve' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '<request-body>'

E.g. Resolve the DID = did:key:z6MkqmaCT2JqdUtLeKah7tEVfNXtDXtQyj4yxEgV11Y5CqUa.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/resolve' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "did": "did:key:z6MkqmaCT2JqdUtLeKah7tEVfNXtDXtQyj4yxEgV11Y5CqUa"
}'

Import DID

The /v1/did/import endpoint resolves and imports the specified DID url to the underlying data store.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/import' \
  -H 'accept: application/json' \
  -H 'Content-Type: text/plain' \
  -d '<request-body>'

E.g. Import the DID = did:key:z6MkqmaCT2JqdUtLeKah7tEVfNXtDXtQyj4yxEgV11Y5CqUa.

curl -X 'POST' \
  'https://core.ssikit.walt.id/v1/did/import' \
  -H 'accept: application/json' \
  -H 'Content-Type: text/plain' \
  -d 'did:key:z6MkqmaCT2JqdUtLeKah7tEVfNXtDXtQyj4yxEgV11Y5CqUa'

Last updated