diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..10abdc2 --- /dev/null +++ b/dist/index.d.ts @@ -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; + query(method: string, params: any): Promise; +} +export declare const createClient: (...args: any) => HandshakeClient; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map new file mode 100644 index 0000000..68d5734 --- /dev/null +++ b/dist/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"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..d897f01 --- /dev/null +++ b/dist/index.js @@ -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);