For the complete documentation index, see llms.txt. This page is also available as Markdown.

Network presets

Pre-configured chain objects and legacy network configs for supported networks.

Import pre-configured chain objects from @zama-fhe/sdk/chains. Each chain includes contract addresses, relayer URLs, chain IDs, and an id alias for use in relayer config keys.

import { sepolia, mainnet, hoodi, hardhat } from "@zama-fhe/sdk/chains";

Available chains

Chain
Chain ID
Network

mainnet

1

Ethereum Mainnet

sepolia

11155111

Sepolia Testnet

hoodi

560048

Hoodi Testnet

hardhat

31337

Local Hardhat node

What each chain includes

Each chain object implements the FheChain interface:

Field
Type
Description

id

number

Chain identifier

gatewayChainId

number

Chain ID of the gateway

relayerUrl

string

Default relayer endpoint for this network

network

EIP1193Provider | string

Default RPC URL or EIP-1193 provider for this network

aclContractAddress

Address

ACL contract address

kmsContractAddress

Address

KMS contract address

inputVerifierContractAddress

Address

Input verifier contract address

verifyingContractAddressDecryption

Address

EIP-712 verifying contract for decrypt operations

verifyingContractAddressInputVerification

Address

EIP-712 verifying contract for encrypt operations

registryAddress

Address | undefined

Token wrapper registry contract address (undefined for chains without a deployed registry, e.g. Hardhat)

executorAddress

Address | undefined

TFHEExecutor contract address (cleartext mode only, undefined for real FHE chains)

auth

Auth | undefined

Relayer authentication. Required for the Zama-hosted mainnet relayer; leave unset on the Sepolia testnet relayer, which needs no key.

kmsSignerPrivateKey

Hex | undefined

KMS signer private key for EIP-712 verification (cleartext mode)

inputSignerPrivateKey

Hex | undefined

Input signer private key for EIP-712 verification (cleartext mode)

Usage with createConfig

Pass chain objects in the chains array and use chain.id as relayer keys:

Per-chain overrides (e.g. relayerUrl, network) are set by spreading the chain preset in the chains array. The chain object provides all contract addresses automatically.

Browser apps

When using the keyed mainnet relayer, proxy requests through your backend so the API key never reaches the client (the Sepolia testnet relayer needs no key, so this is mainnet-only). Override relayerUrl in the chain definition:

Server apps

On the server, use node(). Chain data (network, relayerUrl) comes from the preset, so a bare call is all you need — it also accepts optional @fhevm/sdk client options (batchRpcCalls, fheEncryptionKey) for per-client tuning:

Local development

Use the hardhat chain with a cleartext() relayer:

Multiple networks

Support multiple networks by listing them in the chains array:

Legacy preset configs (removed)

The legacy SepoliaConfig, MainnetConfig, and HardhatConfig objects are no longer exported from @zama-fhe/sdk. Use the chain presets from @zama-fhe/sdk/chains with createConfig instead:

DefaultRegistryAddresses

A convenience export of built-in registry addresses for known chains (Mainnet, Sepolia, Hoodi) as a Record<number, Address> map. Used internally by the WrappersRegistry class.

hardhat has no registry address by default. Pass one via registryAddresses when creating a WrappersRegistry, or set registryAddress on the chain definition.

Last updated