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": true
}

List all registries

Responses

Response samples

Content type
application/json
{
  • "registries": [
    ]
}

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
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
{
  • "ok": true
}

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
{
  • "ok": true
}

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
{
  • "ok": true
}

Encrypt a message

Request Body schema: application/json
required
msg
string
receiver
string
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
"string"

Encrypt JSON

Request Body schema: application/json
required
json
object
receiver
string
options
object

Responses

Request samples

Content type
application/json
{
  • "json": { },
  • "receiver": "string",
  • "options": { }
}

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Decrypt JSON

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
{
  • "ok": true
}

List all IDs

Responses

Response samples

Content type
application/json
{
  • "ids": [
    ]
}

Create a new ID

Request Body schema: application/json
required
name
string
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
{
  • "ok": true
}

Backup an ID

path Parameters
id
required
string

Responses

Response samples

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

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
{
  • "recovered": "Bob"
}

Name

Name management routes

List all names

Responses

Response samples

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

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
{
  • "ok": true
}

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
{
  • "ok": true
}

Challenge

Challenge and response routes

Create an empty challenge

Responses

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Create a custom challenge

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Create a response to a challenge

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Verify a response

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

Responses

Request samples

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

Response samples

Content type
application/json
{ }

Group

Group management routes

Create a new group

Request Body schema: application/json
required
name
string
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
{
  • "ok": true
}

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
{
  • "ok": true
}

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
{
  • "test": true
}

Credential

Credential management routes

Bind a credential

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

Responses

Request samples

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

Response samples

Content type
application/json
{ }

List all held credentials

Responses

Response samples

Content type
application/json
{
  • "held": [
    ]
}

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
{
  • "ok": true
}

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
{
  • "ok": true
}

Publish a credential

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

Responses

Request samples

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

Response samples

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

Unpublish a credential

path Parameters
did
required
string

Responses

Response samples

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

List all issued credentials

Responses

Response samples

Content type
application/json
{
  • "issued": [
    ]
}

Issue a credential

Request Body schema: application/json
required
credential
object
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Get an issued credential

path Parameters
did
required
string

Responses

Response samples

Content type
application/json
{ }

Update an issued credential

path Parameters
did
required
string

Responses

Response samples

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

Revoke an issued credential

path Parameters
did
required
string

Responses

Response samples

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

Poll

Polling endpoints

Create a poll

Request Body schema: application/json
required
poll
object
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
options
object

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

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
{
  • "ok": true
}

Publish a poll

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

Responses

Request samples

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

Response samples

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

Unpublish a poll

path Parameters
poll
required
string

Responses

Response samples

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

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
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

Create new schema

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}

List schemas

Responses

Response samples

Content type
application/json
{
  • "schemas": [
    ]
}

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
{
  • "ok": true
}

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
{
  • "test": true
}