DID API
Is now in the development stage.

DID API

get_did_object(id)

Getting did object.

Parameters

Option
Description
const string& id
Identifier for did object

Example

1
{
2
"jsonrpc": "2.0",
3
"params": [
4
"did",
5
"get_did_object",
6
[
7
"255.1.25.0"
8
]
9
],
10
"method": "call",
11
"id": 1
12
}
Copied!

Returns

Did object in json view. If there is no object, an empty DID Document will be returned.
1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"result": "{\"@context\":\"https://w3id.org/did/v1\",\"id\":\"did:echo:255.1.25.0\",\"publicKey\":[{\"id\":\"did:echo:255.1.25.0\",\"type\":\"Ed25519VerificationKey2018\",\"publicKeyBase58\":\"6XS3BMVnEHAzo1PhHWt9vndrZn2P27tCbU9WdqCM8sJu#key-1\"}],\"authentication\":[{\"type\":\"Ed25519SignatureAuthentication2018\",\"publicKey\":\"did:echo:255.1.25.0#key-1\"}]}"
5
}
Copied!

get_key(id_string)

Get the verification method and public key for a specific key identifier.

Parameters

Option
Description
const string& id_string
Key identifier

Example

1
{
2
"jsonrpc": "2.0",
3
"params": [
4
"did",
5
"get_key",
6
[
7
"did:echo:255.1.25.0#key-1"
8
]
9
],
10
"method": "call",
11
"id": 1
12
}
Copied!

Returns

Verification method and public key. If there is no object, an empty "null" will be returned.
1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"result": [
5
"Ed25519VerificationKey2018",
6
"6XS3BMVnEHAzo1PhHWt9vndrZn2P27tCbU9WdqCM8sJu"
7
]
8
}
Copied!

get_keys(id_string)

Get the list verification methods and public keys for a specific did identifier.

Parameters

Option
Description
const string& id_string
Did identifier

Example

1
{
2
"jsonrpc": "2.0",
3
"params": [
4
"did",
5
"get_keys",
6
[
7
"did:echo:255.1.25.0"
8
]
9
],
10
"method": "call",
11
"id": 1
12
}
Copied!

Returns

List verification methods and public keys. If there is no object, an empty "null" will be returned.
1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"result": [
5
[
6
"Ed25519VerificationKey2018",
7
"6XS3BMVnEHAzo1PhHWt9vndrZn2P27tCbU9WdqCM8sJu"
8
]
9
]
10
}
Copied!
Last modified 1yr ago