2.0 RC docsView 1.x docs
v2.0.0-rc.1 release candidate
The API is frozen and later candidates carry fixes only, except the receipt-free and Safe create surface of /fhe-airdrop, which is @beta. Published on the next dist-tag; latest stays on 1.6.0 until 2.0.0.
Create hooks resolve Mined | Pending
The four create hooks accept waitForReceipt, and a hook cannot overload on it, so data and mutateAsync resolve to the mined result or its PendingCreateAirdropResult. Narrow with if (data.pending) return; before reading a receipt-derived field. The receipt-free create surface is beta; see Receipt-free writes.
Options every hook shares
Hook options take gasHeadroomPercent, and mutation variables that are an object take a per-call gas (Gas headroom). The ECDSA instance hooks take no dedupMode; read the policy with useDedupMode. Read hooks accept query (TanStack options minus queryKey / queryFn), and a function-form query.enabled is honoured; it can turn a ready query off, never an unready one on (query options). On a chain the SDK does not support, the instance hooks no longer throw from render: read hooks stay disabled and mutations reject with the client's UnsupportedChainError. TokenOpsContractError and TokenOpsValidationError are re-exported from @tokenops/sdk/fhe-airdrop/react for instanceof checks.
Query keys and invalidation
Unlike /fhe-vesting, the write hooks here invalidate the reads they affect on success, scoped to that instance and function. After a headless client write, invalidate yourself with the exported key builders: queryClient.invalidateQueries({ queryKey: airdropQueryKeyPrefix({ chainId, address, fn: "merkleRoot" }) }). airdropQueryKey builds the full key, args included.
Airdrop v2 · Hooks · 106

Every airdrop v2 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.

Lifecycle
Return shape
Encryptor
106 hooks
Group:

Setup · deploy · 4

Deploy a factory clone or register with the singleton — the one-time entrypoint.

Configure · 13

Set fees, batch limits, claim windows. Caller is usually the factory or clone owner.

Write · 16

Headline writes — submit a tx through the connected wallet.

Disclose · ACL · 1

Grant ACL on a ciphertext handle to a third party (auditor, tax authority).

Encrypted read · 8

Returns a ciphertext handle. Some are useQuery; some are useMutation (FHE.allow grants ACL inside a tx). Pair with useDecryptedHandle.

Read · 35

Plaintext on-chain reads. TanStack Query envelope, cached + refetched.

Roles · RBAC · 12

RBAC — grant, revoke, renounce. Read role constants + membership.

Recovery · 7

Pause / unpause / withdraw / rescue — recover the system or its funds.

Signature helper · 1

Off-chain EIP-712 signing helper — no chain interaction.

Introspection · 9

Deterministic CREATE2 inputs, role bytes, immutable deployment metadata.