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