Skip to main content

Scaffold

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

Environment Setup

Get your App ID from dashboard.privy.io and set it in frontend/.env:
frontend/.env

Provider Setup

Privy wraps your app with PrivyProvider and Privy’s wagmi connector (@privy-io/wagmi), giving you email, social, and embedded-wallet login. 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: ThemeProviderPrivyProviderQueryClientProviderWagmiProvider Note the wagmi createConfig is imported from @privy-io/wagmi (not wagmi), so Privy’s embedded wallets connect through wagmi automatically.

Inco SDK Integration

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

Dependencies