Huge thanks to the Coinbase team who created ths Smart Wallet Expo Example.
This example focuses on Expo Router and making the smart wallet compatible. It takes care of all polyfills for the Smart Wallet, WAGMI, and sets up an (auth) guard for your app.
-
Install dependencies
npm install
-
Start the app
npx expo start
In the output, you'll find options to open the app in a
- development build
- Android emulator
- iOS simulator
- Expo Go, a limited sandbox for trying out app development with Expo
You can start developing by editing the files inside the app directory. This project uses file-based routing.
polyfills.js
- Includes all polyfills needed for the Coinbase Smart Wallet. Imported at the top of your root_layout.tsx
entrypoint.js
- Includes polyfills needed to use WAGMI and send transactions. In thepackage.json
your main is now this.config.ts
- WAGMI config with Coinbase smart wallet(auth)
- Feel free to change this if you want, but I like to protect routes before a wallet connection.
To learn more about developing your project with Expo, look at the following resources:
- Expo documentation: Learn fundamentals, or go into advanced topics with our guides.
- Smart Wallet Docs: Learn about integrating the smart wallet into your project
- WAGMI docs: Learn about using WAGMI hooks