Transactions & Fees
requestAirdrop
Requests an airdrop of lamports to a Solana account
Parameters
Public key of the account to receive the airdrop (base-58 encoded)
Amount of lamports to request (1 SOL = 1,000,000,000 lamports)
Configuration object containing:
Commitment level (processed, confirmed, finalized)
Response
Transaction signature of the airdrop (base-58 encoded)
Code Examples
Basic Request
Using web3.js
Notes
- Requests an airdrop of SOL to a Solana account
- Only available on test networks (devnet, testnet)
- The response is the transaction signature
- The transaction must be confirmed before funds are available
- The amount is limited based on network configuration
Best Practices
- Use appropriate commitment level based on your needs
- Wait for transaction confirmation before proceeding
- Handle rate limits and network errors
- Consider using faucet services for larger amounts
- Monitor transaction status for failures
Common Errors
Code | Message | Solution |
---|---|---|
-32601 | Method not found | Verify you’re connected to a test network |
-32602 | Invalid params | Check public key format and lamports amount |
-32003 | Transaction simulation failed | Amount may exceed limit or account may be invalid |
Use Cases
-
Airdrop Management
-
Airdrop Monitoring
-
Airdrop Planning