SDK 2.1: platform toolkit + vesting engine
v2.1.0 stable
SDK 2.1 is the stable release on the latest dist-tag. Install it with pnpm add @tokenops/sdk. The receipt-free and Safe create surface of /fhe-airdrop remains @beta.
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.x · Hooks · 39

Every disperse 2.x 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.