///
import { Buffer } from "buffer";
import { Client } from "@lumeweb/libkernel-universal";
import { ErrTuple } from "@siaweb/libweb";
import type { EventEmitter } from "eventemitter3";
export declare class SwarmClient extends Client {
private useDefaultSwarm;
private id;
private _autoReconnect;
private _connectBackoff;
private _ready?;
private _topics;
get dht(): {
ready(): Promise;
};
constructor(useDefaultDht?: boolean, autoReconnect?: boolean);
get swarm(): number | undefined;
connect(pubkey: string | Uint8Array): Promise;
init(): Promise;
ready(): Promise;
start(): Promise;
private _listen;
addRelay(pubkey: string): Promise;
removeRelay(pubkey: string): Promise;
clearRelays(): Promise;
getRelays(): Promise;
join(topic: Buffer | Uint8Array | string): Promise;
}
export declare class Socket extends Client {
private id;
private eventUpdates;
constructor(id: number);
private _remotePublicKey?;
get remotePublicKey(): Uint8Array;
private _rawStream?;
get rawStream(): Uint8Array;
setup(): Promise;
on>(event: T, fn: EventEmitter.EventListener, context?: any): this;
off>(event: T, fn?: EventEmitter.EventListener, context?: any, once?: boolean): this;
write(message: string | Buffer): void;
end(): void;
private ensureEvent;
private trackEvent;
}
export declare const createClient: (...args: any) => SwarmClient;
//# sourceMappingURL=index.d.ts.map