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.
Receipt-free hooks resolve Mined | Pending
useRegister, useDisperse and useWithdrawTokenFee accept waitForReceipt, and so do useDiscloseHandleToParty / useBatchDiscloseHandlesToParty. A hook cannot overload on it, so data is the mined result or its Pending*Result: narrow with if (data.pending) return; before reading wallets, distributions, transferredHandle or disclosedHandles.
Options every hook shares
Hooks take address, chainId and telemetry; the write hooks add encryptor, aclAddress and gasHeadroomPercent, and most write variables accept a per-call gas. Read hooks take query (ReadHookQueryOptions) for staleTime, refetchInterval, select or enabled. Role hooks name the address holder.
Disperse 2.0 · Hooks · 39

Every disperse 2.0 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-disperse/react.

Lifecycle
Return shape
Encryptor
39 hooks
Group:

Setup · deploy · 3

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

Configure · 6

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

Write · 2

Headline writes — submit a tx through the connected wallet.

Disclose · ACL · 2

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

Encrypted read · 2

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

Read · 9

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

Roles · RBAC · 3

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

Recovery · 9

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

Introspection · 3

Deterministic CREATE2 inputs, role bytes, immutable deployment metadata.