Metode RPC getBlockCommitment

Mengembalikan commitment untuk blok tertentu

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 1,
> "method": "getBlockCommitment",
> "params": [
> 5
> ]
> }
> '

params

u64required

Nomor blok, diidentifikasi oleh Slot.

result

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
}
object

Bidang hasil akan berupa objek JSON yang berisi:

Is this page helpful?