Manages multiple subscriptions within a system, keeping track of active subscriptions and the current block number.

interface SubscriptionManager {
    currentBlockNumber: number;
    logSubscriptions: Map<string, Subscription>;
    newHeadsSubscription?: NewHeadsSubscription;
}

Properties

currentBlockNumber: number

The most recent block number that has been processed or observed by the manager, serving as a point of reference for new events.

logSubscriptions: Map<string, Subscription>

A map of subscription identifiers to Subscription objects, keeping track of all log-related subscriptions.

newHeadsSubscription?: NewHeadsSubscription

An optional collection of subscriptions specifically for new block headers, indexed by a unique identifier.