Vesting · Client@tokenops/sdk/fhe-vesting
ConfidentialVestingManagerClient
Mounts against a single manager clone address. Aria opens vestings here; Mira claims here; auditors get ACL grants here. Encrypted values are client-encrypted before each write.
Construct
Headless TS — non-React consumers (Node, Vite, server workers). React hosts use the per-hook surface; same method names, lazy encryptor.
@tokenops/sdk/fhe-vesting
ts
import { createConfidentialVestingManagerClient } from "@tokenops/sdk/fhe-vesting";
const client = createConfidentialVestingManagerClient({
publicClient,
walletClient,
address, // required: manager clone address
});Methods
Write · 9
- Open a new vesting schedule on a manager — encrypts the amount client-side, submits the tx.
client.createVesting()React:useCreateVesting - Recipient-side claim. For FeeType.Gas managers pass value (read it with useManagerFeeInfo); omit value for FeeType.DistributionToken.
client.claim()React:useClaim - Claim less than the unlocked amount — leaves the remainder encrypted on the clone.
client.partialClaim()React:usePartialClaim - Admin revocation — clears the schedule (revocable variants only) and returns funds.
client.revokeVesting()React:useRevokeVesting - Split one vesting into two with custom proportions; both stay encrypted.
client.splitVesting()React:useSplitVesting - Recipient initiates a two-step transfer of a vesting position to another recipient.
client.initiateVestingTransfer()React:useInitiateVestingTransfer - Accept an inbound vesting transfer (counterparty side).
client.acceptVestingTransfer()React:useAcceptVestingTransfer - Cancel an outbound transfer before the counterparty accepts.
client.cancelVestingTransfer()React:useCancelVestingTransfer - Admin-driven transfer — moves a vesting without the recipient's signature.
client.directVestingTransfer()React:useDirectVestingTransfer
Batch write · 2
Admin · 2
Disclose · ACL · 6
- Grant ACL on a full vesting (allocation + settled + claimable) to a third party.
client.discloseToParty()React:useDiscloseToParty - Grant ACL on a single ciphertext handle to a third party (e.g. an auditor).
client.discloseHandleToParty()React:useDiscloseHandleToParty - Batch variant of useDiscloseToParty.
client.batchDiscloseToParty()React:useBatchDiscloseToParty - Batch ACL grant across many handles in one tx.
client.batchDiscloseHandlesToParty()React:useBatchDiscloseHandlesToParty - Admin variant of useDiscloseToParty — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminDiscloseToParty()React:useAdminDiscloseToParty - Admin variant of useBatchDiscloseToParty — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminBatchDiscloseToParty()React:useAdminBatchDiscloseToParty
Encrypted read · 9
- Encrypted-view read: time-unlocked total. Pair with useDecryptedHandle.
client.getVestedAmount()React:useGetVestedAmount - Encrypted-view read: min(vested, balance) - settled. Pair with useDecryptedHandle.
client.getClaimableAmount()React:useGetClaimableAmount - Encrypted-view read: running settled total. Pair with useDecryptedHandle.
client.getSettledAmount()React:useGetSettledAmount - Encrypted-view read: original allocation. Pair with useDecryptedHandle.
client.getTotalAllocation()React:useGetTotalAllocation - Admin variant of useGetVestedAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminGetVestedAmount()React:useAdminGetVestedAmount - Admin variant of useGetClaimableAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminGetClaimableAmount()React:useAdminGetClaimableAmount - Admin variant of useGetSettledAmount — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminGetSettledAmount()React:useAdminGetSettledAmount - Admin variant of useGetTotalAllocation — caller must hold DISCLOSURE_ADMIN_ROLE.
client.adminGetTotalAllocation()React:useAdminGetTotalAllocation - Admin: read the manager clone's confidential ERC-7984 token balance as an euint64 handle.
client.adminGetTokenBalance()React:useAdminGetTokenBalance
Read · 20
- Plaintext schedule shape (start / end / cliff / interval) + encrypted-handle metadata.
client.getVestingInfo()React:useVestingInfo client.preflightClaim()Read-only claim preflight: returns { ready, blockers } with the same typed errors the write would throw. No React hook; call it on the headless client.- The manager clone's immutable underlying token address.
client.token()React:useManagerToken - Read the manager clone's immutable FEE (in wei for FeeType.Gas, in basis points for FeeType.DistributionToken).
client.fee()React:useManagerFee - Read the manager clone's immutable FEE_TYPE (FeeType.Gas or FeeType.DistributionToken).
client.feeType()React:useManagerFeeType - Resolves { feeType, fee } — caller passes the right branch to useClaim.
client.getFeeInfo()React:useManagerFeeInfo - Read whether the manager clone has pause/unpause enabled (immutable).
client.isPausable()React:useManagerIsPausable - Read whether the manager clone has split-vesting enabled (immutable).
client.isSplitEnabled()React:useManagerIsSplitEnabled - Read whether the manager clone is currently paused.
client.paused()React:useManagerPaused - Read the manager clone's maxBatchSize — upper bound for batchCreateVesting.
client.maxBatchSize()React:useManagerMaxBatchSize - Read the manager clone's maxRevokeBatchSize — upper bound for batchRevokeVesting.
client.maxRevokeBatchSize()React:useManagerMaxRevokeBatchSize - Read the manager clone's immutable DEPLOYMENT_BLOCK_NUMBER — the block at which the factory deployed this clone via LibClone.
client.deploymentBlockNumber()React:useManagerDeploymentBlockNumber - Every recipient currently registered on this manager.
client.getAllRecipients()React:useAllRecipients - Count of registered recipients (cheap pre-paging check).
client.getAllRecipientsLength()React:useAllRecipientsLength - Read a [start, end) slice of the recipients set.
client.getAllRecipientsSliced()React:useAllRecipientsSliced - Read whether account is currently a recipient on this manager clone.
client.isRecipient()React:useIsRecipient - Read all vesting IDs owned by recipient.
client.getAllRecipientVestings()React:useRecipientVestings - Read the number of vesting schedules owned by recipient.
client.getAllRecipientVestingsLength()React:useRecipientVestingsLength - Read a [start, end) slice of recipient's vesting IDs.
client.getAllRecipientVestingsSliced()React:useRecipientVestingsSliced - Read the pending transfer (if any) on a vesting — returns { newRecipient, initiatedAt, expiresAt }.
client.getPendingVestingTransfer()React:usePendingVestingTransfer
Configure · 2
Roles · RBAC · 6
- AccessControl: grant role to accountTarget.
client.grantRole()React:useGrantRole - AccessControl: revoke role from accountTarget.
client.revokeRole()React:useRevokeRole - AccessControl: renounce role from msg.sender.
client.renounceRole()React:useRenounceRole - Read 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.
client.hasRole()React:useHasRole - Read all eight AccessControl role hashes off the manager in one fan-out.
client.roleConstants()React:useRoleConstants - Transfer the FEE_COLLECTOR_ROLE to newCollector.
client.transferFeeCollectorRole()React:useTransferFeeCollectorRole
Recovery · 7
- Pauser: pause the manager clone — blocks claim, partialClaim, createVesting, etc.
client.pause()React:usePause - Pauser: unpause the manager clone.
client.unpause()React:useUnpause - Admin: withdraw an encrypted amount of the manager's distribution token to msg.sender.
client.withdrawAdmin()React:useWithdrawAdmin - Fee collector: withdraw collected gas-fee ETH (FeeType.Gas managers).
client.withdrawGasFee()React:useWithdrawGasFee - Fee collector: withdraw collected distribution-token fees (FeeType.DistributionToken managers).
client.withdrawTokenFee()React:useWithdrawTokenFee - Admin: rescue an ERC-20 (non-confidential) other than this manager's configured token.
client.withdrawOtherToken()React:useWithdrawOtherToken - Admin: rescue an ERC-7984 (confidential) token other than this manager's configured token.
client.withdrawOtherConfidentialToken()React:useWithdrawOtherConfidentialToken