From ec859a1c3261319053425f972e141a3d6afaa652 Mon Sep 17 00:00:00 2001 From: dapplion Date: Wed, 25 Nov 2020 11:39:49 +0000 Subject: [PATCH] Fix backing dependencies --- package.json | 10 +++++++--- src/herumi/privateKey.ts | 2 +- src/herumi/publicKey.ts | 2 +- src/herumi/signature.ts | 2 +- yarn.lock | 19 ++++++++++++++++++- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 03f6306..4c21044 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "lint:fix": "yarn run lint --fix", "pretest": "yarn check-types", "prepublishOnly": "yarn build", - "test:web:unit": "karma start", - "test:node:unit": "nyc --cache-dir .nyc_output/.cache -r lcov -e .ts mocha --colors -r ts-node/register 'test/unit/**/*.test.ts' && nyc report", - "test:unit": "yarn run test:node:unit && yarn run test:web:unit", + "test:web": "karma start", + "test:unit": "mocha --colors -r ts-node/register 'test/unit/**/*.test.ts'", + "test:coverage": "nyc --cache-dir .nyc_output/.cache -r lcov -e .ts mocha --colors -r ts-node/register 'test/unit/**/*.test.ts' && nyc report", "test:spec": "mocha --colors -r ts-node/register 'test/spec/**/*.test.ts'", "test": "yarn run test:unit && yarn run test:spec", "coverage": "codecov -F bls", @@ -51,6 +51,7 @@ "@babel/preset-env": "^7.8.4", "@babel/preset-typescript": "^7.8.3", "@babel/register": "^7.8.3", + "@chainsafe/blst": "^0.1.2", "@chainsafe/eth2-spec-tests": "0.12.0", "@chainsafe/lodestar-spec-test-util": "^0.11.0", "@types/chai": "^4.2.9", @@ -80,5 +81,8 @@ "resolutions": { "mocha": "^8.2.1", "v8-profiler-next": "1.3.0" + }, + "peerDependencies": { + "@chainsafe/blst": "^0.1.2" } } diff --git a/src/herumi/privateKey.ts b/src/herumi/privateKey.ts index facdd59..4e1a91e 100644 --- a/src/herumi/privateKey.ts +++ b/src/herumi/privateKey.ts @@ -1,5 +1,5 @@ import assert from "assert"; -import {SecretKeyType} from "@chainsafe/eth2-bls-wasm"; +import {SecretKeyType} from "bls-eth-wasm"; import {generateRandomSecretKey} from "@chainsafe/bls-keygen"; import {SECRET_KEY_LENGTH} from "../constants"; import {getContext} from "./context"; diff --git a/src/herumi/publicKey.ts b/src/herumi/publicKey.ts index 4cd01cc..d889eeb 100644 --- a/src/herumi/publicKey.ts +++ b/src/herumi/publicKey.ts @@ -1,4 +1,4 @@ -import {PublicKeyType} from "@chainsafe/eth2-bls-wasm"; +import {PublicKeyType} from "bls-eth-wasm"; import {getContext} from "./context"; import {EMPTY_PUBLIC_KEY} from "../constants"; import {Signature} from "./signature"; diff --git a/src/herumi/signature.ts b/src/herumi/signature.ts index 3bf8a22..9198d43 100644 --- a/src/herumi/signature.ts +++ b/src/herumi/signature.ts @@ -1,6 +1,6 @@ import assert from "assert"; import {SIGNATURE_LENGTH, EMPTY_SIGNATURE} from "../constants"; -import {SignatureType} from "@chainsafe/eth2-bls-wasm"; +import {SignatureType} from "bls-eth-wasm"; import {getContext} from "./context"; import {PublicKey} from "./publicKey"; import {bytesToHex, hexToBytes, isEqualBytes} from "../helpers/utils"; diff --git a/yarn.lock b/yarn.lock index 9878fd4..fb7d8a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@assemblyscript/loader@^0.9.2": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.9.4.tgz#a483c54c1253656bb33babd464e3154a173e1577" + integrity sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA== + "@babel/cli@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.4.tgz#505fb053721a98777b2b175323ea4f090b7d3c1c" @@ -786,7 +791,7 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@chainsafe/as-sha256@0.2.0", "@chainsafe/as-sha256@^0.2.0": +"@chainsafe/as-sha256@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.2.0.tgz#3ebe061d59d30af9e95a8c22ff4813cbf0e89dbc" integrity sha512-reKklZhY4jSj7JdxdAjUfsaiMt2pdm8V/IqlOR5c4m6Y4tRCxt4f0HBMfyiE2ZQF4tqPPqRVf/ulXwK+LjLIxw== @@ -814,6 +819,13 @@ buffer "^5.4.3" randombytes "^2.1.0" +"@chainsafe/blst@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@chainsafe/blst/-/blst-0.1.2.tgz#5d2ee91609c0f799be4b4de2ea8ed67209bf4201" + integrity sha512-doQ4sFGthNR9WzLlFUvtOx1ReqIMNNjS0JC3NNg7NSkRMvzpIinFcHlcABmCJODofreU11GYext77WFCzoSKNA== + dependencies: + node-fetch "^2.6.1" + "@chainsafe/eth2-spec-tests@0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@chainsafe/eth2-spec-tests/-/eth2-spec-tests-0.12.0.tgz#f95ffe5bc20ddaa4d2240cffe1e417877adc8055" @@ -4416,6 +4428,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425"