*Update dist

This commit is contained in:
Derrick Hammer 2022-08-29 01:05:35 -04:00
parent eb7d84cd40
commit a3465ab9f0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 5 additions and 8 deletions

2
dist/index.d.ts vendored
View File

@ -2,7 +2,7 @@ import {
AbstractResolverModule,
DNSResult,
ResolverOptions,
} from "@lumeweb/resolver-common";
} from "@lumeweb/libresolver";
export default class Handshake extends AbstractResolverModule {
private buildBlacklist;
resolve(

11
dist/index.js vendored
View File

@ -1,6 +1,5 @@
import tldEnum from "@lumeweb/tld-enum";
import { AbstractResolverModule, DNS_RECORD_TYPE, isDomain, isIp, isPromise, normalizeDomain, resolverEmptyResponse, resolveSuccess, } from "@lumeweb/resolver-common";
import { getTld } from "@lumeweb/resolver-common";
import { AbstractResolverModule, DNS_RECORD_TYPE, isDomain, isIp, isPromise, normalizeDomain, resolverEmptyResponse, resolveSuccess, ensureUniqueRecords, getTld, } from "@lumeweb/libresolver";
const HIP5_EXTENSIONS = ["eth", "_eth"];
export default class Handshake extends AbstractResolverModule {
async buildBlacklist() {
@ -75,9 +74,7 @@ export default class Handshake extends AbstractResolverModule {
}
}
}
records = [
...new Set(records.map((item) => JSON.stringify(item))),
].map((item) => JSON.parse(item));
records = ensureUniqueRecords(records);
if (0 < records.length) {
return resolveSuccess(records);
}
@ -163,8 +160,8 @@ export default class Handshake extends AbstractResolverModule {
}
}
}
async query(tld, force) {
const query = this.resolver.rpcNetwork.query("getnameresource", "hns", [tld], force);
async query(tld, bypassCache) {
const query = this.resolver.rpcNetwork.wisdomQuery("getnameresource", "hns", [tld], bypassCache);
const resp = await query.result;
// @ts-ignore
return resp?.records || [];