
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
react-native-solana-mobile-wallet-adapter
Advanced tools
React Native Solana Mobile Wallet Adapter for iOS and Android
Unified cross-platform Solana wallet adapter for React Native and Expo.
# Install the package
npm install react-native-solana-mobile-wallet-adapter
# Install required peer dependencies
npm install expo-linking expo-secure-store @solana/web3.js
# Android only - install MWA protocol (optional if iOS-only)
npm install @solana-mobile/mobile-wallet-adapter-protocol-web3js
import { transact, isConnected, getConnectedAddress } from 'react-native-solana-mobile-wallet-adapter';
// Connect to wallet
const result = await transact(async (wallet) => {
const auth = await wallet.authorize({
cluster: 'mainnet-beta',
identity: {
name: 'My App',
uri: 'https://myapp.com',
icon: 'favicon.ico',
},
});
return auth.accounts[0].address;
});
// Check connection status
if (isConnected()) {
console.log('Connected to:', getConnectedAddress());
}
app.json / app.config.ts){
"expo": {
"scheme": "myapp",
"ios": {
"infoPlist": {
"LSApplicationQueriesSchemes": ["phantom", "solflare", "backpack"]
}
}
}
}
Important: The scheme is required for iOS deeplink callbacks.
Info.plist)<!-- Allow querying wallet apps -->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>phantom</string>
<string>solflare</string>
<string>backpack</string>
</array>
<!-- Register your app's URL scheme -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
</dict>
</array>
import { transact } from 'react-native-solana-mobile-wallet-adapter';
// Automatically uses iOS or Android implementation
await transact(async (wallet) => { /* ... */ });
// iOS
import { transact } from 'react-native-solana-mobile-wallet-adapter/ios';
// Android
import { transact } from 'react-native-solana-mobile-wallet-adapter/android';
import { transact } from 'react-native-solana-mobile-wallet-adapter';
import { Platform } from 'react-native';
await transact(callback, { platform: Platform.OS as 'ios' | 'android' });
transact<T>(callback, config?): Promise<T>Opens a wallet session and executes the callback.
interface TransactConfig {
platform?: 'ios' | 'android'; // Explicit platform
wallet?: 'phantom' | 'solflare'; // iOS: wallet to use
redirectScheme?: string; // iOS: custom URL scheme
walletUriBase?: string; // Android: wallet URI base
}
MobileWallet Methodsauthorize(params): Promise<AuthorizationResult>const auth = await wallet.authorize({
cluster: 'mainnet-beta', // 'mainnet-beta' | 'devnet' | 'testnet'
identity: {
name: 'My App',
uri: 'https://myapp.com',
icon: 'favicon.ico',
},
authToken: previousToken, // Optional: for re-authorization
});
// Returns:
// auth.accounts[0].address - wallet address (string)
// auth.accounts[0].publicKey - wallet public key (Uint8Array)
// auth.authToken - session token
deauthorize(params): Promise<void>await wallet.deauthorize({ authToken: auth.authToken });
signTransactions(params): Promise<Transaction[]>const [signedTx] = await wallet.signTransactions({
transactions: [transaction],
});
signMessages(params): Promise<Uint8Array[]>const [signature] = await wallet.signMessages({
addresses: [auth.accounts[0].address],
payloads: [new TextEncoder().encode('Hello!')],
});
signAndSendTransactions(params): Promise<string[]> (Android only)const signatures = await wallet.signAndSendTransactions({
transactions: [tx],
minContextSlot: slot,
});
| Function | Description |
|---|---|
isConnected() | Returns true if there's an active session |
getConnectedAddress() | Returns the connected wallet address or null |
getConnectedWalletType() | Returns 'phantom' | 'solflare' | null (iOS only) |
disconnect() | Clears the session without calling the wallet |
getInstalledWallets() | Returns list of installed wallet apps (iOS) |
getSelectedWallet() | Returns the user's selected wallet (iOS) |
setSelectedWallet(wallet) | Sets the preferred wallet (iOS) |
handleRedirectUrl(url) | Handle deeplink callback (for Expo Router) |
| Feature | Android (MWA) | iOS (Deeplinks) |
|---|---|---|
signAndSendTransactions | ✅ | ❌ Deprecated |
| Multiple wallet picker | ✅ System UI | Manual selection |
| Background signing | ✅ | ❌ |
| Session encryption | MWA protocol | X25519 |
For local/linked packages, either:
{ platform: Platform.OS } in configEnsure your scheme is configured in app.json and matches your deeplink setup.
Make sure @solana-mobile/mobile-wallet-adapter-protocol-web3js is installed.
MIT
FAQs
React Native Solana Mobile Wallet Adapter for iOS and Android
We found that react-native-solana-mobile-wallet-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.