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 

/timestamp/v4/jsonrpc

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

Request

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

insertHashAlgorithm

Call to build an unsigned transaction to insert a new hash algorithm.

Parameters:

  • from: Ethereum address of the administrator
  • 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 a hash algorithm.

Parameters:

  • from: Ethereum address of the administrator
  • 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

timestampHashes

Call to build an unsigned transaction to timestamp hashes. It's possible to insert up to 3 hashes in a single transaction.

Parameters:

  • from: Ethereum address of user
  • hashAlgorithmIds: Array of hash algorithms ids used (up to 3)
  • hashValues: Array of hashes (up to 3)
  • timestampData (optional): Timestamp data. This field must be a JSON stringified and converted into hex string

timestampRecordHashes

Call to build an unsigned transaction to timestamp data and create a record of it with some info. It's possible to insert up to 3 hashes in a single transaction.

Parameters:

  • from: Ethereum address of user
  • hashAlgorithmIds: Array of hash algorithms ids used (up to 3)
  • hashValues: Array of hashes (up to 3)
  • timestampData (optional): Timestamp data. This field must be a JSON stringified and converted into hex string

timestampVersionHashes

Call to build an unsigned transaction to timestamp hashes and store them under the given record. It's possible to insert up to 3 hashes in a single transaction. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • versionHash: Version hash to update
  • hashAlgorithmIds: Array of hash algorithms ids used (up to 3)
  • hashValues: Array of hashes (up to 3)
  • timestampData (optional): Timestamp data. This field must be a JSON stringified and converted into hex string
  • versionInfo (optional): Version info. This field must be a JSON stringified and converted into hex string

insertRecordOwner

Call to build an unsigned transaction to insert a record owner. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • ownerId: Ethereum address of new owner
  • notBefore: Point in time when the owner becomes valid. It should be defined in epoch time.
  • notAfter: Point in time when the owner becomes invalid. It should be defined in epoch time. For indefinite time set 0.

revokeRecordOwner

Call to build an unsigned transaction to revoke a record owner. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • ownerId: Ethereum address of the owner to revoke

timestampRecordVersionHashes

Call to build an unsigned transaction to timestamp data and link it to a new version of an existing record. It's possible to insert up to 3 hashes in a single transaction. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • hashAlgorithmIds: Array of hash algorithms ids used (up to 3)
  • hashValues: Array of hashes (up to 3)
  • timestampData (optional): Timestamp data. This field must be a JSON stringified and converted into hex string
  • versionInfo (optional): Version info. This field must be a JSON stringified and converted into hex string

appendRecordVersionHashes

Call to build an unsigned transaction to timestamp data and link it to an existing version of a record. It's possible to insert up to 3 hashes in a single transaction. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • versionId: Version ID to update
  • hashAlgorithmIds: Array of hash algorithms ids used (up to 3)
  • hashValues: Array of hashes (up to 3)
  • timestampData (optional): Timestamp data. This field must be a JSON stringified and converted into hex string
  • versionInfo (optional): Version info. This field must be a JSON stringified and converted into hex string

detachRecordVersionHash

Call to build an unsigned transaction to detach a hash from the timestamps ids of a version of an existing record. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • versionId: Version ID to update
  • versionHash: Version hash to update
  • hashValue: Hash value to detach

insertRecordVersionInfo

Call to build an unsigned transaction to to insert new info to a version of an existing record. This method can be called only by record owners.

Parameters:

  • from: Ethereum address of user
  • recordId: Record ID to update
  • versionId: Version ID to update
  • versionInfo (optional): Version info. This field must be a JSON stringified and converted into hex string

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