@ledgerhq/hw-app-btc
Advanced tools
Comparing version 4.22.0-beta.ae6f5c51 to 4.23.0
@@ -48,3 +48,3 @@ "use strict"; | ||
var SIGHASH_ALL = 1; | ||
var OP_PUSHDATA1 = 0x76; | ||
var OP_DUP = 0x76; | ||
var OP_HASH160 = 0xa9; | ||
@@ -64,6 +64,7 @@ var HASH_SIZE = 0x14; | ||
function Btc(transport) { | ||
var scrambleKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "BTC"; | ||
(0, _classCallCheck3.default)(this, Btc); | ||
this.transport = transport; | ||
transport.decorateAppAPIMethods(this, ["getWalletPublicKey", "signP2SHTransaction", "signMessageNew", "createPaymentTransactionNew"], "BTC"); | ||
transport.decorateAppAPIMethods(this, ["getWalletPublicKey", "signP2SHTransaction", "signMessageNew", "createPaymentTransactionNew"], scrambleKey); | ||
} | ||
@@ -260,3 +261,3 @@ | ||
function getTrustedInputBIP143(_x3, _x4) { | ||
function getTrustedInputBIP143(_x4, _x5) { | ||
return _ref.apply(this, arguments); | ||
@@ -596,3 +597,3 @@ } | ||
(0, _utils.foreach)(inputs, function (input, i) { | ||
var script = inputs[i].length >= 3 && typeof inputs[i][2] === "string" ? Buffer.from(inputs[i][2], "hex") : !segwit ? regularOutputs[i].script : Buffer.concat([Buffer.from([OP_PUSHDATA1, OP_HASH160, HASH_SIZE]), _this5.hashPublicKey(publicKeys[i]), Buffer.from([OP_EQUALVERIFY, OP_CHECKSIG])]); | ||
var script = inputs[i].length >= 3 && typeof inputs[i][2] === "string" ? Buffer.from(inputs[i][2], "hex") : !segwit ? regularOutputs[i].script : Buffer.concat([Buffer.from([OP_DUP, OP_HASH160, HASH_SIZE]), _this5.hashPublicKey(publicKeys[i]), Buffer.from([OP_EQUALVERIFY, OP_CHECKSIG])]); | ||
var pseudoTX = (0, _assign2.default)({}, targetTransaction); | ||
@@ -599,0 +600,0 @@ var pseudoTrustedInputs = useBip143 ? [trustedInputs[i]] : trustedInputs; |
{ | ||
"name": "@ledgerhq/hw-app-btc", | ||
"version": "4.22.0-beta.ae6f5c51", | ||
"version": "4.23.0", | ||
"description": "Ledger Hardware Wallet Bitcoin Application API", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@ledgerhq/hw-transport": "^4.22.0-beta.ae6f5c51", | ||
"@ledgerhq/hw-transport": "^4.21.0", | ||
"create-hash": "^1.1.3" | ||
@@ -31,0 +31,0 @@ }, |
@@ -16,3 +16,3 @@ //@flow | ||
const SIGHASH_ALL = 1; | ||
const OP_PUSHDATA1 = 0x76; | ||
const OP_DUP = 0x76; | ||
const OP_HASH160 = 0xa9; | ||
@@ -32,3 +32,3 @@ const HASH_SIZE = 0x14; | ||
constructor(transport: Transport<*>) { | ||
constructor(transport: Transport<*>, scrambleKey: string = "BTC") { | ||
this.transport = transport; | ||
@@ -43,3 +43,3 @@ transport.decorateAppAPIMethods( | ||
], | ||
"BTC" | ||
scrambleKey | ||
); | ||
@@ -671,3 +671,3 @@ } | ||
: Buffer.concat([ | ||
Buffer.from([OP_PUSHDATA1, OP_HASH160, HASH_SIZE]), | ||
Buffer.from([OP_DUP, OP_HASH160, HASH_SIZE]), | ||
this.hashPublicKey(publicKeys[i]), | ||
@@ -674,0 +674,0 @@ Buffer.from([OP_EQUALVERIFY, OP_CHECKSIG]) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a 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
207393
2218
0
0