Prepare and sign the transaction
CallrunExample(rpcUrl, recipient) from a button handler to send 0.001 SOL on devnet.
Transaction example
Transaction example
Installation and connection
Installation and connection
connect.ts, usage.ts, and transaction.ts in the same directory.connect.ts
sigVerify: false. It stops on errors, requests Phantom’s signature, and submits the transaction Phantom returns with preflight enabled.
Use your own instructions
ReplaceSystemProgram.transfer in usage.ts with your operation’s instructions. Include required setup, cleanup, and resource budget instructions before simulating.
Use the connected wallet as the only signer when possible. If you need additional signers, pass them as the last argument to signAndSubmit. The helper collects their signatures after Phantom signs. Keep the wallet-returned message unchanged after signing.
When splitting a large transaction, keep complete operation groups together. See the size and Address Lookup Table guidance.
Confirm and test
A signature indicates submission. Wait forconfirmed or finalized status and check for execution errors before showing success. If submission is uncertain, check the existing signature before retrying. Submission errors from this example include a signature property.
Test approval on your deployed domain. Phantom performs its own simulation and safety checks; a successful RPC simulation does not guarantee that the warning disappears.
Next steps
- Domain and transaction warnings: review steps if the warning persists.
- New domain review guidance: warnings shown when connecting to a domain.
- Send a Solana v1 transaction