Blocks are sets of multiple Operations on the Tezos blockchain. Block headers consists of generic information such as the block predecessor’s hash and the block’s timestamp. For more information see the Block API documentation on tzKT.
Fetches a block with the specified hash from tzKT.
get block by hash.
Fetch Blocks by Hash
let hash: string = 'BLtBd1Jbv4KttVdYjGeA22qDwUZk9AWKgP13MpGgkfE3FFHbumW' let block: Block = await Block.byHash(hash);
Returns a block with the specified hash.
Fetches a block at the specified level from tzKT.
get block by level.
Fetch Block by Level
let level: number = 1000001; let block: Block = await Block.byLevel(level);
Fetches the total number of blocks from tzKT.
get blocks count.
Fetch Block count
let bakerAddress: string = 'tz3S6BBeKgJGXxvLyZ1xzXzMPn11nnFtq5L9'; let level: number = 1000001; let block: Block = await Block.count({'level.gt': level, 'baker': bakerAddress});
Returns the total number of blocks.
Fetches blocks from tzKT.
get blocks.
Fetch list of Blocks
let blocks: Block[] = await Block.get({'level.gt': 1000000, 'level.lt': 1000050});
Returns a list of blocks.
Generated using TypeDoc
Blocks are sets of multiple Operations on the Tezos blockchain. Block headers consists of generic information such as the block predecessor’s hash and the block’s timestamp. For more information see the Block API documentation on tzKT.