refactor: switch to new sdks
This commit is contained in:
parent
d1346999b3
commit
f842968b11
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"preset": [
|
||||||
|
"@lumeweb/node-library-preset"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,12 +0,0 @@
|
||||||
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
|
|
|
@ -1 +0,0 @@
|
||||||
{"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"}
|
|
|
@ -1,11 +0,0 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
|
||||||
const MODULE = "AABCDWpcbyCkTWy5ZP6qZWZ5eiFe--CRJSMKxRYLE4usfQ";
|
|
||||||
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);
|
|
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
|
@ -3,17 +3,28 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"dependencies": {
|
"repository": {
|
||||||
"@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git",
|
"type": "git",
|
||||||
"@noble/hashes": "^1.2.0",
|
"url": "gitea@git.lumeweb.com:LumeWeb/kernel-handshake-client.git"
|
||||||
"@siaweb/libweb": "git+https://git.lumeweb.com/LumeWeb/libsiaweb.git",
|
|
||||||
"backoff.js": "^1.0.4",
|
|
||||||
"eventemitter3": "^5.0.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^18.13.0",
|
"@lumeweb/node-library-preset": "^0.2.7",
|
||||||
"prettier": "^2.8.4",
|
"presetter": "*"
|
||||||
"pretty": "^2.0.0",
|
},
|
||||||
"typescript": "^4.9.5"
|
"readme": "ERROR: No README data found!",
|
||||||
|
"_id": "@lumeweb/kernel-handshake-client@0.1.0",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "presetter bootstrap",
|
||||||
|
"build": "run build",
|
||||||
|
"semantic-release": "semantic-release"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@lumeweb/libkernel": "^0.1.0-develop.14"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
import { Client, factory } from "@lumeweb/libkernel/module";
|
||||||
|
|
||||||
const MODULE = "AABCDWpcbyCkTWy5ZP6qZWZ5eiFe--CRJSMKxRYLE4usfQ";
|
const MODULE = "AABCDWpcbyCkTWy5ZP6qZWZ5eiFe--CRJSMKxRYLE4usfQ";
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"declaration": true,
|
|
||||||
"strict": true,
|
|
||||||
"module": "esnext",
|
|
||||||
"target": "esnext",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"sourceMap": false,
|
|
||||||
"rootDir": "src",
|
|
||||||
"outDir": "dist",
|
|
||||||
"typeRoots": [
|
|
||||||
"node_modules/@types",
|
|
||||||
],
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"declarationMap": true,
|
|
||||||
"declarationDir": "dist",
|
|
||||||
"emitDeclarationOnly": false,
|
|
||||||
"allowJs": true
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue