Skip to content

Reference

getAllocationTransferContext

POST allocation execute-transfer choice-context — payloads for moving value out of an allocation contract.

getAllocationTransferContext mirrors getAllocationCancelContext but targets the execute-transfer choice template advertised by the allocation registry.

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.getAllocationTransferContext.

Minimal example

const ctx = await canton.validator.getAllocationTransferContext({
  allocationId: '<allocation-id>',
});

Parameters

  • allocationId (required, string) — Allocation identifier path segment.
  • meta (optional, string record) — Optional metadata forwarded to the POST body.
  • excludeDebugFields (optional, boolean) — Defaults false.

Returns

Choice-context payload ready for downstream ledger submission packaging disclosed contracts + choice arguments metadata.

Errors and pitfalls

  • Allocations in terminal states may refuse contexts—surface validator diagnostics verbatim.

Auth and party

Authenticated bearer token; exercising the eventual ledger choice requires matching party authorization.

See also

Source

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