Skip to content

Reference

ledger.getUpdateByOffset

POST /v2/updates/update-by-offset — lookup single ledger update by numeric offset with full UpdateFormat control.

Calls POST /v2/updates/update-by-offset. GetUpdateByOffsetParams: offset number + updateFormat (UpdateFormatSchema — transactions / reassignments / topology toggles).

Receiver: await canton.ledger.getUpdateByOffset

Setup

import { Canton } from '@fairmint/canton-node-sdk';

const canton = new Canton({
  network: 'devnet',
  provider: '5n',
  partyId: 'OWN_PARTY_ID',
});

Minimal example

const upd = await canton.ledger.getUpdateByOffset({
  offset: 100,
  updateFormat: {
    includeTransactions: {
      transactionShape: 'TRANSACTION_SHAPE_LEDGER_EFFECTS',
      eventFormat: { filtersByParty: {}, verbose: true },
    },
  },
});

Parameters — GetUpdateByOffsetParams

Validated GetUpdateByOffsetParamsSchema.

Returns — GetUpdateByOffsetResponse

OpenAPI JsUpdate / Canton Update JSON envelope depending codegen revision.

Auth and party

Bearer; updateFormat scopes witnesses deterministically via Canton filtering semantics.

See also

Source

operations/v2/updates/get-update-by-offset.ts