getTransferInstructionRejectContext mirrors getTransferInstructionAcceptContext but targets registry reject semantics so wallets can refuse inbound transfers safely.
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.getTransferInstructionRejectContext.
Minimal example
const ctx = await canton.validator.getTransferInstructionRejectContext({
transferInstructionId: '<transfer-instruction-id>',
});
Parameters
transferInstructionId(required, string) — Identifier embedded in the REST path.meta(optional, string record) — Optional hints passed to the POST body when provided.excludeDebugFields(optional, boolean) — Defaults tofalse.
Returns
Choice context payload (choiceContextData, disclosedContracts) suitable for packaging into ledger submissions.
Errors and pitfalls
- Rejecting after acceptance or expiry yields descriptive HTTP failures—handle terminal states in UI first.
Auth and party
Authenticated bearer token; on-chain reject still requires authorized exercising parties.