getAllocationWithdrawContext complements getAllocationTransferContext when ledger workflows expose explicit withdraw semantics distinct from execute-transfer.
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.getAllocationWithdrawContext.
Minimal example
const ctx = await canton.validator.getAllocationWithdrawContext({
allocationId: '<allocation-id>',
});
Parameters
allocationId(required, string) — Allocation identifier embedded in path.meta(optional, string record) — Forwarded when building POST JSON bodies.excludeDebugFields(optional, boolean) — Defaultsfalse.
Returns
Choice-context payload describing disclosures identical structural expectations as sibling allocation context helpers.
Errors and pitfalls
- Allocation lifecycle mismatches raise descriptive HTTP failures—confirm ACS snapshots prior to spamming endpoints.
Auth and party
Authenticated bearer token; eventual ledger withdraw requires authorized signer parties.