rk-wallet-connector
v1.0.2
Published
Create a wallet connector for your dapp
Readme
Web3 Next.js Wallet App
This is a modern Next.js application template for connecting Ethereum wallets using wagmi and RainbowKit.
Features
- Connect Wallet: Users can connect wallets (MetaMask, Rainbow, Coinbase, etc.) using a beautiful RainbowKit modal.
- Multi-chain Support: Supports Ethereum mainnet, Polygon, Optimism, Arbitrum, Base, and (optionally) Sepolia testnet.
- React Query Integration: Uses React Query for efficient data fetching and caching, as required by wagmi.
- App Router Ready: Built for Next.js App Router with full support for client/server components.
- Customizable Navbar: Includes a top navigation bar for navigation and wallet connection.
Structure
src/app/layout.tsx: Global layout, includes the Providers and navigation bar.src/app/WagmiProvider.tsx: Sets up all required providers (RainbowKit, wagmi, React Query) for the app.src/app/page.tsx: Example home page, shows how to use wagmi hooks and display wallet info.src/wagmi.ts: (If present) Can be used for custom wagmi config.
Getting Started
- Install dependencies:
npm i -g rk-wallet-connector - Set up WalletConnect Project ID:
- Get a free Project ID from WalletConnect Cloud.
- Replace the placeholder in
WagmiProvider.tsxwith your actual Project ID.
- Run the app locally:
create-wallet-connector <project-name> - Visit
http://localhost:3000and click "Connect Wallet" in the top nav bar.
Customization
- Add more pages in
src/app/and the ConnectButton/navbar will appear automatically. - Customize chains, theme, or wallet options in
WagmiProvider.tsx.
Tech Stack
Starter template for your next Web3 project!
