Skip to content

Reference

ledger.getTransactionByOffset

POST /v2/updates/transaction-by-offset — fetch transaction at numeric ledger offset with transactionFormat.

Calls POST /v2/updates/transaction-by-offset. GetTransactionByOffsetParams: offset (number), transactionFormat.

Receiver: await canton.ledger.getTransactionByOffset

Setup

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

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

Minimal example

const tx = await canton.ledger.getTransactionByOffset({
  offset: 42,
  transactionFormat: {
    transactionShape: 'TRANSACTION_SHAPE_ACS_DELTA',
    eventFormat: { filtersByParty: {}, verbose: false },
  },
});

Parameters — GetTransactionByOffsetParams

From GetTransactionByOffsetParamsSchema.

Returns — GetTransactionByOffsetResponse

OpenAPI JSON.

Auth and party

Bearer; filtersByParty must scope visible stakeholders.

See also

Source

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