Skip to main content
POST
getLatestBlockhash
同时保存 blockhash 和 lastValidBlockHeight。检查过期时比较区块高度,不要比较 slot。 请求配置和错误处理见 RPC 快速入门。计费见积分与限制。

授权

api_key
string
query
必填

请求体

application/json
jsonrpc
enum<string>
默认值:2.0
必填

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string
默认值:1
必填

A unique identifier for the request.

示例:

"1"

method
enum<string>
默认值:getLatestBlockhash
必填

The name of the RPC method to invoke.

可用选项:
getLatestBlockhash
示例:

"getLatestBlockhash"

params
object[]

Optional configuration object for the request.

响应

200 - application/json

Successfully retrieved the latest blockhash information.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object

RpcResponse containing blockhash information.