Skip to content

Reference

ledger.getUpdateById

POST /v2/updates/update-by-id — packaged update lookup building verbose wildcard updateFormat from readAs parties.

Calls POST /v2/updates/update-by-id. Validates updateId (non-empty) and readAsbuildRequestData constructs updateFormat.includeTransactions with TRANSACTION_SHAPE_LEDGER_EFFECTS wildcard filtersByParty (includeCreatedEventBlob: true).

Receiver: await canton.ledger.getUpdateById

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.getUpdateById({
  updateId: 'UPDATE_ID',
  readAs: [canton.getPartyId()],
});

Parameters — GetUpdateByIdParams

  • updateId (required string)
  • readAs (required string[]) — drives filtersByParty wildcard buckets Canton resolves server-side.

Returns — GetUpdateByIdResponse

Wrapped ledger Update OpenAPI payload.

Errors

Throws Error when updateId is undefined string sentinel due validator guarding typo pitfalls documented inline SDK file.

Auth and party

Each readAs party requires CanReadAs grants token exposes.

See also

Source

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