getLatestBlockhash RPC Method
Returns the latest blockhash
Version Restriction
This method is only available in solana-core
v1.9 or newer. Please use
getRecentBlockhash for solana-core
v1.8
and below.
params
objectoptional
Configuration object containing the following fields:
result
object
RpcResponse JSON object with value
field set to a JSON object including:
Request
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getLatestBlockhash",> "params": [> {> "commitment": "processed"> }> ]> }> '
Response
{"jsonrpc": "2.0","result": {"context": {"slot": 2792},"value": {"blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N","lastValidBlockHeight": 3090}},"id": 1}
Request
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getLatestBlockhash",> "params": [> {> "commitment": "processed"> }> ]> }> '
params
objectoptional
Configuration object containing the following fields:
result
Response
{"jsonrpc": "2.0","result": {"context": {"slot": 2792},"value": {"blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N","lastValidBlockHeight": 3090}},"id": 1}
object
RpcResponse JSON object with value
field set to a JSON object including:
Is this page helpful?