*Add dist
This commit is contained in:
parent
bf72ae3695
commit
e8e59421b8
|
@ -0,0 +1,12 @@
|
||||||
|
import { Client } from "@lumeweb/libkernel-universal";
|
||||||
|
export interface Response {
|
||||||
|
id?: number;
|
||||||
|
error?: string;
|
||||||
|
result: any;
|
||||||
|
}
|
||||||
|
export declare class HandshakeClient extends Client {
|
||||||
|
ready(): Promise<void>;
|
||||||
|
query(method: string, params: any): Promise<Response>;
|
||||||
|
}
|
||||||
|
export declare const createClient: (...args: any) => HandshakeClient;
|
||||||
|
//# sourceMappingURL=index.d.ts.map
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAI/D,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;CACb;AAED,qBAAa,eAAgB,SAAQ,MAAM;IAC5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGnE;AAED,eAAO,MAAM,YAAY,mCAAoD,CAAC"}
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||||
|
const MODULE = "AAAWj15-dWy44kfNabXtrcgt9Hae2klbZoHRK9bci5x2nQ";
|
||||||
|
export class HandshakeClient extends Client {
|
||||||
|
async ready() {
|
||||||
|
return this.callModuleReturn("ready");
|
||||||
|
}
|
||||||
|
async query(method, params) {
|
||||||
|
return this.callModuleReturn("query", { method, params });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export const createClient = factory(HandshakeClient, MODULE);
|
Loading…
Reference in New Issue