@waku/core
Version:
TypeScript implementation of the Waku v2 protocol
19 lines (18 loc) • 615 B
TypeScript
import type { PeerId, Stream } from "@libp2p/interface";
import type { Libp2pComponents } from "@waku/interfaces";
export declare class StreamManager {
private multicodec;
private readonly libp2p;
private readonly log;
private ongoingCreation;
private streamPool;
constructor(multicodec: string, libp2p: Libp2pComponents);
getStream(peerId: PeerId): Promise<Stream>;
private createStream;
private createStreamWithLock;
private handlePeerUpdateStreamPool;
private scheduleNewStream;
private getOpenStreamForCodec;
private lockStream;
private isStreamLocked;
}