2022-07-20 05:59:16 +00:00
|
|
|
import DhtNode from "@hyperswarm/dht-relay";
|
2022-06-27 22:22:53 +00:00
|
|
|
export default class DHT {
|
2022-07-20 05:59:16 +00:00
|
|
|
private _options;
|
2022-06-27 22:22:53 +00:00
|
|
|
private _relays;
|
2022-07-26 23:28:53 +00:00
|
|
|
private _activeRelays;
|
|
|
|
private _maxConnections;
|
|
|
|
private _inited;
|
2022-07-20 05:59:16 +00:00
|
|
|
constructor(opts?: {});
|
|
|
|
ready(): Promise<void>;
|
2022-06-27 22:22:53 +00:00
|
|
|
get relays(): string[];
|
2022-08-14 11:25:37 +00:00
|
|
|
get relayServers(): string[];
|
2022-06-27 22:22:53 +00:00
|
|
|
addRelay(pubkey: string): Promise<boolean>;
|
|
|
|
removeRelay(pubkey: string): boolean;
|
|
|
|
clearRelays(): void;
|
|
|
|
private isServerAvailable;
|
2022-07-20 05:59:16 +00:00
|
|
|
connect(pubkey: string, options?: {}): Promise<DhtNode>;
|
2022-07-26 23:28:53 +00:00
|
|
|
private fillConnections;
|
2022-06-27 22:22:53 +00:00
|
|
|
}
|
|
|
|
export declare function hashDataKey(dataKey: string): Uint8Array;
|
|
|
|
//# sourceMappingURL=index.d.ts.map
|