getLatestBlockhash RPCメソッド

最新のブロックハッシュを返します

バージョン制限

このメソッドは solana-core v1.9以降でのみ利用可能です。solana-core v1.8 以前のバージョンではgetRecentBlockhashを使用してください。

$ 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

以下のフィールドを含む設定オブジェクト:

result

Response
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 2792
},
"value": {
"blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N",
"lastValidBlockHeight": 3090
}
},
"id": 1
}
object

value フィールドが以下を含むJSONオブジェクトに設定されたRpcResponse JSONオブジェクト:

Is this page helpful?