Airdrop · Client@tokenops/sdk/fhe-airdrop
ConfidentialAirdropFactoryClient
Deploy a per-campaign airdrop clone with the token, start time, end time, admin, and extendability all packed into AirdropParams (every field is required at create time), plus the gas fee. Funding also lives here: the create-and-fund and fund methods encrypt the pool amount and move it via the factory's operator transfer.
Construct
Headless TS — non-React consumers (Node, Vite, server workers). React hosts use the per-hook surface; same method names, lazy encryptor.
@tokenops/sdk/fhe-airdrop
ts
import { createConfidentialAirdropFactoryClient } from "@tokenops/sdk/fhe-airdrop";
const client = createConfidentialAirdropFactoryClient({
publicClient,
walletClient,
// address optional: resolved from publicClient.chain.id
});Methods
Setup · 5
- Deploy an airdrop clone for a token + admin + claim window.
client.createConfidentialAirdrop()React:useCreateConfidentialAirdrop - Deploy an airdrop + wait for receipt + return the clone address.
client.createConfidentialAirdropAndGetAddress()React:useCreateConfidentialAirdropAndGetAddress - Single-flow helper: deploy + fund in one bundle.
client.createAndFundConfidentialAirdrop()React:useCreateAndFundConfidentialAirdrop - Same as useCreateAndFundConfidentialAirdrop but returns the clone address.
client.createAndFundConfidentialAirdropAndGetAddress()React:useCreateAndFundConfidentialAirdropAndGetAddress - Encrypt the funding amount and transferFromConfidential into the clone.
client.fundConfidentialAirdrop()React:useFundConfidentialAirdrop
Configure · 4
- Admin: change the factory-wide default per-claim gas fee.
client.setDefaultGasFee()React:useSetDefaultGasFee - Admin: install a per-creator gas-fee override on the factory.
client.setCustomFee()React:useSetCustomFee - Admin: change the factory's fee collector address.
client.setFeeCollector()React:useSetFeeCollector - Admin: remove a per-creator fee override, reverting to defaultGasFee.
client.disableCustomFee()React:useDisableCustomFee
Read · 6
- Read the factory-wide default per-claim gas fee (in wei) — applied to new airdrop clones at deployment when the creator has no custom override.
client.defaultGasFee()React:useFactoryDefaultGasFee - Read the factory's current fee collector address — the account authorized to call withdrawGasFee on each deployed airdrop clone.
client.feeCollector()React:useFactoryFeeCollector - Read the per-creator fee override set on the factory for creator.
client.getCustomFee()React:useFactoryCustomFee - Read the init-code hash the factory would use to CREATE2 an airdrop clone with the given params + gasFee.
client.getInitCodeHash()React:useFactoryInitCodeHash - Read the FHE-airdrop factory's current implementation() address — the LibClone target every new airdrop clone delegates to.
client.implementation()React:useConfidentialAirdropFactoryImplementation - Alias for implementation() — reads the factory's implementation immutable state variable (the LibClone target every new airdrop clone delegates to).
client.airdropImplementation()React:useConfidentialAirdropFactoryImplementation