refactor: have EthClient extend NetworkClient
This commit is contained in:
parent
5839454d65
commit
da59c69afd
|
@ -8,7 +8,7 @@
|
||||||
"name": "@lumeweb/kernel-eth-client",
|
"name": "@lumeweb/kernel-eth-client",
|
||||||
"version": "0.1.0-develop.6",
|
"version": "0.1.0-develop.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/libkernel": "^0.1.0-develop.20",
|
"@lumeweb/libkernel": "^0.1.0-develop.27",
|
||||||
"ethers": "^6.6.3"
|
"ethers": "^6.6.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1684,12 +1684,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@lumeweb/libkernel": {
|
"node_modules/@lumeweb/libkernel": {
|
||||||
"version": "0.1.0-develop.20",
|
"version": "0.1.0-develop.27",
|
||||||
"resolved": "https://registry.npmjs.org/@lumeweb/libkernel/-/libkernel-0.1.0-develop.20.tgz",
|
"resolved": "https://registry.npmjs.org/@lumeweb/libkernel/-/libkernel-0.1.0-develop.27.tgz",
|
||||||
"integrity": "sha512-z7yRk6B0P0bxPe+a4Xm5/Bl6eIfkDCB2IJhNK2Gm+o7j4RbWbizRk79+zgBFWMrYzo8bVrpBKK7nGI3iNOgT9g==",
|
"integrity": "sha512-XkO16wzr2k1j9CrraVrL5vm5ysY+wJGwfJf9/PAknpLGko8j8Z/TbO5h/Q43iNjYjLlwBL2cGngX8orCZBWVDA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/libweb": "0.2.0-develop.26",
|
"@lumeweb/libweb": "0.2.0-develop.27",
|
||||||
"emittery": "^1.0.1"
|
"emittery": "^1.0.1",
|
||||||
|
"p-defer": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@lumeweb/libkernel/node_modules/emittery": {
|
"node_modules/@lumeweb/libkernel/node_modules/emittery": {
|
||||||
|
@ -1738,9 +1739,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@lumeweb/libweb": {
|
"node_modules/@lumeweb/libweb": {
|
||||||
"version": "0.2.0-develop.26",
|
"version": "0.2.0-develop.27",
|
||||||
"resolved": "https://registry.npmjs.org/@lumeweb/libweb/-/libweb-0.2.0-develop.26.tgz",
|
"resolved": "https://registry.npmjs.org/@lumeweb/libweb/-/libweb-0.2.0-develop.27.tgz",
|
||||||
"integrity": "sha512-XRIDiqRFqlEbcwjxAfkv7UYnyTflN3Q4rki8YAd9QrLQM2vycslgPLYS53vVJVL9GPH93V5J9z2V4DPQZlOOkQ==",
|
"integrity": "sha512-obS4a6mcHJNoWXy5fCDuGAIVMee0ivK8q/q0semqoS3v0PS7t7sUmRX5ajyCwGbACXYqEdq3vU7RwzxhUkuNGg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||||
"@lumeweb/libportal": "^0.2.0-develop.16",
|
"@lumeweb/libportal": "^0.2.0-develop.16",
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"semantic-release": "semantic-release"
|
"semantic-release": "semantic-release"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/libkernel": "^0.1.0-develop.20",
|
"@lumeweb/libkernel": "^0.1.0-develop.27",
|
||||||
"ethers": "^6.6.3"
|
"ethers": "^6.6.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel/module";
|
import { factory, NetworkClient } from "@lumeweb/libkernel/module";
|
||||||
|
|
||||||
const MODULE = "zduNWtikeTg3FwuNKBNLnWLFJ2ERg4BuDXymerS1gxcbQr5kQ4u2mXtUoq";
|
const MODULE = "zduNWtikeTg3FwuNKBNLnWLFJ2ERg4BuDXymerS1gxcbQr5kQ4u2mXtUoq";
|
||||||
|
|
||||||
export class EthClient extends Client {
|
export class EthClient extends NetworkClient {
|
||||||
public async ready() {
|
|
||||||
return this.callModuleReturn("ready");
|
|
||||||
}
|
|
||||||
public async method(method: string, params: any) {
|
public async method(method: string, params: any) {
|
||||||
return this.callModuleReturn(method, params);
|
return this.callModuleReturn(method, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async register() {
|
|
||||||
return this.callModuleReturn("register");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createClient = factory<EthClient>(EthClient, MODULE);
|
export const createClient = factory<EthClient>(EthClient, MODULE);
|
||||||
|
|
Loading…
Reference in New Issue