getConfirmedBlocksWithLimit RPC Method
Returns a list of confirmed blocks starting at the given slot
Deprecated Method
This method is expected to be removed in solana-core
v2.0. Please use
getBlocksWithLimit instead.
Parameters #
u64
required
start_slot, as u64 integer
u64
required
limit, as u64 integer
object
optional
Configuration object containing the following fields:
commitment string
optional
Result #
The result field will be an array of u64 integers listing confirmed blocks
starting at start_slot
for up to limit
blocks, inclusive.
Code sample #
curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0", "id": 1,
"method": "getConfirmedBlocksWithLimit",
"params": [5, 3]
}
'
Response #
{ "jsonrpc": "2.0", "result": [5, 6, 7], "id": 1 }