Scaffold
--template frontend.
Environment Setup
Get a WalletConnect Project ID from cloud.walletconnect.com and set it infrontend/.env:
frontend/.env
Without a Project ID, the template falls back to an injected-wallet-only config (no WalletConnect), so it still runs locally.
Provider Setup
RainbowKit wraps your app withWagmiProvider + RainbowKitProvider. The chain comes from activeChain in lib/network.ts, which follows NEXT_PUBLIC_NETWORK — no per-provider chain edits needed.
components/Providers.tsx
ThemeProvider → WagmiProvider → QueryClientProvider → RainbowKitProvider
Inco SDK Integration
The Inco SDK works with thewalletClient provided by wagmi (which RainbowKit supplies). The network-aware client comes from lib/network.ts:
hooks/useConfLottery.ts
Dependencies
| Package | Purpose |
|---|---|
@rainbow-me/rainbowkit | RainbowKit wallet connector |
@inco/lightning-js | Inco encryption/decryption |
wagmi | EVM wallet hooks |
viem | Ethereum utilities |