diff --git a/package.json b/package.json index 3f02bbd..90199ce 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,17 @@ { "name": "@kyve/evm", + "version": "0.0.3", "license": "MIT", "scripts": { "build": "tsc", - "build:binaries": "tsc && pkg ./dist/index.js --out-path out", - "start": "node ./dist/index.js", + "build:binaries": "tsc && pkg ./dist/src/index.js --out-path out", + "start": "node ./dist/src/index.js", "format": "prettier --write ." }, "dependencies": { - "@kyve/core": "^0.0.5", + "@kyve/core": "^0.0.6", "commander": "^8.2.0", - "ethers": "^5.4.7", + "ethers": "^5.5.1", "object-hash": "^2.2.0" }, "devDependencies": { diff --git a/src/index.ts b/src/index.ts index ad7f0d4..236ae7b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import KYVE from "@kyve/core"; import { Command } from "commander"; import { readFileSync } from "fs"; +import { version } from "../package.json"; import uploadFunction from "./upload"; import validateFunction from "./validate"; @@ -31,6 +32,7 @@ cli.option( true ); cli.option("-e, --email ", "The email of the mantainer. [optional]"); +cli.version(version, "-v, --version"); (async () => { await cli.parseAsync(); @@ -39,6 +41,7 @@ cli.option("-e, --email ", "The email of the mantainer. [optional]"); const node = new KYVE( options.pool, "@kyve/evm", + version, options.stake, options.privateKey, options.keyfile && JSON.parse(readFileSync(options.keyfile, "utf-8")), diff --git a/tsconfig.json b/tsconfig.json index 2373029..2be6c54 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "strict": true, "outDir": "dist", - "esModuleInterop": true + "esModuleInterop": true, + "resolveJsonModule": true }, "files": ["src/index.ts"] } diff --git a/yarn.lock b/yarn.lock index 87aff7c..6ad114b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -361,16 +361,17 @@ "@ethersproject/properties" "^5.5.0" "@ethersproject/strings" "^5.5.0" -"@kyve/core@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@kyve/core/-/core-0.0.5.tgz#556777c26776199e9026a8a9e016f54dadb6623b" - integrity sha512-tSqLmFMVIyYFStp5MYjSzkSpUlJaKiqxxS2IDZy3NWHlgXy00yxMUUHo+9i40djyIhlNPVMJmCCpgMuj/81qzQ== +"@kyve/core@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@kyve/core/-/core-0.0.6.tgz#98bb3c5052bbd6b37f48354cea8c0f1e7e2c3d7e" + integrity sha512-dQ03JvI7eViQwmQP4ruOT1vEj2NvCZrBUFmyySxE18Iw+6BzXSO8C9PeNBnB4TI9Uub4y+mHkxNSsy4YKN/olA== dependencies: arweave "^1.10.17" base64url "^3.0.1" ethers "^5.4.7" prando "^6.0.1" rxjs "^7.4.0" + semver "^7.3.5" tslog "^3.2.2" unique-names-generator "^4.6.0" @@ -703,7 +704,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -ethers@^5.4.7: +ethers@^5.4.7, ethers@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.5.1.tgz#d3259a95a42557844aa543906c537106c0406fbf" integrity sha512-RodEvUFZI+EmFcE6bwkuJqpCYHazdzeR1nMzg+YWQSmQEsNtfl1KHGfp/FWZYl48bI/g7cgBeP2IlPthjiVngw==