From 5276de43632e2dadf1db689d238c5fafcbd87c3d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 14 Aug 2022 07:25:16 -0400 Subject: [PATCH] *add getter to return relay servers --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 040af7b..857b1d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,6 +41,10 @@ export default class DHT { return [...this._relays.keys()]; } + get relayServers(): string[] { + return [...this._relays.values()]; + } + public async addRelay(pubkey: string): Promise { let entry: errTuple = await registryRead( hexToBuf(pubkey).shift() as Uint8Array,