hyperswarm-web/dist/index.d.ts

18 lines
616 B
TypeScript
Raw Normal View History

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 {
private _wsPool;
2022-07-20 05:59:16 +00:00
private _options;
2022-06-27 22:22:53 +00:00
private _relays;
2022-07-20 05:59:16 +00:00
constructor(opts?: {});
ready(): Promise<void>;
static get IS_WEB(): boolean;
2022-06-27 22:22:53 +00:00
get relays(): string[];
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>;
getAvailableRelay(): Promise<string | boolean>;
2022-06-27 22:22:53 +00:00
}
export declare function hashDataKey(dataKey: string): Uint8Array;
//# sourceMappingURL=index.d.ts.map