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
Response samples
- 200
Content type
application/json
{- "seed": {
- "mnemonic": "string",
- "hdkey": {
- "xpriv": "string",
- "xpub": "string"
}
}, - "counter": 2,
- "ids": {
- "example-id": {
- "did": "did:test:string",
- "account": 1,
- "index": 0
}
}, - "names": {
- "example-name-1": "did:string",
- "example-name-2": "did:string",
- "example-name-3": "did:string"
}, - "current": "example-id"
}
Encrypt a message
Request Body schema: application/jsonrequired
msg | string |
receiver | string |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "msg": "string",
- "receiver": "string",
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Encrypt JSON
Request Body schema: application/jsonrequired
json | object |
receiver | string |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "json": { },
- "receiver": "string",
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Response samples
- 200
Content type
application/json
{- "didDocument": {
- "id": "did:test:string",
- "verificationMethod": [
- {
- "id": "#key-1",
- "controller": "did:test:string",
- "type": "string",
- "publicKeyJwk": {
- "kty": "EC",
- "crv": "secp256k1",
- "x": "string",
- "y": "string"
}
}
], - "authentication": [
- "#key-1"
]
}, - "didDocumentMetadata": {
- "created": "2024-07-26T19:27:03.379Z",
- "version": 1,
- "confirmed": true
}, - "didDocumentData": { },
- "mdip": {
- "version": 1,
- "type": "string",
- "registry": "TBTC"
}
}
Response samples
- 200
Content type
application/json
{- "names": {
- "Alice": "did:test:z3v8AuajL3eA67e1kbHkRpwPAzBaoNxrWS2T3aM1Q7f96ScetCK",
- "Bob": "did:test:z3v8AuajNV8UTtdm2X7PzmXvVrNP5iQTX2ebjsHkcF1NS9BCV7v",
- "Carol": "did:test:z3v8AuaaZZqtVPZuHAqFkJhwKrcuAYaud8XA2MjrFYBth7ifELZ",
- "Dave": "did:test:z3v8AuaUd8ExyT4ZfvRdPXzUWrsZqLAE9a8aiYUL7Fya4ncrK4p"
}
}
Response samples
- 200
Content type
application/json
{- "didDocument": {
- "id": "did:test:string",
- "controller": "did:test:string"
}, - "didDocumentMetadata": {
- "created": "2024-07-26T19:53:44.468Z",
- "version": 2,
- "confirmed": true,
- "updated": "2024-07-26T19:56:36.636Z"
}, - "didDocumentData": {
- "name": "string",
- "members": [
- "did:test:string"
]
}, - "mdip": {
- "version": 1,
- "type": "string",
- "registry": "string"
}
}
Create a custom challenge
Request Body schema: application/jsonrequired
challenge | object |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "challenge": { },
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Create a response to a challenge
Request Body schema: application/jsonrequired
challenge | object |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "challenge": { },
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Issue a credential
Request Body schema: application/jsonrequired
credential | object |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "credential": { },
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Vote in a poll
Request Body schema: application/jsonrequired
poll | string |
vote | object |
options | object |
Responses
Request samples
- Payload
Content type
application/json
{- "poll": "string",
- "vote": { },
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Create a template
path Parameters
id required | string |
Request Body schema: application/jsonrequired
schema | object |
Responses
Request samples
- Payload
Content type
application/json
{- "schema": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}
Request samples
- Payload
Content type
application/json
{- "schema": { },
- "options": { }
}
Response samples
- 200
Content type
application/json
{- "did": "did:test:z3v8Auaha4rszsBwMyApaY9eUR1pipjGASYvqqfuXiXhxA8DXmo"
}