Skip to content

Commit

Permalink
Switch to using the npm version of bls12377js (#9673)
Browse files Browse the repository at this point in the history
Co-authored-by: Martín Volpe <volpe@clabs.co>
  • Loading branch information
dckesler and martinvol authored Aug 22, 2022
1 parent 31ab254 commit 4245a02
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
3 changes: 1 addition & 2 deletions packages/celotool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"bignumber.js": "^9.0.0",
"bip32": "2.0.5",
"bip39": "https://github.com/bitcoinjs/bip39#d8ea080a18b40f301d4e2219a2991cd2417e83c2",
"bls12377js": "https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc",
"bunyan": "1.8.12",
"bunyan-gke-stackdriver": "0.1.2",
"compare-versions": "^3.5.1",
Expand Down Expand Up @@ -66,4 +65,4 @@
"build": "tsc -b ."
},
"private": true
}
}
2 changes: 1 addition & 1 deletion packages/celotool/src/lib/generate_utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-ignore
import * as bls12377js from '@celo/bls12377js'
import { blsPrivateKeyToProcessedPrivateKey } from '@celo/cryptographic-utils/lib/bls'
import BigNumber from 'bignumber.js'
import * as bip32 from 'bip32'
import * as bip39 from 'bip39'
import * as bls12377js from 'bls12377js'
import fs from 'fs'
import { merge, range, repeat } from 'lodash'
import { tmpdir } from 'os'
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"test": "TZ=UTC jest --runInBand"
},
"dependencies": {
"@celo/bls12377js": "0.1.1",
"@celo/contractkit": "2.1.1-dev",
"@celo/explorer": "2.1.1-dev",
"@celo/governance": "2.1.1-dev",
Expand All @@ -55,7 +56,6 @@
"@oclif/plugin-plugins": "^1.9.4",
"bip32": "2.0.5",
"bip39": "https://github.com/bitcoinjs/bip39#d8ea080a18b40f301d4e2219a2991cd2417e83c2",
"bls12377js": "https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc",
"chalk": "^2.4.2",
"cli-table": "^0.3.1",
"cli-ux": "^5.4.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"@0x/sol-trace": "^2.0.16",
"@0x/subproviders": "^5.0.0",
"@celo/base": "2.1.1-dev",
"@celo/bls12377js": "0.1.1",
"@celo/connect": "2.1.1-dev",
"@celo/ganache-cli": "git+https://github.com/celo-org/ganache-cli.git#e933297",
"@celo/utils": "2.1.1-dev",
"@celo/cryptographic-utils": "2.1.1-dev",
"@openzeppelin/upgrades": "^2.8.0",
"bip39": "https://github.com/bitcoinjs/bip39#d8ea080a18b40f301d4e2219a2991cd2417e83c2",
"bls12377js": "https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc",
"chai-subset": "^1.6.0",
"csv-parser": "^2.0.0",
"csv-stringify": "^4.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/cryptographic-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
],
"dependencies": {
"@celo/utils": "2.1.1-dev",
"@celo/bls12377js": "0.1.1",
"@celo/base": "2.1.1-dev",
"@types/bn.js": "^5.1.0",
"@types/elliptic": "^6.4.9",
Expand All @@ -32,7 +33,6 @@
"bigi": "^1.1.0",
"bip32": "^2.0.6",
"bip39": "https://github.com/bitcoinjs/bip39#d8ea080a18b40f301d4e2219a2991cd2417e83c2",
"bls12377js": "https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc",
"buffer-reverse": "^1.0.1",
"elliptic": "^6.5.4",
"ethereumjs-util": "^5.2.0"
Expand All @@ -41,4 +41,4 @@
"@celo/flake-tracker": "0.0.1-dev",
"@celo/typescript": "0.0.1"
}
}
}
2 changes: 1 addition & 1 deletion packages/sdk/cryptographic-utils/src/bls.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BLS } from '@celo/bls12377js'
// this is an implementation of a subset of BLS12-377
import { isValidAddress } from '@celo/utils/lib/address'
import { BLS } from 'bls12377js'
import { keccak256 } from 'ethereumjs-util'
const BigInteger = require('bigi')
const reverse = require('buffer-reverse')
Expand Down
15 changes: 8 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,14 @@
resolved "https://registry.yarnpkg.com/@celo/base/-/base-2.1.0.tgz#069b47d6a9d5522d448669a30eb0afbd5e837f5c"
integrity sha512-sNwzeFKSNWj4K67HourcHSD9ihXcFfFuhNp4E9FbXpA1WWmEQx0RK7sqa0ep5nMiIFfEEsjttXKxrZwNe8h9rA==

"@celo/bls12377js@0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@celo/bls12377js/-/bls12377js-0.1.1.tgz#ba3574f41697cdba96c10ae96bb1aac057285798"
integrity sha512-hQjTIegg1+ZX5lPyeBYUEHYW7ktG0xkWxf4tcj//bK+tzyeQd6mMrne7C4+tBZgn+I35HtxYIo+YOLYJxXBg7A==
dependencies:
"@stablelib/blake2xs" "0.10.4"
big-integer "^1.6.44"

"@celo/connect@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@celo/connect/-/connect-2.1.0.tgz#5858c619d7e1d2f9c09b398600fd2cbc9fc56c1a"
Expand Down Expand Up @@ -7422,13 +7430,6 @@ blakejs@^1.1.0:
ts-node "^8.4.1"
typescript "^3.6.4"

"bls12377js@https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc":
version "0.1.0"
resolved "https://github.com/celo-org/bls12377js#cee721830e78bffcc03a660649b12c62386fb4bc"
dependencies:
"@stablelib/blake2xs" "0.10.4"
big-integer "^1.6.44"

bluebird@^2.9.33:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
Expand Down

0 comments on commit 4245a02

Please sign in to comment.