Skip to main content

Prerequisites

Install dependencies

npm install @wallet-ui/react-native-web3js react-native-quick-crypto @solana/web3.js expo-dev-client

Configure polyfills

The react-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
import { install } from 'react-native-quick-crypto';
install();
2. Create an index.js entry point that imports the polyfill first:
index.js
import './polyfill';
import 'expo-router/entry'; // If using Expo Router
3. Update package.json to use the new entry point:
package.json
{
  "main": "./index.js"
}
The polyfill must be imported before any other code that uses @solana/web3.js.

Custom Development Build

MWA uses Kotlin native modules, so you must use a custom Expo development build instead of Expo Go. Update your package.json build scripts:
{
  "scripts": {
    "android": "expo run:android"
  }
}

Next steps

Setup

Wrap your app with MobileWalletProvider and set up the useMobileWallet hook.
Last modified on February 13, 2026