From 038555ac627191dcad62e09d5e0e7c42748cc1ba Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 15 Jan 2023 03:50:17 -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 696ee7b..13488d4 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -9,5 +9,6 @@ export declare class PeerDiscovery { registerSource(name: string, source: PeerSource): boolean; removeSource(name: string): boolean; removeAllSources(): void; + sourceExists(name: string): boolean; discover(pubkey: string | Buffer, options?: {}): Promise; } diff --git a/dist/index.js b/dist/index.js index 48758de..c45a9c3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -24,6 +24,9 @@ class PeerDiscovery { removeAllSources() { this._sources.clear(); } + sourceExists(name) { + return this._sources.has(name); + } async discover(pubkey, options = {}) { if (!b4a_1.default.isBuffer(pubkey)) { pubkey = b4a_1.default.from(pubkey, "hex");