*RpcNetwork needs to be accessible

*re-export RpcNetwork for convenience
This commit is contained in:
Derrick Hammer 2022-08-18 18:50:35 -04:00
parent e06c86720f
commit ef787eba13
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@lumeweb/kernel-dns-client": "github:LumeWeb/kernel-dns-client", "@lumeweb/kernel-dns-client": "github:LumeWeb/kernel-dns-client",
"@lumeweb/kernel-rpc-client": "github:LumeWeb/kernel-rpc-client",
"@lumeweb/resolver-common": "github:LumeWeb/resolver-common", "@lumeweb/resolver-common": "github:LumeWeb/resolver-common",
"libkmodule": "^0.2.51" "libkmodule": "^0.2.51"
} }

View File

@ -5,8 +5,19 @@ import {
resolverError, resolverError,
} from "@lumeweb/resolver-common"; } from "@lumeweb/resolver-common";
import { resolve } from "@lumeweb/kernel-dns-client"; import { resolve } from "@lumeweb/kernel-dns-client";
import { RpcNetwork } from "@lumeweb/kernel-rpc-client";
export class ResolverRegistry { export class ResolverRegistry {
private _rpcNetwork: RpcNetwork;
constructor(network: RpcNetwork) {
this._rpcNetwork = network;
}
get rpcNetwork(): RpcNetwork {
return this._rpcNetwork;
}
public async resolve( public async resolve(
domain: string, domain: string,
options: ResolverOptions = { type: DNS_RECORD_TYPE.DEFAULT }, options: ResolverOptions = { type: DNS_RECORD_TYPE.DEFAULT },
@ -23,3 +34,5 @@ export class ResolverRegistry {
return result; return result;
} }
} }
export { RpcNetwork };