Every vesting 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-vesting/react.
Setup · deploy · 2
Deploy a factory clone or register with the singleton — the one-time entrypoint.
Configure · 10
Set fees, batch limits, claim windows. Caller is usually the factory or clone owner.
useSetDefaultGasFeeAdmin: set the factory-wide default gas fee (in wei).
useMutationuseSetDefaultTokenFeeAdmin: set the factory-wide default token fee (basis points).
useMutationuseSetDefaultFeeTypeAdmin: set the factory's default fee model (FeeType.Gas or FeeType.DistributionToken) for new manager clones.
useMutationuseResetGasFeeAdmin: reset the factory's default gas fee to its bytecode-encoded baseline.
useMutationuseResetTokenFeeAdmin: reset the factory's default token fee to its bytecode-encoded baseline.
useMutationuseSetCustomFeeAdmin: install a per-creator fee override on the factory.
useMutationuseDisableCustomFeeAdmin: disable the per-creator fee override for creator.
useMutationuseSetFeeCollectorAdmin: set the factory's fee collector address.
useMutationuseSetMaxBatchSizeAdmin: bump or lower maxBatchSize (cap for useBatchCreateVesting).
useMutationuseSetMaxRevokeBatchSizeAdmin: bump or lower maxRevokeBatchSize (cap for useBatchRevokeVesting).
useMutation
Write · 9
Headline writes — submit a tx through the connected wallet.
useCreateVestingOpen a new vesting schedule on a manager — encrypts the amount client-side, submits the tx.
useMutation·Encrypts inputuseClaimRecipient-side claim. For FeeType.Gas managers pass value (read it with useManagerFeeInfo); omit value for FeeType.DistributionToken.
useMutationusePartialClaimClaim less than the unlocked amount — leaves the remainder encrypted on the clone.
useMutation·Encrypts inputuseRevokeVestingAdmin revocation — clears the schedule (revocable variants only) and returns funds.
useMutationuseSplitVestingSplit one vesting into two with custom proportions; both stay encrypted.
useMutation·Encrypts inputuseInitiateVestingTransferRecipient initiates a two-step transfer of a vesting position to another recipient.
useMutationuseAcceptVestingTransferAccept an inbound vesting transfer (counterparty side).
useMutationuseCancelVestingTransferCancel an outbound transfer before the counterparty accepts.
useMutationuseDirectVestingTransferAdmin-driven transfer — moves a vesting without the recipient's signature.
useMutation
Batch write · 2
Bulk variants that pack N operations into one tx with one batch proof.
Disclose · ACL · 6
Grant ACL on a ciphertext handle to a third party (auditor, tax authority).
useDiscloseToPartyGrant ACL on a full vesting (allocation + settled + claimable) to a third party.
useMutationuseBatchDiscloseToPartyBatch variant of useDiscloseToParty.
useMutationuseAdminDiscloseToPartyAdmin variant of useDiscloseToParty — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutationuseAdminBatchDiscloseToPartyAdmin variant of useBatchDiscloseToParty — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutationuseDiscloseHandleToPartyGrant ACL on a single ciphertext handle to a third party (e.g. an auditor).
useMutationuseBatchDiscloseHandlesToPartyBatch ACL grant across many handles in one tx.
useMutation
Encrypted read · 10
Returns a ciphertext handle. Some are useQuery; some are useMutation (FHE.allow grants ACL inside a tx). Pair with useDecryptedHandle.
useGetVestedAmountEncrypted-view read: time-unlocked total. Pair with useDecryptedHandle.
useMutation·Reads encrypted handleuseGetClaimableAmountEncrypted-view read: min(vested, balance) - settled. Pair with useDecryptedHandle.
useMutation·Reads encrypted handleuseGetTotalAllocationEncrypted-view read: original allocation. Pair with useDecryptedHandle.
useMutation·Reads encrypted handleuseGetSettledAmountEncrypted-view read: running settled total. Pair with useDecryptedHandle.
useMutation·Reads encrypted handleuseAdminGetVestedAmountAdmin variant of useGetVestedAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutation·Reads encrypted handleuseAdminGetClaimableAmountAdmin variant of useGetClaimableAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutation·Reads encrypted handleuseAdminGetTotalAllocationAdmin variant of useGetTotalAllocation — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutation·Reads encrypted handleuseAdminGetSettledAmountAdmin variant of useGetSettledAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
useMutation·Reads encrypted handleuseAdminGetTokenBalanceAdmin: read the manager clone's confidential ERC-7984 token balance as an euint64 handle.
useMutation·Reads encrypted handleuseDecryptedHandleSubscribe to a single encrypted handle and reactively decrypt via the connected wallet.
custom·Reads encrypted handle
Read · 22
Plaintext on-chain reads. TanStack Query envelope, cached + refetched.
useFactoryDefaultGasFeeRead the factory-wide default gas fee (in wei) — applied to new FeeType.Gas manager clones at deployment.
useQueryuseFactoryDefaultTokenFeeRead the factory-wide default token fee in basis points — applied to new FeeType.DistributionToken manager clones at deployment.
useQueryuseFactoryDefaultFeeTypeRead the factory-wide default fee model (FeeType.Gas or FeeType.DistributionToken) applied to newly-created manager clones.
useQueryuseFactoryFeeCollectorRead the factory's current fee collector address.
useQueryuseFactoryCustomFeeRead the per-creator fee override set on the factory for creator.
useQueryuseManagerTokenThe manager clone's immutable underlying token address.
useQueryuseManagerFeeTypeRead the manager clone's immutable FEE_TYPE (FeeType.Gas or FeeType.DistributionToken).
useQueryuseManagerFeeRead the manager clone's immutable FEE (in wei for FeeType.Gas, in basis points for FeeType.DistributionToken).
useQueryuseManagerFeeInfoResolves { feeType, fee } — caller passes the right branch to useClaim.
useQueryuseManagerIsSplitEnabledRead whether the manager clone has split-vesting enabled (immutable).
useQueryuseManagerIsPausableRead whether the manager clone has pause/unpause enabled (immutable).
useQueryuseManagerMaxBatchSizeRead the manager clone's maxBatchSize — upper bound for batchCreateVesting.
useQueryuseManagerMaxRevokeBatchSizeRead the manager clone's maxRevokeBatchSize — upper bound for batchRevokeVesting.
useQueryuseVestingInfoPlaintext schedule shape (start / end / cliff / interval) + encrypted-handle metadata.
useQueryuseAllRecipientsEvery recipient currently registered on this manager.
useQueryuseAllRecipientsLengthCount of registered recipients (cheap pre-paging check).
useQueryuseAllRecipientsSlicedRead a [start, end) slice of the recipients set.
useQueryuseIsRecipientRead whether account is currently a recipient on this manager clone.
useQueryuseRecipientVestingsRead all vesting IDs owned by recipient.
useQueryuseRecipientVestingsLengthRead the number of vesting schedules owned by recipient.
useQueryuseRecipientVestingsSlicedRead a [start, end) slice of recipient's vesting IDs.
useQueryusePendingVestingTransferRead the pending transfer (if any) on a vesting — returns { newRecipient, initiatedAt, expiresAt }.
useQuery
Admin · 2
Admin-only mutations — caller must hold the relevant role.
Roles · RBAC · 5
RBAC — grant, revoke, renounce. Read role constants + membership.
useHasRoleRead AccessControl: is account a member of role on this manager? The role hashes are stable across deployments — see useRoleConstants if you need to look them up dynamically.
useQueryuseTransferFeeCollectorRoleTransfer the FEE_COLLECTOR_ROLE to newCollector.
useMutationuseGrantRoleAccessControl: grant role to accountTarget.
useMutationuseRevokeRoleAccessControl: revoke role from accountTarget.
useMutationuseRenounceRoleAccessControl: renounce role from msg.sender.
useMutation
Recovery · 8
Pause / unpause / withdraw / rescue — recover the system or its funds.
useManagerPausedRead whether the manager clone is currently paused.
useQueryuseWithdrawAdminAdmin: withdraw an encrypted amount of the manager's distribution token to msg.sender.
useMutation·Encrypts inputuseWithdrawOtherTokenAdmin: rescue an ERC-20 (non-confidential) other than this manager's configured token.
useMutationuseWithdrawOtherConfidentialTokenAdmin: rescue an ERC-7984 (confidential) token other than this manager's configured token.
useMutationuseWithdrawGasFeeFee collector: withdraw collected gas-fee ETH (FeeType.Gas managers).
useMutationuseWithdrawTokenFeeFee collector: withdraw collected distribution-token fees (FeeType.DistributionToken managers).
useMutation·Encrypts inputusePausePauser: pause the manager clone — blocks claim, partialClaim, createVesting, etc.
useMutationuseUnpausePauser: unpause the manager clone.
useMutation
Introspection · 5
Deterministic CREATE2 inputs, role bytes, immutable deployment metadata.
useConfidentialVestingFactoryImplementationRead the FHE-vesting factory's current implementation() address — the LibClone target every new manager clone delegates to.
useQueryuseFactoryInitCodeHashRead the init-code hash the factory would use to CREATE2 a manager clone with the given token + deployer (+ optional immutable flags).
useQueryuseManagerDeploymentBlockNumberRead the manager clone's immutable DEPLOYMENT_BLOCK_NUMBER — the block at which the factory deployed this clone via LibClone.
useQueryuseRoleConstantsRead all eight AccessControl role hashes off the manager in one fan-out.
useQueryusePredictManagerAddressCREATE2 the manager clone address before deploying — pre-flight UI flows.
useQuery