SimpleAirdrop is a smaller template: create with Amulet configuration, execute by referencing stakeholders’ transfer preapproval contract ids, then optionally archive. There is no join / observer / config-update surface in this namespace—use full airdrop if you need those choices.
Setup
import { OcpClient } from '@open-captable-protocol/canton';
const ocp = new OcpClient({ ledger: canton.ledger });
Minimal example
const OPERATOR_PARTY = 'OPERATOR_PARTY_ID';
const createCmd = ocp.CantonPayments.simpleAirdrop.buildCreateSimpleAirdropCommand({
config: {
sender: 'SENDER_PARTY_ID',
featuredAppRight: null, // or contract id string
amuletRulesCid: 'AMULET_RULES_CONTRACT_ID',
dso: 'DSO_PARTY_ID',
},
});
await ocp.createBatch({ actAs: [OPERATOR_PARTY] }).addCommand(createCmd).submitAndWaitForTransactionTree();
API (receiver: ocp.CantonPayments.simpleAirdrop)
buildCreateSimpleAirdropCommand(params)
config(required) —SimpleAirdropConfig:sender,featuredAppRight(string | null),amuletRulesCid,dso.
Returns: CreateCommand for SimpleAirdrop.
buildExecuteSimpleAirdropCommand(params)
airdropContractId(required)recipientSpecs(required) —RecipientSpec[]: each hastransferPreapprovalCidandnumberOfTransfers.initialAmuletInputs(required) —string[]openMiningRoundCid(required)amountPerTransfer(required) —string | number(stringified for DAML)
Returns: Command exercising SimpleAirdrop_Execute.
buildArchiveSimpleAirdropCommand(params)
airdropContractId(required)
Returns: Command exercising template Archive with empty choice argument.
Errors
Builders do not throw Ocp* types. Ledger submission may still fail for authorization, insufficient Amulet inputs, or invalid preapproval ids.
Auth and party
Use actAs parties that may exercise the create / execute / archive choices on behalf of your operational model (typically the sender / operator).