A mock Solana Mobile Wallet app for testing Mobile Wallet Adapter (MWA) integration in your applications.
This is a testing wallet only. Do not use with real funds or in production environments.
- Mobile Wallet Adapter support for
authorize,signIn,signAndSendTransactions, andsignMessage. - Apple pay-like transaction signing (Bottom sheet approval, no app switch)
- Biometric authentication
- Configurable Ed25519 private key loading for testing the wallet
To build this app, install the latest version of Android Studio.
- Clone the Mock MWA Wallet Repo
git clone https://github.com/solana-mobile/mock-mwa-wallet.git-
Open the project on Android Studio > Open >
mock-mwa-wallet/build.gradle -
Optional: Import an existing private key in
local.propertiesto use in the wallet. See Import a private key. -
Build the app and install on any Android device or emulator.
- Install Mock MWA Wallet on an Android device or emulator
- In the wallet, press the
Authenticatebutton to enable wallet signing for 15 minutes. - In your app, install the MWA Client SDK and invoke the MWA
authorizemethod. - Once invoked, Mock MWA Wallet will be discovered as a compatible wallet option.
By default, Mock MWA Wallet will generate a random keypair for usage when it is initialized.
In mock-mwa-wallet/local.properties, you can configure the wallet to initialize with a given Ed25519 private key.
- In
local.propertiesadd a base58 or base64 encoded private key string:
privateKey=<BASE58_OR_BASE64_ENCODED_PRIVATE_KEY_STRING>
This should be a private key that is strictly used for development purposes.
-
Rebuild and install the app.
-
Now, when you connect to the wallet, it will authorize and sign transactions with the imported private key.
You can add Device Authentication on an emulator, just like on a physical device.
- On your emulator go to the Settings app
- Search for
FingerprintorPin Codesettings page - Follow the standard setup instructions.
- If using fingerprint, your emulator settings (through Android Studio) can simulate a fingerprint.
