*Add resolve method
This commit is contained in:
parent
a0800a0feb
commit
63cec2129f
|
@ -5,6 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git",
|
"@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git",
|
||||||
|
"@lumeweb/libresolver": "git+https://git.lumeweb.com/LumeWeb/libresolver.git",
|
||||||
"libkernel": "^0.1.43",
|
"libkernel": "^0.1.43",
|
||||||
"libkmodule": "^0.2.44",
|
"libkmodule": "^0.2.44",
|
||||||
"libskynet": "^0.0.62"
|
"libskynet": "^0.0.62"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||||
|
import { DNS_RECORD_TYPE, ResolverOptions } from "@lumeweb/libresolver";
|
||||||
|
|
||||||
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
||||||
|
|
||||||
|
@ -15,6 +16,13 @@ export class DnsClient extends Client {
|
||||||
public async ready(): Promise<void> {
|
public async ready(): Promise<void> {
|
||||||
return this.callModuleReturn("ready");
|
return this.callModuleReturn("ready");
|
||||||
}
|
}
|
||||||
|
public async resolve(
|
||||||
|
domain: string,
|
||||||
|
options: ResolverOptions = { type: DNS_RECORD_TYPE.CONTENT },
|
||||||
|
bypassCache: boolean = false
|
||||||
|
): Promise<void> {
|
||||||
|
return this.callModuleReturn("ready");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createClient = factory<DnsClient>(DnsClient, MODULE);
|
export const createClient = factory<DnsClient>(DnsClient, MODULE);
|
||||||
|
|
Loading…
Reference in New Issue