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

ledgerco

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ledgerco - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "ledgerco",
"version": "1.1.1",
"version": "1.1.2",
"description": "Node API for Ledger Hardware Wallets (HW.1 / Nano / Nano S / Blue)",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -73,3 +73,3 @@ # ledger-node-js-api

- `changePath` is an optional BIP 32 path pointing to the path to the public key used to compute the change address
- `outputScript` is the hexadecimal serialized outputs of the transaction to sign
- `outputScript` is the hexadecimal serialized outputs of the transaction to sign
- `lockTime` is the optional lockTime of the transaction to sign, or default (0)

@@ -91,2 +91,11 @@ - `sigHashType` is the hash type of the transaction to sign, or default (all)

You can also retrieve the serialized output script as follows
```javascript
var tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc4af009f4d4dc57ae597ed0420b71010000008a47304402201f36a12c240dbf9e566bc04321050b1984cd6eaf6caee8f02bb0bfec08e3354b022012ee2aeadcbbfd1e92959f57c15c1c6debb757b798451b104665aa3010569b49014104090b15bde569386734abf2a2b99f9ca6a50656627e77de663ca7325702769986cf26cc9dd7fdea0af432c8e2becc867c932e1b9dd742f2a108997c2252e2bdebffffffff0281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88aca0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac00000000");
var outputScript = btc.serializeTransactionOutputs(tx1).toString('hex')
```
To obtain the signature of multisignature (P2SH) inputs, call signP2SHTransaction_async with the folowing parameters

@@ -93,0 +102,0 @@

@@ -679,2 +679,18 @@ /********************************************************************************

LedgerBtc.prototype.serializeTransactionOutputs = function (transaction) {
var self = this;
var outputBuffer = Buffer.alloc(0);
if (typeof transaction['outputs'] != "undefined") {
outputBuffer = Buffer.concat([outputBuffer, self.createVarint(transaction['outputs'].length)]);
transaction['outputs'].forEach(function (output) {
outputBuffer = Buffer.concat([outputBuffer,
output['amount'],
self.createVarint(output['script'].length),
output['script']]);
});
}
return outputBuffer;
}
LedgerBtc.prototype.serializeTransaction = function (transaction) {

@@ -692,11 +708,4 @@ var self = this;

var outputBuffer = Buffer.alloc(0);
var outputBuffer = self.serializeTransactionOutputs(transaction);
if (typeof transaction['outputs'] != "undefined") {
outputBuffer = Buffer.concat([outputBuffer, self.createVarint(transaction['outputs'].length)]);
transaction['outputs'].forEach(function (output) {
outputBuffer = Buffer.concat([outputBuffer,
output['amount'],
self.createVarint(output['script'].length),
output['script']]);
});
outputBuffer = Buffer.concat([outputBuffer, transaction['locktime']]);

@@ -703,0 +712,0 @@ }

@@ -30,3 +30,3 @@ /********************************************************************************

ledger.comm_node.create_async(0, true).then(function(comm) {
comm.create_async(0, true).then(function(comm) {

@@ -33,0 +33,0 @@ var btc = new ledger.btc(comm);

@@ -30,3 +30,3 @@ /********************************************************************************

ledger.comm_node.create_async(0, true).then(function(comm) {
comm.create_async(0, true).then(function(comm) {

@@ -33,0 +33,0 @@ var btc = new ledger.btc(comm);

@@ -30,3 +30,3 @@ /********************************************************************************

ledger.comm_node.create_async(0, true).then(function(comm) {
comm.create_async(0, true).then(function(comm) {

@@ -33,0 +33,0 @@ var btc = new ledger.btc(comm);

@@ -30,3 +30,3 @@ /********************************************************************************

ledger.comm_node.create_async(0, true).then(function(comm) {
comm.create_async(0, true).then(function(comm) {

@@ -33,0 +33,0 @@ var eth = new ledger.eth(comm);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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