2023-07-23 17:43:25 +00:00
|
|
|
import { factory, NetworkClient } from "@lumeweb/libkernel/module";
|
2023-02-19 19:42:15 +00:00
|
|
|
|
2023-07-23 17:43:25 +00:00
|
|
|
export const MODULE =
|
|
|
|
"zduS4q1t6q5tLtANmRaUuAJNDqTggfwtV9hhK6wMRg1v891z5ts7iyobnw";
|
2023-02-19 19:42:15 +00:00
|
|
|
|
|
|
|
export interface Response {
|
|
|
|
id?: number;
|
|
|
|
error?: string;
|
|
|
|
result: any;
|
|
|
|
}
|
|
|
|
|
2023-07-23 17:42:43 +00:00
|
|
|
export class HandshakeClient extends NetworkClient {
|
2023-02-19 19:42:15 +00:00
|
|
|
public async query(method: string, params: any): Promise<Response> {
|
|
|
|
return this.callModuleReturn("query", { method, params });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const createClient = factory<HandshakeClient>(HandshakeClient, MODULE);
|