Skip to content

GetBlocksResponse

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:182

The result of a “get_blocks” call.

archived_blocks: object[]

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:211

Encoding of instructions for fetching archived blocks.

callback: [Principal, string]

Callback to fetch the archived blocks.

length: bigint

The number of blocks that can be fetched.

start: bigint

The index of the first archived block.


blocks: Value[]

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:202

List of blocks that were available in the ledger when it processed the call.

The blocks form a contiguous range, with the first block having index [first_block_index] (see below), and the last block having index [first_block_index] + len(blocks) - 1.

The block range can be an arbitrary sub-range of the originally requested range.


certificate: [] | [Uint8Array<ArrayBufferLike>]

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:187

System certificate for the hash of the latest block in the chain. Only present if get_blocks is called in a non-replicated query context.


chain_length: bigint

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:207

The total number of blocks in the chain. If the chain length is positive, the index of the last block is chain_len - 1.


first_index: bigint

Defined in: packages/canisters/src/declarations/ledger-icrc/icrc_ledger.d.ts:192

The index of the first block in “blocks”. If the blocks vector is empty, the exact value of this field is not specified.