BlockResponse class

A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch otherTransactions. As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indexes can be skipped). If a query for one of these omitted indexes is made, the response should not include a Block object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the PartialBlockIdentifier of a block after an omitted block should reference the last non-omitted block.

Annotations
  • @immutable

Constructors

BlockResponse(Block? block, List<TransactionIdentifier>? otherTransactions)
Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned.
const
BlockResponse.fromJson(Map<String, dynamic> map)
factory

Properties

block Block?
final
hashCode int
The hash code for this object.
no setterinherited
otherTransactions List<TransactionIdentifier>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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