useSolana and useEthereum) for signing and sending transactions optimized for mobile platforms.
Transaction security for embedded wallets: All transactions signed for embedded wallets pass through Phantom’s advanced simulation system before execution. This security layer automatically blocks malicious transactions and transactions from origins that have been reported as malicious, providing an additional layer of protection for your users’ assets.
Chain-specific transaction hooks
Solana transactions (useSolana)
The Solana examples on this page build version 0 messages. Building a version 1 message requires@solana/kit 8.0.0 or later, or @solana/web3.js 3.0.2 or later. @solana/web3.js 1.99.0 can read a version 1 transaction and cannot build one. The version 1 browser-extension recipe does not cover React Native or embedded wallets. Check version 1 capability detection on a path you have tested before you require version 1.
Ethereum transactions (useEthereum)
Dapp-sponsored transactions
Pass apresignTransaction callback to signAndSendTransaction for Solana transactions that need double signing, such as dapp fee payer flows. Calls without it proceed normally — it is never applied globally.
presignTransaction only fires for Solana transactions via the embedded provider. EVM transactions are unaffected.Complete mobile examples
Solana transaction with mobile UI
Dapp-sponsored transactions
By default, the user’s embedded wallet is the fee payer for all Solana transactions. ThepresignTransaction hook lets your app co-sign the transaction before the wallet signs it, enabling use cases like:
- Dapp-as-fee-payer — your app covers the transaction fee so users don’t need SOL
- Platform fees — add a fee instruction signed by your app’s keypair
- Multi-signer flows — any scenario where the app needs to sign alongside the user’s wallet
presignTransaction directly to signAndSendTransaction for the specific calls that need it. Calls without it proceed normally — the function is never applied globally.
Example: app as fee payer
The hook only fires for Solana transactions via the embedded provider. EVM transactions are unaffected.