Skip to content

Reference

getAllocationWithdrawContext

POST allocation withdraw choice-context — disclosed contracts for withdrawing funds locked in an allocation.

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) — Defaults false.

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.

See also

Source

src/clients/validator-api/operations/v0/scan-proxy/registry/allocations/v1/get-allocation-withdraw-context.ts on GitHub.