Socket
Socket
Sign inDemoInstall

bitcore

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcore - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

2

bower.json
{
"name": "bitcore",
"main": "./bitcore.min.js",
"version": "0.13.1",
"version": "0.13.2",
"homepage": "http://bitcore.io",

@@ -6,0 +6,0 @@ "authors": [

@@ -16,2 +16,3 @@ 'use strict';

var DEFAULT_SEQNUMBER = 0xFFFFFFFF;
var DEFAULT_LOCKTIME_SEQNUMBER = 0x00000000;

@@ -28,2 +29,3 @@ function Input(params) {

Input.DEFAULT_SEQNUMBER = DEFAULT_SEQNUMBER;
Input.DEFAULT_LOCKTIME_SEQNUMBER = DEFAULT_LOCKTIME_SEQNUMBER;

@@ -30,0 +32,0 @@ Object.defineProperty(Input.prototype, 'script', {

@@ -417,2 +417,9 @@ 'use strict';

}
for (var i = 0; i < this.inputs.length; i++) {
if (this.inputs[i].sequenceNumber === Input.DEFAULT_SEQNUMBER){
this.inputs[i].sequenceNumber = Input.DEFAULT_LOCKTIME_SEQNUMBER;
}
}
this.nLockTime = time;

@@ -437,2 +444,10 @@ return this;

}
for (var i = 0; i < this.inputs.length; i++) {
if (this.inputs[i].sequenceNumber === Input.DEFAULT_SEQNUMBER){
this.inputs[i].sequenceNumber = Input.DEFAULT_LOCKTIME_SEQNUMBER;
}
}
this.nLockTime = height;

@@ -439,0 +454,0 @@ return this;

{
"name": "bitcore",
"version": "0.13.1",
"version": "0.13.2",
"dependencies": {

@@ -5,0 +5,0 @@ "bn.js": {

{
"name": "bitcore",
"version": "0.13.1",
"version": "0.13.2",
"description": "A pure and powerful JavaScript Bitcoin library.",

@@ -5,0 +5,0 @@ "author": "BitPay <dev@bitpay.com>",

@@ -751,2 +751,36 @@ 'use strict';

});
it('has a non-max sequenceNumber for effective date locktime tx', function() {
var transaction = new Transaction()
.from(simpleUtxoWith1BTC)
.lockUntilDate(date);
transaction.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER);
});
it('has a non-max sequenceNumber for effective blockheight locktime tx', function() {
var transaction = new Transaction()
.from(simpleUtxoWith1BTC)
.lockUntilBlockHeight(blockHeight);
transaction.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER);
});
it('should serialize correctly for date locktime ', function() {
var transaction= new Transaction()
.from(simpleUtxoWith1BTC)
.lockUntilDate(date);
var serialized_tx = transaction.uncheckedSerialize();
var copy = new Transaction(serialized_tx);
serialized_tx.should.equal(copy.uncheckedSerialize());
copy.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER)
});
it('should serialize correctly for a block height locktime', function() {
var transaction= new Transaction()
.from(simpleUtxoWith1BTC)
.lockUntilBlockHeight(blockHeight);
var serialized_tx = transaction.uncheckedSerialize();
var copy = new Transaction(serialized_tx);
serialized_tx.should.equal(copy.uncheckedSerialize());
copy.inputs[0].sequenceNumber
.should.equal(Transaction.Input.DEFAULT_LOCKTIME_SEQNUMBER)
});
});

@@ -753,0 +787,0 @@

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