*Update dist
This commit is contained in:
parent
eb7d84cd40
commit
a3465ab9f0
|
@ -2,7 +2,7 @@ import {
|
||||||
AbstractResolverModule,
|
AbstractResolverModule,
|
||||||
DNSResult,
|
DNSResult,
|
||||||
ResolverOptions,
|
ResolverOptions,
|
||||||
} from "@lumeweb/resolver-common";
|
} from "@lumeweb/libresolver";
|
||||||
export default class Handshake extends AbstractResolverModule {
|
export default class Handshake extends AbstractResolverModule {
|
||||||
private buildBlacklist;
|
private buildBlacklist;
|
||||||
resolve(
|
resolve(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import tldEnum from "@lumeweb/tld-enum";
|
import tldEnum from "@lumeweb/tld-enum";
|
||||||
import { AbstractResolverModule, DNS_RECORD_TYPE, isDomain, isIp, isPromise, normalizeDomain, resolverEmptyResponse, resolveSuccess, } from "@lumeweb/resolver-common";
|
import { AbstractResolverModule, DNS_RECORD_TYPE, isDomain, isIp, isPromise, normalizeDomain, resolverEmptyResponse, resolveSuccess, ensureUniqueRecords, getTld, } from "@lumeweb/libresolver";
|
||||||
import { getTld } from "@lumeweb/resolver-common";
|
|
||||||
const HIP5_EXTENSIONS = ["eth", "_eth"];
|
const HIP5_EXTENSIONS = ["eth", "_eth"];
|
||||||
export default class Handshake extends AbstractResolverModule {
|
export default class Handshake extends AbstractResolverModule {
|
||||||
async buildBlacklist() {
|
async buildBlacklist() {
|
||||||
|
@ -75,9 +74,7 @@ export default class Handshake extends AbstractResolverModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
records = [
|
records = ensureUniqueRecords(records);
|
||||||
...new Set(records.map((item) => JSON.stringify(item))),
|
|
||||||
].map((item) => JSON.parse(item));
|
|
||||||
if (0 < records.length) {
|
if (0 < records.length) {
|
||||||
return resolveSuccess(records);
|
return resolveSuccess(records);
|
||||||
}
|
}
|
||||||
|
@ -163,8 +160,8 @@ export default class Handshake extends AbstractResolverModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async query(tld, force) {
|
async query(tld, bypassCache) {
|
||||||
const query = this.resolver.rpcNetwork.query("getnameresource", "hns", [tld], force);
|
const query = this.resolver.rpcNetwork.wisdomQuery("getnameresource", "hns", [tld], bypassCache);
|
||||||
const resp = await query.result;
|
const resp = await query.result;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return resp?.records || [];
|
return resp?.records || [];
|
||||||
|
|
Loading…
Reference in New Issue