BlockHeaderEntity class

Block header storage entity for SPV validation

Annotations
  • @collection

Constructors

BlockHeaderEntity()
BlockHeaderEntity.fromBlockHeader(BlockHeader blockHeader, int height)
Create from SpiffyNode BlockHeader
factory
BlockHeaderEntity.fromJson(Map<String, dynamic> json)
Deserialize from JSON for restore
factory

Properties

bits int
Difficulty bits
getter/setter pair
hash String
Block hash (hex string)
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height int
Block height
getter/setter pair
id ↔ Id
getter/setter pair
isOrphaned bool
Whether this header is orphaned due to reorganization
getter/setter pair
merkleRoot String
Merkle root hash
getter/setter pair
nonce int
Block nonce
getter/setter pair
prevBlockHash String
Previous block hash
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storedAt DateTime
When this header was stored
getter/setter pair
timestamp int
Block timestamp (Unix timestamp)
getter/setter pair
version int
Block version
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBlockHeader() → BlockHeader
Convert back to SpiffyNode BlockHeader Note: This reconstructs the BlockHeader from stored values
toJson() Map<String, dynamic>
Serialize to JSON for backup
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited