ChainHeadSession<P extends Provider> class

A session representing an active chainHead follow subscription.

Provides typed methods for all chainHead operations scoped to this follow subscription. The session must be closed by calling unfollow when no longer needed.

Constructors

ChainHeadSession({required P provider, required String followSubscriptionId, required Stream<SubscriptionMessage> rawStream})

Properties

followSubscriptionId String
The subscription ID from the follow call.
final
hashCode int
The hash code for this object.
no setterinherited
isActive bool
Whether this session is still active.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<ChainHeadEvent>
Stream of typed chain head events.
no setter

Methods

body(String blockHash) Future<ChainHeadOperationResult>
Request the body (extrinsics) of a pinned block.
call(String blockHash, String function, String callParameters) Future<ChainHeadOperationResult>
Make a runtime call at a pinned block.
Get the header of a pinned block.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
storage(String blockHash, List<StorageQueryItem> items, {String? childTrie}) Future<ChainHeadOperationResult>
Query storage items of a pinned block.
toString() String
A string representation of this object.
inherited
unfollow() Future<void>
Stop the follow subscription.
unpin(List<String> blockHashes) Future<void>
Unpin one or more previously-pinned blocks.

Operators

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