REST API

In the following examples, replacehttps://lto.example.com with the domain or IP address of your node.

Authorization

A node can be configured with an authorization token. This can be done in case the api of the node is exposed publicly. Once the token is configured the anchoring of hash on the chain requires an authorization header

Authorization: bearer <token>

Decentralized identifiers (DID)

get
Resolve DID

https://lto.example.com/identities/:address
Resolve a DID into a DID document
Request
Response
Request
Path Parameters
address
required
string
DID or LTO address
Response
200: OK

get
Resolve derived DID

https://lto.example.com/identities/:address/derived/:secret
Request
Response
Request
Path Parameters
address
required
string
DID or LTO address
secret
required
string
Base58 encoded random secret
Response
200: OK

Trust network

get
Get all the roles of an identity

https://lto.example.com/trust/:address
Resolves the roles from an identity
Request
Response
Request
Query Parameters
address
required
string
Account's address in Base58 format
Response
200: OK
{
"roles": [
"authority",
"notary"
],
"issues_roles": [
{ "type": 100, "role": "notary" }
],
"issues_authorization": [
"https://www.w3.org/2018/credentials/examples/v1"
]
}
400: Bad Request
{
"error": "invalid address"
}

Verifiable credentials

post
Verify that a verifiable credential is valid

https://lto.example.com/verify
Request
Response
Request
Response
200: OK