Skip to main content

getBlockCommitment RPC Method

Returns commitment for particular block

params

u64 required Block number, identified by Slot.

result

object optiona The result field will be a JSON object containing:

commitment

Array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 to MAX_LOCKOUT_HISTORY.

totalStake
Total active stake, in lamports, of the current epoch.

cURL

curl https://us-seattle.openverse.network/api -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockCommitment",
"params": [
5
]
}
'

Response

{
"jsonrpc": "2.0",
"result": {
"commitment": [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 10, 32
],
"totalStake": 42
},
"id": 1
}