Mobile Wallet Adapter (MWA)
Connect React Native apps to mobile wallets for authorize and sign.
Search across all documentation pages
Connect React Native apps to mobile wallets for authorize and sign.
npm install @solana-mobile/mobile-wallet-adapter-protocol-web3js
# Prefer kit-compatible MWA bindings in new apps alongside @solana/kit@7.0.0When to reach for this:
import { transact } from "@solana-mobile/mobile-wallet-adapter-protocol-web3js";
async function connectMobileWallet() {
await transact(async (wallet) => {
const auth = await wallet.authorize({
cluster: "devnet",
identity: { name: "My dApp", uri: "https://example.com", icon: "favicon.ico" },
});
console.log("accounts", auth.accounts);
// sign transactions with wallet.signTransactions during same session
});
}What this demonstrates:
transact scopes wallet session to callback.| Alternative | Use When | Don't Use When |
|---|---|---|
| In-app embedded wallet | Consumer onboarding | External wallet power users |
| Mobile web + wallet deep link | No app install | Native performance needs |
Providers in client layout.tsx; pages mix server + client components.
Server env only for keypairs; NEXT_PUBLIC_ for RPC URLs.
All examples use @solana/kit, not web3.js v1.
Signing only in client components.
Revalidate on-chain reads carefully - chain is source of truth.
HTTPS endpoints returning Solana Actions JSON.
Separate React Native app with MWA.
Surfpool for integration; mock RPC in unit tests.
Separate env files and program IDs.
Decode simulation logs for user-facing messages.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026