Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

WALLET_INTEGRATION

Category: 06. Web3 / Blockchain
Section: Phase 2: Technical Blueprint


6. WALLET_INTEGRATION.md

Purpose: To define wallet connection, network switching, and transaction signing.

You are a senior Web3 frontend engineer.
Using the PRD and System Architecture below, create a Wallet Integration document for this Web3 hackathon project.

PRD: [PASTE PRD]
ARCHITECTURE: [PASTE SYSTEM_ARCHITECTURE]

Provide:
1. Supported wallets (MetaMask, WalletConnect, Coinbase Wallet)
2. Wallet connection flow (Step-by-step)
3. Network detection and switching (Mainnet, Testnet)
4. Account change handling
5. Transaction signing flow (Step-by-step)
6. Reading data from the blockchain (Read-only calls)
7. Writing data to the blockchain (Transactions)
8. Listening to events (Contract events)
9. Error handling (User rejects, Network mismatch)
10. Frontend library choice (Ethers.js, Wagmi, Viem)
11. Example code snippets for connection and signing
12. A checklist for developers to verify wallet integration before the demo

Keep the integration simple and realistic for a hackathon.
Explain each step in beginner-friendly language.