Overview
TypeScript SDK for confidential smart contracts — shield, transfer, and unshield tokens with Fully Homomorphic Encryption.
Welcome to the Zama SDK!
Where to go next
If you're new to the Zama Protocol, start with the Litepaper or the Protocol Overview to understand the foundations.
Otherwise:
🟨 Go to Quick start to get from zero to a working confidential transfer in under 5 minutes.
🟨 Go to Build your first confidential dApp for an end-to-end React tutorial.
🟨 Go to Configuration for step-by-step instructions on shielding, transfers, balances, and more.
🟨 Go to SDK reference for the full core SDK API.
🟨 Go to React reference for all React hooks and components.
Features
Shield & unshield
Convert public ERC-20 tokens into encrypted form and back. The SDK handles approvals, encryption, and the two-step unshield flow.
Confidential transfers
Encrypt amounts client-side before submitting on-chain. On-chain observers see the transaction but never the value.
React hooks
TanStack Query-based hooks with cached decryption, automatic cache invalidation, and one-signature permit management.
Two packages, one import
You are building with vanilla TypeScript, Node.js, or any non-React framework
You are building a React app (hooks and React-specific providers)
If you are using React, install both packages: @zama-fhe/react-sdk provides the hooks and ZamaProvider, while @zama-fhe/sdk is a peer dependency that provides core utilities, relayer factories, chain presets, and error helpers. For wagmi apps, build the config with createConfig from @zama-fhe/react-sdk/wagmi and pass it to <ZamaProvider config={zamaConfig}>. For non-React apps, use createConfig from @zama-fhe/sdk/viem or @zama-fhe/sdk/ethers.
Install
Your first confidential transfer in 30 seconds
Ready to build? Jump to the Quick start for a full working example with your stack.
Help center
Ask technical questions, discuss with the community, or report a bug.
Open an issue on the SDK repository
Last updated