@scure/bip32
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -200,5 +200,7 @@ import { hmac } from '@noble/hashes/hmac'; | ||
else { | ||
opt.publicKey = secp.Point.fromHex(this.pubKey) | ||
.add(secp.Point.fromPrivateKey(childTweak)) | ||
.toRawBytes(true); | ||
const added = secp.Point.fromHex(this.pubKey).add(secp.Point.fromPrivateKey(childTweak)); | ||
if (added.equals(secp.Point.ZERO)) { | ||
throw new Error('The tweak was equal to negative P, which made the result key invalid'); | ||
} | ||
opt.publicKey = added.toRawBytes(true); | ||
} | ||
@@ -205,0 +207,0 @@ return new HDKey(opt); |
@@ -203,5 +203,7 @@ "use strict"; | ||
else { | ||
opt.publicKey = secp.Point.fromHex(this.pubKey) | ||
.add(secp.Point.fromPrivateKey(childTweak)) | ||
.toRawBytes(true); | ||
const added = secp.Point.fromHex(this.pubKey).add(secp.Point.fromPrivateKey(childTweak)); | ||
if (added.equals(secp.Point.ZERO)) { | ||
throw new Error('The tweak was equal to negative P, which made the result key invalid'); | ||
} | ||
opt.publicKey = added.toRawBytes(true); | ||
} | ||
@@ -208,0 +210,0 @@ return new HDKey(opt); |
{ | ||
"name": "@scure/bip32", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Secure, audited & minimal implementation of BIP32 hierarchical deterministic (HD) wallets", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
27081
569