*update dist

This commit is contained in:
Derrick Hammer 2022-08-14 07:25:37 -04:00
parent 5276de4363
commit f8b5bcab64
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 5 additions and 1 deletions

1
dist/index.d.ts vendored
View File

@ -8,6 +8,7 @@ export default class DHT {
constructor(opts?: {});
ready(): Promise<void>;
get relays(): string[];
get relayServers(): string[];
addRelay(pubkey: string): Promise<boolean>;
removeRelay(pubkey: string): boolean;
clearRelays(): void;

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAgB5C,MAAM,CAAC,OAAO,OAAO,GAAG;IACtB,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,OAAO,CAAS;gBAEZ,IAAI,KAAK;IAMrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;IAEY,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiChD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAepC,WAAW,IAAI,IAAI;YAIZ,iBAAiB;IAazB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;YAmB/C,eAAe;CAkD9B;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEvD"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAgB5C,MAAM,CAAC,OAAO,OAAO,GAAG;IACtB,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,OAAO,CAAS;gBAEZ,IAAI,KAAK;IAMrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;IAED,IAAI,YAAY,IAAI,MAAM,EAAE,CAE3B;IAEY,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiChD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAepC,WAAW,IAAI,IAAI;YAIZ,iBAAiB;IAazB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;YAmB/C,eAAe;CAkD9B;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEvD"}

3
dist/index.js vendored
View File

@ -31,6 +31,9 @@ export default class DHT {
get relays() {
return [...this._relays.keys()];
}
get relayServers() {
return [...this._relays.values()];
}
async addRelay(pubkey) {
let entry = await registryRead(hexToBuf(pubkey).shift(), hashDataKey(REGISTRY_DHT_KEY));
if (entry[1] || !entry[0]?.exists) {