Skip to content

Reference

getTransferFactory

POST transfer-instruction transfer-factory — factory id, transfer kind, and choice context for direct splice-token transfers.

getTransferFactory wraps the token-standard transfer-instruction registry proxied through validator scan-proxy. Supply choiceArguments that match the Daml transfer factory choice your flow exercises next.

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

Minimal example

const res = await canton.validator.getTransferFactory({
  choiceArguments: { /* factory-specific payload */ },
  excludeDebugFields: false,
});
console.log(res.factoryId, res.transferKind);

Parameters

  • choiceArguments (required, record) — JSON-shaped arguments expected by the transfer factory choice your workflow invokes.
  • excludeDebugFields (optional, boolean) — Defaults to false; omits optional debug payloads when true.

Returns

  • factoryId (string) — Factory identifier used when assembling ledger submissions.
  • transferKind (enum) — One of self, direct, or offer, describing routing semantics documented by token-standard tooling.
  • choiceContext — Includes choiceContextData plus disclosedContracts suitable for packaging alongside ledger writes.

Errors and pitfalls

  • Wrong argument shapes yield validator-side failures—mirror splice codegen or canonical fixtures before iterating blindly.

Auth and party

Authenticated bearer token; ledger submissions afterward still honor Canton authorization rules.

See also

Source

src/clients/validator-api/operations/v0/scan-proxy/registry/transfer-instruction/v1/get-transfer-factory.ts on GitHub.