Block class

Block

Inheritance

Constructors

Block({required String blockhash, required String previousBlockhash, required u64 parentSlot, required List<TransactionData<Object>>? transactions, required List<String>? signatures, required List<Reward> rewards, required i64? blockTime, required u64? blockHeight})
A confirmed transaction block.
const
Block.fromJson(Map<String, dynamic> json)
Creates an instance of this class from the constructor parameters defined in the json object.
factory

Properties

blockhash → String
The block's blockhash as a base-58 encoded string.
final
blockHeight → u64?
The number of blocks beneath this block.
final
blockTime → u64?
Estimated block production unix epoch time in seconds or null if not available.
final
hashCode → int
The hash code for this object.
no setterinherited
isParentBlockAvailable → bool
Indicates if the parent block (previousBlockhash) is available.
no setter
parentSlot → int
The parent block's slot index.
final
previousBlockhash → String
The parent block's blockhash as a base-58 encoded string or '11111111111111111111111111111111' if the parent block is not available due to ledger cleanup.
final
rewards → List<Reward>
Rewards (provided if GetBlockConfig.rewards is true).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signatures → List<String>?
Transaction signatures (provided if TransactionDetail.signatures is requested).
final
transactions → List<TransactionData<Object>>?
Transaction details (provided if TransactionDetail.full is requested).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialises this class into a JSON object.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

tryFromJson(Map<String, dynamic>? json) → Block?
Creates an instance of this class from the constructor parameters defined in the json object.
override