Skip to content

Reference

ledger.submitAndWaitForTransactionTree

Submit commands and return the resulting transaction tree (nested exercise/create/archive structure).

submitAndWaitForTransactionTree hits POST /v2/commands/submit-and-wait-for-transaction-tree. Parameters align with submitAndWait (SubmitAndWaitForTransactionTreeParams equals the shared command bundle—auto commandId / actAs defaults included).

Receiver: await canton.ledger.submitAndWaitForTransactionTree

Setup

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

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

Minimal example

const tree = await canton.ledger.submitAndWaitForTransactionTree({
  commands: [],
});

console.log(tree.transaction);

Parameters — SubmitAndWaitForTransactionTreeParams

Same CompositeCommand[] surface as SubmitAndWaitParams (commands plus optional commandId, actAs, readAs, disclosures, dedup, synchronizer hints, etc.).

Returns — SubmitAndWaitForTransactionTreeResponse

OpenAPI-generated transaction tree including nested exercises suitable for audit pipelines.

Errors and pitfalls

Interpretation errors reject entirely; watch disclosed-contract visibility like other synchronous submits.

Auth and party

OAuth-backed LedgerJsonApiClient with act-as coverage for every actAs party.

See also

Source

operations/v2/commands/submit-and-wait-for-transaction-tree.ts