Low-level structure for backward compatibility.
As implemented in previous versions of near-lake-framework.
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).
List of included Transactions, converted into Receipts.
NOTE: Heads up! You might want to know about Transactions to know where the action chain has begun. Unlike Ethereum, where a Transaction contains everything you may want to know about a particular interaction on the Ethereum blockchain, Near Protocol because of its asynchronous nature converts a Transaction into a Receipt before executing it. Thus, On NEAR, Receipts are more important for figuring out what happened on-chain as a result of a Transaction signed by a user. Read more about Transactions on Near here.
Private _actionsPrivate _eventsPrivate _statePrivate executedReadonly postponedReceipts 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).
Readonly streamerLow-level structure for backward compatibility.
As implemented in previous versions of near-lake-framework.
Readonly transactionsList of included Transactions, converted into Receipts.
NOTE: Heads up! You might want to know about Transactions to know where the action chain has begun. Unlike Ethereum, where a Transaction contains everything you may want to know about a particular interaction on the Ethereum blockchain, Near Protocol because of its asynchronous nature converts a Transaction into a Receipt before executing it. Thus, On NEAR, Receipts are more important for figuring out what happened on-chain as a result of a Transaction signed by a user. Read more about Transactions on Near here.
Returns the block date in ISO format, e.g. 2022-01-01.
Returns the block hash. A shortcut to get the data from the block header.
Returns the block height. A shortcut to get the data from the block header.
Returns the previous block hash. A shortcut to get the data from the block header.
Returns Action of the provided receipt_id from the block if any. Returns undefined if there is no corresponding Action.
This method uses the internal Block action field which is empty by default and will be filled with the block’s actions on the first call to optimize memory usage.
The result is either Action | undefined since there might be a request for an Action by receipt_id from another block, in which case this method will be unable to find the Action in the current block. In the other case, the request might be for an Action for a receipt_id that belongs to a DataReceipt where an action does not exist.
Private buildPrivate buildReturns an Array of Events emitted by ExecutionOutcome for the given account_id. There might be more than one Event for the Receipt or there might be none of them. In the latter case, this method returns an empty Array.
Returns an Array of Events emitted by ExecutionOutcome for the given receipt_id. There might be more than one Event for the Receipt or there might be none of them. In the latter case, this method returns an empty Array.
Returns an Array of function calls executed in the block matching provided filters.
filter by contract name (e.g. *.pool.near,*.poolv1.near). Default is * (all contracts).
filter by receipt status (all|onlySuccessful|onlyFailed). Default is onlySuccessful.
Returns an Array of function calls to receivers matching receiverFilter.
filter by contract name (e.g. *.pool.near,*.poolv1.near). Default is * (all contracts).
Optional method: stringname of the method to filter by. Returns all function calls to receiverFilter if not provided.
filter by receipt status (all|onlySuccessful|onlyFailed). Default is onlySuccessful.
Returns a BlockHeader structure of the block
See BlockHeader structure sections for details.
Returns an Array of StateChange occurred in the block.
Static fromGenerated using TypeDoc
The
Blocktype is used to represent a block in the NEAR Lake Framework.Important Notes on
Block: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.