import { StreamMessage, StreamPartID, ProxyDirection } from '@streamr/protocol';
import { Node, NodeOptions } from './Node';
import { NodeId } from '../identifiers';
export declare class NetworkNode extends Node {
    constructor(opts: NodeOptions);
    setExtraMetadata(metadata: Record<string, unknown>): void;
    publish(streamMessage: StreamMessage): void | never;
    openProxyConnection(streamPartId: StreamPartID, contactNodeId: string, direction: ProxyDirection, userId: string): Promise<void>;
    closeProxyConnection(streamPartId: StreamPartID, contactNodeId: string, direction: ProxyDirection): Promise<void>;
    addMessageListener<T>(cb: (msg: StreamMessage<T>) => void): void;
    removeMessageListener<T>(cb: (msg: StreamMessage<T>) => void): void;
    subscribe(streamPartId: StreamPartID): void;
    subscribeAndWaitForJoin(streamPartId: StreamPartID, timeout?: number): Promise<number>;
    waitForJoinAndPublish(streamMessage: StreamMessage, timeout?: number): Promise<number>;
    unsubscribe(streamPartId: StreamPartID): void;
    getNeighborsForStreamPart(streamPartId: StreamPartID): ReadonlyArray<NodeId>;
    hasStreamPart(streamPartId: StreamPartID): boolean;
    hasProxyConnection(streamPartId: StreamPartID, contactNodeId: NodeId, direction: ProxyDirection): boolean;
    getRtt(nodeId: NodeId): number | undefined;
}
