Skip to main content
European CommissionEBSI European Blockchain
Select the Environment you want to work withEnvironment:

JSON-RPC API

Last updated on
POST 

/trusted-issuers-registry/v4/jsonrpc

The JSON-RPC API provides methods assisting the construction of blockchain transactions for TIR SC operations, and interaction with the ledger.

Request

Body

The body follows the JSON-RPC 2.0 specification.

It requires the following fields:

  • jsonrpc: must be exactly "2.0"
  • method: method to be invoked
  • params: method parameters
  • id: identifier established by the client

API Methods

insertIssuer

Call to build an unsigned transaction to insert a new issuer. This method is restricted to RootTAOs, TAOs, or admins registered in the Trusted Policies Registry. If the new issuer is a RootTAO it must be registered by an admin registered in the Trusted Policies Registry. Requires an access token with "tir_write" scope.

Parameters:

  • from: Ethereum address of the administrator
  • did: DID of the issuer to insert
  • attributeData: Verifiable credential converted to hex string
  • issuerType: 1 (RootTAO), 2 (TAO), 3 (TI), or 4 (Revoked)
  • taoDid: DID of the TAO accrediting the issuer
  • taoAttributeId: Attribute ID that accredits taoDid as TAO or RootTAO

updateIssuer

Call to build an unsigned transaction to add a new attribute to, or update an existing attribute of, an issuer. The issuer can be updated by the corresponding TAO, RootTAO, or an admin registered in the Trusted Policies Registry. Requires an access token with "tir_write" scope.

Parameters (add a new attribute):

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • attributeData: Verifiable credential converted to hex string
  • issuerType: 1 (RootTAO), 2 (TAO), 3 (TI), or 4 (Revoked)
  • taoDid: DID of the TAO accrediting the issuer
  • taoAttributeId: Attribute ID that accredits taoDid as TAO or RootTAO

Parameters (update an existing attribute):

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • prevAttributeHash: Attribute ID to update
  • attributeData: Verifiable credential converted to hex string
  • issuerType: 1 (RootTAO), 2 (TAO), 3 (TI), or 4 (Revoked)
  • taoDid: DID of the TAO accrediting the issuer
  • taoAttributeId: Attribute ID that accredits taoDid as TAO or RootTAO

setAttributeMetadata

Call to build an unsigned transaction to set the metadata of an attribute. Requires an access token with "tir_write" scope.

Parameters:

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • attributeId: Attribute ID
  • issuerType: 1 (RootTAO), 2 (TAO), 3 (TI), or 4 (Revoked)
  • taoDid: DID of the TAO accrediting the issuer
  • taoAttributeId: Attribute ID that accredits taoDid as TAO or RootTAO

setAttributeData

Call to build an unsigned transaction to set an attribute. Requires an access token with "tir_invite" or "tir_write" scope.

Parameters:

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • attributeId: ID of the attribute to set
  • attributeData: Verifiable credential converted to hex string

addIssuerProxy

Call to build an unsigned transaction to insert a new proxy to an issuer. It can be added by the issuer itself or an admin registered in the Trusted Policies Registry to update issuers. Requires an access token with "tir_write" scope.

Parameters:

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • proxyData: Proxy configuration to be used during the verification of credentials. For the registration to be accepted, the configured proxy must serve a status list which is valid and signed by the issuer requesting the proxy. The validation is done by combining "prefix" with "testSuffix" and executed before accepting the registration. Proxy must be configured before any VCs are issued. The validation will fail if the credential status proxy doesn't exist. It must be a JSON object converted to hex string. Example: Buffer.from('{"prefix":"https://example.net","headers":{"Authorization":"Bearer 1234567890"},"testSuffix":"/cred/1"}').toString("hex").

updateIssuerProxy

Call to build an unsigned transaction to update an existing proxy of an issuer. It can be updated by the issuer itself or an admin registered in the Trusted Policies Registry to update issuers. Requires an access token with "tir_write" scope.

Parameters:

  • from: Ethereum address of the administrator
  • did: DID of the issuer
  • proxyId: ID of the existing proxy
  • proxyData: Proxy configuration to be used during the verification of credentials. For the registration to be accepted, the configured proxy must serve a status list which is valid and signed by the issuer requesting the proxy. The validation is done by combining "prefix" with "testSuffix" and executed before accepting the registration. Proxy must be configured before any VCs are issued. The validation will fail if the credential status proxy doesn't exist. It must be a JSON object converted to hex string. Example: Buffer.from('{"prefix":"https://example.net","headers":{"Authorization":"Bearer 1234567890"},"testSuffix":"/cred/1"}').toString("hex").

sendSignedTransaction

Call to send a signed transaction to the blockchain.

    jsonrpc stringrequired

    Must be exactly "2.0"

    method stringrequired

    Method that needs to be invoked

    params object[]required

    Array of parameters

    id integerrequired

    Identifier established by the client

Responses

Response

Schema
    jsonrpc string

    Must be exactly "2.0"

    id integer

    Same identifier established by the client in the call

    result object

    Result of the call

    oneOf
    string
Loading...