Getting Started

Architecture

How the browser, wallet, Zama Relayer/Gateway, and the fhEVM contracts talk to each other.

ShadowLine is a non-custodial frontend. There is no backend that holds keys or funds — everything happens between your browser, your wallet, the public RPC, and Zama's FHE infrastructure.

Youbrowser + walletShadowLine UINext.js appWagmi + viempublic RPC reads/writesZama React SDKencrypt · decrypt · permitfhEVMwrapper contractsRelayer / GatewayKMS coprocessorsettles
ShadowLine end-to-end request flow

The four moving parts

Every action in the app resolves to a combination of these four lanes. Reads and writes to public state go through Wagmi; anything involving an encrypted value goes through the Zama SDK.

  • ShadowLine UI — a Next.js app. It renders the registry, forms, and balances. It never sees your private key and stores no secrets server-side.
  • Wagmi + viem — public RPC for standard EVM reads (allowances, ERC-20 balances, registry pairs) and for sending transactions your wallet signs.
  • Zama React SDK — client-side FHE: it encrypts inputs before they hit the chain, requests EIP-712 permits, and asks the Gateway to decrypt values that belong to you.
  • Relayer / Gateway (KMS)— Zama's off-chain coprocessor. It performs the heavy FHE work and produces the decryption proofs the fhEVM contracts verify on-chain.

A shield, traced end-to-end

When you shield 100 USDC: the UI reads your allowance via Wagmi, sends an approve() if needed, waits for the receipt, then calls the wrapper's wrap(). The wrapper locks the ERC-20 and mints an encrypted euint64 balance to you. Nothing about the amount is readable on-chain afterward — only a ciphertext handle exists.

A decrypt, traced end-to-end

When you reveal a balance: the SDK asks your wallet for an off-chain EIP-712 signature (no gas), derives a session key scoped to your address and that contract, and hands it to the Gateway. The Gateway decrypts only your ciphertext and returns the plaintext to the browser session. See EIP-712 Permits for the full sequence.

Non-custodial by construction: there is no ShadowLine server in any of these paths. If this site disappeared tomorrow, your tokens and wrappers would remain fully usable directly against the on-chain contracts.