Block class
Block
- Inheritance
-
- Object
- Serializable
- Block
Constructors
-
Block.new({required String blockhash, required String previousBlockhash, required u64 parentSlot, required List<
TransactionData< ? transactions, required List<Object> >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 thejson
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 → i64?
-
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 → u64
-
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 thejson
object.override