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.12.15 to 0.13.0

2

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

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

@@ -6,9 +6,16 @@ Contributing to Bitcore

## Community
If there are any questions, etc., please feel to ask in one of the community channels:
- https://labs.bitpay.com/c/bitcore (Support Forum)
- https://gitter.im/bitpay/bitcore (Development Chat)
## Quick Checklist
Make sure:
Ideally, please make sure to run:
* `gulp test` passes all the tests (We run tests against Node.js v0.10, v0.12, io.js, and modern browsers)
* `gulp coverage` covers 100% of the branches of your code (See `coverage/lcov-report/index.html` for details)
* `gulp lint` doesn't complain about your changes
* `gulp test` passes all the tests
* `gulp coverage` covers 100% of the branches of your code

@@ -89,4 +96,3 @@ ## Design Guidelines

When possible, bitcore objects should have standard methods on an instance prototype:
* `toObject` - A plain JavaScript object that can be JSON stringified
* `toJSON` - A JSON stringified object of the instance
* `toObject/toJSON` - A plain JavaScript object that `JSON.stringify` can call
* `toString` - A string representation of the instance

@@ -96,6 +102,19 @@ * `toBuffer` - A hex Buffer

These should have a matching static method that can be used for instantiation:
* `fromJSON` - Should handle both JSON from `toJSON` and plain JavaScript object from `toObject`
* `fromObject` - Should be able to instatiate with the output from `toObject/toJSON`
* `fromString` - Should be able to instantiate with output from `toString`
* `fromBuffer` - Should likewise be able to instantiate from output from `toBuffer`
`JSON.stringify` and `JSON.parse` are expected to be handled outside of the scope of Bitcore methods. For example, calling `JSON.stringify` on an Bitcore object will behave as expected and call `transaction.toJSON()` and then stringify it:
```javascript
var transactionString = JSON.stringify(transaction);
```
Likewise to instantiate a transaction from that string:
```javascript
var data = JSON.parse(transactionString);
var tx = new Transaction(data);
```
### Errors

@@ -102,0 +121,0 @@

@@ -71,3 +71,3 @@ ---

var signature = multiSigTx.getSignatures(privateKey)[0];
console.log(signature.toJSON());
console.log(JSON.stringify(signature));
console.log(signature.toObject());

@@ -148,3 +148,3 @@ console.log(signature.signature.toString()); // Outputs a DER signature

* `toObject`: Returns a plain JavaScript object with no methods and enough information to fully restore the state of this transaction. Using other serialization methods (except for `toJSON`) will cause a some information to be lost.
* `toJSON`: Returns a string with a JSON-encoded version of the output for `toObject`.
* `toJSON`: Will be called when using `JSON.stringify` to return JSON-encoded string using the output from `toObject`.
* `toString` or `uncheckedSerialize`: Returns an hexadecimal serialization of the transaction, in the [serialization format for bitcoin](https://bitcoin.org/en/developer-reference#raw-transaction-format).

@@ -151,0 +151,0 @@ * `serialize`: Does a series of checks before serializing the transaction

@@ -384,3 +384,3 @@ 'use strict';

/**
* Instantiate an address from JSON
* Instantiate an address from an Object
*

@@ -390,12 +390,9 @@ * @param {string} json - An JSON string or Object with keys: hash, network and type

*/
Address.fromJSON = function fromJSON(json) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
Address.fromObject = function fromObject(obj) {
$.checkState(
JSUtil.isHexa(json.hash),
'Unexpected hash property, "' + json.hash + '", expected to be hex.'
JSUtil.isHexa(obj.hash),
'Unexpected hash property, "' + obj.hash + '", expected to be hex.'
);
var hashBuffer = new Buffer(json.hash, 'hex');
return new Address(hashBuffer, json.network, json.type);
var hashBuffer = new Buffer(obj.hash, 'hex');
return new Address(hashBuffer, obj.network, obj.type);
};

@@ -475,3 +472,3 @@

*/
Address.prototype.toObject = function toObject() {
Address.prototype.toObject = Address.prototype.toJSON = function toObject() {
return {

@@ -485,9 +482,2 @@ hash: this.hashBuffer.toString('hex'),

/**
* @returns {string} A JSON representation of a plain object with the address information
*/
Address.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* Will return a the string representation of the address

@@ -494,0 +484,0 @@ *

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

var Hash = require('../crypto/hash');
var JSUtil = require('../util/js');
var Transaction = require('../transaction');

@@ -44,4 +43,2 @@ var $ = require('../util/preconditions');

info = Block._fromBufferReader(BufferReader(arg));
} else if (JSUtil.isValidJSON(arg)) {
info = Block._fromJSON(arg);
} else if (_.isObject(arg)) {

@@ -56,13 +53,2 @@ info = Block._fromObject(arg);

/**
* @param {String} - A JSON string
* @returns {Object} - An object representing block data
* @private
*/
Block._fromJSON = function _fromJSON(data) {
$.checkArgument(JSUtil.isValidJSON(data), 'data must be valid JSON');
data = JSON.parse(data);
return Block._fromObject(data);
};
/**
* @param {Object} - A plain JavaScript object

@@ -78,3 +64,3 @@ * @returns {Object} - An object representing block data

} else {
transactions.push(Transaction().fromJSON(tx));
transactions.push(Transaction().fromObject(tx));
}

@@ -90,11 +76,2 @@ });

/**
* @param {String} - A JSON string
* @returns {Block} - An instance of block
*/
Block.fromJSON = function fromJSON(json) {
var info = Block._fromJSON(json);
return new Block(info);
};
/**
* @param {Object} - A plain JavaScript object

@@ -169,3 +146,3 @@ * @returns {Block} - An instance of block

*/
Block.prototype.toObject = function toObject() {
Block.prototype.toObject = Block.prototype.toJSON = function toObject() {
var transactions = [];

@@ -182,9 +159,2 @@ this.transactions.forEach(function(tx) {

/**
* @returns {string} - A JSON string
*/
Block.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* @returns {Buffer} - A buffer of the block

@@ -191,0 +161,0 @@ */

@@ -24,3 +24,18 @@ 'use strict';

}
_.extend(this, BlockHeader._from(arg));
var info = BlockHeader._from(arg);
this.version = info.version;
this.prevHash = info.prevHash;
this.merkleRoot = info.merkleRoot;
this.time = info.time;
this.timestamp = info.time;
this.bits = info.bits;
this.nonce = info.nonce;
if (info.hash) {
$.checkState(
this.hash === info.hash,
'Argument object hash property does not match block hash.'
);
}
return this;

@@ -39,4 +54,2 @@ };

info = BlockHeader._fromBufferReader(BufferReader(arg));
} else if (JSUtil.isValidJSON(arg)) {
info = BlockHeader._fromJSON(arg);
} else if (_.isObject(arg)) {

@@ -51,13 +64,2 @@ info = BlockHeader._fromObject(arg);

/**
* @param {String} - A JSON string
* @returns {Object} - An object representing block header data
* @private
*/
BlockHeader._fromJSON = function _fromJSON(data) {
$.checkArgument(JSUtil.isValidJSON(data), 'data must be a valid JSON string');
data = JSON.parse(data);
return BlockHeader._fromObject(data);
};
/**
* @param {Object} - A JSON string

@@ -78,2 +80,3 @@ * @returns {Object} - An object representing block header data

var info = {
hash: data.hash,
version: data.version,

@@ -91,11 +94,2 @@ prevHash: prevHash,

/**
* @param {String} - A JSON string or object
* @returns {BlockHeader} - An instance of block header
*/
BlockHeader.fromJSON = function fromJSON(json) {
var info = BlockHeader._fromJSON(json);
return new BlockHeader(info);
};
/**
* @param {Object} - A plain JavaScript object

@@ -169,4 +163,5 @@ * @returns {BlockHeader} - An instance of block header

*/
BlockHeader.prototype.toObject = function toObject() {
BlockHeader.prototype.toObject = BlockHeader.prototype.toJSON = function toObject() {
return {
hash: this.hash,
version: this.version,

@@ -182,9 +177,2 @@ prevHash: BufferUtil.reverse(this.prevHash).toString('hex'),

/**
* @returns {string} - A JSON string
*/
BlockHeader.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* @returns {Buffer} - A Buffer of the BlockHeader

@@ -191,0 +179,0 @@ */

@@ -31,4 +31,2 @@ 'use strict';

info = MerkleBlock._fromBufferReader(BufferReader(arg));
} else if (JSUtil.isValidJSON(arg)) {
info = MerkleBlock._fromJSON(arg);
} else if (_.isObject(arg)) {

@@ -39,3 +37,3 @@ var header;

} else {
header = BlockHeader.fromJSON(JSON.stringify(arg.header));
header = BlockHeader.fromObject(arg.header);
}

@@ -90,10 +88,2 @@ info = {

/**
* @param {String|Object} - A JSON String or Object
* @returns {MerkleBlock} - A MerkleBlock object
*/
MerkleBlock.fromJSON = function fromJSON(buf) {
return new MerkleBlock(MerkleBlock._fromJSON(buf));
};
/**
* @returns {Buffer} - A buffer of the block

@@ -129,3 +119,3 @@ */

*/
MerkleBlock.prototype.toObject = function toObject() {
MerkleBlock.prototype.toObject = MerkleBlock.prototype.toJSON = function toObject() {
return {

@@ -140,9 +130,2 @@ header: this.header.toObject(),

/**
* @returns {String} - A JSON string of a MerkleBlock
*/
MerkleBlock.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* Verify that the MerkleBlock is valid

@@ -287,19 +270,9 @@ * @returns {Boolean} - True/False whether this MerkleBlock is Valid

/**
* @param {String|Object} - A JSON or String Object
* @returns {Object} - An Object representing merkleblock data
* @private
* @param {Object} - A plain JavaScript object
* @returns {Block} - An instance of block
*/
MerkleBlock._fromJSON = function _fromJSON(data) {
if (JSUtil.isValidJSON(data)) {
data = JSON.parse(data);
}
var info = {
header: BlockHeader.fromObject(data.header),
numTransactions: data.numTransactions,
hashes: data.hashes,
flags: data.flags,
};
return info;
MerkleBlock.fromObject = function fromObject(obj) {
return new MerkleBlock(obj);
};
module.exports = MerkleBlock;

@@ -168,2 +168,5 @@ 'use strict';

}, {
name: 'InvalidIndexCantDeriveHardened',
message: 'Invalid argument: creating a hardened path requires an HDPrivateKey'
}, {
name: 'MustSupplyArgument',

@@ -170,0 +173,0 @@ message: 'Must supply an argument to create a HDPublicKey'

@@ -281,7 +281,2 @@ 'use strict';

HDPrivateKey.fromJSON = function(arg) {
$.checkArgument(JSUtil.isValidJSON(arg), 'No valid JSON string was provided');
return new HDPrivateKey(arg);
};
HDPrivateKey.fromString = function(arg) {

@@ -514,3 +509,3 @@ $.checkArgument(_.isString(arg), 'No valid string was provided');

*/
HDPrivateKey.prototype.toObject = function toObject() {
HDPrivateKey.prototype.toObject = HDPrivateKey.prototype.toJSON = function toObject() {
return {

@@ -530,11 +525,2 @@ network: Network.get(BufferUtil.integerFromBuffer(this._buffers.version), 'xprivkey').name,

/**
* Returns a JSON representation of the HDPrivateKey
*
* @return {string}
*/
HDPrivateKey.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* Build a HDPrivateKey from a buffer

@@ -541,0 +527,0 @@ *

@@ -46,4 +46,2 @@ 'use strict';

return this._buildFromSerialized(arg);
} else if (JSUtil.isValidJSON(arg)) {
return this._buildFromJSON(arg);
} else if (BufferUtil.isBuffer(arg) && !HDPublicKey.getSerializedError(arg.toString())) {

@@ -114,5 +112,5 @@ return this._buildFromSerialized(arg.toString());

*/
HDPublicKey.prototype.derive = function (arg) {
HDPublicKey.prototype.derive = function(arg, hardened) {
if (_.isNumber(arg)) {
return this._deriveWithNumber(arg);
return this._deriveWithNumber(arg, hardened);
} else if (_.isString(arg)) {

@@ -125,4 +123,4 @@ return this._deriveFromString(arg);

HDPublicKey.prototype._deriveWithNumber = function (index) {
if (index >= HDPublicKey.Hardened) {
HDPublicKey.prototype._deriveWithNumber = function(index, hardened) {
if (index >= HDPublicKey.Hardened || hardened) {
throw new hdErrors.InvalidIndexCantDeriveHardened();

@@ -158,3 +156,3 @@ }

HDPublicKey.prototype._deriveFromString = function (path) {
HDPublicKey.prototype._deriveFromString = function(path) {
/* jshint maxcomplexity: 8 */

@@ -184,3 +182,3 @@ if (_.contains(path, "'")) {

*/
HDPublicKey.isValidSerialized = function (data, network) {
HDPublicKey.isValidSerialized = function(data, network) {
return _.isNull(HDPublicKey.getSerializedError(data, network));

@@ -198,3 +196,3 @@ };

*/
HDPublicKey.getSerializedError = function (data, network) {
HDPublicKey.getSerializedError = function(data, network) {
/* jshint maxcomplexity: 10 */

@@ -214,3 +212,3 @@ /* jshint maxstatements: 20 */

if (data.length !== HDPublicKey.DataSize) {
return new errors.InvalidLength(data);
return new hdErrors.InvalidLength(data);
}

@@ -230,3 +228,3 @@ if (!_.isUndefined(network)) {

HDPublicKey._validateNetwork = function (data, networkArg) {
HDPublicKey._validateNetwork = function(data, networkArg) {
var network = Network.get(networkArg);

@@ -243,6 +241,2 @@ if (!network) {

HDPublicKey.prototype._buildFromJSON = function (arg) {
return this._buildFromObject(JSON.parse(arg));
};
HDPublicKey.prototype._buildFromPrivate = function (arg) {

@@ -259,3 +253,3 @@ var args = _.clone(arg._buffers);

HDPublicKey.prototype._buildFromObject = function (arg) {
HDPublicKey.prototype._buildFromObject = function(arg) {
/* jshint maxcomplexity: 10 */

@@ -276,3 +270,3 @@ // TODO: Type validation

HDPublicKey.prototype._buildFromSerialized = function (arg) {
HDPublicKey.prototype._buildFromSerialized = function(arg) {
var decoded = Base58Check.decode(arg);

@@ -309,3 +303,3 @@ var buffers = {

*/
HDPublicKey.prototype._buildFromBuffers = function (arg) {
HDPublicKey.prototype._buildFromBuffers = function(arg) {
/* jshint maxcomplexity: 8 */

@@ -354,3 +348,3 @@ /* jshint maxstatements: 20 */

HDPublicKey._validateBufferArguments = function (arg) {
HDPublicKey._validateBufferArguments = function(arg) {
var checkBuffer = function(name, size) {

@@ -375,4 +369,4 @@ var buff = arg[name];

HDPublicKey.fromJSON = function(arg) {
$.checkArgument(JSUtil.isValidJSON(arg), 'No valid JSON string was provided');
HDPublicKey.fromString = function(arg) {
$.checkArgument(_.isString(arg), 'No valid string was provided');
return new HDPublicKey(arg);

@@ -386,7 +380,2 @@ };

HDPublicKey.fromString = function(arg) {
$.checkArgument(_.isString(arg), 'No valid string was provided');
return new HDPublicKey(arg);
};
/**

@@ -396,3 +385,3 @@ * Returns the base58 checked representation of the public key

*/
HDPublicKey.prototype.toString = function () {
HDPublicKey.prototype.toString = function() {
return this.xpubkey;

@@ -426,3 +415,3 @@ };

*/
HDPublicKey.prototype.toObject = function toObject() {
HDPublicKey.prototype.toObject = HDPublicKey.prototype.toJSON = function toObject() {
return {

@@ -442,10 +431,2 @@ network: Network.get(BufferUtil.integerFromBuffer(this._buffers.version)).name,

/**
* Serializes this object into a JSON string
* @return {string}
*/
HDPublicKey.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* Create a HDPublicKey from a buffer argument

@@ -452,0 +433,0 @@ *

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

var Random = require('./crypto/random');
var $ = require('./util/preconditions');

@@ -37,3 +38,3 @@ /**

*/
var PrivateKey = function PrivateKey(data, network) {
function PrivateKey(data, network) {
/* jshint maxstatements: 20 */

@@ -100,4 +101,4 @@ /* jshint maxcomplexity: 8 */

info = PrivateKey._transformBuffer(data, network);
} else if (PrivateKey._isJSON(data)){
info = PrivateKey._transformJSON(data);
} else if (data.bn && data.network){
info = PrivateKey._transformObject(data);
} else if (!network && Networks.get(data)) {

@@ -136,13 +137,2 @@ info.bn = PrivateKey._getRandomBN();

/**
* Internal function to detect if a param is a JSON string or plain object
*
* @param {*} param - value to test
* @returns {boolean}
* @private
*/
PrivateKey._isJSON = function(json) {
return JSUtil.isValidJSON(json) || (json.bn && json.network);
};
/**
* Internal function to transform a WIF Buffer into a private key

@@ -214,16 +204,2 @@ *

/**
* Instantiate a PrivateKey from a JSON string
*
* @param {string} json - The JSON encoded private key string
* @returns {PrivateKey} A new valid instance of PrivateKey
*/
PrivateKey.fromJSON = function(json) {
if (!PrivateKey._isJSON(json)) {
throw new TypeError('Must be a valid JSON string or plain object');
}
return new PrivateKey(json);
};
/**
* Instantiate a PrivateKey from a Buffer with the DER or WIF representation

@@ -247,6 +223,3 @@ *

*/
PrivateKey._transformJSON = function(json) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
PrivateKey._transformObject = function(json) {
var bn = new BN(json.bn, 'hex');

@@ -268,2 +241,3 @@ var network = Networks.get(json.network);

PrivateKey.fromString = PrivateKey.fromWIF = function(str) {
$.checkArgument(_.isString(str), 'First argument is expected to be a string.');
return new PrivateKey(str);

@@ -273,2 +247,12 @@ };

/**
* Instantiate a PrivateKey from a plain JavaScript object
*
* @param {Object} obj - The output from privateKey.toObject()
*/
PrivateKey.fromObject = function(obj) {
$.checkArgument(_.isObject(obj), 'First argument is expected to be an object.');
return new PrivateKey(obj);
};
/**
* Instantiate a PrivateKey from random bytes

@@ -393,3 +377,3 @@ *

*/
PrivateKey.prototype.toObject = function toObject() {
PrivateKey.prototype.toObject = PrivateKey.prototype.toJSON = function toObject() {
return {

@@ -402,6 +386,2 @@ bn: this.bn.toString('hex'),

PrivateKey.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**

@@ -408,0 +388,0 @@ * Will return a string formatted for the console

@@ -36,3 +36,3 @@ 'use strict';

*/
var PublicKey = function PublicKey(data, extra) {
function PublicKey(data, extra) {

@@ -79,4 +79,4 @@ if (!(this instanceof PublicKey)) {

info.point = data;
} else if (PublicKey._isJSON(data)) {
info = PublicKey._transformJSON(data);
} else if (data.x && data.y) {
info = PublicKey._transformObject(data);
} else if (typeof(data) === 'string') {

@@ -121,13 +121,2 @@ info = PublicKey._transformDER(new Buffer(data, 'hex'));

/**
* Internal function to detect if a param is a JSON string or plain object
*
* @param {*} json - value to test
* @returns {boolean}
* @private
*/
PublicKey._isJSON = function(json) {
return !!(JSUtil.isValidJSON(json) || (json.x && json.y));
};
/**
* Internal function to transform a private key into a public key point

@@ -211,13 +200,2 @@ *

/**
* Instantiate a PublicKey from JSON
*
* @param {string} json - A JSON string
* @returns {PublicKey} A new valid instance of PublicKey
*/
PublicKey.fromJSON = function(json) {
$.checkArgument(PublicKey._isJSON(json), 'Must be a valid JSON string or plain object');
return new PublicKey(json);
};
/**
* Internal function to transform a JSON into a public key point

@@ -229,6 +207,3 @@ *

*/
PublicKey._transformJSON = function(json) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
PublicKey._transformObject = function(json) {
var x = new BN(json.x, 'hex');

@@ -344,3 +319,3 @@ var y = new BN(json.y, 'hex');

*/
PublicKey.prototype.toObject = function toObject() {
PublicKey.prototype.toObject = PublicKey.prototype.toJSON = function toObject() {
return {

@@ -354,9 +329,2 @@ x: this.point.getX().toString('hex', 2),

/**
* @returns {string} A JSON string of the PublicKey
*/
PublicKey.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**
* Will output the PublicKey to a DER Buffer

@@ -363,0 +331,0 @@ *

@@ -43,2 +43,8 @@ 'use strict';

Input.fromObject = function(obj) {
$.checkArgument(_.isObject(obj));
var input = new Input();
return input._fromObject(obj);
};
Input.prototype._fromObject = function(params) {

@@ -64,3 +70,3 @@ var prevTxId;

Input.prototype.toObject = function toObject() {
Input.prototype.toObject = Input.prototype.toJSON = function toObject() {
var obj = {

@@ -82,17 +88,2 @@ prevTxId: this.prevTxId.toString('hex'),

Input.fromObject = function(obj) {
$.checkArgument(_.isObject(obj));
var input = new Input();
return input._fromObject(obj);
};
Input.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
Input.fromJSON = function(json) {
$.checkArgument(JSUtil.isValidJSON(json), 'Invalid JSON provided to Input.fromJSON');
return Input.fromObject(JSON.parse(json));
};
Input.fromBufferReader = function(br) {

@@ -159,3 +150,3 @@ var input = new Input();

'Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported)' +
' for input: ' + this.toJSON()
' for input: ' + JSON.stringify(this)
);

@@ -162,0 +153,0 @@ };

@@ -32,4 +32,2 @@ 'use strict';

}
} else if (JSUtil.isValidJSON(args)) {
return Output.fromJSON(args);
} else {

@@ -95,3 +93,3 @@ throw new TypeError('Unrecognized argument for Output');

Output.prototype.toObject = function toObject() {
Output.prototype.toObject = Output.prototype.toJSON = function toObject() {
var obj = {

@@ -104,15 +102,6 @@ satoshis: this.satoshis

Output.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
Output.fromObject = function(data) {
return new Output(data);
};
Output.fromJSON = function(data) {
$.checkArgument(JSUtil.isValidJSON(data), 'data must be valid JSON');
var json = JSON.parse(data);
return new Output({
satoshis: Number(json.satoshis),
script: new Script(json.script)
});
};
Output.prototype.setScriptFromBuffer = function(buffer) {

@@ -119,0 +108,0 @@ this._scriptBuffer = buffer;

@@ -27,7 +27,2 @@ 'use strict';

}
if (_.isString(arg)) {
if (JSUtil.isValidJSON(arg)) {
return TransactionSignature.fromJSON(arg);
}
}
if (_.isObject(arg)) {

@@ -74,3 +69,3 @@ return this._fromObject(arg);

*/
TransactionSignature.prototype.toObject = function() {
TransactionSignature.prototype.toObject = TransactionSignature.prototype.toJSON = function toObject() {
return {

@@ -87,19 +82,2 @@ publicKey: this.publicKey.toString(),

/**
* Serializes a transaction to a JSON string
* @return {string}
*/
TransactionSignature.prototype.toJSON = function() {
return JSON.stringify(this.toObject());
};
/**
* Builds a TransactionSignature from a JSON string
* @param {string} json
* @return {TransactionSignature}
*/
TransactionSignature.fromJSON = function(json) {
return new TransactionSignature(JSON.parse(json));
};
/**
* Builds a TransactionSignature from an object

@@ -106,0 +84,0 @@ * @param {Object} object

@@ -47,4 +47,2 @@ 'use strict';

this.fromString(serialized);
} else if (JSUtil.isValidJSON(serialized)) {
this.fromJSON(serialized);
} else if (BufferUtil.isBuffer(serialized)) {

@@ -319,10 +317,3 @@ this.fromBuffer(serialized);

Transaction.prototype.fromJSON = function(json) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
return this.fromObject(json);
};
Transaction.prototype.toObject = function toObject() {
Transaction.prototype.toObject = Transaction.prototype.toJSON = function toObject() {
var inputs = [];

@@ -337,2 +328,3 @@ this.inputs.forEach(function(input) {

var obj = {
hash: this.hash,
version: this.version,

@@ -355,6 +347,11 @@ inputs: inputs,

Transaction.prototype.fromObject = function(transaction) {
Transaction.prototype.fromObject = function fromObject(arg) {
/* jshint maxstatements: 20 */
$.checkArgument(_.isObject(arg) || arg instanceof Transaction);
var self = this;
if (transaction instanceof Transaction) {
var transaction;
if (arg instanceof Transaction) {
transaction = transaction.toObject();
} else {
transaction = arg;
}

@@ -393,7 +390,7 @@ _.each(transaction.inputs, function(input) {

this.version = transaction.version;
this._checkConsistency();
this._checkConsistency(arg);
return this;
};
Transaction.prototype._checkConsistency = function() {
Transaction.prototype._checkConsistency = function(arg) {
if (!_.isUndefined(this._changeIndex)) {

@@ -405,3 +402,5 @@ $.checkState(this._changeScript);

}
// TODO: add other checks
if (arg && arg.hash) {
$.checkState(arg.hash === this.hash, 'Hash in object does not match transaction hash');
}
};

@@ -464,6 +463,2 @@

Transaction.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
Transaction.prototype.fromString = function(string) {

@@ -470,0 +465,0 @@ this.fromBuffer(new buffer.Buffer(string, 'hex'));

@@ -78,10 +78,7 @@ 'use strict';

/**
* Deserialize an UnspentOutput from an object or JSON string
* Deserialize an UnspentOutput from an object
* @param {object|string} data
* @return UnspentOutput
*/
UnspentOutput.fromJSON = UnspentOutput.fromObject = function(data) {
if (JSUtil.isValidJSON(data)) {
data = JSON.parse(data);
}
UnspentOutput.fromObject = function(data) {
return new UnspentOutput(data);

@@ -91,14 +88,6 @@ };

/**
* Retrieve a string representation of this object
* @return {string}
*/
UnspentOutput.prototype.toJSON = function() {
return JSON.stringify(this.toObject());
};
/**
* Returns a plain object (no prototype or methods) with the associated infor for this output
* @return {object}
*/
UnspentOutput.prototype.toObject = function() {
UnspentOutput.prototype.toObject = UnspentOutput.prototype.toJSON = function toObject() {
return {

@@ -105,0 +94,0 @@ address: this.address ? this.address.toString() : undefined,

@@ -6,3 +6,3 @@ 'use strict';

var errors = require('./errors');
var JSUtil = require('./util/js');
var $ = require('./util/preconditions');

@@ -78,7 +78,5 @@ var UNITS = {

*/
Unit.fromJSON = function fromJSON(json){
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
return new Unit(json.amount, json.code);
Unit.fromObject = function fromObject(data){
$.checkArgument(_.isObject(data), 'Argument is expected to be an object');
return new Unit(data.amount, data.code);
};

@@ -226,3 +224,3 @@

*/
Unit.prototype.toObject = function toObject() {
Unit.prototype.toObject = Unit.prototype.toJSON = function toObject() {
return {

@@ -234,6 +232,2 @@ amount: this.BTC,

Unit.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**

@@ -240,0 +234,0 @@ * Returns a string formatted for the console

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

var Unit = require('./unit');
var JSUtil = require('./util/js');

@@ -73,11 +72,8 @@ /**

/**
* Instantiate a URI from JSON
* Instantiate a URI from an Object
*
* @param {String|Object} json - JSON string or object of the URI
* @param {Object} data - object of the URI
* @returns {URI} A new instance of a URI
*/
URI.fromJSON = function fromJSON(json) {
if (JSUtil.isValidJSON(json)) {
json = JSON.parse(json);
}
URI.fromObject = function fromObject(json) {
return new URI(json);

@@ -180,3 +176,3 @@ };

URI.prototype.toObject = function toObject() {
URI.prototype.toObject = URI.prototype.toJSON = function toObject() {
var json = {};

@@ -193,6 +189,2 @@ for (var i = 0; i < URI.Members.length; i++) {

URI.prototype.toJSON = function toJSON() {
return JSON.stringify(this.toObject());
};
/**

@@ -199,0 +191,0 @@ * Will return a the string representation of the URI

{
"name": "bitcore",
"version": "0.12.15",
"version": "0.13.0",
"dependencies": {

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

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

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

@@ -448,14 +448,14 @@ 'use strict';

describe('#json', function() {
describe('#object', function() {
it('roundtrip to-from-to', function() {
var json = new Address(str).toJSON();
var address = Address.fromJSON(json);
var obj = new Address(str).toObject();
var address = Address.fromObject(obj);
address.toString().should.equal(str);
});
it('checks that the string parameter is valid JSON', function() {
it('will fail with invalid state', function() {
expect(function() {
return Address.fromJSON('¹');
}).to.throw();
return Address.fromObject('¹');
}).to.throw(bitcore.errors.InvalidState);
});

@@ -462,0 +462,0 @@ });

@@ -66,8 +66,22 @@ 'use strict';

it('will throw an error if the argument object hash property doesn\'t match', function() {
(function() {
var bh = new BlockHeader({
hash: '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
version: version,
prevHash: prevblockidbuf,
merkleRoot: merklerootbuf,
time: time,
bits: bits,
nonce: nonce
});
}).should.throw('Argument object hash property does not match block hash.');
});
});
describe('#fromJSON', function() {
describe('#fromObject', function() {
it('should set all the variables', function() {
var bh = BlockHeader.fromJSON(JSON.stringify({
var bh = BlockHeader.fromObject({
version: version,

@@ -79,3 +93,3 @@ prevHash: prevblockidbuf.toString('hex'),

nonce: nonce
}));
});
should.exist(bh.version);

@@ -94,3 +108,3 @@ should.exist(bh.prevHash);

it('should set all the variables', function() {
var json = JSON.parse(bh.toJSON());
var json = bh.toJSON();
should.exist(json.version);

@@ -119,3 +133,3 @@ should.exist(json.prevHash);

var json = new BlockHeader(jsonString);
var json = new BlockHeader(JSON.parse(jsonString));
should.exist(json.version);

@@ -122,0 +136,0 @@ should.exist(json.prevHash);

@@ -32,4 +32,4 @@ 'use strict';

it('should make a new merkleblock from JSON', function() {
var b = MerkleBlock(blockJSON);
b.toJSON().should.equal(blockJSON);
var b = MerkleBlock(JSON.parse(blockJSON));
JSON.stringify(b).should.equal(blockJSON);
});

@@ -44,6 +44,6 @@

describe('#fromJSON', function() {
describe('#fromObject', function() {
it('should set these known values', function() {
var block = MerkleBlock.fromJSON(blockJSON);
var block = MerkleBlock.fromObject(JSON.parse(blockJSON));
should.exist(block.header);

@@ -56,3 +56,3 @@ should.exist(block.numTransactions);

it('should set these known values', function() {
var block = MerkleBlock(blockJSON);
var block = MerkleBlock(JSON.parse(blockJSON));
should.exist(block.header);

@@ -66,3 +66,3 @@ should.exist(block.numTransactions);

var block = MerkleBlock(blockbuf);
MerkleBlock.fromJSON(block.toObject()).should.exist();
MerkleBlock.fromObject(block.toObject()).should.exist();
});

@@ -75,4 +75,4 @@

it('should recover these known values', function() {
var block = MerkleBlock.fromJSON(blockJSON);
var b = JSON.parse(block.toJSON());
var block = new MerkleBlock(JSON.parse(blockJSON));
var b = JSON.parse(JSON.stringify(block));
should.exist(block.header);

@@ -136,4 +136,4 @@ should.exist(block.numTransactions);

it('should validate good merkleblocks', function() {
data.JSON.forEach(function(json) {
var b = MerkleBlock(JSON.stringify(json));
data.JSON.forEach(function(data) {
var b = MerkleBlock(data);
b.validMerkleTree().should.equal(true);

@@ -144,3 +144,3 @@ });

it('should not validate merkleblocks with too many hashes', function() {
var b = MerkleBlock(JSON.stringify(data.JSON[0]));
var b = MerkleBlock(data.JSON[0]);
// Add too many hashes

@@ -155,3 +155,3 @@ var i = 0;

it('should not validate merkleblocks with too few bit flags', function() {
var b = MerkleBlock(blockJSON);
var b = MerkleBlock(JSON.parse(blockJSON));
b.flags.pop();

@@ -166,5 +166,5 @@ b.validMerkleTree().should.equal(false);

it('should find transactions via hash string', function() {
var json = data.JSON[0];
var txId = new Buffer(json.hashes[1],'hex').toString('hex');
var b = MerkleBlock(JSON.stringify(json));
var jsonData = data.JSON[0];
var txId = new Buffer(jsonData.hashes[1],'hex').toString('hex');
var b = MerkleBlock(jsonData);
b.hasTransaction(txId).should.equal(true);

@@ -175,6 +175,6 @@ b.hasTransaction(txId + 'abcd').should.equal(false);

it('should find transactions via Transaction object', function() {
var json = data.JSON[0];
var jsonData = data.JSON[0];
var txBuf = new Buffer(data.TXHEX[0][0],'hex');
var tx = new Transaction().fromBuffer(txBuf);
var b = MerkleBlock(JSON.stringify(json));
var b = MerkleBlock(jsonData);
b.hasTransaction(tx).should.equal(true);

@@ -187,3 +187,3 @@ });

var tx = new Transaction().fromBuffer(new Buffer(serialized, 'hex'));
var b = MerkleBlock(JSON.stringify(data.JSON[0]));
var b = MerkleBlock(data.JSON[0]);
b.hasTransaction(tx).should.equal(false);

@@ -193,3 +193,3 @@ });

it('should not match with merkle nodes', function() {
var b = MerkleBlock(JSON.stringify(data.JSON[0]));
var b = MerkleBlock(data.JSON[0]);

@@ -196,0 +196,0 @@ var hashData = [

{
"header": {
"version": 2,
"prevHash": "4baaa9507c3b27908397ea7bc177a998e9f4fe38b9d5130be7b5353c00000000",
"merkleRoot": "97fc4c97868288e984ff9f246f2c38510f5c37a3d5b41aae7004b01e2dd5e658",
"time": 1371410638,
"bits": 473956288,
"nonce": 3594009557
"header":{
"hash":"000000000b99b16390660d79fcc138d2ad0c89a0d044c4201a02bdf1f61ffa11",
"version":2,
"prevHash":"000000003c35b5e70b13d5b938fef4e998a977c17bea978390273b7c50a9aa4b",
"merkleRoot":"58e6d52d1eb00470ae1ab4d5a3375c0f51382c6f249fff84e9888286974cfc97",
"time":1371410638,
"bits":473956288,
"nonce":3594009557
},
"transactions": [{
"version": 1,
"txinsvi": "01",
"txins": [{
"txidbuf": "0000000000000000000000000000000000000000000000000000000000000000",
"txoutnum": 4294967295,
"scriptvi": "0b",
"script": "3 0xe45201 6 0x2f503253482f",
"seqnum": 4294967295
}],
"txoutsvi": "03",
"txouts": [{
"valuebn": "5001000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xee9a7590f91e04832054f0645bbf243c9fac8e22 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "0",
"scriptvi": "43",
"script": "65 0x04ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664b OP_CHECKSIG"
}, {
"valuebn": "0",
"scriptvi": "25",
"script": "36 0x58e99e66e2b90bd8b2a0e2bfcce91e1f09ee7621d95e9a728ca2372d45df3ded00000000"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "01",
"txins": [{
"txidbuf": "d6e149959b6248eee5a17c23a518e5e5e399e98f7d42a2833810f3baf1525acf",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x30450221009273f5d777408439a40c33ee96630a877d4f29af3f60f5c230e5254ee6f08f4302207975a64f43dc632f34479aa403b9956c484ad0c90a3c50d2e1b5037e1abb586f01 33 0x03449772f2c60c2f4e1f1f74cb6c521a48f12d51ea681b64c8fc074fd8108123f6",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "864185035",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x0487c481a671649e1db182ede98d093a335d6713 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "2635964965",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x590ea00fa3a18281d3020e7ba0c3a1d6aea663c0 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "2a24c5dfbdb9dc5e1eb5d38dc9e8c5f8643aee53fcb0d2e44a04924b55c65c6b",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402207aa649b3ba03eeac6c6fb88e74800ca418297f62da75c58284a0c5f6cdfa96b70220324eb99fecdb0eb8bd4eec05bec0f440f4c2132c1afbaa7aaf10f31d17d8ef0201 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "1186e9edc6526a3ab463d1f0123ae38e5593364d2f80de9d8031a48274b718ab",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x304602210084cd799ec732e95a08c9e1ef98e99e43767b6bc4eb6af6cf65ecdf2be6bc96ab022100da1d1c450d675d383b92095c2b9949d693b82b54ac81ba219fad98f8500589ad01 33 0x02b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "2940000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x68340b9145127d2529dd7ebc3a4567d5579997ac OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x3770e8980281b63351861a17881cecbfaaa5c74b OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "0f5000a056f91d03c489d7d1558f09c7bc330af3ca8e43706d5cb08fd6c60aad",
"txoutnum": 1,
"scriptvi": "6a",
"script": "71 0x304402201068b39118afc383bb1b7de9aa8fe02cddbd8be5d29cab99d5fff23a0cef5667022020d6cfb4712fc61c13c7ca26e32028cce3d68afea7957ab4bfc5ee03bf9615d401 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "08d4577f5634796567fb0cd50abd1886df3555f71847a1977ba5bc75195405a7",
"txoutnum": 1,
"scriptvi": "6a",
"script": "71 0x304402206728ade49cb5ec883e07d8acc6450e17b0e27b7f64c81143b4632eaded365e2e02202be3b4b723200de8c070b914d0050ead71d1418196a037f55f1a6dff4e45aee301 33 0x039e65fd2479d4edb0f3db6eecacdadcdc5ddd6d8ef518cf861466dfe1c21cc891",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3650000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x9a704e2c99955f50694de60f93cdd449473678aa OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xdac91bdfe809346e9df5e753adaaef9336344bfc OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "fc85133b1e259f6deec25953bccfa75df61fd23a471553c80c043c2ea716a675",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402203da7beabc48687b746a7149679bd8982032816771b5634d1d651af59ce9fa86d0220198ea81d1a547e3493988dd94ffefff3b8fe030340886aa4ffc1b205532f0f9d01 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "04297137bc2c9f486713e4e4fab43134da153e0f8ee8e852554090d02f2605a5",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402206b729bfd4c132b673c9f1a66c645ed374338963f1e6a3b56229f72b4358f8077022023bea16c89d267313da6df152a976b36a36e1bbea738d698f0ce72ef315962df01 33 0x03ba341f7dd2401a2cd51682d418fd8a12b4d0b09acb8971f0671c2211366a8531",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3700000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x4769612ee7c6e977df40a8cdfd837c85cc7a48f7 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xdac91bdfe809346e9df5e753adaaef9336344bfc OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "1cb5734a303cefa1ace87b8cc386a573f1eed8370e14c0a830fd04249b7756a6",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x3044022059bbf19179b81fad8a15ba3dff94271d55d443da636dbaeba6ea0bb5901b8779022045417e208f41f8b37473caaf367a61ed21b31f1205605020de241e89b7ec0ca601 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "babb329d773e9101e127f7c1e95533fb384c79260789dc06fdf73296c9ef352d",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x30450220012c555e725f4eb0d767efdc07aec149c63522b06253e9d1ce6245b90c71951e022100edcce82ddd7e52a3b85bf9a4acc73a3b6df5c9b40fda36e8de09890860599ddf01 33 0x02b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3210000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x3770e8980281b63351861a17881cecbfaaa5c74b OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "2740000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xe1144ff8ca0ac143b83ada244040bfe9c8d1d638 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "9a494e6072106a040e279b4566f25fc35441a84f6228812142eb5515688832f5",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x3045022100b35809ba9abcea1ec143c7cd0a27845b3f5139a6bb52757c9e24d86319f8d16c022079f8381c5287af7e6488d6a589e73caf23c487bf355ac22b7c01cf58830110bf01 33 0x023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a",
"seqnum": 4294967295
}, {
"txidbuf": "ec7d5d39d4db41d7d9ba0653b6c9758f20cf89a4c2e60bb27645a966889fdfd6",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x3044022008848d34f2ca77f8bf79eb83b89ee8a24292d0c3936350a37f1522664e2e216002204ad05817044e18d0c26e89139b9fb98a21ceda2249a7cfa58f3ec420af9477c701 33 0x03af07092ed729d97d5e2ae9f8a295f1b2da268e7414ce3df9b374051d7647092b",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3700000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xb1b9b659297859bd310ba8ba6f95573c635b191a OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x636c549bf6035b27cf3823f5482911ebb2bce5d0 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "8c88435add45be7b1521756b8ee3bfc51558040c3922e11facff1d6cdc7fc841",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402201bf92a99fd85e09de43b9039801f387ad6ea996d71c02185019a18cd2691d68502204500ea82873501c25c5b1476f9cd75d70b2a34a4162470e3390f89ff6a58301101 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "bb1d138f7c9e8df06a87cd068fc303cb960c7b5670515a7759653fd3b71c6e7e",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x30450220277eb0e03b897cd20ac3bfa15af82ae2c1e75472ffce0482ce1594cd4536e83802210088164c46f3fc82ed3530b7552a1da6ecd2f690647485bb0fe1a706ae0f09d5b601 33 0x02718b695944b9e6f12db75e7dc7b77f023c8b9706405b62dac6e6c94dc1c7214e",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "1950000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xe22f515855329b13602778a1d681295e485390b8 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1882e6174c19c4a2ac6c7d807170e76cbc75160f OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "948a4df70264c816b3c65bb1315bc20df2ee12baaba580818ed232a59dbe3282",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x3045022100e96feaa777c517aa67498d51c52b7c177c18f7eb96c7ec109bcf4b7d1993245e02203d4f6dc06f4ac4ff947d81a45c9e53b12ee89e4223aa670eee2ca435157f605401 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"seqnum": 4294967295
}, {
"txidbuf": "8dddf5d111131865b48f2b141f635ac6c41f14adc748ea0cd6087fd69b60d573",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x30450220588e7eb9477043dc7b7d9f554b5db44823d9b7108a73d224af8cb24b190ebc94022100deb2fd7cfbff5f7679a38a16c18075dc9eb705850054415eba27a0f769f94e8d01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "2740000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x7ff6d70c9f71e29f3b3b77e1acb0bae8d1af12d2 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3210000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1c5b740011cff8324ed10c3e8f63f6261f36613a OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "7624f057be29a1d4d39112006d1a1acaca84b78f5e2323c3ae587365f91b6014",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402201bfc0a95285de492ca53fd2ab89b58cdb1d9d817d7c4ade64e31bb63ccf73b7802206d4f72973c9aa804d9a5c9b749a49aec579ab7875d30c1e0b9ab8d3d7b8041ad01 33 0x02926efc059307ca51862547d58b7a0c1749f0e27df6fbea550bbb291ef0a00bcb",
"seqnum": 4294967295
}, {
"txidbuf": "ed83ae0fa16dd5602ca174f1c845be1f1c370ce483925dda6e524e6f82b93bd8",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x30460221008de29b6fafdadc7a1430ff453c9cb4ea96f9186c1c43b9d1f243876c4d187c5a022100f03f8a8a43c39a619c03db80bedaf9111ee817a574edf912795b3bef85024d4601 33 0x02891fda8944ae461484abdc5898a94d666d8e54ed47f534218601c9a39e1058b8",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xfc9c507e2cf3563c63bf9ec7b38773c2a1e1c472 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3970000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x736d9e4703437b3f245cda14ab4ed2d52b0a622d OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "a34b87af6103eac5adaba08069aca7f19c6091f6b1f4b8ca788e54970cab2039",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x3045022049ce62033552a024ce0badb3d3c9db84af929c373b816dade2611563871e48840221009f80e97265ce861637468c98237a06df9c7482cc7c1739e1c36a8e85537c7f1601 33 0x032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f",
"seqnum": 4294967295
}, {
"txidbuf": "a973c9f57b44c4f70b181311ba1ab60c3f3c20663a3127d3c418b9bb3b175ef4",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x304502204d5decc921dff956fbcfa1a574e43e0d17b9a49ee07f294b74f854f0dd7e0160022100d49781e18670f3372961dd5799d162071e13832fa9f15197c90d7b8ab8168e8d01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "2940000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xcc0d9d6d476efe8205891836f40e00caf2fde492 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x3770e8980281b63351861a17881cecbfaaa5c74b OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "6904c207207b72a9671e78f8e1284ae13b7b60c51b352142c849d338e8f3e8f1",
"txoutnum": 1,
"scriptvi": "6a",
"script": "71 0x30440220740a2107c2d9be5f621822667b9cc34566511c0e6767de900f3b46fa0852d62302207cf2fcf969e48fce7ad43880bd3a7ee5658a421a3fb718e3fd824e22e4bac6ee01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"seqnum": 4294967295
}, {
"txidbuf": "a3693948981b6fab5aeb9df82b1fc8e3fdbfeff8d934ce0617f4a9be699e06e7",
"txoutnum": 1,
"scriptvi": "6c",
"script": "73 0x3046022100942e3ffd4522789f747b0c0d18a7228ba9f343294a34ffb0a53801b0d1626963022100eacf2ea0eef2c58e2666442bd331489dbda43adfd6d4809c2e71de38aff7fd9201 33 0x03de66ea9a044ee251ba8a6dfe1d68ee1c2e17acaf5d8b568a515ff37752b6ea0e",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "2940000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xac64ed9c139e44fd8d1d9ad28d1d08fc8a8f70f8 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x3770e8980281b63351861a17881cecbfaaa5c74b OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "3b45e99dd007030fd8511434235b70a7d29041eb1e72d3cb2dda7d1e769ec13c",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x304502201c10c88a04850d9101b6cbcb51c28d9ca34f693fd918ba3c26775c5993cbdfc1022100e5d7708777b9592d709863859ce0f4d590f56acf5bb3655e119cac10d597c46301 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "87cc87cf0be7989073235f455fe6524324bfe8cba5f4ee3c2a59c46fec3bf14a",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x304502205cd5ea454979d705d4573d7b6f6a1bae22e5f146e0ccd14079a959a429bf69fc022100d88f05762b394621ec967546151b682f8103bed05b6d99b80adfadd626a721c501 33 0x03803aa78d28c40170231e0520fc38daa405140ed6e177c0747ce9d8d7dd6cdee4",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3530000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xbc1e95774ee2e36d2687714da14551132f0588b0 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x859819cb59368e07d4c95b5221fa4c466d666949 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "7848ce7fbc4f3b3e56a778607e046aa2b2cf891cdba8b61186095d4931b44c72",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x3045022100850533f400465b01658b7dfcb05b3bae38a89344065f8321f69f7b1b2036446f0220663a629b5f2b1cf8748558ae71c8b49cda87e43347d4cbf4c84e3a79bc904a4901 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "0e33c08e14303d5660127f5d3792ca11c18321a276e71f53415af75a2319ee92",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x3045022020d4bbbc5c300aadbc52110f7aa971d77bcf567c91d288ed6af0a98fc8f75e74022100ea84ee6d3fbeb672e92ea993d27202fc9ecd33ba7494d8b064518649fc2c17dc01 33 0x036a91343ca1c973401accb1fb902336d2a7a1b4f670ff82d9acc5c380d6a627f0",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3620000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x4cc35fc2651b5b3e4f22dfa9b6ebef0ca1797fb0 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x49452bed77744157799ba71fdb43efbd66968ad1 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "2a6cc52c8804088ddbc164cfa01e4d9ee7e839c7a8f5d2f1b59b70a50d253f24",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x3045022100bd72079af0ba0965d01dc6de2502ceebe38fa94fcf9850140e7ce1e5ef29d3cc02207da0e0b881594a9bc8750143dfa41ce8255e14f24784a551d3d1c4a2acecc0a201 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "36262f4b7717eca333432cd9af776bb5ef4b29a2ea1b1cf877b49642db945c62",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x3045022100f074c81f476f50dad72d3d07cef668532bb2b0cc772b49abf67cafd476e4e41302201e36efd9eec72b2f5ff4eac4ffbbe0598c6185b63c6ba8e03737b708e731499401 33 0x022d7e055cd28a8b7ca2613687e9b5cd4ff4a959c54d74f49c12345d1d8f78b374",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xfc9c507e2cf3563c63bf9ec7b38773c2a1e1c472 OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3750000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x5ab29618ded8892f8189ca3ce81bef83d3ddda16 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "d724e595476277be4337bb8f39ca700b4f9df1bfb84089c4afd338e1079e9add",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x3045022100f775b297513593c1c6e461902ab6405c4c38ce3b37d9292fe074153b8c466c29022010ded748e9e7fb1fbb263b8f466e6a1352e05ddb8842a17f712478e3d9c1770401 33 0x023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a",
"seqnum": 4294967295
}, {
"txidbuf": "ff40fb739e2271f4aaa851dd46fcd1895ddd7a98850ef191ba3b50325c29a4ed",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x30450220686b1c5ecd7ea0e9078784f5ea0100035a962809fd1d0cf7a131604ecfb26f02022100ddf7b8874a375edfa4d0d7b93cfd214d0327e550add318f1a8a379cceae8dac601 33 0x0363c3fa31a5453a29f6cde46c9d77698fd8276cf9f511dd6e5d079a231fea568e",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3940000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xb0c1cda106bb5085bd9c0c9982773c7bd066fabc OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x859819cb59368e07d4c95b5221fa4c466d666949 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "a9b95beed9491639bc0d1bb833005cf45429ef9a50505f9b91f3c7588feb87ef",
"txoutnum": 1,
"scriptvi": "6c",
"script": "73 0x3046022100854bc0ee8b24e2b625798148fc505cb37464f72688456dc54b0c25c4dd564091022100c2863ab346c23157baaeb45e6d102e7354cc895ee0dd7b6ecdc77ab34bdd4d0f01 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "8eaaf0d722fe9deffbc6e9d543f406844c93d1dd1c073d739863c314d2adf4ef",
"txoutnum": 0,
"scriptvi": "6a",
"script": "71 0x304402203f28684b208f0f4bf87ca22544e59585a7807fcd5a2ec78fc93ce915e282335502201ab05402d3a2b2914dd955971fade92dc874e6441bc2383766ec8b4c56dca27501 33 0x0251a3bd043afe5cf46a40c4ce4caf3e917190583588634711507d6ef77acc438b",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1882e6174c19c4a2ac6c7d807170e76cbc75160f OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "2010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xb27f37b7cee282e7890f4f6df9b49574f35e8552 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "fadecb6a5b1bd5f0688fc7dd049dadd956c30006e4dc57155f22c054c1550791",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x304502201dcb7d73d180cda9ddb192e50fcf5f0efaa5e680931f2bc25e58dd368d4b815f0221008149257f9394b01188aa84f92aec7374339076b408360767236a3af18718cddc01 33 0x032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f",
"seqnum": 4294967295
}, {
"txidbuf": "569ed0585b1d5261fe5a1839e99c23d0cd3b82972526c5bb5b812ceb493facc3",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x304502205665ae2983ad6ec44220810a6f4c28d77dd518cc891eb9ed67503a756e97c477022100ab456b8a9c1f977623956943d8f1892c3bf84d8adefaa405606d3473f37fb8b401 33 0x02bbdf0772bbacab8eaba47d783d30fa401b08a0ecc4bccd49357171ac38791c0e",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1882e6174c19c4a2ac6c7d807170e76cbc75160f OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "1330000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xa6a0900e3c77496dc68be8ee130a21b446b82665 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "3d9d0df887b3621c3c884515d1a4c0a22e2bc4aa02300493cb568189847265db",
"txoutnum": 1,
"scriptvi": "6b",
"script": "72 0x3045022100af41bf6edc04de96ad8b0d0e0794a7055c9677f2616fcfc1b053f87ad5c60c0f02201ef5279534263776cca80957368791a362354d7a40f3f175874b909de2d7f9a101 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "70f6c965fcbae21ee712571b683b33e3b4d0e9c5d1fd685046db7176e3bf432e",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x3045022033da8150f9870e045581f5894366f57345946174b43b7f8c0f9b24f7afad395c022100e3db87d42b1050ea8f2e964a13eeae86cc57e771c4dfa29f7f055c74a39be3b801 33 0x0221f705f7d58ceea66122bcdc7220db0583d8ce1d7d948ed86007905268f55162",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3010000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1882e6174c19c4a2ac6c7d807170e76cbc75160f OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "2130000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x47830d334d04acd62668904b6fab06a90742e750 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "2e48318fb557623da627d1c3f81ab34b99a87ce701440dfb907ad6a8691b51f2",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x3046022100d2733fcc63dd86bc4653d268f16e467e87a7be9e1d3f45cbeccb2423b7eb1c6c022100e3963622c12dab3e9c0c76a8ef13151114cb0f17abe6c29cca2fcbac264dfc9801 33 0x020ce8a0852e31812de6b8f2b2604d948cb06f8f7f404e70a19067cca01b5d0988",
"seqnum": 4294967295
}, {
"txidbuf": "675f09c92aa029f3283ee9a6b8bd6f022a1ea3bdccb1d33a09416ee9389e3ecb",
"txoutnum": 0,
"scriptvi": "6b",
"script": "72 0x304502202beb8d4ff142762f12f867a1686c2a523c55ff336b8ae3992ae1292019afeaf1022100a2e7edb9ffb29628540fd02b21c84abf1cc48d70c9f6adb39550b8aff572c65a01 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3970000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x449c3ac7336a78f0c6401f51710949005d2c7ffa OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x636c549bf6035b27cf3823f5482911ebb2bce5d0 OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "33232e2ce65e394a2c7e46519fae48b9b711b5152f764a4d6454bfc0552f275a",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x3046022100928f760eaabaed51bfc4db0188c84a6a19ef34a88786f2a25d8050c8356d858d022100c1a35c67f2c21b4837eaf73e195c74eb213bdaa4650fe77da072db9f84b90d0c01 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"seqnum": 4294967295
}, {
"txidbuf": "f7fc20459ede0aeba4e9224ac667212ff815c651ca4feaaf40880b9f9d82413a",
"txoutnum": 1,
"scriptvi": "6c",
"script": "73 0x3046022100c098dd6d9b20ed80de2d86d2c1bc9328b1c42f04b03c3767aec9d846d4538c9d0221009e32178215a499f22d8d3afe9f257159143c3d24f07371e0ef2de97d216e3b4201 33 0x02078d4050a314870bd68960765015e5f884e35c60b44e23e0f2d264b73aaca477",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3210000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x1c5b740011cff8324ed10c3e8f63f6261f36613a OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "2740000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x7bdb65a92af2520836f77e5ebccc697d814149ce OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}, {
"version": 1,
"txinsvi": "02",
"txins": [{
"txidbuf": "dae9bc0142c15e33fe26a494d1233e80adf68b50a131f467eb13450caa56e43d",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x3046022100ecf03f0bafb0cf6e08ac80336565bf79b6bac800f546e9f953fb14df7bf239ac022100982e27f2f0b3f8569cef126c0c54a88b002f00d570106c74f5c4b314c960944201 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"seqnum": 4294967295
}, {
"txidbuf": "6904c207207b72a9671e78f8e1284ae13b7b60c51b352142c849d338e8f3e8f1",
"txoutnum": 0,
"scriptvi": "6c",
"script": "73 0x3046022100febc4cdfbd5073ee756c9763b0e18009893b422e13c25e8f74ca97b84c0cf73f022100a85a6c10debf45e8ad00db28fce5fcb68404e9ac4b844f0ae1d59c0ef210d71401 33 0x03dc9adee9c23ca7a091b4eafc4dfef2ed07adf903dae568f345095321aa9c57e2",
"seqnum": 4294967295
}],
"txoutsvi": "02",
"txouts": [{
"valuebn": "3620000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0x67a341d7fe4de6a810c182ed27a09554e0b4405d OP_EQUALVERIFY OP_CHECKSIG"
}, {
"valuebn": "3000000",
"scriptvi": "19",
"script": "OP_DUP OP_HASH160 20 0xf7f1f64a590896dccfb869ced060f058007f388b OP_EQUALVERIFY OP_CHECKSIG"
}],
"nlocktime": 0
}]
"transactions":[
{
"hash":"a6f7b4284fb753eab9b554283c4fe1f1d7e143e6cf3b975d0376d7c08ba4cdf5",
"version":1,
"inputs":[
{
"prevTxId":"0000000000000000000000000000000000000000000000000000000000000000",
"outputIndex":4294967295,
"sequenceNumber":4294967295,
"script":"03e45201062f503253482f"
}
],
"outputs":[
{
"satoshis":5001000000,
"script":"76a914ee9a7590f91e04832054f0645bbf243c9fac8e2288ac"
},
{
"satoshis":0,
"script":"4104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac"
},
{
"satoshis":0,
"script":"2458e99e66e2b90bd8b2a0e2bfcce91e1f09ee7621d95e9a728ca2372d45df3ded00000000"
}
],
"nLockTime":0
},
{
"hash":"60c2679c0e791b19638c975528bf5bd55d81e192003c7d1f3fda53fe534b0a7f",
"version":1,
"inputs":[
{
"prevTxId":"cf5a52f1baf3103883a2427d8fe999e3e5e518a5237ca1e5ee48629b9549e1d6",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"4830450221009273f5d777408439a40c33ee96630a877d4f29af3f60f5c230e5254ee6f08f4302207975a64f43dc632f34479aa403b9956c484ad0c90a3c50d2e1b5037e1abb586f012103449772f2c60c2f4e1f1f74cb6c521a48f12d51ea681b64c8fc074fd8108123f6",
"scriptString":"72 0x30450221009273f5d777408439a40c33ee96630a877d4f29af3f60f5c230e5254ee6f08f4302207975a64f43dc632f34479aa403b9956c484ad0c90a3c50d2e1b5037e1abb586f01 33 0x03449772f2c60c2f4e1f1f74cb6c521a48f12d51ea681b64c8fc074fd8108123f6"
}
],
"outputs":[
{
"satoshis":864185035,
"script":"76a9140487c481a671649e1db182ede98d093a335d671388ac"
},
{
"satoshis":2635964965,
"script":"76a914590ea00fa3a18281d3020e7ba0c3a1d6aea663c088ac"
}
],
"nLockTime":0
},
{
"hash":"d35ce8868da34cdd63dad93b698867cee01e1e5c762a48059528b15eceba9278",
"version":1,
"inputs":[
{
"prevTxId":"6b5cc6554b92044ae4d2b0fc53ee3a64f8c5e8c98dd3b51e5edcb9bddfc5242a",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402207aa649b3ba03eeac6c6fb88e74800ca418297f62da75c58284a0c5f6cdfa96b70220324eb99fecdb0eb8bd4eec05bec0f440f4c2132c1afbaa7aaf10f31d17d8ef020121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"71 0x304402207aa649b3ba03eeac6c6fb88e74800ca418297f62da75c58284a0c5f6cdfa96b70220324eb99fecdb0eb8bd4eec05bec0f440f4c2132c1afbaa7aaf10f31d17d8ef0201 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"ab18b77482a431809dde802f4d3693558ee33a12f0d163b43a6a52c6ede98611",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"49304602210084cd799ec732e95a08c9e1ef98e99e43767b6bc4eb6af6cf65ecdf2be6bc96ab022100da1d1c450d675d383b92095c2b9949d693b82b54ac81ba219fad98f8500589ad012102b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786",
"scriptString":"73 0x304602210084cd799ec732e95a08c9e1ef98e99e43767b6bc4eb6af6cf65ecdf2be6bc96ab022100da1d1c450d675d383b92095c2b9949d693b82b54ac81ba219fad98f8500589ad01 33 0x02b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786"
}
],
"outputs":[
{
"satoshis":2940000,
"script":"76a91468340b9145127d2529dd7ebc3a4567d5579997ac88ac"
},
{
"satoshis":3010000,
"script":"76a9143770e8980281b63351861a17881cecbfaaa5c74b88ac"
}
],
"nLockTime":0
},
{
"hash":"7801b9230e03ce29fcfcaf9648939ba522b5d0e303b7683c9babd658ae857903",
"version":1,
"inputs":[
{
"prevTxId":"ad0ac6d68fb05c6d70438ecaf30a33bcc7098f55d1d789c4031df956a000500f",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"47304402201068b39118afc383bb1b7de9aa8fe02cddbd8be5d29cab99d5fff23a0cef5667022020d6cfb4712fc61c13c7ca26e32028cce3d68afea7957ab4bfc5ee03bf9615d4012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"71 0x304402201068b39118afc383bb1b7de9aa8fe02cddbd8be5d29cab99d5fff23a0cef5667022020d6cfb4712fc61c13c7ca26e32028cce3d68afea7957ab4bfc5ee03bf9615d401 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"a705541975bca57b97a14718f75535df8618bd0ad50cfb67657934567f57d408",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"47304402206728ade49cb5ec883e07d8acc6450e17b0e27b7f64c81143b4632eaded365e2e02202be3b4b723200de8c070b914d0050ead71d1418196a037f55f1a6dff4e45aee30121039e65fd2479d4edb0f3db6eecacdadcdc5ddd6d8ef518cf861466dfe1c21cc891",
"scriptString":"71 0x304402206728ade49cb5ec883e07d8acc6450e17b0e27b7f64c81143b4632eaded365e2e02202be3b4b723200de8c070b914d0050ead71d1418196a037f55f1a6dff4e45aee301 33 0x039e65fd2479d4edb0f3db6eecacdadcdc5ddd6d8ef518cf861466dfe1c21cc891"
}
],
"outputs":[
{
"satoshis":3650000,
"script":"76a9149a704e2c99955f50694de60f93cdd449473678aa88ac"
},
{
"satoshis":3000000,
"script":"76a914dac91bdfe809346e9df5e753adaaef9336344bfc88ac"
}
],
"nLockTime":0
},
{
"hash":"1367dbd80e679ccc7008ad5803d60fc60baa126a2490697197224dea823cc407",
"version":1,
"inputs":[
{
"prevTxId":"75a616a72e3c040cc85315473ad21ff65da7cfbc5359c2ee6d9f251e3b1385fc",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402203da7beabc48687b746a7149679bd8982032816771b5634d1d651af59ce9fa86d0220198ea81d1a547e3493988dd94ffefff3b8fe030340886aa4ffc1b205532f0f9d012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"71 0x304402203da7beabc48687b746a7149679bd8982032816771b5634d1d651af59ce9fa86d0220198ea81d1a547e3493988dd94ffefff3b8fe030340886aa4ffc1b205532f0f9d01 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"a505262fd090405552e8e88e0f3e15da3431b4fae4e41367489f2cbc37712904",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402206b729bfd4c132b673c9f1a66c645ed374338963f1e6a3b56229f72b4358f8077022023bea16c89d267313da6df152a976b36a36e1bbea738d698f0ce72ef315962df012103ba341f7dd2401a2cd51682d418fd8a12b4d0b09acb8971f0671c2211366a8531",
"scriptString":"71 0x304402206b729bfd4c132b673c9f1a66c645ed374338963f1e6a3b56229f72b4358f8077022023bea16c89d267313da6df152a976b36a36e1bbea738d698f0ce72ef315962df01 33 0x03ba341f7dd2401a2cd51682d418fd8a12b4d0b09acb8971f0671c2211366a8531"
}
],
"outputs":[
{
"satoshis":3700000,
"script":"76a9144769612ee7c6e977df40a8cdfd837c85cc7a48f788ac"
},
{
"satoshis":3000000,
"script":"76a914dac91bdfe809346e9df5e753adaaef9336344bfc88ac"
}
],
"nLockTime":0
},
{
"hash":"dcb4af4edae739299a633aca1f8d482d44e3d7b99bc4bac574cd470bdb6ad64c",
"version":1,
"inputs":[
{
"prevTxId":"a656779b2404fd30a8c0140e37d8eef173a586c38c7be8aca1ef3c304a73b51c",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"473044022059bbf19179b81fad8a15ba3dff94271d55d443da636dbaeba6ea0bb5901b8779022045417e208f41f8b37473caaf367a61ed21b31f1205605020de241e89b7ec0ca60121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"71 0x3044022059bbf19179b81fad8a15ba3dff94271d55d443da636dbaeba6ea0bb5901b8779022045417e208f41f8b37473caaf367a61ed21b31f1205605020de241e89b7ec0ca601 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"2d35efc99632f7fd06dc890726794c38fb3355e9c1f727e101913e779d32bbba",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"4830450220012c555e725f4eb0d767efdc07aec149c63522b06253e9d1ce6245b90c71951e022100edcce82ddd7e52a3b85bf9a4acc73a3b6df5c9b40fda36e8de09890860599ddf012102b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786",
"scriptString":"72 0x30450220012c555e725f4eb0d767efdc07aec149c63522b06253e9d1ce6245b90c71951e022100edcce82ddd7e52a3b85bf9a4acc73a3b6df5c9b40fda36e8de09890860599ddf01 33 0x02b567c3f3442f71b6762404be7cc06ffd3b170d4cb98b90dab169187a07eb6786"
}
],
"outputs":[
{
"satoshis":3210000,
"script":"76a9143770e8980281b63351861a17881cecbfaaa5c74b88ac"
},
{
"satoshis":2740000,
"script":"76a914e1144ff8ca0ac143b83ada244040bfe9c8d1d63888ac"
}
],
"nLockTime":0
},
{
"hash":"7a1dc3bb633c50f7f53d3d8b9d10a86da38483616841de7bd51b8cca3b564a1c",
"version":1,
"inputs":[
{
"prevTxId":"f53288681555eb42218128624fa84154c35ff266459b270e046a1072604e499a",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"483045022100b35809ba9abcea1ec143c7cd0a27845b3f5139a6bb52757c9e24d86319f8d16c022079f8381c5287af7e6488d6a589e73caf23c487bf355ac22b7c01cf58830110bf0121023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a",
"scriptString":"72 0x3045022100b35809ba9abcea1ec143c7cd0a27845b3f5139a6bb52757c9e24d86319f8d16c022079f8381c5287af7e6488d6a589e73caf23c487bf355ac22b7c01cf58830110bf01 33 0x023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a"
},
{
"prevTxId":"d6df9f8866a94576b20be6c2a489cf208f75c9b65306bad9d741dbd4395d7dec",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"473044022008848d34f2ca77f8bf79eb83b89ee8a24292d0c3936350a37f1522664e2e216002204ad05817044e18d0c26e89139b9fb98a21ceda2249a7cfa58f3ec420af9477c7012103af07092ed729d97d5e2ae9f8a295f1b2da268e7414ce3df9b374051d7647092b",
"scriptString":"71 0x3044022008848d34f2ca77f8bf79eb83b89ee8a24292d0c3936350a37f1522664e2e216002204ad05817044e18d0c26e89139b9fb98a21ceda2249a7cfa58f3ec420af9477c701 33 0x03af07092ed729d97d5e2ae9f8a295f1b2da268e7414ce3df9b374051d7647092b"
}
],
"outputs":[
{
"satoshis":3700000,
"script":"76a914b1b9b659297859bd310ba8ba6f95573c635b191a88ac"
},
{
"satoshis":3000000,
"script":"76a914636c549bf6035b27cf3823f5482911ebb2bce5d088ac"
}
],
"nLockTime":0
},
{
"hash":"7766eac176f9db586456b150b7f0f757fd2c8a9b6d7ae8d42977580effe1c964",
"version":1,
"inputs":[
{
"prevTxId":"41c87fdc6c1dffac1fe122390c045815c5bfe38e6b7521157bbe45dd5a43888c",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402201bf92a99fd85e09de43b9039801f387ad6ea996d71c02185019a18cd2691d68502204500ea82873501c25c5b1476f9cd75d70b2a34a4162470e3390f89ff6a5830110121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"71 0x304402201bf92a99fd85e09de43b9039801f387ad6ea996d71c02185019a18cd2691d68502204500ea82873501c25c5b1476f9cd75d70b2a34a4162470e3390f89ff6a58301101 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"7e6e1cb7d33f6559775a5170567b0c96cb03c38f06cd876af08d9e7c8f131dbb",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"4830450220277eb0e03b897cd20ac3bfa15af82ae2c1e75472ffce0482ce1594cd4536e83802210088164c46f3fc82ed3530b7552a1da6ecd2f690647485bb0fe1a706ae0f09d5b6012102718b695944b9e6f12db75e7dc7b77f023c8b9706405b62dac6e6c94dc1c7214e",
"scriptString":"72 0x30450220277eb0e03b897cd20ac3bfa15af82ae2c1e75472ffce0482ce1594cd4536e83802210088164c46f3fc82ed3530b7552a1da6ecd2f690647485bb0fe1a706ae0f09d5b601 33 0x02718b695944b9e6f12db75e7dc7b77f023c8b9706405b62dac6e6c94dc1c7214e"
}
],
"outputs":[
{
"satoshis":1950000,
"script":"76a914e22f515855329b13602778a1d681295e485390b888ac"
},
{
"satoshis":3010000,
"script":"76a9141882e6174c19c4a2ac6c7d807170e76cbc75160f88ac"
}
],
"nLockTime":0
},
{
"hash":"819427319cedc05e63e092cbe5e72a3186bea072c01814dd8476d3ef85893ab8",
"version":1,
"inputs":[
{
"prevTxId":"8232be9da532d28e8180a5abba12eef20dc25b31b15bc6b316c86402f74d8a94",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"483045022100e96feaa777c517aa67498d51c52b7c177c18f7eb96c7ec109bcf4b7d1993245e02203d4f6dc06f4ac4ff947d81a45c9e53b12ee89e4223aa670eee2ca435157f6054012102690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"scriptString":"72 0x3045022100e96feaa777c517aa67498d51c52b7c177c18f7eb96c7ec109bcf4b7d1993245e02203d4f6dc06f4ac4ff947d81a45c9e53b12ee89e4223aa670eee2ca435157f605401 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807"
},
{
"prevTxId":"73d5609bd67f08d60cea48c7ad141fc4c65a631f142b8fb465181311d1f5dd8d",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"4830450220588e7eb9477043dc7b7d9f554b5db44823d9b7108a73d224af8cb24b190ebc94022100deb2fd7cfbff5f7679a38a16c18075dc9eb705850054415eba27a0f769f94e8d012102690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"scriptString":"72 0x30450220588e7eb9477043dc7b7d9f554b5db44823d9b7108a73d224af8cb24b190ebc94022100deb2fd7cfbff5f7679a38a16c18075dc9eb705850054415eba27a0f769f94e8d01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807"
}
],
"outputs":[
{
"satoshis":2740000,
"script":"76a9147ff6d70c9f71e29f3b3b77e1acb0bae8d1af12d288ac"
},
{
"satoshis":3210000,
"script":"76a9141c5b740011cff8324ed10c3e8f63f6261f36613a88ac"
}
],
"nLockTime":0
},
{
"hash":"cbbf483ac272ed5f9cca3ceccf6f08ada34d87fd6a5ccb34ac14e13dfbd4cf1c",
"version":1,
"inputs":[
{
"prevTxId":"14601bf9657358aec323235e8fb784caca1a1a6d001291d3d4a129be57f02476",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402201bfc0a95285de492ca53fd2ab89b58cdb1d9d817d7c4ade64e31bb63ccf73b7802206d4f72973c9aa804d9a5c9b749a49aec579ab7875d30c1e0b9ab8d3d7b8041ad012102926efc059307ca51862547d58b7a0c1749f0e27df6fbea550bbb291ef0a00bcb",
"scriptString":"71 0x304402201bfc0a95285de492ca53fd2ab89b58cdb1d9d817d7c4ade64e31bb63ccf73b7802206d4f72973c9aa804d9a5c9b749a49aec579ab7875d30c1e0b9ab8d3d7b8041ad01 33 0x02926efc059307ca51862547d58b7a0c1749f0e27df6fbea550bbb291ef0a00bcb"
},
{
"prevTxId":"d83bb9826f4e526eda5d9283e40c371c1fbe45c8f174a12c60d56da10fae83ed",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"4930460221008de29b6fafdadc7a1430ff453c9cb4ea96f9186c1c43b9d1f243876c4d187c5a022100f03f8a8a43c39a619c03db80bedaf9111ee817a574edf912795b3bef85024d46012102891fda8944ae461484abdc5898a94d666d8e54ed47f534218601c9a39e1058b8",
"scriptString":"73 0x30460221008de29b6fafdadc7a1430ff453c9cb4ea96f9186c1c43b9d1f243876c4d187c5a022100f03f8a8a43c39a619c03db80bedaf9111ee817a574edf912795b3bef85024d4601 33 0x02891fda8944ae461484abdc5898a94d666d8e54ed47f534218601c9a39e1058b8"
}
],
"outputs":[
{
"satoshis":3000000,
"script":"76a914fc9c507e2cf3563c63bf9ec7b38773c2a1e1c47288ac"
},
{
"satoshis":3970000,
"script":"76a914736d9e4703437b3f245cda14ab4ed2d52b0a622d88ac"
}
],
"nLockTime":0
},
{
"hash":"a887d7d752368dbaf40d418fc26915bbcef06b6625739c17fd332914d7c57f94",
"version":1,
"inputs":[
{
"prevTxId":"3920ab0c97548e78cab8f4b1f691609cf1a7ac6980a0abadc5ea0361af874ba3",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"483045022049ce62033552a024ce0badb3d3c9db84af929c373b816dade2611563871e48840221009f80e97265ce861637468c98237a06df9c7482cc7c1739e1c36a8e85537c7f160121032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f",
"scriptString":"72 0x3045022049ce62033552a024ce0badb3d3c9db84af929c373b816dade2611563871e48840221009f80e97265ce861637468c98237a06df9c7482cc7c1739e1c36a8e85537c7f1601 33 0x032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f"
},
{
"prevTxId":"f45e173bbbb918c4d327313a66203c3f0cb61aba1113180bf7c4447bf5c973a9",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"48304502204d5decc921dff956fbcfa1a574e43e0d17b9a49ee07f294b74f854f0dd7e0160022100d49781e18670f3372961dd5799d162071e13832fa9f15197c90d7b8ab8168e8d012102690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"scriptString":"72 0x304502204d5decc921dff956fbcfa1a574e43e0d17b9a49ee07f294b74f854f0dd7e0160022100d49781e18670f3372961dd5799d162071e13832fa9f15197c90d7b8ab8168e8d01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807"
}
],
"outputs":[
{
"satoshis":2940000,
"script":"76a914cc0d9d6d476efe8205891836f40e00caf2fde49288ac"
},
{
"satoshis":3010000,
"script":"76a9143770e8980281b63351861a17881cecbfaaa5c74b88ac"
}
],
"nLockTime":0
},
{
"hash":"db164f27acf3d43e5e5dbed5c173902ecfb1010b992568d086712b62a5e331ef",
"version":1,
"inputs":[
{
"prevTxId":"f1e8f3e838d349c84221351bc5607b3be14a28e1f8781e67a9727b2007c20469",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"4730440220740a2107c2d9be5f621822667b9cc34566511c0e6767de900f3b46fa0852d62302207cf2fcf969e48fce7ad43880bd3a7ee5658a421a3fb718e3fd824e22e4bac6ee012102690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807",
"scriptString":"71 0x30440220740a2107c2d9be5f621822667b9cc34566511c0e6767de900f3b46fa0852d62302207cf2fcf969e48fce7ad43880bd3a7ee5658a421a3fb718e3fd824e22e4bac6ee01 33 0x02690619097c609c03c8b82f7d289aac8a4d2fe36e5a41fc3701138deeeccd9807"
},
{
"prevTxId":"e7069e69bea9f41706ce34d9f8efbffde3c81f2bf89deb5aab6f1b98483969a3",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"493046022100942e3ffd4522789f747b0c0d18a7228ba9f343294a34ffb0a53801b0d1626963022100eacf2ea0eef2c58e2666442bd331489dbda43adfd6d4809c2e71de38aff7fd92012103de66ea9a044ee251ba8a6dfe1d68ee1c2e17acaf5d8b568a515ff37752b6ea0e",
"scriptString":"73 0x3046022100942e3ffd4522789f747b0c0d18a7228ba9f343294a34ffb0a53801b0d1626963022100eacf2ea0eef2c58e2666442bd331489dbda43adfd6d4809c2e71de38aff7fd9201 33 0x03de66ea9a044ee251ba8a6dfe1d68ee1c2e17acaf5d8b568a515ff37752b6ea0e"
}
],
"outputs":[
{
"satoshis":2940000,
"script":"76a914ac64ed9c139e44fd8d1d9ad28d1d08fc8a8f70f888ac"
},
{
"satoshis":3010000,
"script":"76a9143770e8980281b63351861a17881cecbfaaa5c74b88ac"
}
],
"nLockTime":0
},
{
"hash":"f9840db5cc0479fcd40701543af5db8ba6f127f8f4f0c04752f69278f436ea02",
"version":1,
"inputs":[
{
"prevTxId":"3cc19e761e7dda2dcbd3721eeb4190d2a7705b23341451d80f0307d09de9453b",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"48304502201c10c88a04850d9101b6cbcb51c28d9ca34f693fd918ba3c26775c5993cbdfc1022100e5d7708777b9592d709863859ce0f4d590f56acf5bb3655e119cac10d597c463012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"72 0x304502201c10c88a04850d9101b6cbcb51c28d9ca34f693fd918ba3c26775c5993cbdfc1022100e5d7708777b9592d709863859ce0f4d590f56acf5bb3655e119cac10d597c46301 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"4af13bec6fc4592a3ceef4a5cbe8bf244352e65f455f23739098e70bcf87cc87",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"48304502205cd5ea454979d705d4573d7b6f6a1bae22e5f146e0ccd14079a959a429bf69fc022100d88f05762b394621ec967546151b682f8103bed05b6d99b80adfadd626a721c5012103803aa78d28c40170231e0520fc38daa405140ed6e177c0747ce9d8d7dd6cdee4",
"scriptString":"72 0x304502205cd5ea454979d705d4573d7b6f6a1bae22e5f146e0ccd14079a959a429bf69fc022100d88f05762b394621ec967546151b682f8103bed05b6d99b80adfadd626a721c501 33 0x03803aa78d28c40170231e0520fc38daa405140ed6e177c0747ce9d8d7dd6cdee4"
}
],
"outputs":[
{
"satoshis":3530000,
"script":"76a914bc1e95774ee2e36d2687714da14551132f0588b088ac"
},
{
"satoshis":3000000,
"script":"76a914859819cb59368e07d4c95b5221fa4c466d66694988ac"
}
],
"nLockTime":0
},
{
"hash":"48464b4a6f6f126c220ac43159f1ae9b6e516702126d00762c335d9deb6563ea",
"version":1,
"inputs":[
{
"prevTxId":"724cb431495d098611b6a8db1c89cfb2a26a047e6078a7563e3b4fbc7fce4878",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"483045022100850533f400465b01658b7dfcb05b3bae38a89344065f8321f69f7b1b2036446f0220663a629b5f2b1cf8748558ae71c8b49cda87e43347d4cbf4c84e3a79bc904a49012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"72 0x3045022100850533f400465b01658b7dfcb05b3bae38a89344065f8321f69f7b1b2036446f0220663a629b5f2b1cf8748558ae71c8b49cda87e43347d4cbf4c84e3a79bc904a4901 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"92ee19235af75a41531fe776a22183c111ca92375d7f1260563d30148ec0330e",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"483045022020d4bbbc5c300aadbc52110f7aa971d77bcf567c91d288ed6af0a98fc8f75e74022100ea84ee6d3fbeb672e92ea993d27202fc9ecd33ba7494d8b064518649fc2c17dc0121036a91343ca1c973401accb1fb902336d2a7a1b4f670ff82d9acc5c380d6a627f0",
"scriptString":"72 0x3045022020d4bbbc5c300aadbc52110f7aa971d77bcf567c91d288ed6af0a98fc8f75e74022100ea84ee6d3fbeb672e92ea993d27202fc9ecd33ba7494d8b064518649fc2c17dc01 33 0x036a91343ca1c973401accb1fb902336d2a7a1b4f670ff82d9acc5c380d6a627f0"
}
],
"outputs":[
{
"satoshis":3620000,
"script":"76a9144cc35fc2651b5b3e4f22dfa9b6ebef0ca1797fb088ac"
},
{
"satoshis":3000000,
"script":"76a91449452bed77744157799ba71fdb43efbd66968ad188ac"
}
],
"nLockTime":0
},
{
"hash":"54b986c38ae88a0fdf5efb43d1f8db2d0c1331e746d25d676bc422e93cc1ff67",
"version":1,
"inputs":[
{
"prevTxId":"243f250da5709bb5f1d2f5a8c739e8e79e4d1ea0cf64c1db8d0804882cc56c2a",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"483045022100bd72079af0ba0965d01dc6de2502ceebe38fa94fcf9850140e7ce1e5ef29d3cc02207da0e0b881594a9bc8750143dfa41ce8255e14f24784a551d3d1c4a2acecc0a2012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"72 0x3045022100bd72079af0ba0965d01dc6de2502ceebe38fa94fcf9850140e7ce1e5ef29d3cc02207da0e0b881594a9bc8750143dfa41ce8255e14f24784a551d3d1c4a2acecc0a201 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"625c94db4296b477f81c1beaa2294befb56b77afd92c4333a3ec17774b2f2636",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"483045022100f074c81f476f50dad72d3d07cef668532bb2b0cc772b49abf67cafd476e4e41302201e36efd9eec72b2f5ff4eac4ffbbe0598c6185b63c6ba8e03737b708e73149940121022d7e055cd28a8b7ca2613687e9b5cd4ff4a959c54d74f49c12345d1d8f78b374",
"scriptString":"72 0x3045022100f074c81f476f50dad72d3d07cef668532bb2b0cc772b49abf67cafd476e4e41302201e36efd9eec72b2f5ff4eac4ffbbe0598c6185b63c6ba8e03737b708e731499401 33 0x022d7e055cd28a8b7ca2613687e9b5cd4ff4a959c54d74f49c12345d1d8f78b374"
}
],
"outputs":[
{
"satoshis":3000000,
"script":"76a914fc9c507e2cf3563c63bf9ec7b38773c2a1e1c47288ac"
},
{
"satoshis":3750000,
"script":"76a9145ab29618ded8892f8189ca3ce81bef83d3ddda1688ac"
}
],
"nLockTime":0
},
{
"hash":"8422b9cdd10e63b7daf4c5a5ac6958c50d1f03f51bd76d1b0e1379c89110f354",
"version":1,
"inputs":[
{
"prevTxId":"dd9a9e07e138d3afc48940b8bff19d4f0b70ca398fbb3743be77624795e524d7",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"483045022100f775b297513593c1c6e461902ab6405c4c38ce3b37d9292fe074153b8c466c29022010ded748e9e7fb1fbb263b8f466e6a1352e05ddb8842a17f712478e3d9c177040121023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a",
"scriptString":"72 0x3045022100f775b297513593c1c6e461902ab6405c4c38ce3b37d9292fe074153b8c466c29022010ded748e9e7fb1fbb263b8f466e6a1352e05ddb8842a17f712478e3d9c1770401 33 0x023d1c9bcd771cc12b60cce62e9b8196788dd365089b70d898d60917a174e16f6a"
},
{
"prevTxId":"eda4295c32503bba91f10e85987add5d89d1fc46dd51a8aaf471229e73fb40ff",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"4830450220686b1c5ecd7ea0e9078784f5ea0100035a962809fd1d0cf7a131604ecfb26f02022100ddf7b8874a375edfa4d0d7b93cfd214d0327e550add318f1a8a379cceae8dac601210363c3fa31a5453a29f6cde46c9d77698fd8276cf9f511dd6e5d079a231fea568e",
"scriptString":"72 0x30450220686b1c5ecd7ea0e9078784f5ea0100035a962809fd1d0cf7a131604ecfb26f02022100ddf7b8874a375edfa4d0d7b93cfd214d0327e550add318f1a8a379cceae8dac601 33 0x0363c3fa31a5453a29f6cde46c9d77698fd8276cf9f511dd6e5d079a231fea568e"
}
],
"outputs":[
{
"satoshis":3940000,
"script":"76a914b0c1cda106bb5085bd9c0c9982773c7bd066fabc88ac"
},
{
"satoshis":3000000,
"script":"76a914859819cb59368e07d4c95b5221fa4c466d66694988ac"
}
],
"nLockTime":0
},
{
"hash":"0172e18055af32e502eb6d29e2d7700747c9938de5c145ab652bc9999c51fbd9",
"version":1,
"inputs":[
{
"prevTxId":"ef87eb8f58c7f3919b5f50509aef2954f45c0033b81b0dbc391649d9ee5bb9a9",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"493046022100854bc0ee8b24e2b625798148fc505cb37464f72688456dc54b0c25c4dd564091022100c2863ab346c23157baaeb45e6d102e7354cc895ee0dd7b6ecdc77ab34bdd4d0f0121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"73 0x3046022100854bc0ee8b24e2b625798148fc505cb37464f72688456dc54b0c25c4dd564091022100c2863ab346c23157baaeb45e6d102e7354cc895ee0dd7b6ecdc77ab34bdd4d0f01 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"eff4add214c36398733d071cddd1934c8406f443d5e9c6fbef9dfe22d7f0aa8e",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"47304402203f28684b208f0f4bf87ca22544e59585a7807fcd5a2ec78fc93ce915e282335502201ab05402d3a2b2914dd955971fade92dc874e6441bc2383766ec8b4c56dca27501210251a3bd043afe5cf46a40c4ce4caf3e917190583588634711507d6ef77acc438b",
"scriptString":"71 0x304402203f28684b208f0f4bf87ca22544e59585a7807fcd5a2ec78fc93ce915e282335502201ab05402d3a2b2914dd955971fade92dc874e6441bc2383766ec8b4c56dca27501 33 0x0251a3bd043afe5cf46a40c4ce4caf3e917190583588634711507d6ef77acc438b"
}
],
"outputs":[
{
"satoshis":3010000,
"script":"76a9141882e6174c19c4a2ac6c7d807170e76cbc75160f88ac"
},
{
"satoshis":2010000,
"script":"76a914b27f37b7cee282e7890f4f6df9b49574f35e855288ac"
}
],
"nLockTime":0
},
{
"hash":"040efc4e5a76a012626d64106c14c9fcacc451061bb105c057d25a9020f67237",
"version":1,
"inputs":[
{
"prevTxId":"910755c154c0225f1557dce40600c356d9ad9d04ddc78f68f0d51b5b6acbdefa",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"48304502201dcb7d73d180cda9ddb192e50fcf5f0efaa5e680931f2bc25e58dd368d4b815f0221008149257f9394b01188aa84f92aec7374339076b408360767236a3af18718cddc0121032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f",
"scriptString":"72 0x304502201dcb7d73d180cda9ddb192e50fcf5f0efaa5e680931f2bc25e58dd368d4b815f0221008149257f9394b01188aa84f92aec7374339076b408360767236a3af18718cddc01 33 0x032e68cde689f248f9dcce3f1b3b607400fd1275aa3d3a821ff81dd95a3645e20f"
},
{
"prevTxId":"c3ac3f49eb2c815bbbc5262597823bcdd0239ce939185afe61521d5b58d09e56",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"48304502205665ae2983ad6ec44220810a6f4c28d77dd518cc891eb9ed67503a756e97c477022100ab456b8a9c1f977623956943d8f1892c3bf84d8adefaa405606d3473f37fb8b4012102bbdf0772bbacab8eaba47d783d30fa401b08a0ecc4bccd49357171ac38791c0e",
"scriptString":"72 0x304502205665ae2983ad6ec44220810a6f4c28d77dd518cc891eb9ed67503a756e97c477022100ab456b8a9c1f977623956943d8f1892c3bf84d8adefaa405606d3473f37fb8b401 33 0x02bbdf0772bbacab8eaba47d783d30fa401b08a0ecc4bccd49357171ac38791c0e"
}
],
"outputs":[
{
"satoshis":3010000,
"script":"76a9141882e6174c19c4a2ac6c7d807170e76cbc75160f88ac"
},
{
"satoshis":1330000,
"script":"76a914a6a0900e3c77496dc68be8ee130a21b446b8266588ac"
}
],
"nLockTime":0
},
{
"hash":"6d0d9d9fefa0abe4892a304b6ea0da54a7e2fc87d9b8cf32e68e868f045dc955",
"version":1,
"inputs":[
{
"prevTxId":"db657284898156cb93043002aac42b2ea2c0a4d11545883c1c62b387f80d9d3d",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"483045022100af41bf6edc04de96ad8b0d0e0794a7055c9677f2616fcfc1b053f87ad5c60c0f02201ef5279534263776cca80957368791a362354d7a40f3f175874b909de2d7f9a10121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"72 0x3045022100af41bf6edc04de96ad8b0d0e0794a7055c9677f2616fcfc1b053f87ad5c60c0f02201ef5279534263776cca80957368791a362354d7a40f3f175874b909de2d7f9a101 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"2e43bfe37671db465068fdd1c5e9d0b4e3333b681b5712e71ee2bafc65c9f670",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"483045022033da8150f9870e045581f5894366f57345946174b43b7f8c0f9b24f7afad395c022100e3db87d42b1050ea8f2e964a13eeae86cc57e771c4dfa29f7f055c74a39be3b801210221f705f7d58ceea66122bcdc7220db0583d8ce1d7d948ed86007905268f55162",
"scriptString":"72 0x3045022033da8150f9870e045581f5894366f57345946174b43b7f8c0f9b24f7afad395c022100e3db87d42b1050ea8f2e964a13eeae86cc57e771c4dfa29f7f055c74a39be3b801 33 0x0221f705f7d58ceea66122bcdc7220db0583d8ce1d7d948ed86007905268f55162"
}
],
"outputs":[
{
"satoshis":3010000,
"script":"76a9141882e6174c19c4a2ac6c7d807170e76cbc75160f88ac"
},
{
"satoshis":2130000,
"script":"76a91447830d334d04acd62668904b6fab06a90742e75088ac"
}
],
"nLockTime":0
},
{
"hash":"cb44de025ed8fb7dab371789bd8328c7df7916058556ec0cd32bd856e3acdc86",
"version":1,
"inputs":[
{
"prevTxId":"f2511b69a8d67a90fb0d4401e77ca8994bb31af8c3d127a63d6257b58f31482e",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"493046022100d2733fcc63dd86bc4653d268f16e467e87a7be9e1d3f45cbeccb2423b7eb1c6c022100e3963622c12dab3e9c0c76a8ef13151114cb0f17abe6c29cca2fcbac264dfc980121020ce8a0852e31812de6b8f2b2604d948cb06f8f7f404e70a19067cca01b5d0988",
"scriptString":"73 0x3046022100d2733fcc63dd86bc4653d268f16e467e87a7be9e1d3f45cbeccb2423b7eb1c6c022100e3963622c12dab3e9c0c76a8ef13151114cb0f17abe6c29cca2fcbac264dfc9801 33 0x020ce8a0852e31812de6b8f2b2604d948cb06f8f7f404e70a19067cca01b5d0988"
},
{
"prevTxId":"cb3e9e38e96e41093ad3b1ccbda31e2a026fbdb8a6e93e28f329a02ac9095f67",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"48304502202beb8d4ff142762f12f867a1686c2a523c55ff336b8ae3992ae1292019afeaf1022100a2e7edb9ffb29628540fd02b21c84abf1cc48d70c9f6adb39550b8aff572c65a012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"72 0x304502202beb8d4ff142762f12f867a1686c2a523c55ff336b8ae3992ae1292019afeaf1022100a2e7edb9ffb29628540fd02b21c84abf1cc48d70c9f6adb39550b8aff572c65a01 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
}
],
"outputs":[
{
"satoshis":3970000,
"script":"76a914449c3ac7336a78f0c6401f51710949005d2c7ffa88ac"
},
{
"satoshis":3000000,
"script":"76a914636c549bf6035b27cf3823f5482911ebb2bce5d088ac"
}
],
"nLockTime":0
},
{
"hash":"69910ceb1bdb1551d5fef5979e698c665e1d5c8d365c3d9a0925bf05631e8ab0",
"version":1,
"inputs":[
{
"prevTxId":"5a272f55c0bf54644d4a762f15b511b7b948ae9f51467e2c4a395ee62c2e2333",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"493046022100928f760eaabaed51bfc4db0188c84a6a19ef34a88786f2a25d8050c8356d858d022100c1a35c67f2c21b4837eaf73e195c74eb213bdaa4650fe77da072db9f84b90d0c0121022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c",
"scriptString":"73 0x3046022100928f760eaabaed51bfc4db0188c84a6a19ef34a88786f2a25d8050c8356d858d022100c1a35c67f2c21b4837eaf73e195c74eb213bdaa4650fe77da072db9f84b90d0c01 33 0x022d9055b471959ea9385bf8c92788c45d836818d86833d91331cee37d8c15ee3c"
},
{
"prevTxId":"3a41829d9f0b8840afea4fca51c615f82f2167c64a22e9a4eb0ade9e4520fcf7",
"outputIndex":1,
"sequenceNumber":4294967295,
"script":"493046022100c098dd6d9b20ed80de2d86d2c1bc9328b1c42f04b03c3767aec9d846d4538c9d0221009e32178215a499f22d8d3afe9f257159143c3d24f07371e0ef2de97d216e3b42012102078d4050a314870bd68960765015e5f884e35c60b44e23e0f2d264b73aaca477",
"scriptString":"73 0x3046022100c098dd6d9b20ed80de2d86d2c1bc9328b1c42f04b03c3767aec9d846d4538c9d0221009e32178215a499f22d8d3afe9f257159143c3d24f07371e0ef2de97d216e3b4201 33 0x02078d4050a314870bd68960765015e5f884e35c60b44e23e0f2d264b73aaca477"
}
],
"outputs":[
{
"satoshis":3210000,
"script":"76a9141c5b740011cff8324ed10c3e8f63f6261f36613a88ac"
},
{
"satoshis":2740000,
"script":"76a9147bdb65a92af2520836f77e5ebccc697d814149ce88ac"
}
],
"nLockTime":0
},
{
"hash":"ca62089ca56d89d36f53d84bc035c839ab20e7d9284e3f93fb4cb408057b4601",
"version":1,
"inputs":[
{
"prevTxId":"3de456aa0c4513eb67f431a1508bf6ad803e23d194a426fe335ec14201bce9da",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"493046022100ecf03f0bafb0cf6e08ac80336565bf79b6bac800f546e9f953fb14df7bf239ac022100982e27f2f0b3f8569cef126c0c54a88b002f00d570106c74f5c4b314c9609442012103b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662",
"scriptString":"73 0x3046022100ecf03f0bafb0cf6e08ac80336565bf79b6bac800f546e9f953fb14df7bf239ac022100982e27f2f0b3f8569cef126c0c54a88b002f00d570106c74f5c4b314c960944201 33 0x03b3385ed65f34e06927d8835e86103c3de352dbdece5cb704f6899886a0334662"
},
{
"prevTxId":"f1e8f3e838d349c84221351bc5607b3be14a28e1f8781e67a9727b2007c20469",
"outputIndex":0,
"sequenceNumber":4294967295,
"script":"493046022100febc4cdfbd5073ee756c9763b0e18009893b422e13c25e8f74ca97b84c0cf73f022100a85a6c10debf45e8ad00db28fce5fcb68404e9ac4b844f0ae1d59c0ef210d714012103dc9adee9c23ca7a091b4eafc4dfef2ed07adf903dae568f345095321aa9c57e2",
"scriptString":"73 0x3046022100febc4cdfbd5073ee756c9763b0e18009893b422e13c25e8f74ca97b84c0cf73f022100a85a6c10debf45e8ad00db28fce5fcb68404e9ac4b844f0ae1d59c0ef210d71401 33 0x03dc9adee9c23ca7a091b4eafc4dfef2ed07adf903dae568f345095321aa9c57e2"
}
],
"outputs":[
{
"satoshis":3620000,
"script":"76a91467a341d7fe4de6a810c182ed27a09554e0b4405d88ac"
},
{
"satoshis":3000000,
"script":"76a914f7f1f64a590896dccfb869ced060f058007f388b88ac"
}
],
"nLockTime":0
}
]
}

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

header: {
hash: "000000000000b731f2eef9e8c63173adfb07e41bd53eb0ef0a6b720d6cb6dea4",
version: 1,

@@ -36,3 +37,3 @@ prevHash: "0000000000016780c81d42b7eff86974c36f5ae026e8662a4393a7f39c86bb82",

bits: 453281356,
nonce: 151839121
nonce: 696601429
},

@@ -50,2 +51,3 @@ numTransactions: 7,

header: {
hash: "00000000ae81d8be56fcad40f7b2ca03612a9ab681ca5bc6628ab3c2d914ef9a",
version: 1,

@@ -449,2 +451,3 @@ prevHash: "00000000acc3e6a055e05edc7cd0cfac6187cd73adc3c06d408d05c95edaaef8",

header : {
hash: "00000000000000018eaf634bf13b7e5e50860b99466b91140538223c75b75049",
prevHash : "000000000000000124f6ce137a43bb288d63cc84f9847033cb84595ead05f9de",

@@ -451,0 +454,0 @@ merkleRoot : "792f40129c95aec653d2838ef4b031bf541f11c764ca6c3ecc2e20b396ce83cb",

@@ -30,4 +30,4 @@ 'use strict';

it(clazz.name + ' fromJSON checks that a valid JSON is provided', function() {
var errorMessage = 'No valid JSON string was provided';
var method = 'fromJSON';
var errorMessage = 'Invalid Argument: No valid argument was provided';
var method = 'fromObject';
expectStaticMethodFail(method, undefined, errorMessage);

@@ -37,3 +37,2 @@ expectStaticMethodFail(method, null, errorMessage);

expectStaticMethodFail(method, '{\'singlequotes\': true}', errorMessage);
expectStaticMethodFail(method, {}, errorMessage);
});

@@ -40,0 +39,0 @@ it(clazz.name + ' fromString checks that a string is provided', function() {

@@ -297,8 +297,8 @@ 'use strict';

});
it('roundtrips toJSON', function() {
expect(HDPrivateKey.fromJSON(new HDPrivateKey(xprivkey).toJSON()).xprivkey).to.equal(xprivkey);
it('roundtrips toObject', function() {
expect(HDPrivateKey.fromObject(new HDPrivateKey(xprivkey).toObject()).xprivkey).to.equal(xprivkey);
});
it('roundtrips to JSON and to Object', function() {
var privkey = new HDPrivateKey(xprivkey);
expect(HDPrivateKey.fromJSON(privkey.toJSON()).xprivkey).to.equal(xprivkey);
expect(HDPrivateKey.fromObject(privkey.toJSON()).xprivkey).to.equal(xprivkey);
});

@@ -305,0 +305,0 @@ it('recovers state from JSON', function() {

@@ -27,27 +27,18 @@ 'use strict';

var expectFail = function(func, errorType) {
var got = null;
var error = null;
try {
(function() {
func();
} catch (e) {
error = e;
got = e instanceof errorType;
}
if (!error instanceof errorType) {
console.log('Error', typeof error);
}
// expect(got).to.equal(true);
}).should.throw(errorType);
};
var expectDerivationFail = function(argument, error) {
return expectFail(function() {
(function() {
var pubkey = new HDPublicKey(xpubkey);
xpubkey.derive(argument);
}, error);
pubkey.derive(argument);
}).should.throw(error);
};
var expectFailBuilding = function(argument, error) {
return expectFail(function() {
(function() {
return new HDPublicKey(argument);
}, error);
}).should.throw(error);
};

@@ -107,3 +98,3 @@

it('can be generated from a json', function() {
expect(new HDPublicKey(json).xpubkey).to.equal(xpubkey);
expect(new HDPublicKey(JSON.parse(json)).xpubkey).to.equal(xpubkey);
});

@@ -113,3 +104,3 @@

assert(_.isEqual(
new HDPublicKey(json).toJSON(),
new HDPublicKey(JSON.parse(json)).toJSON(),
new HDPublicKey(xpubkey).toJSON()

@@ -193,7 +184,4 @@ ));

var pubkey = new HDPublicKey(xpubkey);
expect(HDPublicKey.fromJSON(pubkey.toJSON()).xpubkey).to.equal(xpubkey);
expect(HDPublicKey.fromObject(pubkey.toJSON()).xpubkey).to.equal(xpubkey);
});
it('recovers state from JSON', function() {
new HDPublicKey(JSON.stringify(plainObject)).xpubkey.should.equal(xpubkey);
});
it('recovers state from Object', function() {

@@ -235,6 +223,6 @@ new HDPublicKey(plainObject).xpubkey.should.equal(xpubkey);

/* jshint quotmark: double */
expectDerivationFail("m'", hdErrors.InvalidDerivationArgument);
expectDerivationFail("M'", hdErrors.InvalidDerivationArgument);
expectDerivationFail("1", hdErrors.InvalidDerivationArgument);
expectDerivationFail("S", hdErrors.InvalidDerivationArgument);
expectDerivationFail("m'", hdErrors.InvalidIndexCantDeriveHardened);
expectDerivationFail("M'", hdErrors.InvalidIndexCantDeriveHardened);
expectDerivationFail("1", hdErrors.InvalidPath);
expectDerivationFail("S", hdErrors.InvalidPath);
});

@@ -245,43 +233,49 @@

return new HDPublicKey(xpubkey).derive(HDPublicKey.Hardened);
}, hdErrors.InvalidDerivationArgument);
}, hdErrors.InvalidIndexCantDeriveHardened);
});
it('validates correct paths', function() {
var valid;
it('can\'t derive hardened keys via second argument', function() {
expectFail(function() {
return new HDPublicKey(xpubkey).derive(5, true);
}, hdErrors.InvalidIndexCantDeriveHardened);
});
valid = HDPublicKey.isValidPath('m/123/12');
valid.should.equal(true);
it('validates correct paths', function() {
var valid;
valid = HDPublicKey.isValidPath('m');
valid.should.equal(true);
valid = HDPublicKey.isValidPath('m/123/12');
valid.should.equal(true);
valid = HDPublicKey.isValidPath(123);
valid.should.equal(true);
});
valid = HDPublicKey.isValidPath('m');
valid.should.equal(true);
it('rejects illegal paths', function() {
var valid;
valid = HDPublicKey.isValidPath(123);
valid.should.equal(true);
});
valid = HDPublicKey.isValidPath('m/-1/12');
valid.should.equal(false);
it('rejects illegal paths', function() {
var valid;
valid = HDPublicKey.isValidPath("m/0'/12");
valid.should.equal(false);
valid = HDPublicKey.isValidPath('m/-1/12');
valid.should.equal(false);
valid = HDPublicKey.isValidPath("m/8000000000/12");
valid.should.equal(false);
valid = HDPublicKey.isValidPath("m/0'/12");
valid.should.equal(false);
valid = HDPublicKey.isValidPath('bad path');
valid.should.equal(false);
valid = HDPublicKey.isValidPath("m/8000000000/12");
valid.should.equal(false);
valid = HDPublicKey.isValidPath(-1);
valid.should.equal(false);
valid = HDPublicKey.isValidPath('bad path');
valid.should.equal(false);
valid = HDPublicKey.isValidPath(8000000000);
valid.should.equal(false);
valid = HDPublicKey.isValidPath(-1);
valid.should.equal(false);
valid = HDPublicKey.isValidPath(HDPublicKey.Hardened);
valid.should.equal(false);
});
valid = HDPublicKey.isValidPath(8000000000);
valid.should.equal(false);
valid = HDPublicKey.isValidPath(HDPublicKey.Hardened);
valid.should.equal(false);
});
it('should use the cache', function() {

@@ -288,0 +282,0 @@ var pubkey = new HDPublicKey(xpubkey);

@@ -201,3 +201,3 @@ 'use strict';

describe('#json', function() {
describe('#json/object', function() {

@@ -210,3 +210,4 @@ it('should input/output json', function() {

});
PrivateKey.fromJSON(json).toJSON().should.deep.equal(json);
var key = PrivateKey.fromObject(JSON.parse(json));
JSON.stringify(key).should.equal(json);
});

@@ -216,7 +217,7 @@

['livenet', 'testnet', 'mainnet'].forEach(function (net) {
var pk = PrivateKey.fromJSON(JSON.stringify({
var pk = PrivateKey.fromObject({
bn: '96c132224121b509b7d0a16245e957d9192609c5637c6228311287b1be21627a',
compressed: false,
network: net
}));
});
pk.network.should.be.deep.equal(Networks.get(net));

@@ -226,6 +227,2 @@ });

it('an object with private key info can be also used as argument for "fromJSON"', function() {
expect(PrivateKey._isJSON({bn: true, network: true})).to.equal(true);
});
it('fails on invalid argument', function() {

@@ -239,3 +236,3 @@ expect(function() {

expect(function() {
return PrivateKey.fromJSON(new PrivateKey().toObject());
return PrivateKey.fromObject(new PrivateKey().toObject());
}).to.not.throw();

@@ -242,0 +239,0 @@ });

@@ -172,3 +172,3 @@ 'use strict';

describe('#json', function() {
describe('#json/object', function() {

@@ -181,3 +181,4 @@ it('should input/ouput json', function() {

});
PublicKey.fromJSON(json).toJSON().should.deep.equal(json);
var pubkey = new PublicKey(JSON.parse(json));
JSON.stringify(pubkey).should.deep.equal(json);
});

@@ -187,6 +188,6 @@

expect(function() {
return PublicKey.fromJSON('{"x": "1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a"}');
return new PublicKey({
x: '1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a'
});
}).to.throw();
// coverage
PublicKey._isJSON({x: '1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a'}).should.equal(false);
});

@@ -193,0 +194,0 @@

@@ -79,10 +79,11 @@ 'use strict';

});
it('fromJSON should work', function() {
var input = Input.fromJSON(coinbaseJSON);
var otherInput = Input.fromJSON(otherJSON);
it('fromObject should work', function() {
var jsonData = JSON.parse(coinbaseJSON);
var input = Input.fromObject(jsonData);
should.exist(input);
should.exist(otherInput);
input.prevTxId.toString('hex').should.equal(jsonData.prevTxId);
input.outputIndex.should.equal(jsonData.outputIndex);
});
it('fromObject should work', function() {
var input = Input.fromJSON(coinbaseJSON);
var input = Input.fromObject(JSON.parse(coinbaseJSON));
var obj = input.toObject();

@@ -89,0 +90,0 @@ Input.fromObject(obj).should.deep.equal(input);

@@ -97,4 +97,4 @@ 'use strict';

it('can instantiate from JSON', function() {
var out = new Output(JSON.stringify(output.toObject()));
it('can instantiate from an object', function() {
var out = new Output(output.toObject());
should.exist(out);

@@ -165,5 +165,5 @@ });

it('roundtrips to/from JSON', function() {
var json = output2.toJSON();
var o3 = new Output(json);
o3.toJSON().should.equal(json);
var json = JSON.stringify(output2);
var o3 = new Output(JSON.parse(json));
JSON.stringify(o3).should.equal(json);
});

@@ -170,0 +170,0 @@

@@ -114,9 +114,10 @@ 'use strict';

var serialized = signature.toObject();
var json = signature.toJSON();
expect(TransactionSignature(json).toObject()).to.deep.equal(serialized);
expect(TransactionSignature.fromJSON(json).toObject()).to.deep.equal(serialized);
var json = JSON.stringify(signature);
expect(TransactionSignature(JSON.parse(json)).toObject()).to.deep.equal(serialized);
expect(TransactionSignature.fromObject(JSON.parse(json)).toObject()).to.deep.equal(serialized);
});
it('can parse a previously known json string', function() {
expect(JSON.parse(TransactionSignature(testJSON).toJSON())).to.deep.equal(JSON.parse(testJSON));
var str = JSON.stringify(TransactionSignature(JSON.parse(testJSON)));
expect(JSON.parse(str)).to.deep.equal(JSON.parse(testJSON));
});

@@ -123,0 +124,0 @@

@@ -581,3 +581,3 @@ 'use strict';

transaction.change(changeAddress);
expect(JSON.parse(transaction.toJSON()).changeScript).to.equal(Script.fromAddress(changeAddress).toString());
expect(transaction.toJSON().changeScript).to.equal(Script.fromAddress(changeAddress).toString());
expect(new Transaction(transaction.toJSON()).uncheckedSerialize()).to.equal(transaction.uncheckedSerialize());

@@ -763,6 +763,15 @@ });

var transaction = new Transaction();
transaction.fromJSON.bind(transaction, unsupportedTxObj)
transaction.fromObject.bind(transaction, JSON.parse(unsupportedTxObj))
.should.throw('Unsupported input script type: OP_1 OP_ADD OP_2 OP_EQUAL');
});
it('will error if object hash does not match transaction hash', function() {
var tx = new Transaction(tx_1_hex);
var txObj = tx.toObject();
txObj.hash = 'a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458';
(function() {
var tx2 = new Transaction(txObj);
}).should.throw('Hash in object does not match transaction hash');
});
describe('inputAmount + outputAmount', function() {

@@ -769,0 +778,0 @@ it('returns correct values for simple transaction', function() {

@@ -87,14 +87,9 @@ 'use strict';

var utxo = new UnspentOutput(sampleData2);
expect(
JSON.parse(
UnspentOutput.fromJSON(
UnspentOutput.fromObject(
UnspentOutput.fromJSON(
utxo.toJSON()
).toObject()
).toJSON()
).toJSON()
)
).to.deep.equal(sampleData2);
var obj = UnspentOutput.fromObject(utxo.toJSON()).toObject();
expect(obj).to.deep.equal(sampleData2);
var str = JSON.stringify(UnspentOutput.fromObject(obj));
expect(JSON.parse(str)).to.deep.equal(sampleData2);
var str2 = JSON.stringify(new UnspentOutput(JSON.parse(str)));
expect(JSON.parse(str2)).to.deep.equal(sampleData2);
});
});

@@ -160,4 +160,4 @@ 'use strict';

var json = JSON.stringify({amount:1.3, code:'BTC'});
var unit = Unit.fromJSON(json);
unit.toJSON().should.deep.equal(json);
var unit = Unit.fromObject(JSON.parse(json));
JSON.stringify(unit).should.deep.equal(json);
});

@@ -164,0 +164,0 @@

@@ -186,3 +186,3 @@ 'use strict';

});
URI.fromJSON(json).toJSON().should.deep.equal(json);
JSON.stringify(URI.fromObject(JSON.parse(json))).should.equal(json);
});

@@ -189,0 +189,0 @@

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