Every airdrop method, as a hook.
Filter by lifecycle (where in the flow), TanStack shape (how to wire it), or encryptor dependency. Import path is @tokenops/sdk/fhe-airdrop/react.
Setup · deploy · 4
Deploy a factory clone or register with the singleton — the one-time entrypoint.
useCreateConfidentialAirdropAndGetAddressDeploy an airdrop + wait for receipt + return the clone address.
useMutationuseCreateConfidentialAirdropDeploy an airdrop clone for a token + admin + claim window.
useMutationuseCreateAndFundConfidentialAirdropSingle-flow helper: deploy + fund in one bundle.
useMutation·Encrypts inputuseCreateAndFundConfidentialAirdropAndGetAddressSame as useCreateAndFundConfidentialAirdrop but returns the clone address.
useMutation·Encrypts input
Configure · 5
Set fees, batch limits, claim windows. Caller is usually the factory or clone owner.
useSetFeeCollectorAdmin: change the factory's fee collector address.
useMutationuseSetDefaultGasFeeAdmin: change the factory-wide default per-claim gas fee.
useMutationuseSetCustomFeeAdmin: install a per-creator gas-fee override on the factory.
useMutationuseDisableCustomFeeAdmin: remove a per-creator fee override, reverting to defaultGasFee.
useMutationuseExtendClaimWindowAdmin extends the claim deadline.
useMutation
Write · 2
Headline writes — submit a tx through the connected wallet.
Encrypted read · 2
Returns a ciphertext handle. Some are useQuery; some are useMutation (FHE.allow grants ACL inside a tx). Pair with useDecryptedHandle.
useGetClaimAmountSubmits a transaction (costs gas) to grant the caller decrypt access to the claim amount as an euint64 handle. The handle is granted persistent ACL on-chain via FHE.allow(handle, msg.sender); the SDK extracts it from the receipt's ACL.Allowed event (NOT from simulation — that returns a divergent, ACL-less handle; see CLAUDE.md Pitfall #1).
useMutation·Reads encrypted handleuseDecryptedHandleSubscribe to a single encrypted handle and reactively decrypt via the connected wallet.
custom·Reads encrypted handle
Read · 14
Plaintext on-chain reads. TanStack Query envelope, cached + refetched.
useFactoryDefaultGasFeeRead the factory-wide default per-claim gas fee (in wei) — applied to new airdrop clones at deployment when the creator has no custom override.
useQueryuseFactoryFeeCollectorRead the factory's current fee collector address — the account authorized to call withdrawGasFee on each deployed airdrop clone.
useQueryuseFactoryCustomFeeRead the per-creator fee override set on the factory for creator.
useQueryuseAirdropTokenRead the airdrop clone's immutable TOKEN.
useQueryuseAirdropGasFeeRead the airdrop clone's immutable per-claim gas fee (in wei).
useQueryuseAirdropStartTimeRead the airdrop clone's immutable START_TIME — the unix timestamp when claims become available.
useQueryuseAirdropCanExtendClaimWindowRead whether the admin can extend the claim window past endTime on this airdrop clone.
useQueryuseAirdropEndTimeRead the airdrop clone's endTime — the unix timestamp when claims close.
useQueryuseAirdropIsClaimWindowActiveReturns true between startTime and endTime per the on-chain config.
useQueryuseAirdropHasClaimStartedRead whether the current chain timestamp is past START_TIME on this airdrop clone.
useQueryuseAirdropHasClaimEndedRead whether the current chain timestamp is past endTime on this airdrop clone.
useQueryuseAirdropClaimedSignaturesCheck whether a pre-computed claim struct hash has been consumed on this airdrop clone.
useQueryuseAirdropIsSignatureClaimedHas this admin signature already been redeemed?
useQueryuseAirdropIsSignatureValidOff-chain check of the signature shape before paying gas to submit it.
useQuery
Roles · RBAC · 3
RBAC — grant, revoke, renounce. Read role constants + membership.
useAirdropHasRoleRead AccessControl: is account a member of role on this airdrop clone? The role hashes are stable across deployments (DEFAULT_ADMIN_ROLE, FEE_COLLECTOR_ROLE, etc.).
useQueryuseAirdropGrantRoleAccessControl: grant role to accountTarget on this airdrop clone.
useMutationuseAirdropRevokeRoleAccessControl: revoke role from accountTarget on this airdrop clone.
useMutation
Recovery · 6
Pause / unpause / withdraw / rescue — recover the system or its funds.
useAirdropIsPausedRead whether claims are currently paused by the admin on this airdrop clone.
useQueryuseWithdrawAdmin: withdraw all confidential tokens from the airdrop to recipient.
useMutationuseSetPausedAdmin: pause or unpause claims on this airdrop clone.
useMutationuseWithdrawOtherTokenAdmin: rescue accidentally sent ERC-20 (non-confidential) tokens.
useMutationuseWithdrawOtherConfidentialTokenAdmin: rescue accidentally sent ERC-7984 confidential tokens (other than this airdrop's configured TOKEN).
useMutationuseAirdropWithdrawGasFeeFee collector: withdraw collected ETH gas fees from the airdrop clone.
useMutation
Signature helper · 1
Off-chain EIP-712 signing helper — no chain interaction.
Introspection · 6
Deterministic CREATE2 inputs, role bytes, immutable deployment metadata.
useConfidentialAirdropFactoryImplementationRead the FHE-airdrop factory's current implementation() address — the LibClone target every new airdrop clone delegates to.
useQueryuseFactoryInitCodeHashRead the init-code hash the factory would use to CREATE2 an airdrop clone with the given params + gasFee.
useQueryuseAirdropDeploymentBlockNumberRead the block number at which this airdrop clone was deployed.
useQueryuseAirdropDomainSeparatorRead the EIP-712 domain separator for this airdrop clone.
useQueryuseAirdropClaimTypehashRead the EIP-712 type hash for Claim(address recipient, bytes32 encryptedAmount).
useQueryusePredictAirdropAddressCREATE2 the airdrop clone address before deploying.
useQuery·Encrypts input