import DhtNode from "@hyperswarm/dht-relay"; import Hyperswarm from "hyperswarm"; import EventEmitter, { OnOptions } from "eventemitter2"; export default class HyperswarmWeb extends EventEmitter { private _options; private _discovery; private _queuedEmActions; private _connectionMutex; constructor(opts?: any); private _relays; get relays(): string[]; private _activeRelay; get activeRelay(): Hyperswarm; private _ready; get ready(): boolean; init(): Promise; connect(pubkey: string, options?: {}): Promise; addRelay(pubkey: string): Promise; removeRelay(pubkey: string): boolean; clearRelays(): void; on(eventName: string | symbol, listener: (...args: any[]) => void): Hyperswarm; onSelf(eventName: string | symbol, listener: (...args: any[]) => void, options?: boolean | OnOptions): Hyperswarm; addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; off(eventName: string | symbol, listener: (...args: any[]) => void): Hyperswarm; offSelf(eventName: string | symbol, listener: (...args: any[]) => void): Hyperswarm; removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; emit(eventName: string | symbol, ...args: any[]): boolean; emitSelf(eventName: string | symbol, ...args: any[]): boolean; once(eventName: string | symbol, listener: (...args: any[]) => void): this; onceSelf(eventName: string | symbol, listener: (...args: any[]) => void): this; join(topic: Uint8Array, opts?: {}): void; joinPeer(publicKey: Uint8Array): void; leave(topic: Uint8Array): void; leavePeer(publicKey: Uint8Array): void; status(publicKey: Uint8Array): any; topics(): string[]; flush(): Promise; clear(): Promise; private ensureConnection; private isServerAvailable; private _processOrQueueAction; private _processQueuedActions; } //# sourceMappingURL=index.d.ts.map