getBlocksWithLimit RPC Metodu

Belirtilen slottan başlayarak onaylanmış blokların bir listesini döndürür

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

params

u64required

Başlangıç slotu

u64optional

Limit (start_slot değerinden en fazla 500.000 blok yüksek olmalıdır)

objectoptional

Yapılandırma nesnesi

result

Response
{
"jsonrpc": "2.0",
"result": [5, 6, 7],
"id": 1
}
array

start_slot değerinden başlayarak en fazla limit blok için onaylanmış blokları listeleyen u64 tamsayılarının bir dizisi.

Is this page helpful?