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 dashboard
- 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 wrapperWhat’s Next
- Send Solana Transactions - Transfer SOL and build transactions
- Sign Solana Messages - Sign messages with Solana wallets
- Token Balances - Query token balances
- Network Management - Switch between networks