Concepts

Mental models the SDK assumes.

FHE on chain is unfamiliar even to senior wallet devs. The concept pages cover what a handle is, when ACL grants happen, how the encryptor gets wired, and how to catch typed errors — everything you need to read the rest of the docs without losing the thread.

What is FHEVM?

Fully-homomorphic encryption on chain — what a handle is, why amounts stay opaque, why @zama-fhe/sdk and @zama-fhe/react-sdk are optional peer deps.

Read

The encryptor source pattern

Eager vs lazy injection of the Zama relayer. CLAUDE.md Pitfall #3 spelled out so the next dev doesn't trip over context lifetime.

Read

Encrypted inputs + handles

EncryptedInput, EncryptedHandle, EncryptedViewResult — what they wrap and which path each takes through the SDK.

Read

Typed errors + recovery

SDK-level vs product-level vs the ContractRevertError generic fallback — how to catch a class, how to recover.

Read

Scale-ratio math

FHE_SPLIT_DENOMINATOR, share(), scaleRatio() — the bigint arithmetic that keeps splits exact.

Read

Branded primitives

asVestingId, asAirdropId, asDisperseId — why we wrap Hex strings in nominal types.

Read

Preflight checks

PreflightResult — when to run, what it catches, how to surface its hints in your UI.

Read

ACL grants + disclosure

FHE ACL is append-only. Operators + disclose hooks + the FHE.allow primitive.

Read

Supported chains + addresses

DEPLOYED_ADDRESSES, chain overrides, the Sepolia / mainnet matrix.

Read

SDK telemetry

SdkTelemetry interface, recommended event tags, plug-your-own adapter pattern.

Read