diff --git a/README.md b/README.md index c1ec659..482b984 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,13 @@ VALIDATOR_IMAGE_URL=https://s3.amazonaws.com/keybase_processed_uploads/e86fec489 RESTAKE_BY_CRON='0 */4 * * *' # Human-readable CRON job for automatically restaking tokens HUMAN_READABLE_RESTAKE_BY_CRON='4 hours' +# KYVE_ENV (optinal) default is 'kyve-1' +KYVE_ENV='kyve-1 ' +# RPC enpoint(optinal) +RPC='https://rpc-eu-1.korellia.kyve.network' +# API endpoint (optinal) +REST='https://api-eu-1.korellia.kyve.network' +# If no RPC or REST endpoint provided, service will use default endpoints from kyvejs/sdk bu ``` 1. With Docker compose diff --git a/app/common/config.js b/app/common/config.js index 179e851..e22bd57 100644 --- a/app/common/config.js +++ b/app/common/config.js @@ -21,6 +21,12 @@ const schema = { type: 'string', default: 'kyve-1' }, + REST: { + type: 'string' + }, + RPC: { + type: 'string' + }, GRANT_MNEMONIC: { type: 'string' }, diff --git a/app/common/kyve.factory.js b/app/common/kyve.factory.js index fa1df60..59cb4cc 100644 --- a/app/common/kyve.factory.js +++ b/app/common/kyve.factory.js @@ -2,8 +2,8 @@ const KyveSDK = require('@kyvejs/sdk').default function kyveSDK () { let kyve = null - async function init (mnemonic, env) { - const sdk = new KyveSDK(env) + async function init (mnemonic, env = { chainId: 'kyve-1' }) { + const sdk = env.rpc || env.api ? new KyveSDK(env.chainId, { rpc: env.rpc, api: env.api }) : new KyveSDK(env.chainId) kyve = { kyveSdk: await sdk.fromMnemonic(mnemonic), kyveApi: sdk.createLCDClient(env) diff --git a/app/package-lock.json b/app/package-lock.json index 4d7b061..a419beb 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -575,9 +575,9 @@ } }, "node_modules/@kyvejs/sdk": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@kyvejs/sdk/-/sdk-1.0.1.tgz", - "integrity": "sha512-HdZaipCAnZjPpwb5BW8+WCg4RSRCxuGftgherJLOJGfznBk3v3VCIKKBb6qyVe6N0L+OsG398L6B7w+bCOjfMg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@kyvejs/sdk/-/sdk-1.0.5.tgz", + "integrity": "sha512-ZQ2CICoNkQNcBekM7PdBQxDiZaZ5k6nFGirgIaH5uaEUdAFSRxK0SOAxsjigMBMwPJ746w6pc9TufOlAzx98CQ==", "dependencies": { "@cosmjs/amino": "^0.30.1", "@cosmjs/crypto": "^0.30.1", @@ -587,7 +587,7 @@ "@cosmjs/tendermint-rpc": "^0.30.1", "@cosmostation/extension-client": "^0.0.6", "@keplr-wallet/cosmos": "^0.11.38", - "@kyvejs/types": "1.0.1", + "@kyvejs/types": "1.0.3", "axios": "0.25.0", "bech32": "2.0.0", "bignumber.js": "9.0.2", @@ -596,9 +596,9 @@ } }, "node_modules/@kyvejs/types": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@kyvejs/types/-/types-1.0.1.tgz", - "integrity": "sha512-kIPNLSJOFNd0Cea1V3rlkMLomtIuiNBJcTcnhGFbPtkArr1QawoNbkfFNNRYMzb8mBmy7Ys4QiQA+GXIQCu/dw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@kyvejs/types/-/types-1.0.3.tgz", + "integrity": "sha512-y7uFE6ARMcRnM11ls8zHv/JWx9HyMF96Isce0ivRJ0Lwqqgv6+2ChnvkVoVdfIelq68NtGxorM+v1PDDq0Nrhw==", "dependencies": { "@protobufs/cosmos": "^0.0.11", "@protobufs/gogoproto": "^0.0.10", @@ -651,19 +651,19 @@ } }, "node_modules/@nrwl/cli": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.8.8.tgz", - "integrity": "sha512-xV1Mu93w5e1Vsd3Pgy9eFC1MHjuLxAAHta5cNgQGxjev+XpnNrGb0x978zpenX7dJ0Pww3Vvi/vdcsaDNg6z4Q==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.8.9.tgz", + "integrity": "sha512-NsnVfM4B4Fqjvu9a9ZeJAzDKQclKeyWvSMXLGCebzsKcIBwbeh6G30nmVV8Z8VkdaJDOvle6QsYSVVNrl416fw==", "dependencies": { - "nx": "14.8.8" + "nx": "14.8.9" } }, "node_modules/@nrwl/tao": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.8.8.tgz", - "integrity": "sha512-cfTNM2cgI1miKLkGemU09v72EEYiRxyRw1jdHJ/zShcvcvt8CZI9mUtcV578Cx1K2yNFLseFkUS0rGh+fbcmrA==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.8.9.tgz", + "integrity": "sha512-llaZvTCXUmj4WtpbnjZOOzyTWcZIkj7gmtY5sa1nrTvbls9BaFRabOvfW4/z3s3E3iavni9ENMuuaHOfHyiRkg==", "dependencies": { - "nx": "14.8.8" + "nx": "14.8.9" }, "bin": { "tao": "index.js" @@ -796,23 +796,21 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, - "node_modules/@types/object-hash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-3.0.2.tgz", - "integrity": "sha512-tfyXl1JPCf2hzIDK29gO7qGqJjThKBzg/Cn3bA68R9NmWdOx+f7k5mm4to/n43BHspCwcoUC6FU4NpUoK/h9bQ==" - }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" }, "node_modules/@yarnpkg/parsers": { - "version": "3.0.0-rc.48.1", - "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.48.1.tgz", - "integrity": "sha512-qEewJouhRvaecGjbkjz9kMKn96UASbDodNrE5MYy2TrXkHcisIkbMxZdGBYfAq+s1dFtCSx/5H4k5bEkfakM+A==", + "version": "3.0.0-rc.53", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.53.tgz", + "integrity": "sha512-kprOp3hV9l7B9oqjgTQIM04mmEaYBYcccUXVIM1NFFf10HqnD9joTfZ1cAqx9lpccWzgUnHkrhVwhhlGjPzyIw==", "dependencies": { "js-yaml": "^3.10.0", "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.12.0" } }, "node_modules/@yarnpkg/parsers/node_modules/argparse": { @@ -1723,11 +1721,6 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, - "node_modules/dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" - }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -1857,9 +1850,9 @@ } }, "node_modules/dprint-node": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.7.tgz", - "integrity": "sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", "dependencies": { "detect-libc": "^1.0.3" } @@ -2822,9 +2815,9 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, "optional": true, "os": [ @@ -3949,9 +3942,9 @@ "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -3978,13 +3971,13 @@ } }, "node_modules/nx": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/nx/-/nx-14.8.8.tgz", - "integrity": "sha512-hXoTcBjY+3+OituiSE9G44CjwfbFVEtw6W9Hl0DxcFW+Vb9V+sa/LHAQbIq1GXvr819sBduP0bncowUoOq6iBg==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/nx/-/nx-14.8.9.tgz", + "integrity": "sha512-X29mxovtXkrqcYNndTNMUOrtO3tkSZF0GkdsQ16kCxo4YIqUVVOpM7IzZYx+JxO6fVDFMlK7eGU2C2lTHz/MSQ==", "hasInstallScript": true, "dependencies": { - "@nrwl/cli": "14.8.8", - "@nrwl/tao": "14.8.8", + "@nrwl/cli": "14.8.9", + "@nrwl/tao": "14.8.9", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "^3.0.0-rc.18", @@ -4036,9 +4029,9 @@ } }, "node_modules/nx/node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -4117,14 +4110,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "engines": { - "node": ">= 6" - } - }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -5445,37 +5430,106 @@ "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==" }, "node_modules/ts-poet": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.4.1.tgz", - "integrity": "sha512-AjZEs4h2w4sDfwpHMxQKHrTlNh2wRbM5NRXmLz0RiH+yPGtSQFbe9hBpNocU8vqVNgfh0BIOiXR80xDz3kKxUQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", + "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", "dependencies": { "dprint-node": "^1.0.7" } }, "node_modules/ts-proto": { - "version": "1.151.1", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.151.1.tgz", - "integrity": "sha512-T7PteegdeArA6D7G2fcpM5PsD5+SLlz3647dJfZ1WzV6IoP88Q+9bVvhRxdRVuFAUUGm2RtzdPOJJBjKR3QrFg==", - "dependencies": { - "@types/object-hash": "^3.0.2", - "case-anything": "^2.1.10", - "dataloader": "^1.4.0", - "object-hash": "^3.0.0", - "protobufjs": "^6.11.3", - "ts-poet": "^6.4.1", - "ts-proto-descriptors": "1.9.0" + "version": "1.162.1", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.162.1.tgz", + "integrity": "sha512-pzg5AKS04Nju6MNR2OSoQKszo5Q8FkB1SOrCvspCuIiAMDa0mJj4m5V99DFjdoyek+lx/U1x/ox/p99tOztKvg==", + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.5.0", + "ts-proto-descriptors": "1.15.0" }, "bin": { "protoc-gen-ts_proto": "protoc-gen-ts_proto" } }, "node_modules/ts-proto-descriptors": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.9.0.tgz", - "integrity": "sha512-Ui8zA5Q4Jnq6JIGRraUWvECrqixxtwwin8GkhIkvwCpR+JcSPsxWe8HfTj5eHfyruGYI6Zjf96XlC87hTakHfQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", + "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", "dependencies": { - "long": "^4.0.0", - "protobufjs": "^6.8.8" + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, + "node_modules/ts-proto-descriptors/node_modules/@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dependencies": { + "undici-types": "~5.25.1" + } + }, + "node_modules/ts-proto-descriptors/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/ts-proto-descriptors/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ts-proto/node_modules/@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dependencies": { + "undici-types": "~5.25.1" + } + }, + "node_modules/ts-proto/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/ts-proto/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" } }, "node_modules/tsconfig-paths": { @@ -5490,9 +5544,9 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-check": { "version": "0.4.0", @@ -5575,6 +5629,11 @@ "node": ">=14.0" } }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -6272,9 +6331,9 @@ } }, "@kyvejs/sdk": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@kyvejs/sdk/-/sdk-1.0.1.tgz", - "integrity": "sha512-HdZaipCAnZjPpwb5BW8+WCg4RSRCxuGftgherJLOJGfznBk3v3VCIKKBb6qyVe6N0L+OsG398L6B7w+bCOjfMg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@kyvejs/sdk/-/sdk-1.0.5.tgz", + "integrity": "sha512-ZQ2CICoNkQNcBekM7PdBQxDiZaZ5k6nFGirgIaH5uaEUdAFSRxK0SOAxsjigMBMwPJ746w6pc9TufOlAzx98CQ==", "requires": { "@cosmjs/amino": "^0.30.1", "@cosmjs/crypto": "^0.30.1", @@ -6284,7 +6343,7 @@ "@cosmjs/tendermint-rpc": "^0.30.1", "@cosmostation/extension-client": "^0.0.6", "@keplr-wallet/cosmos": "^0.11.38", - "@kyvejs/types": "1.0.1", + "@kyvejs/types": "1.0.3", "axios": "0.25.0", "bech32": "2.0.0", "bignumber.js": "9.0.2", @@ -6293,9 +6352,9 @@ } }, "@kyvejs/types": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@kyvejs/types/-/types-1.0.1.tgz", - "integrity": "sha512-kIPNLSJOFNd0Cea1V3rlkMLomtIuiNBJcTcnhGFbPtkArr1QawoNbkfFNNRYMzb8mBmy7Ys4QiQA+GXIQCu/dw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@kyvejs/types/-/types-1.0.3.tgz", + "integrity": "sha512-y7uFE6ARMcRnM11ls8zHv/JWx9HyMF96Isce0ivRJ0Lwqqgv6+2ChnvkVoVdfIelq68NtGxorM+v1PDDq0Nrhw==", "requires": { "@protobufs/cosmos": "^0.0.11", "@protobufs/gogoproto": "^0.0.10", @@ -6333,19 +6392,19 @@ } }, "@nrwl/cli": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.8.8.tgz", - "integrity": "sha512-xV1Mu93w5e1Vsd3Pgy9eFC1MHjuLxAAHta5cNgQGxjev+XpnNrGb0x978zpenX7dJ0Pww3Vvi/vdcsaDNg6z4Q==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.8.9.tgz", + "integrity": "sha512-NsnVfM4B4Fqjvu9a9ZeJAzDKQclKeyWvSMXLGCebzsKcIBwbeh6G30nmVV8Z8VkdaJDOvle6QsYSVVNrl416fw==", "requires": { - "nx": "14.8.8" + "nx": "14.8.9" } }, "@nrwl/tao": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.8.8.tgz", - "integrity": "sha512-cfTNM2cgI1miKLkGemU09v72EEYiRxyRw1jdHJ/zShcvcvt8CZI9mUtcV578Cx1K2yNFLseFkUS0rGh+fbcmrA==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.8.9.tgz", + "integrity": "sha512-llaZvTCXUmj4WtpbnjZOOzyTWcZIkj7gmtY5sa1nrTvbls9BaFRabOvfW4/z3s3E3iavni9ENMuuaHOfHyiRkg==", "requires": { - "nx": "14.8.8" + "nx": "14.8.9" } }, "@parcel/watcher": { @@ -6467,20 +6526,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, - "@types/object-hash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/object-hash/-/object-hash-3.0.2.tgz", - "integrity": "sha512-tfyXl1JPCf2hzIDK29gO7qGqJjThKBzg/Cn3bA68R9NmWdOx+f7k5mm4to/n43BHspCwcoUC6FU4NpUoK/h9bQ==" - }, "@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" }, "@yarnpkg/parsers": { - "version": "3.0.0-rc.48.1", - "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.48.1.tgz", - "integrity": "sha512-qEewJouhRvaecGjbkjz9kMKn96UASbDodNrE5MYy2TrXkHcisIkbMxZdGBYfAq+s1dFtCSx/5H4k5bEkfakM+A==", + "version": "3.0.0-rc.53", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.53.tgz", + "integrity": "sha512-kprOp3hV9l7B9oqjgTQIM04mmEaYBYcccUXVIM1NFFf10HqnD9joTfZ1cAqx9lpccWzgUnHkrhVwhhlGjPzyIw==", "requires": { "js-yaml": "^3.10.0", "tslib": "^2.4.0" @@ -7173,11 +7227,6 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, - "dataloader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz", - "integrity": "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==" - }, "dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -7261,9 +7310,9 @@ "integrity": "sha512-uW8Hrhp5ammm9x7kBLR6jDfujgaDarNA02tprvZdyrJ7MpdzD1KyrIHG4l+YoC2fJ2UcdFdNWNWIjt+sexBHJw==" }, "dprint-node": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.7.tgz", - "integrity": "sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", "requires": { "detect-libc": "^1.0.3" } @@ -8006,9 +8055,9 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "optional": true }, "function-bind": { @@ -8823,9 +8872,9 @@ "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==" + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz", + "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==" }, "normalize-path": { "version": "3.0.0", @@ -8841,12 +8890,12 @@ } }, "nx": { - "version": "14.8.8", - "resolved": "https://registry.npmjs.org/nx/-/nx-14.8.8.tgz", - "integrity": "sha512-hXoTcBjY+3+OituiSE9G44CjwfbFVEtw6W9Hl0DxcFW+Vb9V+sa/LHAQbIq1GXvr819sBduP0bncowUoOq6iBg==", + "version": "14.8.9", + "resolved": "https://registry.npmjs.org/nx/-/nx-14.8.9.tgz", + "integrity": "sha512-X29mxovtXkrqcYNndTNMUOrtO3tkSZF0GkdsQ16kCxo4YIqUVVOpM7IzZYx+JxO6fVDFMlK7eGU2C2lTHz/MSQ==", "requires": { - "@nrwl/cli": "14.8.8", - "@nrwl/tao": "14.8.8", + "@nrwl/cli": "14.8.9", + "@nrwl/tao": "14.8.9", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "^3.0.0-rc.18", @@ -8883,9 +8932,9 @@ }, "dependencies": { "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -8942,11 +8991,6 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" - }, "object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -9965,34 +10009,99 @@ "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==" }, "ts-poet": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.4.1.tgz", - "integrity": "sha512-AjZEs4h2w4sDfwpHMxQKHrTlNh2wRbM5NRXmLz0RiH+yPGtSQFbe9hBpNocU8vqVNgfh0BIOiXR80xDz3kKxUQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", + "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", "requires": { "dprint-node": "^1.0.7" } }, "ts-proto": { - "version": "1.151.1", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.151.1.tgz", - "integrity": "sha512-T7PteegdeArA6D7G2fcpM5PsD5+SLlz3647dJfZ1WzV6IoP88Q+9bVvhRxdRVuFAUUGm2RtzdPOJJBjKR3QrFg==", + "version": "1.162.1", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.162.1.tgz", + "integrity": "sha512-pzg5AKS04Nju6MNR2OSoQKszo5Q8FkB1SOrCvspCuIiAMDa0mJj4m5V99DFjdoyek+lx/U1x/ox/p99tOztKvg==", "requires": { - "@types/object-hash": "^3.0.2", - "case-anything": "^2.1.10", - "dataloader": "^1.4.0", - "object-hash": "^3.0.0", - "protobufjs": "^6.11.3", - "ts-poet": "^6.4.1", - "ts-proto-descriptors": "1.9.0" + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.5.0", + "ts-proto-descriptors": "1.15.0" + }, + "dependencies": { + "@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "requires": { + "undici-types": "~5.25.1" + } + }, + "long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + } + } } }, "ts-proto-descriptors": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.9.0.tgz", - "integrity": "sha512-Ui8zA5Q4Jnq6JIGRraUWvECrqixxtwwin8GkhIkvwCpR+JcSPsxWe8HfTj5eHfyruGYI6Zjf96XlC87hTakHfQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", + "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", "requires": { - "long": "^4.0.0", - "protobufjs": "^6.8.8" + "long": "^5.2.3", + "protobufjs": "^7.2.4" + }, + "dependencies": { + "@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "requires": { + "undici-types": "~5.25.1" + } + }, + "long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + } + } } }, "tsconfig-paths": { @@ -10007,9 +10116,9 @@ } }, "tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-check": { "version": "0.4.0", @@ -10071,6 +10180,11 @@ "busboy": "^1.6.0" } }, + "undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", diff --git a/app/package.json b/app/package.json index 7742e40..1d274c5 100644 --- a/app/package.json +++ b/app/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "server:dev": "NODE_ENV=development node --watch server/src/server.js", - "woker:dev": "NODE_ENV=development node --watch restake-worker/index.js", + "worker:dev": "NODE_ENV=development node --watch restake-worker/index.js", "cli": "node cli/index.js", "lint:fix": "eslint --fix .", "lint": "eslint ." diff --git a/app/restake-worker/index.js b/app/restake-worker/index.js index dd6e18a..b6961d8 100644 --- a/app/restake-worker/index.js +++ b/app/restake-worker/index.js @@ -46,7 +46,11 @@ const restakeHandler = async () => { } (async () => { - await kyve.init(config.GRANT_MNEMONIC, config.KYVE_ENV) + await kyve.init(config.GRANT_MNEMONIC, { + chaindId: config.KYVE_ENV, + rpc: config.RPC, + rest: config.REST + }) log.info(`Kyve SDK initialized with grantee: ${kyve.instance.kyveSdk.account.address} `) cosmosApi.init(kyve.instance.kyveSdk.config.rest) log.info('cosmos api initialized') diff --git a/app/server/src/server.js b/app/server/src/server.js index fb445a7..b6939d9 100644 --- a/app/server/src/server.js +++ b/app/server/src/server.js @@ -82,7 +82,11 @@ app.use((err, _req, res, _next) => { }); (async () => { - await kyve.init(config.GRANT_MNEMONIC) + await kyve.init(config.GRANT_MNEMONIC, { + chaindId: config.KYVE_ENV, + rpc: config.RPC, + rest: config.REST + }) log.info(`Kyve SDK initialized with grantee: ${kyve.instance.kyveSdk.account.address} `) cosmosApi.init(kyve.instance.kyveSdk.config.rest) log.info('Cosmos API initialized')