TokenOps SDK
@tokenops/sdk is a typed, viem-first TypeScript SDK for confidential token operations on Zama fhEVM. It covers confidential vesting, confidential airdrops, and confidential disperse, with end-to-end FHE input plumbing (encryption, ACL, KMS proofs) handled inside the SDK so consumers work in plaintext bigint at the application boundary.
Every token airdrop, vesting schedule, and batch distribution on a public chain is visible to anyone — competitors, snipers, and speculators can see amounts before recipients do. The TokenOps SDK changes that. Built on Zama's fhEVM and the ERC-7984 Confidential Token standard, every product in this SDK keeps token amounts encrypted on-chain so only authorized parties can decrypt them. Core contracts are audited by OpenZeppelin.
What stays private, what stays public
Private (Encrypted)
- Token amounts per recipient
- Claimed amounts
- Total reserved amounts
- Fee reserves
Public (Plaintext)
- Recipient addresses
- Vesting schedules and timelines
- Role assignments
- Whether a vesting is revocable
Confidential features
Confidential Airdrop
Encrypts every claim amount so only the recipient sees their allocation. Audited by OpenZeppelin.
Highlights:- Encrypted claim amounts via ERC-7984
- EIP-712 signature-based authorization
- CREATE3 cross-chain deployment
- Audited and ready for deployment
Confidential Disperse
Batch-distribute tokens to multiple recipients while keeping per-address amounts encrypted end-to-end.
Highlights:- Encrypted per-recipient amounts
- Wallet-based, direct, and token-fee modes
- Gas and token fee options
- Per-user wallet system
Confidential Vesting
Token amounts stay encrypted throughout the full vesting lifecycle while schedules remain transparent.
Highlights:- Encrypted allocations and claims
- Selective disclosure to third parties
- Batch vesting creation
- Gas-sponsored and partial claims
Architecture
Why FHE?
Fully Homomorphic Encryption allows smart contracts to perform computations directly on encrypted data without ever decrypting it. While zero-knowledge proofs prove facts about hidden data, FHE goes further by enabling contract logic to compute directly on encrypted state. Zama's fhEVM combines both techniques to deliver an EVM-compatible execution environment where token amounts stay as ciphertext throughout the entire operation — claim, vest, distribute. Only authorized parties can see the plaintext.
Documentation model
Use the product guides for end-to-end flows and design decisions. Use the generated API reference when you need exact method signatures, argument types, returned objects, and React hook exports.
- Getting Started — install and pick a product.
- Confidential Vesting — the
@tokenops/sdk/fhe-vestingentry point. - Confidential Airdrop — the
@tokenops/sdk/fhe-airdropentry point. - Confidential Disperse — the
@tokenops/sdk/fhe-disperseentry point. - Contributing — how to wire
@tokenops/sdkinto a consumer app during active development.