Skip to main content

Overview

Connect to Solana networks to query accounts, check balances, and prepare transactions.

Prerequisites

  • Dynamic SDK initialized (see Installation Guide)
  • User authenticated (see Authentication Guide)
  • Solana wallets enabled in your Dynamic developer console
  • SolanaWeb3 library for transaction building

Get Solana Wallets

Create Solana Connection

Query Account Balance

Get Latest Blockhash

Lamports Conversion

Solana Network Configuration

Best Practices

  • Handle network errors gracefully
  • Cache connection instances to avoid repeated creation
  • Validate public key format before use
  • Use devnet for testing, mainnet for production
  • Monitor balance changes periodically if needed

Error Handling

Troubleshooting

Connection timeout: Use reliable RPC endpoint or implement retry logic with exponential backoff Invalid blockhash: Fetch blockhash immediately before creating transaction (valid ~60 seconds) Rate limiting: Add delays between requests or use rate limiting wrapper

What’s Next

Last modified on September 16, 2026