import { SmartContractRecord, StreamPartID } from 'streamr-client-protocol'; import { Location, Rtts, NodeId, TrackerId } from '../identifiers'; import { NodeToTracker } from '../protocol/NodeToTracker'; import { StreamPartManager } from './StreamPartManager'; interface NodeDescriptor { started: string; location?: Location; extra: Record; rtts: Readonly | null; } interface Subscriber { subscribeToStreamPartIfHaveNotYet: (streamPartId: StreamPartID, sendStatus?: boolean) => void; subscribeToStreamPartOnNodes: (nodeIds: NodeId[], streamPartId: StreamPartID, trackerId: TrackerId, reattempt: boolean) => Promise[]>; unsubscribeFromStreamPartOnNode: (node: NodeId, streamPartId: StreamPartID, sendStatus?: boolean) => void; emitJoinCompleted: (streamPartId: StreamPartID, numOfNeighbors: number) => void; emitJoinFailed: (streamPartId: StreamPartID, error: string) => void; } declare type GetNodeDescriptor = (includeRtt: boolean) => NodeDescriptor; export interface TrackerManagerOptions { trackers: Array; rttUpdateTimeout?: number; trackerConnectionMaintenanceInterval?: number; instructionRetryInterval?: number; } export declare class TrackerManager { private readonly rttUpdateTimeoutsOnTrackers; private readonly trackerRegistry; private readonly trackerConnector; private readonly nodeToTracker; private readonly streamPartManager; private readonly rttUpdateInterval; private readonly instructionThrottler; private readonly instructionRetryManager; private readonly getNodeDescriptor; private readonly subscriber; constructor(nodeToTracker: NodeToTracker, opts: TrackerManagerOptions, streamPartManager: StreamPartManager, getNodeDescriptor: GetNodeDescriptor, subscriber: Subscriber); sendStreamPartStatus(streamPartId: StreamPartID): void; onNewStreamPart(streamPartId: StreamPartID): void; connectToSignallingOnlyTracker(trackerId: TrackerId, trackerAddress: string): Promise; disconnectFromSignallingOnlyTracker(trackerId: string): void; onUnsubscribeFromStreamPart(streamPartId: StreamPartID): void; start(): void; stop(): Promise; private getStreamPartsForTracker; private shouldIncludeRttInfo; private sendStatus; private handleTrackerInstruction; getTrackerId(streamPartId: StreamPartID): TrackerId; getTrackerAddress(streamPartId: StreamPartID): TrackerId; } export {};