Skip to main content

Scaffold

This scaffolds the full monorepo with RainbowKit as the wallet provider. For just the frontend, add --template frontend.

Environment Setup

Get a WalletConnect Project ID from cloud.walletconnect.com and set it in frontend/.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 with WagmiProvider + RainbowKitProvider. The chain comes from activeChain in lib/network.ts, which follows NEXT_PUBLIC_NETWORK — no per-provider chain edits needed.
components/Providers.tsx
Provider hierarchy: ThemeProviderWagmiProviderQueryClientProviderRainbowKitProvider

Inco SDK Integration

The Inco SDK works with the walletClient provided by wagmi (which RainbowKit supplies). The network-aware client comes from lib/network.ts:
hooks/useConfLottery.ts

Dependencies

PackagePurpose
@rainbow-me/rainbowkitRainbowKit wallet connector
@inco/lightning-jsInco encryption/decryption
wagmiEVM wallet hooks
viemEthereum utilities