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 =
|
2023-07-29 18:24:41 +00:00
|
|
|
"zduKgJ3grSZvc4AnnCfiJUSLmizKzPByJ5ZeRU3pvo2LRf1DsVjQDdbFvw";
|
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);
|