To achieve this, you will write code that:
- Builds a transaction that invokes the System Program’s
transfer instruction
- Connects to the user’s wallet to retrieve their wallet address
- Prompt the user to sign the transaction with Mobile Wallet Adapter
Build a transfer transaction
Write a helper method buildTransferTransaction that handles creating the transfer instruction and assembling it into a Transaction.
You can use the SystemProgram.transfer util method provided by web3-solana to conveniently generate a serialized transfer instruction.
TIPFetching the latest blockhash
In this method, we use a blockhash parameter. See this RPC requests guide for an example.
Instantiate Mobile Wallet Adapter client
In your app, instantiate a MobileWalletAdapter client instance, that will be used to establish a session with the user’s mobile wallet app.
Connect to the user’s wallet
Assuming you do not currently have the user’s wallet address available, you can use Mobile Wallet Adapter
to connect to their mobile wallet app, and learn what their wallet address is.
Sign and send the transaction
Finally, issue a signAndSendTransactions request, prompting the user to sign the transfer transaction
and submit it to the network.
If signing is successful, you can check the returned result for the transaction signature, or handle failure cases.
Next steps
Check out the Kotlin Compose Scaffold for a code examples of what is discussed in this guide, and an easy launching point to getting started with Solana Kotlin development!
Last modified on July 21, 2026