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)

Resolve DID

GET https://lto.example.com/identities/:address

Resolve a DID into a DID document

Path Parameters

Resolve derived DID

GET https://lto.example.com/identities/:address/derived/:secret

Path Parameters

Trust network

Get all the roles of an identity

GET https://lto.example.com/trust/:address

Resolves the roles from an identity

Query Parameters

{
  "roles": [
    "authority",
    "notary"
  ],
  "issues_roles": [
    { "type": 100, "role": "notary" }
  ],
  "issues_authorization": [
    "https://www.w3.org/2018/credentials/examples/v1"
  ]
}

Last updated