getTransferInstructionWithdrawContext exposes disclosure bundles analogous to accept/reject helpers so senders can unwind outstanding instructions without guessing disclosed contract blobs.
Setup
import { Canton } from '@fairmint/canton-node-sdk';
const canton = new Canton({
network: 'devnet',
provider: '5n',
partyId: 'OWN_PARTY_ID',
});
Import and receiver
import { Canton } from '@fairmint/canton-node-sdk';
Receiver: canton.validator.getTransferInstructionWithdrawContext.
Minimal example
const ctx = await canton.validator.getTransferInstructionWithdrawContext({
transferInstructionId: '<transfer-instruction-id>',
});
Parameters
transferInstructionId(required, string) — Identifier embedded in path.meta(optional, string record) — Optional POST-body hints when provided.excludeDebugFields(optional, boolean) — Defaultsfalse.
Returns
Choice context (choiceContextData, disclosedContracts) identical structural expectations accept/reject siblings share.
Errors and pitfalls
- Withdraw-after-completion yields ledger-visible failures surfaced HTTP-wise—confirm ACS snapshots prior retries.
Auth and party
Authenticated bearer token; exercising withdraw choices requires sender-side ledger authorization.