Agent

OpenAPI documentation for the Agent module

This endpoint facilitates the retrieval of a DID document id.

GET../public/did
Response
Body
any
Request
const response = await fetch('../public/did', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Returns all the information needed to see the status of the services running

GET../public/getStatus
Response
Body
state*enum

What state is the Agent in

startingrunningdid_resolving
did*GetStatusDidDto (object)
started*string

Agent started date with timestamp in ISO

Example: "2011-10-05T14:48:00.000Z"
timestamp*string

Current date with timestamp in ISO

Example: "2011-10-05T14:48:00.000Z"
version*GetStatusVersionDto (object)
Request
const response = await fetch('../public/getStatus', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "state": "starting",
  "did": {
    "did": "did:bsv:1234",
    "ready": true,
    "controller": "https://did.identity.controller.nchainplatform.com/",
    "resolver": "https://did.identity.resolver.nchainplatform.com/"
  },
  "started": "2011-10-05T14:48:00.000Z",
  "timestamp": "2011-10-05T14:48:00.000Z",
  "version": {
    "version": "v1.1.0",
    "commit": "4bfccdd063f6d21d34beba1c48eb6e82170d99f0",
    "development": true,
    "buildTime": "2011-10-05T14:48:00.000Z"
  }
}

Retrieve information about credential types and configurations

Endpoint facilitates the retrieval of a list of credentials that can be issued based on the provided correlationId. This endpoint expects the correlationId to be passed as a path parameter. Upon receiving a request, the server searches for JSON files located in the /dev/oid4vci_metadata directory, matching the correlationId with the correlationId property in the JSON files. It also returns metadata, which has fields credential_issuer (tells web address where issuer is located) and credential_endpoint (tells web address endpoint where credential can be claimed). It also returns display object and credential_supplier_configobject. display field name will be displayed in wallet app as Authority Name when accepting a credential. Object credential_supplier_config returns all templates and mappings for the credential supplier.

GET../public/{correlationId}/.well-known/openid-credential-issuer
Path parameters
correlationId*string

The correlation ID defined on the server (nchain in our case).

Response
Body
credential_issuer*string
credential_endpoint*string
display*array of WellKnownOpenidCredentialIssuerDisplayDto (object)
credentials_supported*array of WellKnownOpenidCredentialIssuerCredentialsSupportedDto (object)
Request
const response = await fetch('../public/{correlationId}/.well-known/openid-credential-issuer', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "credential_issuer": "text",
  "credential_endpoint": "text",
  "display": {
    "name": "Organisation Issuer",
    "description": "<p>Organisation Issuer</p>",
    "__$markdownParsed": true
  },
  "credentials_supported": [
    {
      "display": {
        "name": "Email Credential",
        "description": "<p>Email Credential for Organisation</p>",
        "__$markdownParsed": true
      },
      "order": [
        "name-of-claim"
      ],
      "credentialSubject": {
        "name-of-claim": "value"
      }
    }
  ]
}

Last updated