Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scure/bip32

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scure/bip32 - npm Package Compare versions

Comparing version 1.0.0-rc1 to 1.0.1

8

index.js

@@ -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/"
}
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc