The Solana Mobile Wallet Adapter (MWA) is a library that allows apps to connect to mobile Solana wallets. This guide will walk you through the steps to integrate MWA into your Privy app.

Resources

Install dependencies

Install the required dependencies:
npm i @solana-mobile/wallet-standard-mobile

Register the MWA adapter

In your app’s root component, register the MWA adapter with Privy.
import {
  createDefaultAuthorizationCache,
  createDefaultChainSelector,
  createDefaultWalletNotFoundHandler,
  registerMwa
} from '@solana-mobile/wallet-standard-mobile';

registerMwa({
  appIdentity: {
    name: 'My app',
    uri: 'https://myapp.io',
    icon: 'relative/path/to/icon.png' // resolves to https://myapp.io/relative/path/to/icon.png
  },
  authorizationCache: createDefaultAuthorizationCache(),
  chains: ['solana:mainnet'],
  chainSelector: createDefaultChainSelector(),
  onWalletNotFound: createDefaultWalletNotFoundHandler(),
  remoteHostAuthority: 'https://myapp.io' // Include to enable remote connection option.
});

Conclusion

That’s it! Your Privy app is now set up to connect to Solana wallets using the Solana Mobile Wallet Adapter. You can now use Privy’s wallet connection and transaction signing features with Solana wallets that support MWA.