From ae6609f0b07dea3afed3f528d42b55d771d81a3d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 15 Jan 2023 03:36:25 -0500 Subject: [PATCH] *Update dist --- dist/index.d.ts | 1 + dist/index.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/dist/index.d.ts b/dist/index.d.ts index 62aa0a2..696ee7b 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -8,5 +8,6 @@ export declare class PeerDiscovery { private _sources; registerSource(name: string, source: PeerSource): boolean; removeSource(name: string): boolean; + removeAllSources(): void; discover(pubkey: string | Buffer, options?: {}): Promise; } diff --git a/dist/index.js b/dist/index.js index f199920..48758de 100644 --- a/dist/index.js +++ b/dist/index.js @@ -21,6 +21,9 @@ class PeerDiscovery { this._sources.delete(name); return true; } + removeAllSources() { + this._sources.clear(); + } async discover(pubkey, options = {}) { if (!b4a_1.default.isBuffer(pubkey)) { pubkey = b4a_1.default.from(pubkey, "hex");