@trezor/utxo-lib
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@trezor/utxo-lib", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"upstreamVersion": "1.7.0", | ||
@@ -5,0 +5,0 @@ "description": "Client-side Bitcoin JavaScript library", |
@@ -1201,7 +1201,19 @@ var Buffer = require('safe-buffer').Buffer | ||
if (this.supportsJoinSplits()) { | ||
var offset = 4 // header | ||
if (this.isOverwinterCompatible()) { | ||
offset += 4 // nVersionGroupId | ||
} | ||
offset += varuint.encodingLength(this.ins.length) // tx_in_count | ||
offset += this.ins.reduce(function (sum, input) { return sum + 40 + varSliceSize(input.script) }, 0) // tx_in | ||
offset += varuint.encodingLength(this.outs.length) // tx_out_count | ||
offset += this.outs.reduce(function (sum, output) { return sum + 8 + varSliceSize(output.script) }, 0) // tx_out | ||
offset += 4 // lock_time | ||
if (this.isOverwinterCompatible()) { | ||
offset += 4 // nExpiryHeight | ||
} | ||
var buffer = this.toBuffer() | ||
var joinsplitByteLength = this.getJoinSplitByteLength() | ||
var res = buffer.slice(buffer.length - joinsplitByteLength) | ||
return res | ||
return buffer.slice(offset) | ||
} | ||
if (this.isDashSpecialTransaction()) { | ||
@@ -1213,2 +1225,3 @@ var extraDataLength = varuint.encode(this.extraPayload.length) | ||
} | ||
module.exports = Transaction |
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
158222
4130