*RpcNetwork needs to be accessible
*re-export RpcNetwork for convenience
This commit is contained in:
parent
e06c86720f
commit
ef787eba13
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 };
|
||||||
|
|
Loading…
Reference in New Issue