Did management
DID management functions enable the following:
List - lists the available DIDs
Load - loads a DID by the specified id
Delete - deletes a DID by the specified url
Create - creates a new DID
Resolve - resolves a DID to a document
Import - import a DID
For more info on DIDs, go here.
List DID
The /did endpoint lists the available DIDs.
curl -X 'GET' \
'https://custodian.ssikit.walt.id/did' \
-H 'accept: application/json'No parametersThe list of DID stringsE.g. List the available DIDs
curl -X 'GET' \
'https://custodian.ssikit.walt.id/did' \
-H 'accept: application/json'[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX",
"did:web:my.domain",
"did:web:walt.id",
"did:key:z6Mkv58vGsBMwbiyQ3P93MRnYfRgGvn4STEEsj5hFHYe51wu"
]Load DID
The /did/{id} endpoint loads a DID specified by:
id path parameter (required) - the DID url string
curl -X 'GET' \
'https://custodian.ssikit.walt.id/{id}' \
-H 'accept: application/json'No parameters{
"assertionMethod":
[
"string"
],
"authentication":
[
"string"
],
"@context":
[
"string"
],
"id": "string",
"verificationMethod":
[
{
"controller": "string",
"id": "string",
"publicKeyJwk":
{
"alg": "string",
"crv": "string",
"kid": "string",
"kty": "string",
"use": "string",
"x": "string"
},
"type": "string"
}
]
}E.g Load the DID having the id = did:web:walt.id.
curl -X 'GET' \
'https://custodian.ssikit.walt.id/did/did%3Aweb%3Awalt.id' \
-H 'accept: application/json'{
"assertionMethod":
[
"did:web:walt.id#186a1e0a6d42459ba902724fe7643ed4"
],
"authentication":
[
"did:web:walt.id#186a1e0a6d42459ba902724fe7643ed4"
],
"@context":
[
"https://www.w3.org/ns/did/v1"
],
"id": "did:web:walt.id",
"verificationMethod":
[
{
"controller": "did:web:walt.id",
"id": "did:web:walt.id#186a1e0a6d42459ba902724fe7643ed4",
"publicKeyJwk":
{
"alg": "EdDSA",
"crv": "Ed25519",
"kid": "186a1e0a6d42459ba902724fe7643ed4",
"kty": "OKP",
"use": "sig",
"x": "7-ofBq4vt0ePzC5IjiWkqTedfSv7WJJr6-HsQNXsr2M"
},
"type": "Ed25519VerificationKey2019"
}
]
}Delete DID
The /did/{id} deletes the DID specified by:
url - path parameter (required) - the DID url string
curl -X 'DELETE' \
'https://custodian.ssikit.walt.id/did/{id}' \
-H 'accept: application/json'No parametersCode 200E.g. Delete the DID having id = did:web:walt.id.
curl -X 'DELETE' \
'https://custodian.ssikit.walt.id/did/did%3Aweb%3Awalt.id' \
-H 'accept: application/json'Create DID
The /did/create endpoint creates a DID.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '<request-body>'{
"method": "string",
"keyAlias": "string",
"method-dependent-options": "..."
}The DID url stringThe 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)
{
"method": "web",
"keyAlias": "string",
"didWebDomain": "string",
"didWebPath": "string"
}didWebDomain(default) - "walt.id"didWebPath(default) - empty-string
{
"method": "ebsi",
"keyAlias": "string",
"version": "int"
}version(default) - 1
{
"method": "cheqd",
"keyAlias": "string",
"network": "string"
}network(default) - "testnet"
{
"method": "iota",
"keyAlias": "string"
}{
"method": "jwk",
"keyAlias": "string"
}E.g. Create a DID using the web method having the domain set to walt.id.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"method": "web",
"didWebDomain": "walt.id"
}'{
"method": "web",
"didWebDomain": "walt.id"
}did:web:walt.idResolve DID
The /did/resolve endpoint resolves a DID.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/resolve' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '<request-body>'{
"did": "string"
}{
"assertionMethod":
[
"string"
],
"authentication":
[
"string"
],
"@context":
[
"string"
],
"id": "string",
"verificationMethod":
[
{
"controller": "string",
"id": "string",
"publicKeyJwk":
{
"alg": "string",
"crv": "string",
"kid": "string",
"kty": "string",
"use": "string",
"x": "string"
},
"type": "string"
}
]
}E.g. Reslove the DID having id = did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/resolve' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"did": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
}'{
"did": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
}{
"assertionMethod":
[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
],
"authentication":
[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
],
"capabilityDelegation":
[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
],
"capabilityInvocation":
[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX"
],
"@context":
[
"https://www.w3.org/ns/did/v1"
],
"id": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX",
"keyAgreement":
[
"did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6LShXhgLqK3vQX3eg18gwZUYNtt6M6FjPqpV1eQD86m8Hwh"
],
"verificationMethod":
[
{
"controller": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX",
"id": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX",
"publicKeyBase58": "6tW7uQ6c3YgZDoCFbHMB6QFjPENyHRouTUwGnLv36wS9",
"type": "Ed25519VerificationKey2019"
},
{
"controller": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX",
"id": "did:key:z6MkkLmAVeM3P6B2LJ2xGrK1wVojCoephK4G9VrCcct42ADX#z6LShXhgLqK3vQX3eg18gwZUYNtt6M6FjPqpV1eQD86m8Hwh",
"publicKeyBase58": "6rXWpXWBpwoJZHdNAJ3XDngQFCZ92nffc2viifTEQvAw",
"type": "X25519KeyAgreementKey2019"
}
]
}Import DID
The /did/import endpoint resolves and imports the DID to the underlying data store.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/import' \
-H 'accept: application/json' \
-H 'Content-Type: text/plain' \
-d '<request-body>'The DID url string.
Code 201E.g. Import DID having id = did:key:z6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z.
curl -X 'POST' \
'https://custodian.ssikit.walt.id/did/import' \
-H 'accept: application/json' \
-H 'Content-Type: text/plain' \
-d 'did:key:z6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3z'did:key:z6Mkm8NbvDnnxJ2t5zLGSkYGCWZiqq11Axr58xQ3ZG1Jss3zLast updated
Was this helpful?
