diff --git a/dist/index.d.ts b/dist/index.d.ts index 0c185fd..a2f1e7f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,4 +1,4 @@ export * from "./types.js"; export * from "./util.js"; export * from "./resolverModule.js"; -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/resolverModule.d.ts b/dist/resolverModule.d.ts index 6f4596d..a3e4f0a 100644 --- a/dist/resolverModule.d.ts +++ b/dist/resolverModule.d.ts @@ -1,23 +1,26 @@ import type { DNSResult, ResolverOptions } from "./types.js"; -import { ResolverRegistry } from "@lumeweb/resolver"; +import { RpcNetwork } from "@lumeweb/dht-rpc-client"; +declare class ResolverRegistry { + private _resolvers; + private _rpcNetwork; + constructor(network?: RpcNetwork); + get resolvers(): Set; + get rpcNetwork(): RpcNetwork; + resolve(domain: string, options?: ResolverOptions, bypassCache?: boolean): Promise; + register(resolver: ResolverModule): void; + clear(): void; +} export interface ResolverModule { - constructor(resolver: ResolverRegistry): any; - resolve( - domain: string, - options: ResolverOptions, - bypassCache: boolean - ): Promise; - getSupportedTlds(): string[]; + constructor(resolver: ResolverRegistry): any; + resolve(domain: string, options: ResolverOptions, bypassCache: boolean): Promise; + getSupportedTlds(): string[]; } export declare abstract class AbstractResolverModule { - protected resolver: ResolverRegistry; - constructor(resolver: ResolverRegistry); - abstract resolve( - domain: string, - options: ResolverOptions, - bypassCache: boolean - ): Promise; - getSupportedTlds(): string[]; - isTldSupported(domain: string): boolean; + protected resolver: ResolverRegistry; + constructor(resolver: ResolverRegistry); + abstract resolve(domain: string, options: ResolverOptions, bypassCache: boolean): Promise; + getSupportedTlds(): string[]; + isTldSupported(domain: string): boolean; } -//# sourceMappingURL=resolverModule.d.ts.map +export {}; +//# sourceMappingURL=resolverModule.d.ts.map \ No newline at end of file diff --git a/dist/resolverModule.d.ts.map b/dist/resolverModule.d.ts.map index e190975..613d46a 100644 --- a/dist/resolverModule.d.ts.map +++ b/dist/resolverModule.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"resolverModule.d.ts","sourceRoot":"","sources":["../src/resolverModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,QAAQ,EAAE,gBAAgB,OAAE;IAExC,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;IAEtB,gBAAgB,IAAI,MAAM,EAAE,CAAC;CAC9B;AAGD,8BAAsB,sBAAsB;IAC1C,SAAS,CAAC,QAAQ,EAAE,gBAAgB,CAAC;gBAEzB,QAAQ,EAAE,gBAAgB;IAItC,QAAQ,CAAC,OAAO,CACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC;IAErB,gBAAgB,IAAI,MAAM,EAAE;IAI5B,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAGxC"} \ No newline at end of file +{"version":3,"file":"resolverModule.d.ts","sourceRoot":"","sources":["../src/resolverModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAEnD,OAAO,OAAO,gBAAgB;IAC1B,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,WAAW,CAAC;gBACR,OAAO,CAAC,EAAE,UAAU;IAChC,IAAI,SAAS,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC;IACrC,IAAI,UAAU,IAAI,UAAU,CAAC;IAC7B,OAAO,CACH,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,EACzB,WAAW,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,SAAS,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IACxC,KAAK,IAAI,IAAI;CAChB;AAGD,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,QAAQ,EAAE,gBAAgB,OAAE;IAExC,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;IAEtB,gBAAgB,IAAI,MAAM,EAAE,CAAC;CAC9B;AAGD,8BAAsB,sBAAsB;IAC1C,SAAS,CAAC,QAAQ,EAAE,gBAAgB,CAAC;gBAEzB,QAAQ,EAAE,gBAAgB;IAItC,QAAQ,CAAC,OAAO,CACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC;IAErB,gBAAgB,IAAI,MAAM,EAAE;IAI5B,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAGxC"} \ No newline at end of file diff --git a/dist/types.d.ts b/dist/types.d.ts index ea54ed1..546e440 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -1,25 +1,25 @@ export interface ResolverOptions { - type: string; - customType?: string; - options?: any; + type: string; + customType?: string; + options?: any; } export interface DNSResult { - records: DNSRecord[]; - error?: Error; + records: DNSRecord[]; + error?: Error; } export interface DNSRecord { - type: string; - customType?: string; - value: string; + type: string; + customType?: string; + value: string; } declare const DNS_RECORD_TYPE: { - A: string; - CNAME: string; - NS: string; - CONTENT: string; - TEXT: string; - ALL: string; - CUSTOM: string; + A: string; + CNAME: string; + NS: string; + CONTENT: string; + TEXT: string; + ALL: string; + CUSTOM: string; }; export { DNS_RECORD_TYPE }; -//# sourceMappingURL=types.d.ts.map +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/util.d.ts b/dist/util.d.ts index 2602eb5..c51e1fe 100644 --- a/dist/util.d.ts +++ b/dist/util.d.ts @@ -8,4 +8,4 @@ export declare function resolverError(e: Error | string): DNSResult; export declare function resolveSuccess(records: DNSRecord[]): DNSResult; export declare function normalizeDomain(domain: string): string; export declare function isPromise(obj: Promise): boolean; -//# sourceMappingURL=util.d.ts.map +//# sourceMappingURL=util.d.ts.map \ No newline at end of file