Skip to main content

Overview

Build, sign, and send SOL transactions with blockhash management.

Prerequisites

Send SOL Transaction

Sign Transaction (Without Sending)

Lamports Conversion Helpers

Best Practices

  • Get fresh blockhash immediately before sending (valid ~60 seconds)
  • Validate addresses before creating transactions
  • Check balance includes transaction fees (~5000 lamports)
  • Show transaction confirmations to users
  • Display transaction status with explorer links

Error Handling

Common Transaction Errors

Troubleshooting

Transaction not confirming: Check transaction status on explorer Blockhash expired: Get fresh blockhash immediately before sending, implement retry logic Network mismatch: Use devnet for testing, mainnet for production Insufficient funds: Get devnet SOL from faucet.solana.com for testing

What’s Next

Last modified on February 3, 2026