*Update dist
This commit is contained in:
parent
5e3de30f51
commit
d7ec437ce3
|
@ -20,6 +20,8 @@ export default class RpcNetwork {
|
||||||
get force(): boolean;
|
get force(): boolean;
|
||||||
set force(value: boolean);
|
set force(value: boolean);
|
||||||
addRelay(pubkey: string): void;
|
addRelay(pubkey: string): void;
|
||||||
|
removeRelay(pubkey: string): boolean;
|
||||||
|
clearRelays(): void;
|
||||||
query(query: string, chain: string, data?: object | any[], force?: boolean): RpcQuery;
|
query(query: string, chain: string, data?: object | any[], force?: boolean): RpcQuery;
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=rpcNetwork.d.ts.map
|
//# sourceMappingURL=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,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAE7B;IAED,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,IAAI,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAElC;IAED,IAAI,KA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AAW,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"}
|
|
@ -50,6 +50,17 @@ export default class RpcNetwork {
|
||||||
this._relays.push(pubkey);
|
this._relays.push(pubkey);
|
||||||
this._relays = [...new Set(this._relays)];
|
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) {
|
query(query, chain, data = {}, force = false) {
|
||||||
return new RpcQuery(this, {
|
return new RpcQuery(this, {
|
||||||
query,
|
query,
|
||||||
|
|
Loading…
Reference in New Issue