import { AbstractMessageStream } from './abstract-message-stream.ts'; import type { MessageStreamInit } from './abstract-message-stream.ts'; import type { AbortOptions, Stream } from '@libp2p/interface'; export interface AbstractStreamInit extends MessageStreamInit { /** * A unique identifier for this stream */ id: string; /** * The protocol name for the stream, if it is known */ protocol?: string; } export declare abstract class AbstractStream extends AbstractMessageStream implements Stream { id: string; protocol: string; constructor(init: AbstractStreamInit); close(options?: AbortOptions): Promise; closeRead(options?: AbortOptions): Promise; /** * Send a message to the remote end of the stream, informing them that we will * send no more data messages. */ abstract sendCloseWrite(options?: AbortOptions): Promise; /** * If supported, send a message to the remote end of the stream, informing * them that we will read no more data messages. */ abstract sendCloseRead(options?: AbortOptions): Promise; } //# sourceMappingURL=abstract-stream.d.ts.map