
What is Mobile Wallet Adapter?
Well, It is a protocol that allows mobile apps to connect to solana wallets that implement the MWA protocol. In simple terms you can interact with wallets that support MWA specification from your mobile app and perform actions like signing transactions & messages, SIWS …How are we going to do it?
- We will use a solana js SDK called kit to create generic hooks that can accept transactions & messages and make it interact with mobile wallets.
-
On top of these, we’ll build signers to simplify working with Kit SDK, similar to how you would with
generateKeyPairSigner.
Setup Kit Client
Install kit packageclient.tsx inside it and add the following code
services/kit/client.tsx
_Layout.tsx) and wrap your app with KitClientProvider
app/_layout.tsx
If you have any hard time following the steps or fell that my grammar is not good enough, you can always
refer to the complete code github repo
Install Mobile Wallet Adapter
Install@solana-mobile/mobile-wallet-adapter-protocol, this is the core package that provides the MWA protocol implementation with react native
@solana-mobile/mobile-wallet-adapter-kit. This package provides us typed utilities
making it easier to work with MWA and Kit SDK.