nooschain / chain/block / BlockHeader
Interface: BlockHeader
Defined in: chain/block.ts:15
The header of a block in nooschain, containing metadata about the block such as its height, previous block hash, Merkle root of transactions, proposer node ID, transaction count, and creation timestamp. The block header is used to compute the block hash and serves as a reference for the block's position in the blockchain and its relationship to other blocks.
Properties
createdAt
createdAt:
string
Defined in: chain/block.ts:49
The timestamp when the block was created, represented as an ISO 8601 string. This field is used for ordering blocks and can be used for time-based validations and analytics.
height
height:
string
Defined in: chain/block.ts:22
The height of the block in the blockchain, represented as a string to accommodate large numbers that may exceed JavaScript's safe integer limit. The height indicates the block's position in the chain, with the genesis block having a height of "0" and subsequent blocks incrementing the height by one. This field is essential for maintaining the order of blocks and ensuring the integrity of the blockchain structure.
merkleRoot
merkleRoot:
string
Defined in: chain/block.ts:32
The Merkle root of the transactions included in the block. The Merkle root is a cryptographic summary of all transactions in the block, allowing efficient and secure verification of transaction inclusion.
previousHash
previousHash:
string|null
Defined in: chain/block.ts:27
The hash of the previous block in the blockchain. This field establishes the link between blocks , ensuring the immutability and integrity of the blockchain. For the genesis block, this value is null.
proposerNodeId
proposerNodeId:
string|null
Defined in: chain/block.ts:38
The ID of the node that proposed the block. This field identifies the node responsible for creating the block and can be used for consensus and accountability purposes.
protocolVersion
protocolVersion:
number
Defined in: chain/block.ts:44
stateRoot
stateRoot:
string|null
Defined in: chain/block.ts:33
transactionCount
transactionCount:
number
Defined in: chain/block.ts:43
The number of transactions included in the block. This field provides a quick reference for the block's transaction count without needing to traverse the entire transaction list.