This project is a Next.js starter application that demonstrates the integration of Privy Smart Wallets for signing and executing transactions on the Base and Base Sepolia networks.
- Privy authentication and embedded wallets
- Smart wallet integration
- Signing messages
- Sending USDC transactions
- Chain switching between Base and Base Sepolia
- Balance display for both embedded and smart wallets
- Clone the repository
- Install dependencies:
yarn install
- Set up your environment variables:
Create a .env.local
file in the root directory and add your Privy App ID:
NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id_here
- Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
app/
: Contains the main application pages and layoutcomponents/
: Reusable React componentslib/
: Utility functions and constantspublic/
: Static assets
Key dependencies include:
- Next.js
- React
- Privy SDK (@privy-io/react-auth, @privy-io/wagmi)
- Wagmi
- Viem
- NextUI
For a full list of dependencies, refer to the package.json
file.
To learn more about the technologies used in this starter:
- Next.js Documentation
- Privy Documentation
- Privy Smart Wallets Documentation
- Wagmi Documentation
- NextUI Documentation
This project can be easily deployed on Vercel. For more details, check out the Next.js deployment documentation.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.