///
import { EventEmitter } from 'events';
import * as pull from 'pull-stream';
import { Scuttlebutt } from '../index';
import { AsyncScuttlebutt } from '../async-scuttlebutt';
import { Sources, StreamOptions } from '../interfaces';
import { DumpDuplex, DumpDuplexOptions } from './dump-duplex';
declare class Duplex extends EventEmitter implements pull.Duplex {
readonly sb: Scuttlebutt | AsyncScuttlebutt;
readonly opts: StreamOptions;
private _name;
private _sink;
private _source;
private _wrapper;
private _readable;
private _writable;
private _syncSent;
private _syncRecv;
private _isFirstRead;
private _sentCounter;
private _receivedCounter;
private _tail;
private logger;
peerSources: Sources;
peerAccept: any;
peerId: string;
private _innerDuplex;
constructor(sb: Scuttlebutt | AsyncScuttlebutt, opts: StreamOptions);
private onReceived;
private onRead;
private getOutgoing;
private onUpdate;
get source(): pull.Source;
get sink(): pull.Sink;
get name(): string;
get readable(): boolean;
set readable(value: boolean);
get writable(): boolean;
set writable(value: boolean);
push(data: unknown, toHead?: boolean): void;
end(end?: pull.EndOrError): void;
abort(abort?: pull.EndOrError): void;
start(data: Object): Promise;
}
export declare function link(a: pull.Duplex, b: pull.Duplex): void;
export { Duplex };
export declare function createDumpDuplex(dumpSink: pull.Sink, opts?: Partial): DumpDuplex;