Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update bcrypto #54

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run: npm install
- run: npm install eslint nyc codecov
- run: npm install bslint nyc codecov
- save_cache:
paths:
- node_modules
Expand Down
2 changes: 1 addition & 1 deletion lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {Script, Address, Network} = bcoin;
const HDPublicKey = bcoin.hd.HDPublicKey;
const Validator = require('bval');
const Logger = require('blgr');
const {base58} = require('bstring');
const base58 = require('bcrypto/lib/encoding/base58');
const sha256 = require('bcrypto/lib/sha256');
const random = require('bcrypto/lib/random');
const {safeEqual} = require('bcrypto/lib/safe');
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/sig.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ sigutils.verifyMessage = function verifyMessage(message, signature, publicKey) {
*/

sigutils.signHash = function signHash(hash, privateKey) {
const {
const [
signature,
recovery
} = secp256k1.signRecoverable(hash, privateKey);
] = secp256k1.signRecoverable(hash, privateKey);

return sigutils.encodeSignature(signature, recovery);
};
Expand Down
29 changes: 6 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@
"dependencies": {
"bclient": "^0.1.7",
"bcoin": "~1.0.2",
"bcrypto": "~3.1.9",
"bcrypto": "~4.0.1",
"bdb": "~1.1.7",
"bevent": "~0.1.5",
"blgr": "~0.1.7",
"bmutex": "~0.1.6",
"bsert": "0.0.10",
"bstring": "^0.3.9",
"buffer-map": "0.0.7",
"bufio": "^1.0.6",
"bval": "^0.1.6",
Expand Down
2 changes: 1 addition & 1 deletion test/cosigner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {hd} = require('bcoin');
const secp256k1 = require('bcrypto/lib/secp256k1');
const sigUtils = require('../lib/utils/sig');

const privKey = secp256k1.generatePrivateKey();
const privKey = secp256k1.privateKeyGenerate();

// commonly used test case
const NETWORK = 'main';
Expand Down