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

This API is being released as part of an upcoming version.

The upcoming version is not backward compatible with the current stable version. 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

Last updated on
POST 

/did-registry/v5/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

Header Parameters

    Conformance uuid

    The header MUST be used ONLY for the EBSI conformance testing.

    • Type: string
    • Format: UUID V4

    The header is used to log the activities. See Conformance testing header section in the documentation.

    Example: edb60e02-398d-4b62-8028-85710b2476a5

Body

required

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

insertDidDocument

Call to build an unsigned transaction to insert a new DID document. Requires an access token with "didr_invite" or "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: DID to insert. It must be for a legal entity (DID v1)
  • baseDocument: JSON string containing the @context of the DID document
  • vMethodId: Thumbprint of the public key
  • publicKey: Public key for secp256k1 in compressed or uncompressed format
  • isSecp256k1: It must be true
  • notBefore: capability invocation is valid from this time
  • notAfter: expiration of the capability invocation

updateBaseDocument

Call to build an unsigned transaction to update the base document of an existing DID. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • baseDocument: JSON string containing the @context of the DID document

addController

Call to build an unsigned transaction to add a new controller to an existing DID document. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • controller: DID of the new controller

revokeController

Call to build an unsigned transaction to revoke a controller from a DID document. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • controller: DID of controller to revoke

addVerificationMethod

Call to build an unsigned transaction to add a verification method. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • vMethodId: New verification method id
  • isSecp256k1: Boolean defining if the public key is for secp256k1 curve or not
  • publicKey: Public key as hex string. For algorithms different to ES256K it must be the JWK transformed to string and then to hex format.

addVerificationRelationship

Call to build an unsigned transaction to add a verification relationship. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • name: Name of the verification relationship
  • vMethodId: Reference to the verification method
  • notBefore: Verification relationship is valid from this time
  • notAfter: Expiration of the verification relationship

revokeVerificationMethod

Call to build an unsigned transaction to revoke a verification method. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • vMethodId: Reference to the verification method
  • notAfter: Date on which the revocation takes effect. It must be in the past

expireVerificationMethod

Call to build an unsigned transaction to expire a verification method. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • did: Existing DID
  • vMethodId: Reference to the verification method
  • notAfter: New expiration date. It must be in the future

rollVerificationMethod

Call to build an unsigned transaction to roll a verification method. Requires an access token with "didr_write" scope.

Parameters:

  • from: Ethereum address of the signer
  • rollArgs: Roll arguments. JSON with the following fields:
    • did: Existing DID
    • vMethodId: New verification method id (thumbprint of the new public key)
    • isSecp256k1: Boolean defining if the public key is for secp256k1 curve or not
    • publicKey: Public key as hex string. For algorithms different to ES256K it must be the JWK transformed to string and then to hex format.
    • notBefore: Verification relationship is valid from this time
    • notAfter: Expiration of the verification relationship
    • oldVMethodId: Old verification method id that will be rolled
    • duration: Duration of the period of transition. During this period both verification methods will be valid.

sendSignedTransaction

Call to send a signed transaction to the blockchain. Requires an access token with "didr_invite" or "didr_write" scope.

[conformance description]

EBSI conformance testing

The API supports the following EBSI conformance tests:

  • Construct a blockchain transaction to register a DID (CT ONBOARD_061)
  • Broadcast a signed blockchain transaction to register a DID (CT ONBOARD_062)
    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...