lookupTransferPreapprovalByParty exposes the active TransferPreapproval contract snapshot for a party (same conceptual flow as wallet helpers in createParty). Parameter name is partyId in the SDK object; it maps to the REST path.
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.lookupTransferPreapprovalByParty.
Minimal example
const pre = await canton.validator.lookupTransferPreapprovalByParty({
partyId: 'Alice::1220...',
});
Parameters
partyId(required, string) — Receiver party whose preapproval contract you want.
Returns
Nested structure transfer_preapproval containing contract metadata (template_id, contract_id, payload, blobs) plus domain_id anchoring the synchronizer domain.
Errors and pitfalls
- Absence of a preapproval may appear as empty payload or HTTP errors depending on validator behavior—handle both in UX.
Auth and party
Authenticated bearer token; read visibility must align with Canton policies for that party’s contracts.
See also
Source
src/clients/validator-api/operations/v0/scan-proxy/lookup-transfer-preapproval-by-party.ts on GitHub.