Parameters
string
required
The blockhash to validate (base-58 encoded)
object
Response
boolean
Whether the blockhash is still valid (true) or not (false)
Code Examples
Basic Request
Using web3.js
Notes
- Returns whether a blockhash is still valid
- Blockhashes expire after a certain number of slots
- The response is immediate as it reads from the current state
- Invalid blockhashes cannot be used in transactions
- The blockhash must be base-58 encoded
Best Practices
- Use appropriate commitment level based on your needs
- Cache results when appropriate to reduce RPC load
- Check blockhash validity before sending transactions
- Consider using websocket subscription for real-time updates
- Handle network errors and retry when appropriate
Common Errors
Use Cases
-
Blockhash Validation
-
Blockhash Monitoring
-
Transaction Planning