NEAR Lake Primitive Types
This article contains the primitive types used by the NEAR Lake Framework package. These types are used to define the data structures used by the framework as well as provide some popular helper functions.
Block
Important Notes on
Block- All the entities located on different shards were merged into one single list without differentiation.
Blockis not the fairest name for this structure either. NEAR Protocol is a sharded blockchain, so its block is actually an ephemeral structure that represents a collection of real blocks called chunks in NEAR Protocol.
Block Structure Definition
The Block type is used to represent a block in the NEAR Lake Framework. It is comprised by the following structure:
export class Block {
constructor(
readonly streamerMessage: StreamerMessage,
private executedReceipts: Receipt[],
readonly postponedReceipts: Receipt[],
readonly transactions: Transaction[],
private _actions: Map<string, Action>,
private _events: Map<string, Event[]>,
private _stateChanges: StateChange[]) {
}
... // helper methods and getters omitted for brevity
}
streamerMessage
Low-level structure for backward compatibility. As implemented in previous versions of near-lake-framework.
postponedReceipts
Receipts included on the chain but not executed yet marked as “postponed”: they are represented by the same structure Receipt (see the corresponding section in this doc for more details).