getBlockCommitment - Solana

Example code for the getBlockCommitment json-rpc method. Сomplete guide on how to use getBlockCommitment json-rpc in GetBlock.io Web3 documentation.

Parameters

block - u64

block, identified by Slot

Request

curl --location --request POST 'https://sol.getblock.io/mainnet' \ 
--header 'x-api-key: YOUR-API-KEY' \ 
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "getBlockCommitment",
"params": [122791192],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "commitment": null,
        "totalStake": 388997198076741924
    }
}

Last updated