@scure/bip32
Advanced tools
Comparing version 1.0.0-rc1 to 1.0.1
@@ -29,4 +29,4 @@ "use strict"; | ||
const utils_1 = require("@noble/hashes/utils"); | ||
const secp = __importStar(require("@noble/secp256k1")); | ||
const base_1 = require("@scure/base"); | ||
const secp = __importStar(require("@noble/secp256k1")); | ||
// Enable sync API for noble-secp256k1 | ||
@@ -45,6 +45,2 @@ secp.utils.hmacSha256Sync = (key, ...messages) => { | ||
} | ||
function modN(a, b = secp.CURVE.n) { | ||
const result = a % b; | ||
return result >= 0 ? result : b + result; | ||
} | ||
const MASTER_SECRET = (0, utils_1.utf8ToBytes)('Bitcoin seed'); | ||
@@ -233,3 +229,3 @@ // Bitcoin hardcoded by default | ||
if (this.privateKey) { | ||
const added = modN(this.privKey + childTweak); | ||
const added = secp.utils.mod(this.privKey + childTweak, secp.CURVE.n); | ||
if (!secp.utils.isValidPrivateKey(added)) { | ||
@@ -236,0 +232,0 @@ throw new Error('The tweak was out of range or the resulted private key is invalid'); |
{ | ||
"name": "@scure/bip32", | ||
"version": "1.0.0-rc1", | ||
"version": "1.0.1", | ||
"description": "Secure, audited & minimal implementation of BIP32 hierarchical deterministic (HD) wallets", | ||
@@ -10,12 +10,20 @@ "main": "index.js", | ||
], | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"@noble/hashes": "~1.0.0", | ||
"@noble/secp256k1": "~1.5.0", | ||
"@scure/base": "~1.0.0-rc1" | ||
"@noble/secp256k1": "~1.5.2", | ||
"@scure/base": "~1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^9.0.0", | ||
"mocha": "^9.1.3", | ||
"@types/mocha": "9.0.0", | ||
"mocha": "9.2.0", | ||
"prettier": "2.4.1", | ||
"typescript": "4.5.4" | ||
}, | ||
"author": "Paul Miller (https://paulmillr.com)", | ||
"homepage": "https://paulmillr.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/paulmillr/scure-bip32.git" | ||
}, | ||
"contributors": [ | ||
@@ -34,2 +42,4 @@ { | ||
"build": "tsc", | ||
"lint": "prettier --check 'index.ts' 'test/**/*.{js,ts}'", | ||
"format": "prettier --write 'index.ts' 'test/**/*.{js,ts}'", | ||
"test": "cd test && tsc && mocha hdkey.test.js" | ||
@@ -50,3 +60,9 @@ }, | ||
"code" | ||
], | ||
"funding": [ | ||
{ | ||
"type": "individual", | ||
"url": "https://paulmillr.com/funding/" | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
18099
0
0
4
341
Updated@noble/secp256k1@~1.5.2
Updated@scure/base@~1.0.0