import { TrackerManager } from './TrackerManager';
import { StreamPartManager } from './StreamPartManager';
import { NodeToNode } from '../protocol/NodeToNode';
import { NodeId } from '../identifiers';
import { Node } from './Node';
import { ProxyConnectionRequest, ProxyConnectionResponse, ProxyDirection, StreamPartID, UnsubscribeRequest } from '@streamr/protocol';
import { Propagation } from './propagation/Propagation';
export interface ProxyStreamConnectionManagerOptions {
    trackerManager: TrackerManager;
    streamPartManager: StreamPartManager;
    nodeToNode: NodeToNode;
    propagation: Propagation;
    node: Node;
    nodeConnectTimeout: number;
    acceptProxyConnections: boolean;
}
export declare class ProxyStreamConnectionManager {
    private readonly trackerManager;
    private readonly streamPartManager;
    private readonly nodeToNode;
    private readonly node;
    private readonly nodeConnectTimeout;
    private readonly acceptProxyConnections;
    private readonly connections;
    private readonly propagation;
    constructor(opts: ProxyStreamConnectionManagerOptions);
    private addConnection;
    private removeConnection;
    private hasConnection;
    private getConnection;
    getNodeIdsForUserId(streamPartId: StreamPartID, userId: string): NodeId[];
    openProxyConnection(streamPartId: StreamPartID, targetNodeId: string, direction: ProxyDirection, userId: string): Promise<void>;
    private connectAndNegotiate;
    closeProxyConnection(streamPartId: StreamPartID, targetNodeId: NodeId, direction: ProxyDirection): Promise<void>;
    processLeaveRequest(message: UnsubscribeRequest, nodeId: NodeId): void;
    processProxyConnectionRequest(message: ProxyConnectionRequest, nodeId: NodeId): Promise<void>;
    processProxyConnectionResponse(message: ProxyConnectionResponse, nodeId: NodeId): void;
    reconnect(targetNodeId: NodeId, streamPartId: StreamPartID): Promise<void>;
    isProxiedStreamPart(streamPartId: StreamPartID, direction: ProxyDirection): boolean;
    stop(): void;
}
