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

@ledgerhq/hw-app-btc

Package Overview
Dependencies
Maintainers
7
Versions
437
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/hw-app-btc - npm Package Compare versions

Comparing version 4.22.0-beta.ae6f5c51 to 4.23.0

9

lib/Btc.js

@@ -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

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