isBlockhashValid
Returns whether a blockhash is still valid or not

Parameters

  • blockhash: <base-58 encoded string> - the blockhash of this block
  • <object> - (optional) Config object:
    • commitment: (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.
    • minContextSlot: (optional)<number> - set the minimum slot that the request can be evaluated at

Returns

  • <bool> - True if the blockhash is still valid

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"id": 45,
5
"jsonrpc": "2.0",
6
"method": "isBlockhashValid",
7
"params": [
8
"J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",
9
{
10
"commitment": "processed"
11
}
12
]
13
}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"context": {
5
"slot": 136103237
6
},
7
"value": false
8
},
9
"id": 45
10
}
Copied!