Skip to main content
Send a Solana v1 SOL transfer with the Phantom browser extension.

Send SOL

Call runExample(rpcUrl, recipient) from a button handler to send 0.001 SOL on devnet.
Save connect.ts, usage.ts, and transaction.ts in the same directory.
connect.ts

V1 settings

V1 stores resource limits and the priority fee in the message configuration. This transfer uses 200,000 compute units, a 1 MiB loaded account data limit, and a total priority fee of 1,000 lamports. Re-estimate these values when you change the instructions. The example verifies that the RPC endpoint matches the selected network, simulates before requesting approval, then submits the transaction Phantom returns with preflight enabled. Preserve the wallet’s changes when submitting.

Confirm the transaction

A signature indicates submission. Wait for confirmed or finalized status and check for execution errors before showing success. To read the transaction, set maxSupportedTransactionVersion: 1 in getTransaction and check that the returned version is 1. If submission or confirmation is uncertain, check the existing signature before retrying. Submission errors from this example include a signature property. Phantom may refresh the blockhash during signing, so expiry of the original blockhash does not prove failure.

Next steps