A comprehensive demonstration of the Coinbase Wallet API v2, showcasing how to create blockchain accounts, fund them with test tokens, and transfer funds easily across Ethereum and Solana networks.
This project serves as a practical implementation and demonstration of the Coinbase Developer Platform (CDP) SDK, allowing developers to interact with blockchain networks through a simple and intuitive interface. It provides a working example of how to integrate blockchain functionality into web applications.
- Multi-blockchain Support: Interact with both EVM-compatible chains (Ethereum, Base) and Solana
- Account Management: Create and manage regular and smart accounts
- Test Network Integration: Connect to testnets (Sepolia, Base Sepolia, Solana Devnet)
- Faucet Integration: Request test tokens directly from network faucets
- Transaction Management: Send and receive transactions with real-time status updates
- Transaction History: View and track all transactions with explorer links
- Responsive UI: User-friendly interface that works across devices
- Frontend: Next.js, React, Tailwind CSS, shadcn/ui
- Blockchain: Coinbase CDP SDK, viem (for EVM), @solana/web3.js
- API: Server-side API routes for secure blockchain interactions
- Node.js v18 or higher
- Coinbase Developer Platform credentials:
- CDP_API_KEY_ID
- CDP_API_KEY_SECRET
- CDP_WALLET_SECRET
-
Clone the repository: ```bash git clone https://github.com/yourusername/coinbase-wallet-api-demo.git cd coinbase-wallet-api-demo ```
-
Install dependencies: ```bash npm install ```
-
Set up environment variables: Create a
.env.local
file with your CDP credentials: ``` CDP_API_KEY_ID=your-api-key-id CDP_API_KEY_SECRET=your-api-key-secret CDP_WALLET_SECRET=your-wallet-secret ``` -
Run the development server: ```bash npm run dev ```
-
Open http://localhost:3000 in your browser.
- Select the network (Base Sepolia or Ethereum Sepolia)
- Create a regular account
- Request test ETH from the faucet
- Send transactions to other addresses
- View transaction history and details
- Select the network (Devnet or Testnet)
- Create a Solana account
- Request test SOL from the faucet
- Send transactions to other Solana addresses
- View transaction history with explorer links
This project contributes to the blockchain ecosystem in several important ways:
By providing a clear, working example of blockchain integration, this demo helps developers new to Web3 understand how to build blockchain applications without getting lost in complex documentation.
The codebase demonstrates secure and efficient patterns for blockchain interactions, including:
- Server-side API routes for sensitive operations
- Proper error handling and transaction confirmation
- User-friendly status updates and notifications
Developers can use this project as a starting point or reference for their own applications, significantly reducing development time and avoiding common pitfalls.
By supporting both EVM chains and Solana, the demo helps developers understand the differences and similarities between blockchain ecosystems, promoting cross-chain literacy.
The testnet integration allows for risk-free experimentation with blockchain technology, encouraging innovation without the financial risks of mainnet development.
- Add support for more blockchains
- Implement message signing functionality
- Create an interactive tutorial
- Add smart contract interaction
- Implement biometric authentication
- Add NFT support
- Create a business dashboard
- Improve error handling
- Add support for multiple networks
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This is a demonstration project and should not be used in production without proper security review and testing.