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)
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.