Vesting · Client@tokenops/sdk/fhe-vesting
ConfidentialVestingFactoryClient
Deploy manager clones and configure the factory's default fees. Each call resolves the on-chain factory address from DEPLOYED_ADDRESSES by chain id. Role management, pause, and fee withdrawal live on the manager client; deterministic address prediction lives on ConfidentialVestingFactoryAdvancedClient (@tokenops/sdk/fhe-vesting/advanced).
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 { createConfidentialVestingFactoryClient } from "@tokenops/sdk/fhe-vesting";
const client = createConfidentialVestingFactoryClient({
publicClient,
walletClient,
// address optional: resolved from publicClient.chain.id
});Methods
Setup · 2
Configure · 8
- Admin: set the factory-wide default gas fee (in wei).
client.setDefaultGasFee()React:useSetDefaultGasFee - Admin: set the factory-wide default token fee (basis points).
client.setDefaultTokenFee()React:useSetDefaultTokenFee - Admin: set the factory's default fee model (FeeType.Gas or FeeType.DistributionToken) for new manager clones.
client.setDefaultFeeType()React:useSetDefaultFeeType - Admin: install a per-creator fee override on the factory.
client.setCustomFee()React:useSetCustomFee - Admin: set the factory's fee collector address.
client.setFeeCollector()React:useSetFeeCollector - Admin: reset the factory's default gas fee to its bytecode-encoded baseline.
client.resetGasFee()React:useResetGasFee - Admin: reset the factory's default token fee to its bytecode-encoded baseline.
client.resetTokenFee()React:useResetTokenFee - Admin: disable the per-creator fee override for creator.
client.disableCustomFee()React:useDisableCustomFee
Read · 8
- Read the factory-wide default gas fee (in wei) — applied to new FeeType.Gas manager clones at deployment.
client.defaultGasFee()React:useFactoryDefaultGasFee - Read the factory-wide default token fee in basis points — applied to new FeeType.DistributionToken manager clones at deployment.
client.defaultTokenFee()React:useFactoryDefaultTokenFee - Read the factory-wide default fee model (FeeType.Gas or FeeType.DistributionToken) applied to newly-created manager clones.
client.defaultFeeType()React:useFactoryDefaultFeeType - Read the per-creator fee override set on the factory for creator.
client.getCustomFee()React:useFactoryCustomFee - Read the factory's current fee collector address.
client.feeCollector()React:useFactoryFeeCollector - Read the init-code hash the factory would use to CREATE2 a manager clone with the given token + deployer (+ optional immutable flags).
client.getInitCodeHash()React:useFactoryInitCodeHash - Read the FHE-vesting factory's current implementation() address — the LibClone target every new manager clone delegates to.
client.implementation()React:useConfidentialVestingFactoryImplementation client.managerImplementation()Alias for implementation(), named after the contract storage field (_managerImplementation). Client method only; the hook covers the canonical read.