BlockInfo class
Block information for a chronik block
- Available extensions
- Annotations
-
- @freezed
Constructors
- BlockInfo({required String hash, required String prevHash, required int height, required int nBits, required int timestamp, required bool isFinal, required int blockSize, required int numTxs, required int numInputs, required int numOutputs, required int sumInputSats, required int sumCoinbaseOutputSats, required int sumNormalOutputSats, required int sumBurnedSats})
- BlockInfo.fromProto(BlockInfo proto)
-
factory
Properties
- blockSize → int
-
Block size of this block in bytes (including headers etc.).
final
-
copyWith
→ $BlockInfoCopyWith<
BlockInfo> -
Create a copy of BlockInfo
with the given fields replaced by the non-null parameter values.
no setterinherited
- hash → String
-
Block hash of the block, in 'human-readable' (big-endian) hex encoding.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Height of the block; Genesis block has height 0.
final
- isFinal → bool
-
Is this block avalanche finalized?
final
- nBits → int
-
nBits field of the block, encodes the target compactly.
final
- numInputs → int
-
Total number of tx inputs in block (including coinbase).
final
- numOutputs → int
-
Total number of tx output in block (including coinbase).
final
- numTxs → int
-
Number of txs in this block.
final
- prevHash → String
-
Block hash of the prev block, in 'human-readable' (big-endian) hex encoding.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sumBurnedSats → int
-
Total number of satoshis burned using OP_RETURN.
final
- sumCoinbaseOutputSats → int
-
Total block reward for this block.
final
- sumInputSats → int
-
Total number of satoshis spent by tx inputs.
final
- sumNormalOutputSats → int
-
Total number of satoshis in non-coinbase tx outputs.
final
- timestamp → int
-
Timestamp of the block. Filled in by the miner, so might not be 100 % precise.
final
Methods
-
map<
TResult extends Object?> () → TResult -
Available on BlockInfo, provided by the BlockInfoPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> () → TResult? -
Available on BlockInfo, provided by the BlockInfoPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({required TResult orElse()}) → TResult -
Available on BlockInfo, provided by the BlockInfoPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({required TResult orElse()}) → TResult -
Available on BlockInfo, provided by the BlockInfoPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> () → TResult -
Available on BlockInfo, provided by the BlockInfoPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> () → TResult? -
Available on BlockInfo, provided by the BlockInfoPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited