Prerequisites
- A React Native (Expo) project set up for Android development. See the Environment Setup guide.
- An MWA-compatible wallet installed on your device or emulator. See Install a development wallet.
Install dependencies
Configure polyfills
Thereact-native-quick-crypto library provides a polyfill for the crypto module needed by @solana/web3.js.
1. Create a polyfill.js file in your project root:
polyfill.js
index.js entry point that imports the polyfill first:
index.js
package.json to use the new entry point:
package.json
Custom Development Build
MWA uses Kotlin native modules, so you must use a custom Expo development build instead of Expo Go. Update yourpackage.json build scripts:
Next steps
Setup
Wrap your app with MobileWalletProvider and set up the useMobileWallet hook.
