文档
定价GitHub控制台

Solana

geyser.Geyser/GetBlockHeight5 额度

Returns the newest block height at a commitment level (gRPC).

网络: solana

参数

名称类型描述
commitmentCommitmentLevelCommitment level: 0 = PROCESSED, 1 = CONFIRMED, 2 = FINALIZED. Optional. (可选)

返回值

类型

GetBlockHeightResponse

{ block_height: uint64 }.

代码示例

# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
  -H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
  -d '{
  "commitment": 0
}' \
  grpc-holy-burned-sky-solana-mainnet.rpcnode.dev:443 \
  geyser.Geyser/GetBlockHeight