BlockhashCache class

Blockhash Cache

Constructors

BlockhashCache.new({Duration timeout = const Duration(seconds: 30)})
Stores the latest blockhash fetched from HttpConnection.getLatestBlockhash.

Properties

expired bool
If true, the cached value is null or has expired.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
simulatedSignatures List<String>
The simulated transactions signatures made using the cached value.
final
timeout Duration
The cached value's expiration time.
final
transactionSignatures List<String>
The transactions signatures made using the cached value.
final
value BlockhashWithExpiryBlockHeight?
The cached blockhash or null if the cache has expired.
no setter

Methods

get(HttpConnection connection, {required bool disabled}) FutureOr<BlockhashWithExpiryBlockHeight>
Returns the latest blockhash.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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