import type { MockMultiaddrConnectionInit } from './multiaddr-connection-pair.ts'; import type { Stream, StreamOptions } from '@libp2p/interface'; export interface StreamPairOptions { /** * How long to wait in ms before sending messages * * @default 1 */ delay?: number; /** * If more than this many messages are sent within delay, write backpressure * will be applied */ capacity?: number; /** * Simulate having pre-negotiated a protocol by passing it here */ protocol?: string; /** * Configuration options for the outbound stream */ outbound?: StreamOptions; /** * Configuration options for underlying outbound connection */ outboundConnection?: Partial; /** * Configuration options for the inbound stream */ inbound?: StreamOptions; /** * Configuration options for underlying inbound connection */ inboundConnection?: Partial; } /** * Returns two streams connected to each other with a slight delay in sending * messages to simulate a network */ export declare function streamPair(opts?: StreamPairOptions): Promise<[Stream, Stream]>; export declare function echoStream(opts?: StreamPairOptions): Promise; //# sourceMappingURL=stream-pair.d.ts.map