2023-02-19 21:20:38 +00:00
|
|
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
2022-08-18 20:51:48 +00:00
|
|
|
|
2023-02-19 21:20:38 +00:00
|
|
|
const MODULE = "PACYNuYbp_5hgCjMK16EGcytB9QCxDLe4_uitahwePdeaA";
|
2022-07-20 11:11:06 +00:00
|
|
|
|
2023-02-19 21:20:38 +00:00
|
|
|
export class DnsClient extends Client {
|
2023-02-19 21:27:24 +00:00
|
|
|
public async register(module: string): Promise<void> {
|
|
|
|
const bag = await this.loadBound(module);
|
|
|
|
const ret = await bag.callModule("register");
|
|
|
|
this.handleError(ret);
|
2022-08-14 10:54:18 +00:00
|
|
|
}
|
2023-02-19 21:20:38 +00:00
|
|
|
public async clear(): Promise<void> {
|
|
|
|
return this.callModuleReturn("clear");
|
2022-08-14 10:54:18 +00:00
|
|
|
}
|
2023-02-19 21:20:38 +00:00
|
|
|
public async getResolvers(): Promise<void> {
|
|
|
|
return this.callModuleReturn("clear");
|
2022-08-14 10:54:18 +00:00
|
|
|
}
|
2023-02-19 21:20:38 +00:00
|
|
|
public async ready(): Promise<void> {
|
|
|
|
return this.callModuleReturn("ready");
|
2022-08-18 23:45:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-19 21:20:38 +00:00
|
|
|
export const createClient = factory<DnsClient>(DnsClient, MODULE);
|