.env.local file in the frontend/ directory. Copy .env.local.example to .env.local and fill in the values described below before running npm run dev or npm run build.
Contract Addresses
The deployed address of the
HideMeFactory contract on Ethereum mainnet.This is used when NEXT_PUBLIC_NETWORK is set to "mainnet". The production address is 0x46E16F6E248dfa735D50345b1d2657C8dBC5d60B.The deployed address of the
HideMeFactory contract on Sepolia testnet.Used when NEXT_PUBLIC_NETWORK is set to "sepolia" (the default). Set this to your own Sepolia deployment address during development and testing.Network Selection
Controls which network the frontend connects to. Accepted values are
"mainnet" and "sepolia".When set to "mainnet", the frontend uses NEXT_PUBLIC_FACTORY_ADDRESS_MAINNET and the mainnet Zama KMS configuration. When omitted or set to "sepolia", it uses NEXT_PUBLIC_FACTORY_ADDRESS and the Sepolia Zama configuration.Relayer Credentials
The private key of the relayer wallet. The relayer submits finalization transactions — such as
finalizeUnwrap on the ConfidentialWrapper and finalize on the ConfidentialPaymentRouterV2 — after the Zama KMS network produces a decryption proof.The relayer wallet must hold enough ETH to cover gas for finalization transactions. It does not hold user funds and is non-custodial by design; any address can finalize a pending request on-chain.Zama Relayer Configuration
Your Zama API key for the hosted mainnet relayer at
https://relayer.mainnet.zama.org. Required when connecting to Zama’s production KMS network and NEXT_PUBLIC_USE_MINI_RELAYER is not "true".For Sepolia testing the API key is not needed; the Sepolia relayer at https://relayer.testnet.zama.org accepts unauthenticated requests.Set to
"true" to use the built-in mini-relayer instead of an external Zama-hosted relayer.When enabled, the frontend’s KMS decrypt requests are proxied through a Next.js API route at /api/decrypt/user-decrypt. This route forwards the request to the Zama KMS gateway using the server-side GATEWAY_RELAYER_PRIVATE_KEY, so NEXT_PUBLIC_ZAMA_API_KEY is not required.This is the recommended mode for local development and for deployments where you do not have a Zama API key.The mini-relayer proxies user-decrypt requests through
POST /api/decrypt/user-decrypt. The route is implemented in frontend/src/app/api/decrypt/user-decrypt/route.ts and signs the gateway transaction with GATEWAY_RELAYER_PRIVATE_KEY before forwarding the request to the Zama Gateway Chain.