Overview

TypeScript SDK for confidential smart contracts — shield, transfer, and unshield tokens with Fully Homomorphic Encryption.

Welcome to the Zama SDK!

circle-info

Looking for the legacy Relayer SDK?

This is the new default SDK for building on the Zama Protocol. The legacy @zama-fhe/relayer-sdk lives at github.com/zama-ai/relayer-sdkarrow-up-right.

Where to go next

If you're new to the Zama Protocol, start with the Litepaperarrow-up-right or the Protocol Overviewarrow-up-right 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 Guides 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 session management.

Two packages, one import

Package
Use when...

You are building with vanilla TypeScript, Node.js, or any non-React framework

You are building a React app (includes everything from the core SDK)

If you are using React, @zama-fhe/react-sdk re-exports most of the core SDK (hooks, providers, RelayerWeb, storage singletons). You still import signer adapters from their sub-paths (e.g. @zama-fhe/sdk/viem, @zama-fhe/sdk/ethers).

Install

Your first confidential transfer in 30 seconds

Ready to build? Jump to the Quick startarrow-up-right for a full working example with your stack.

Help center

Ask technical questions and discuss with the community.

Last updated