MobileWalletProvider
Wrap your app’s root component withMobileWalletProvider. This provider manages the wallet connection state and exposes the useMobileWallet hook to all child components.
- @solana/kit
- @solana/web3.js
Identity object
Every field is optional in the protocol, but setname and an absolute uri. Wallets verify your app by checking the Digital Asset Links file on the uri domain against your app signing key, and the MWA spec recommends a wallet decline authorization when identity carries no uri. A relative icon also resolves against uri.
useMobileWallet hook
Inside any component wrapped byMobileWalletProvider, use the useMobileWallet hook to access wallet functionality:
- @solana/kit
- @solana/web3.js
account.address is a kit Address — a branded string, so it needs no conversion before you pass it to an RPC call or an instruction builder.Every signing method also has a singular alias —
signMessage,
signTransaction, signAndSendTransaction — with the same signature. The
plural names are used throughout these docs and in the templates.Next steps
Quickstart
See usage examples for all useMobileWallet hook methods.
