DID Management

Generate DID documents

post

Generates new DID documents for the specified methods.

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Body
methodsstring[]Required

DID method which will be used for generate DID documents

Example: ["empe","empe-testnet","web"]
Responses
201

The DID documents have been successfully created.

application/json
post
/did/generate
POST /did/generate HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41

{
  "methods": [
    "empe",
    "empe-testnet",
    "web"
  ]
}
[
  {
    "@context": "https://www.w3.org/ns/did/v1",
    "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "verificationMethod": [
      {
        "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1",
        "type": "Ed25519VerificationKey2020",
        "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
        "publicKeyMultibase": "z6MkoTHsg2YMW1qSw7pdPcyKyKR4jaHmkKMM2cQEKDSNmhd7"
      }
    ],
    "authentication": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "assertionMethod": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "capabilityInvocation": [],
    "capabilityDelegation": [],
    "keyAgreement": [],
    "service": [],
    "alsoKnownAs": []
  }
]

Import DID documents from mnemonics

post

Restores/creates DID documents for the specified methods using a mnemonic phrase.

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Body
methodsstring[]Required

DID method which will be used for generate DID documents

Example: ["empe","empe-testnet","web"]
mnemonicsstringRequired

Mnemonic phrase used to restore the DID(s).

Example: abandon ability able about above absent absorb abstract absurd abuse access accident
Responses
201

The DID documents have been successfully imported.

application/json
post
/did/import
POST /did/import HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "methods": [
    "empe",
    "empe-testnet",
    "web"
  ],
  "mnemonics": "abandon ability able about above absent absorb abstract absurd abuse access accident"
}
[
  {
    "@context": "https://www.w3.org/ns/did/v1",
    "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "verificationMethod": [
      {
        "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1",
        "type": "Ed25519VerificationKey2020",
        "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
        "publicKeyMultibase": "z6MkoTHsg2YMW1qSw7pdPcyKyKR4jaHmkKMM2cQEKDSNmhd7"
      }
    ],
    "authentication": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "assertionMethod": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "capabilityInvocation": [],
    "capabilityDelegation": [],
    "keyAgreement": [],
    "service": [],
    "alsoKnownAs": []
  }
]

Retrieve a DID document by method

get

Fetches the existing DID document for the specified method. For EMPE_TESTNET, the underlying network must be TESTNET.

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Path parameters
methodstring · enumRequired

The DID method to resolve.

Possible values:
Responses
get
/dids/{method}
GET /dids/{method} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
  "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
  "verificationMethod": [
    {
      "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
      "publicKeyMultibase": "z6MkoTHsg2YMW1qSw7pdPcyKyKR4jaHmkKMM2cQEKDSNmhd7"
    }
  ],
  "authentication": [
    "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
  ],
  "assertionMethod": [
    "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
  ],
  "capabilityInvocation": [],
  "capabilityDelegation": [],
  "keyAgreement": [],
  "service": [],
  "alsoKnownAs": []
}

Retrieve all DID documents for authenticated user

get

Fetches all DID documents from all networks

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Responses
get
/dids
GET /dids HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The DID documents have been successfully retrieved

[
  {
    "@context": "https://www.w3.org/ns/did/v1",
    "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
    "verificationMethod": [
      {
        "id": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1",
        "type": "Ed25519VerificationKey2020",
        "controller": "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA",
        "publicKeyMultibase": "z6MkoTHsg2YMW1qSw7pdPcyKyKR4jaHmkKMM2cQEKDSNmhd7"
      }
    ],
    "authentication": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "assertionMethod": [
      "did:empe:testnet:EiBZK8AeSe3xq-hiMgL2-zkSe8XAoIcMNxQmoK3vpE97kA#key-1"
    ],
    "capabilityInvocation": [],
    "capabilityDelegation": [],
    "keyAgreement": [],
    "service": [],
    "alsoKnownAs": []
  }
]

Serve did:web did.json for a given user

get
Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Path parameters
idstringRequired

User id

Responses
get
/did/user/{id}/did.json
GET /did/user/{id}/did.json HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success

No content

Last updated