From d7ec437ce3d3071aaa313fc0b01635d167a9c5df Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 27 Jun 2022 16:26:13 -0400 Subject: [PATCH] *Update dist --- dist/rpcNetwork.d.ts | 2 ++ dist/rpcNetwork.d.ts.map | 2 +- dist/rpcNetwork.js | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dist/rpcNetwork.d.ts b/dist/rpcNetwork.d.ts index a7a334c..d0c5579 100644 --- a/dist/rpcNetwork.d.ts +++ b/dist/rpcNetwork.d.ts @@ -20,6 +20,8 @@ export default class RpcNetwork { get force(): boolean; set force(value: boolean); addRelay(pubkey: string): void; + removeRelay(pubkey: string): boolean; + clearRelays(): void; query(query: string, chain: string, data?: object | any[], force?: boolean): RpcQuery; } //# sourceMappingURL=rpcNetwork.d.ts.map \ No newline at end of file diff --git a/dist/rpcNetwork.d.ts.map b/dist/rpcNetwork.d.ts.map index 1755bba..b06f820 100644 --- a/dist/rpcNetwork.d.ts.map +++ b/dist/rpcNetwork.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"rpcNetwork.d.ts","sourceRoot":"","sources":["../src/rpcNetwork.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAMrC,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAkB;gBAEpB,GAAG,MAAY;IAK3B,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAEzB;IAED,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;IAED,IAAI,GAAG,QAEN;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAA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AAiB,CAAC,KAAK,EAAE,MAAM,EAElC;IAED,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,OAAO,EAEvB;IAEM,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK9B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAWpC,WAAW,IAAI,IAAI;IAInB,KAAK,CACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAM,GAAG,GAAG,EAAO,EACzB,KAAK,GAAE,OAAe,GACrB,QAAQ;CAQZ"} \ No newline at end of file diff --git a/dist/rpcNetwork.js b/dist/rpcNetwork.js index af482b5..82036e9 100644 --- a/dist/rpcNetwork.js +++ b/dist/rpcNetwork.js @@ -50,6 +50,17 @@ export default class RpcNetwork { this._relays.push(pubkey); this._relays = [...new Set(this._relays)]; } + removeRelay(pubkey) { + if (!this._relays.includes(pubkey)) { + return false; + } + delete this._relays[this._relays.indexOf(pubkey)]; + this._relays = Object.values(this._relays); + return true; + } + clearRelays() { + this._relays = []; + } query(query, chain, data = {}, force = false) { return new RpcQuery(this, { query,