diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index fa803e0..6e7762f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -18,5 +18,13 @@ jobs: node-version: ${{ matrix.node }} - run: npm install + env: + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: npm run lint + env: + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: npm run test + env: + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..c01517c --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +//npm.pkg.github.com/:_authToken=${NPM_TOKEN} +@eyblockchain:registry=https://npm.pkg.github.com/ diff --git a/__tests__/general-number.js b/__tests__/general-number.js index d93802b..55925ec 100644 --- a/__tests__/general-number.js +++ b/__tests__/general-number.js @@ -1,4 +1,4 @@ -const { hexToBinArray, hexToBytes } = require('zkp-utils'); +const { hexToBinArray, hexToBytes } = require('@eyblockchain/zkp-utils'); const { generalise, GN, GO, stitchLimbs } = require('../index'); const dec = '17408914224622445472'; diff --git a/index.js b/index.js index d713331..bb828a1 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ const { decToHex, utf8ToHex, asciiToHex, -} = require('zkp-utils'); +} = require('@eyblockchain/zkp-utils'); const { logger } = require('./logger'); /** diff --git a/package-lock.json b/package-lock.json index cc96bda..788183d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -748,6 +748,34 @@ "kuler": "^2.0.0" } }, + "@eyblockchain/zkp-utils": { + "version": "1.0.9", + "resolved": "https://npm.pkg.github.com/download/@eyblockchain/zkp-utils/1.0.9/c16ee0af1b84016793498ea3a4d0494d1bf6cc9e3724fb47ba991f66da4dd1a1", + "integrity": "sha1-FmptTQamU3J7yMDGvfGF4qwszvE=", + "requires": { + "big-integer": "^1.6.48", + "keccak": "^3.0.1", + "winston": "^3.3.3" + }, + "dependencies": { + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + } + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1687,6 +1715,11 @@ "tweetnacl": "^0.14.3" } }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -6654,6 +6687,15 @@ "object.assign": "^4.1.0" } }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -10340,48 +10382,6 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true - }, - "zkp-utils": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/zkp-utils/-/zkp-utils-1.0.7.tgz", - "integrity": "sha512-iMvbCWP0pXEZF5OcgBu+NAGn8L+5SPI98tXxz+xEzr/4Ew+IjIt8/dbClrT+DsvvStvacjDIL8nXlCkv6Bk8TA==", - "requires": { - "big-integer": "^1.6.48", - "keccak": "^3.0.1", - "winston": "^3.3.3" - }, - "dependencies": { - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - } - } - } } } } diff --git a/package.json b/package.json index 5380d1b..c930f27 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "prettier": "^2.0.5" }, "dependencies": { - "winston": "^3.3.3", - "zkp-utils": "^1.0.7" + "@eyblockchain/zkp-utils": "^1.0.9", + "winston": "^3.3.3" }, "publishConfig": { "registry": "https://npm.pkg.github.com"