2023-07-05 17:08:38 +00:00
|
|
|
import { Client, factory } from "@lumeweb/libkernel/module";
|
2023-02-19 19:42:15 +00:00
|
|
|
|
2023-07-14 09:50:00 +00:00
|
|
|
const MODULE = "zduLCsqi4z9Pa4GLah28bJF91YhE8c6CSMcSkmYFcPkVQssVYVoTsspimD";
|
2023-02-19 19:42:15 +00:00
|
|
|
|
|
|
|
export interface Response {
|
|
|
|
id?: number;
|
|
|
|
error?: string;
|
|
|
|
result: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class HandshakeClient extends Client {
|
|
|
|
public async ready(): Promise<void> {
|
|
|
|
return this.callModuleReturn("ready");
|
|
|
|
}
|
|
|
|
|
|
|
|
public async query(method: string, params: any): Promise<Response> {
|
|
|
|
return this.callModuleReturn("query", { method, params });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const createClient = factory<HandshakeClient>(HandshakeClient, MODULE);
|