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) — Defaultsfalse.
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.