POST/trusted-issuers-registry/v5/jsonrpc
The JSON-RPC API provides methods assisting the construction of blockchain transactions for TIR SC operations, and interaction with the ledger.
Request
- application/json
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
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 signer
- did: DID of the issuer
- revisionId: Attribute ID (hexadecimal string prefixed with 0x)
- issuerType: 1 (RootTAO), 2 (TAO), 3 (TI), or 4 (Revoked)
- taoDid: DID of the TAO accrediting the issuer
- attributeIdTao: Attribute ID that accredits taoDid as TAO or RootTAO (hexadecimal string prefixed with 0x)
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 signer
- did: DID of the issuer
- attributeId: ID of the attribute to set (hexadecimal string prefixed with 0x)
- attributeData: Verifiable credential converted to an hexadecimal string prefixed with 0x
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 signer
- 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 a string. Example:
JSON.stringify({"prefix":"https://example.net","headers":{"Authorization":"Bearer 1234567890"},"testSuffix":"/cred/1"})
.
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 signer
- did: DID of the issuer
- proxyId: ID of the existing proxy (hexadecimal string prefixed with 0x)
- 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 a string. Example:
JSON.stringify({"prefix":"https://example.net","headers":{"Authorization":"Bearer 1234567890"},"testSuffix":"/cred/1"})
.
sendSignedTransaction
Call to send a signed transaction to the blockchain.
Must be exactly "2.0"
Method that needs to be invoked
Array of parameters
Identifier established by the client
Responses
- 200
- 400
Response
- application/json
- Schema
- Build tx
- Send Transaction
Schema
- MOD2
Must be exactly "2.0"
Same identifier established by the client in the call
result object
Result of the call
{
"jsonrpc": "2.0",
"id": 482,
"result": {
"from": "0x8445fC96e27ceB0d1794be16a1Ac8BF5D765AACB",
"to": "0xFdfbCE7F3c12A902B79e0ceB0DB2662331bBA1aF",
"data": "0x250f4d9700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000120fb33cccb447605de75846617385f6d2aac28010f53a89ecb5ce151751c53c8d400000000000000000000000000000000000000000000000000000000000000206469643a656273693a7a5a766970744568464e31723275313868686937486f66000000000000000000000000000000000000000000000000000000000000000865794a68622e2e2e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000216469643a656273693a7a323536617342576d4842736a325a4e567847354d686b7000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0",
"nonce": "0xb1d3",
"chainId": "0x181f",
"gasLimit": "0x1000000",
"gasPrice": "0x0"
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
Bad request
- application/problem+json
- Schema
- Bad Request
- Invalid Token
Schema
Default value: about:blank
An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.
A short summary of the problem type.
Possible values: >= 400
and <= 600
The HTTP status code generated by the origin server for this occurrence of the problem.
A human readable explanation specific to this occurrence of the problem.
An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"title": "Bad request",
"status": 400,
"detail": "Bad request"
}
{
"title": "Invalid token",
"status": 400,
"detail": "Invalid token"
}