Skip to main content

Get All Blocks Minted

Allows you to retrieve a list of all blocks that have been minted by the pool.

Parameter

AttributeDescription
bech32PoolAddressThe Cardano Pool Address, starts with pool...

Example

import { anvil } from "@ada-anvil/sdk-client";

try {
await anvil.spo.getAllBlocks({ bech32PoolAddress });
} catch {
console.log("Authentication failed");
}

Curl

ENDPOINT="https://prod.api.ada-anvil.app"
BECH32_POOL_ADDRESS="pool1n3sjq3qvu5vvcd6aud6ndcwq7r3ghmkafcg60gznlwfrk2ucxku"
API_KEY="XXXXXXX"

curl "${ENDPOINT}/spo/getAllBlocks?input=%7B%22bech32PoolAddress%22%3A%22${BECH32_POOL_ADDRESS}%22%7D" \
--header "x-api-key: ${API_KEY}"

Return informations

{
"result": {
"data": {
"blocks": [
{
"epochNo": 438,
"slotNo": "104115989",
"epochSlotNo": 263189,
"blockNo": 9336799,
"previousId": 9375614,
"slotLeaderId": 7825776,
"size": 50590,
"time": "2023-09-25 22:51:20",
"txCount": 18,
"protoMajor": 8,
"protoMinor": 0,
"vrfKey": "vrf_vk13wxmywaspnvgnpw9jas9rav8pgsu6asr2z9zynuemn7kvydg03pqhml80m",
"opCertCounter": "4"
},
{
/* ... */
}
],
"latestBlock": {
"epochNo": 438,
"slotNo": "104115989",
"epochSlotNo": 263189,
"blockNo": 9336799,
"previousId": 9375614,
"slotLeaderId": 7825776,
"size": 50590,
"time": "2023-09-25 22:51:20",
"txCount": 18,
"protoMajor": 8,
"protoMinor": 0,
"vrfKey": "vrf_vk13wxmywaspnvgnpw9jas9rav8pgsu6asr2z9zynuemn7kvydg03pqhml80m",
"opCertCounter": "4"
}
}
}
}