Overledger pattern

Prepare-Sign-Execute.

Introduction

Overledger provides a standardised way to interact with any connected Distributed Ledger Technology (DLT). To do so, Overledger utilises a standardised data model based on a taxonomy defined in ISO/TS 23258:2021.


This standardised interaction method follows a **Prepare-Sign-Execute** pattern. This allows:
  • users to build approval-based checks to confirm any Overledger prepare request, where this check has to pass before the request is executed.
  • users to check the standardised data prepare request's mapping to the native data signing body
  • users to separate the signature part of the flow into a secure and separate system

The Prepare-Sign-Execute pattern consists of three steps:

Prepare

In this step, you propose a distributed ledger technology interaction, stating your intent for a DLT operation (e.g. read, write, subscribe) to be performed.

The prepare request body consists of sending the parameters of the operation you want to perform to Overledger. Due to the standardised data model used across all DLTs, the parameters are the same regardless of which DLT network you want to interact with.


Overledger will prepare the interaction request for you, and will respond to the user with:

  • The ID of this request. When executing, you will specify which prepared request to execute using this ID.

and optionally:

  • Native Data: This field is only returned if the operation you are preparing requires a transaction. This field is what must be signed.
  • DLT Fee: This field is only returned if the operation you are preparing requires a transaction. It is an estimation of the DLT fee to execute the transaction. See the fee estimation article for more details.
  • Location: Confirmation of the DLT and DLT network that this operation will be performed on. Note that in Overledger V3 this information is returned in the prepare response, while in Overledger V2 this information is returned in the execute response.

Sign

Transactions change state on the blockchain and, therefore, must be signed by the transaction sender. The signing step is relevant for transactions such as making a payment, transferring an NFT, or deploying a Smart Contract.

If the interaction doesn't require a transaction (e.g., to read block information), you can skip the Sign step and jump to Autoexecute.

But if you have a transaction to sign, once you have prepared your request, you will receive a Native Data object. You have two options for signing.

a. Sign offline with multilingual SDKs

b. Sign using Overledger's transaction signing endpoint

Overledger's transaction signing endpoint utilises the Authorise product, which offers central bank-grade key management and enterprise transaction signing capabilities to the blockchain ecosystem.


Execute

Finally, for Overledger to process the requested DLT operation, you must call the execute endpoint. You will need to send:

  • the ID of the request you prepared

and optionally

  • The transaction signature. If your request needs signing.

If the DLT operation requested is a read or subscription request, you will receive the result immediately.

If the DLT operation requested is a write (and therefore a transaction is required), your transaction will be broadcast to the requested DLT network, and its status will be "PENDING" until a new block is generated that includes your transaction. The amount of time this will take depends on the DLT network.

Autoexecute - only for searches

We offer an alternative method to submit search requests that require only one call. Searches, such as searching a transaction or a block, do not require the signing step and, therefore, can be executed completely in one Overledger API call, should the user desire this.