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

A new version of this API is now available.

EBSI will stop supporting this maintenance version in the upcoming months. You can find the details of the upcoming release and affected endpoints in the change log. Please contact eu-ebsi@ec.europa.eu if this upcoming release might cause a high impact on either an ongoing development or a piloting demonstration.

JSON-RPC API

POST 

/did-registry/v3/jsonrpc

The JSON-RPC API provides methods assisting the construction of blockchain transactions and interaction with the ledger, i.e. write operation on ledger.

Request

Bodyrequired

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

insertHashAlgorithm

Call to build an unsigned transaction to insert a new hash algorithm. This method requires the "DIDR:insertHashAlgorithm" attribute in the TPR.

Parameters:

  • from: Ethereum address of the signer
  • outputLength: hash output length (in bits)
  • ianaName: IANA name of the hash algorithm
  • oid: object identifier (OID)
  • status: status of the algorithm (1 = active, 2 = revoked)
  • multihash: multihash name

updateHashAlgorithm

Call to build an unsigned transaction to update an existing hash algorithm. This method requires the "DIDR:updateHashAlgorithm" attribute in the TPR.

Parameters:

  • from: Ethereum address of the signer
  • hashAlgorithmId: ID of the hash algorithm to update
  • outputLength: hash output length (in bits)
  • ianaName: IANA name of the hash algorithm
  • oid: object identifier (ODI)
  • status: status of the algorithm (1 = active, 2 = revoked)
  • multihash: multihash name

insertDidDocument

Call to build an unsigned transaction to insert a new DID document.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • hashAlgorithmId: ID of the hash algorithm used to hash the DID document
  • hashValue: hash of the canonicalized DID document
  • didVersionInfo: stringified JSON DID document (hex-encoded)
  • timestampData: data to be added to the timestamp (stringified JSON encoded in hexadecimal)
  • didVersionMetadata: DID document metadata (stringified JSON encoded in hexadecimal)

updateDidDocument

Call to build an unsigned transaction to update an existing DID document.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • hashAlgorithmId: ID of the hash algorithm used to hash the DID document
  • hashValue: hash of the canonicalized DID document
  • didVersionInfo: stringified JSON DID document (hex-encoded)
  • timestampData: data to be added to the timestamp (stringified JSON encoded in hexadecimal)
  • didVersionMetadata: DID document metadata (stringified JSON encoded in hexadecimal)

insertDidController

Call to build an unsigned transaction to insert a new DID Controller to an existing DID document.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • newControllerId: Ethereum address of the new controller (hex-encoded)
  • notBefore: timestamp before which the controller is not valid
  • notAfter: timestamp after which the controller is not valid anymore

updateDidController

Call to build an unsigned transaction to update an existing DID Controller.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • newControllerId: Ethereum address of the controller to be updated (hex-encoded)
  • notBefore: timestamp before which the controller is not valid
  • notAfter: timestamp after which the controller is not valid anymore

revokeDidController

Call to build an unsigned transaction to revoke an existing DID Controller.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID (hexadecimal)
  • oldControllerId: Ethereum address of the controller to be revoked (hex-encoded)

appendDidDocumentVersionHash

Call to build an unsigned transaction to append a new type of hash for given DID Doc version.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • hashAlgorithmId: The new hash algorithm id used to compute the new hashValue of an existing DID Doc version
  • hashValue: new hash value of an existing DID Doc version
  • didVersionInfo: DID document content (stringified JSON encoded in hexadecimal)
  • timestampData (optional): additional timestamping data. If set, it should be serialized JSON-LD file. The data can be added only at the timestamp.

detachDidDocumentVersionHash

Call to build an unsigned transaction to detach an existing hash for a given DID Doc version.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • hashAlgorithmId: The new hash algorithm id used to compute the new hashValue of an existing DID Doc version
  • hashValue: new hash value of an existing DID Doc version
  • didVersionInfo: DID document content (stringified JSON encoded in hexadecimal)

appendDidDocumentVersionMetadata

Call to build an unsigned transaction to append a new metadata for given DID Doc version.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • didVersionInfo: DID document content (stringified JSON encoded in hexadecimal)
  • didVersionMetadata: DID document Version Metadata content (stringified JSON encoded in hexadecimal)

detachDidDocumentVersionMetadata

Call to build an unsigned transaction to detaches an existing metadata for given DID Doc version.

Parameters:

  • from: Ethereum address of the signer
  • identifier: DID identifier (hexadecimal)
  • didVersionInfo: DID document content (stringified JSON encoded in hexadecimal)
  • didVersionMetadata: DID document Version Metadata content (stringified JSON encoded in hexadecimal)

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...