Skip to main content

Keymaster API

warning

This feature is currently in the experimental stage of development. Do not use it in production environments or presume it is secure. Expect breaking changes.

Keymaster API (1.0.0)

Download OpenAPI specification:Download

API for managing wallets, identities, credentials, and more

General

General API routes

Check if the API is ready

Responses

Response samples

Content type
application/json
"ready"

List all registries

Responses

Response samples

Content type
application/json
[
  • "local",
  • "hyperswarm",
  • "TESS"
]

Create an asset

Request Body schema: application/json
required
asset
object

Responses

Request samples

Content type
application/json
{
  • "asset": { }
}

Response samples

Content type
application/json
{ }

Wallet

Wallet management routes

Load wallet

Responses

Response samples

Content type
application/json
{
  • "seed": {
    },
  • "counter": 2,
  • "ids": {
    },
  • "names": {
    },
  • "current": "example-id"
}

Save wallet

Request Body schema: application/json
required
wallet
object

Responses

Request samples

Content type
application/json
{
  • "wallet": { }
}

Response samples

Content type
application/json
{ }

Create a new wallet

Request Body schema: application/json
required
mnemonic
string
overwrite
boolean

Responses

Request samples

Content type
application/json
{
  • "mnemonic": "string",
  • "overwrite": true
}

Response samples

Content type
application/json
{ }

Backup wallet

Responses

Response samples

Content type
application/json
{ }

Recover wallet

Responses

Response samples

Content type
application/json
{ }

Check wallet

Responses

Response samples

Content type
application/json
{ }

Fix wallet

Responses

Response samples

Content type
application/json
{ }

Get decrypted mnemonic

Responses

Response samples

Content type
application/json
"equip vital solution badge crucial pitch excite fork favorite soldier scene tray"

Rotate keys

Responses

Response samples

Content type
application/json
{ }

Encrypt a message

Request Body schema: application/json
required
msg
string
did
string

Responses

Request samples

Content type
application/json
{
  • "msg": "string",
  • "did": "string"
}

Response samples

Content type
application/json
{ }

Decrypt a message

Request Body schema: application/json
required
did
string

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{ }

Add a signature

Request Body schema: application/json
required
contents
string

Responses

Request samples

Content type
application/json
{
  • "contents": "string"
}

Response samples

Content type
application/json
{ }

Verify a signature

Request Body schema: application/json
required
json
object

Responses

Request samples

Content type
application/json
{
  • "json": { }
}

Response samples

Content type
application/json
true

Identity

Identity management routes

Get current ID

Responses

Response samples

Content type
application/json
"string"

Set current ID

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
"string"

List all IDs

Responses

Response samples

Content type
application/json
[
  • { }
]

Create a new ID

Request Body schema: application/json
required
name
string
registry
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "registry": "string"
}

Response samples

Content type
application/json
{ }

Resolve an ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "didDocument": {
    },
  • "didDocumentMetadata": {
    },
  • "didDocumentData": { },
  • "mdip": {
    }
}

Remove an ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Backup an ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Recover an DID

path Parameters
did
required
string
Request Body schema: application/json
required
did
string

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{ }

Name

Name management routes

List all names

Responses

Response samples

Content type
application/json
[
  • "string"
]

Add a new name

Request Body schema: application/json
required
name
string
did
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "did": "string"
}

Response samples

Content type
application/json
{ }

Resolve a name to DID

path Parameters
name
required
string

Responses

Response samples

Content type
application/json
{
  • "didDocument": {},
  • "didDocumentMetadata": {
    },
  • "didDocumentData": {
    },
  • "mdip": {
    }
}

Remove a name

path Parameters
name
required
string

Responses

Response samples

Content type
application/json
{ }

Challenge

Challenge and response routes

Create an empty challenge

Responses

Response samples

Content type
application/json
"did:string"

Create a custom challenge

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Create a response to a challenge

Request Body schema: application/json
required
challenge
object

Responses

Request samples

Content type
application/json
{
  • "challenge": { }
}

Response samples

Content type
application/json
{ }

Verify a response

Request Body schema: application/json
required
response
object
challenge
object

Responses

Request samples

Content type
application/json
{
  • "response": { },
  • "challenge": { }
}

Response samples

Content type
application/json
{ }

Group

Group management routes

Create a new group

Request Body schema: application/json
required
name
string
registry
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "registry": "string"
}

Response samples

Content type
application/json
{ }

Get a group

path Parameters
name
required
string

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "members": [
    ]
}

Add a member to a group

path Parameters
name
required
string
Request Body schema: application/json
required
member
string

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
{ }

Remove a member from a group

path Parameters
name
required
string
Request Body schema: application/json
required
member
string

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
{ }

Test if a member is in a group

path Parameters
name
required
string
Request Body schema: application/json
required
member
string

Responses

Request samples

Content type
application/json
{
  • "member": "string"
}

Response samples

Content type
application/json
true

Credential

Credential management routes

Create a credential

Request Body schema: application/json
required
schema
object

Responses

Request samples

Content type
application/json
{
  • "schema": { }
}

Response samples

Content type
application/json
{ }

Bind a credential

Request Body schema: application/json
required
schema
object
subject
object

Responses

Request samples

Content type
application/json
{
  • "schema": { },
  • "subject": { }
}

Response samples

Content type
application/json
{ }

List all held credentials

Responses

Response samples

Content type
application/json
[
  • { }
]

Accept a credential

Request Body schema: application/json
required
did
string

Responses

Request samples

Content type
application/json
{
  • "did": "string"
}

Response samples

Content type
application/json
{ }

Get a credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

Remove a credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

Publish a credential

path Parameters
did
required
string
Request Body schema: application/json
required
reveal
boolean

Responses

Request samples

Content type
application/json
{
  • "reveal": true
}

Response samples

Content type
application/json
{ }

Unpublish a credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

List all issued credentials

Responses

Response samples

Content type
application/json
[
  • { }
]

Get an issued credential

path Parameters
did
required
string
Request Body schema: application/json
required
credential
object
registry
string

Responses

Request samples

Content type
application/json
{
  • "credential": { },
  • "registry": "string"
}

Response samples

Content type
application/json
{ }

Update an issued credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

Revoke an issued credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

Poll

Polling endpoints

Create a poll

Request Body schema: application/json
required
poll
object

Responses

Request samples

Content type
application/json
{
  • "poll": { }
}

Response samples

Content type
application/json
{ }

View a poll

path Parameters
poll
required
string

Responses

Response samples

Content type
application/json
{ }

Vote in a poll

Request Body schema: application/json
required
poll
string
vote
object
spoil
boolean

Responses

Request samples

Content type
application/json
{
  • "poll": "string",
  • "vote": { },
  • "spoil": true
}

Response samples

Content type
application/json
{ }

Update a poll

Request Body schema: application/json
required
ballot
object

Responses

Request samples

Content type
application/json
{
  • "ballot": { }
}

Response samples

Content type
application/json
{ }

Publish a poll

path Parameters
poll
required
string
Request Body schema: application/json
required
reveal
boolean

Responses

Request samples

Content type
application/json
{
  • "reveal": true
}

Response samples

Content type
application/json
{ }

Unpublish a poll

path Parameters
poll
required
string

Responses

Response samples

Content type
application/json
{ }

Schemas

Schema endpoints

Create a template

path Parameters
id
required
string
Request Body schema: application/json
required
schema
object

Responses

Request samples

Content type
application/json
{
  • "schema": { }
}

Response samples

Content type
application/json
{ }

Create new schema

Request Body schema: application/json
required
schema
object

Responses

Request samples

Content type
application/json
{
  • "schema": { }
}

Response samples

Content type
application/json
{ }

List schemas

Responses

Response samples

Content type
application/json
{ }

Get a schema

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Update a schema

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Test if id is a valid schema

path Parameters
id
required
string
Request Body schema: application/json
required
schema
object

Responses

Request samples

Content type
application/json
{
  • "schema": { }
}

Response samples

Content type
application/json
{ }