commit
1dce3d6ad9
27
index.js
27
index.js
|
@ -1,19 +1,21 @@
|
|||
var bitcore = module.exports;
|
||||
|
||||
// protocol
|
||||
bitcore.Constants = require('./lib/protocol/constants');
|
||||
bitcore.Base58 = require('./lib/protocol/base58');
|
||||
bitcore.Base58Check = require('./lib/protocol/base58check');
|
||||
bitcore.BufferReader = require('./lib/protocol/bufferreader');
|
||||
bitcore.BufferWriter = require('./lib/protocol/bufferwriter');
|
||||
bitcore.Varint = require('./lib/protocol/varint');
|
||||
|
||||
// crypto
|
||||
bitcore.BN = require('./lib/crypto/bn');
|
||||
bitcore.ECDSA = require('./lib/crypto/ecdsa');
|
||||
bitcore.Hash = require('./lib/crypto/hash');
|
||||
bitcore.Random = require('./lib/crypto/random');
|
||||
bitcore.Point = require('./lib/crypto/point');
|
||||
bitcore.crypto = {};
|
||||
bitcore.crypto.BN = require('./lib/crypto/bn');
|
||||
bitcore.crypto.ECDSA = require('./lib/crypto/ecdsa');
|
||||
bitcore.crypto.Hash = require('./lib/crypto/hash');
|
||||
bitcore.crypto.Random = require('./lib/crypto/random');
|
||||
bitcore.crypto.Point = require('./lib/crypto/point');
|
||||
|
||||
// encoding
|
||||
bitcore.encoding = {};
|
||||
bitcore.encoding.Base58 = require('./lib/encoding/base58');
|
||||
bitcore.encoding.Base58Check = require('./lib/encoding/base58check');
|
||||
bitcore.encoding.BufferReader = require('./lib/encoding/bufferreader');
|
||||
bitcore.encoding.BufferWriter = require('./lib/encoding/bufferwriter');
|
||||
bitcore.encoding.Varint = require('./lib/encoding/varint');
|
||||
|
||||
// main bitcoin library
|
||||
bitcore.Address = require('./lib/address');
|
||||
|
@ -21,6 +23,7 @@ bitcore.BIP32 = require('./lib/bip32');
|
|||
bitcore.Block = require('./lib/block');
|
||||
bitcore.Blockheader = require('./lib/blockheader');
|
||||
bitcore.Keypair = require('./lib/keypair');
|
||||
bitcore.Networks = require('./lib/networks');
|
||||
bitcore.Opcode = require('./lib/opcode');
|
||||
bitcore.Privkey = require('./lib/privkey');
|
||||
bitcore.Pubkey = require('./lib/pubkey');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var base58check = require('./protocol/base58check');
|
||||
var constants = require('./protocol/constants');
|
||||
var base58check = require('./encoding/base58check');
|
||||
var networks = require('./networks');
|
||||
var Hash = require('./crypto/hash');
|
||||
|
||||
function Address(buf) {
|
||||
|
@ -29,16 +29,16 @@ Address.prototype.fromBuffer = function(buf) {
|
|||
if (buf.length !== 1 + 20)
|
||||
throw new Error('Address buffers must be exactly 21 bytes');
|
||||
var version = buf[0];
|
||||
if (version === constants['mainnet']['pubkeyhash']) {
|
||||
if (version === networks['mainnet']['pubkeyhash']) {
|
||||
this.networkstr = 'mainnet';
|
||||
this.typestr = 'pubkeyhash';
|
||||
} else if (version === constants['mainnet']['scripthash']) {
|
||||
} else if (version === networks['mainnet']['scripthash']) {
|
||||
this.networkstr = 'mainnet';
|
||||
this.typestr = 'scripthash';
|
||||
} else if (version === constants['testnet']['pubkeyhash']) {
|
||||
} else if (version === networks['testnet']['pubkeyhash']) {
|
||||
this.networkstr = 'testnet';
|
||||
this.typestr = 'pubkeyhash';
|
||||
} else if (version === constants['testnet']['scripthash']) {
|
||||
} else if (version === networks['testnet']['scripthash']) {
|
||||
this.networkstr = 'testnet';
|
||||
this.typestr = 'scripthash';
|
||||
} else {
|
||||
|
@ -98,7 +98,7 @@ Address.prototype.isValid = function() {
|
|||
};
|
||||
|
||||
Address.prototype.toBuffer = function() {
|
||||
var version = new Buffer([constants[this.networkstr][this.typestr]]);
|
||||
var version = new Buffer([networks[this.networkstr][this.typestr]]);
|
||||
var buf = Buffer.concat([version, this.hashbuf]);
|
||||
return buf;
|
||||
};
|
||||
|
|
36
lib/bip32.js
36
lib/bip32.js
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var Base58Check = require('./protocol/base58check');
|
||||
var constants = require('./protocol/constants');
|
||||
var Base58Check = require('./encoding/base58check');
|
||||
var networks = require('./networks');
|
||||
var Hash = require('./crypto/hash');
|
||||
var Point = require('./crypto/point');
|
||||
var Random = require('./crypto/random');
|
||||
|
@ -38,7 +38,7 @@ BIP32.prototype.set = function(obj) {
|
|||
BIP32.prototype.fromRandom = function(networkstr) {
|
||||
if (!networkstr)
|
||||
networkstr = 'mainnet';
|
||||
this.version = constants[networkstr].bip32privkey;
|
||||
this.version = networks[networkstr].bip32privkey;
|
||||
this.depth = 0x00;
|
||||
this.parentfingerprint = new Buffer([0, 0, 0, 0]);
|
||||
this.childindex = new Buffer([0, 0, 0, 0]);
|
||||
|
@ -72,7 +72,7 @@ BIP32.prototype.fromSeed = function(bytes, networkstr) {
|
|||
this.parentfingerprint = new Buffer([0, 0, 0, 0]);
|
||||
this.childindex = new Buffer([0, 0, 0, 0]);
|
||||
this.chaincode = hash.slice(32, 64);
|
||||
this.version = constants[networkstr].bip32privkey;
|
||||
this.version = networks[networkstr].bip32privkey;
|
||||
this.keypair = new Keypair();
|
||||
this.keypair.privkey = new Privkey({bn: BN().fromBuffer(hash.slice(0, 32))});
|
||||
this.keypair.privkey2pubkey();
|
||||
|
@ -99,12 +99,12 @@ BIP32.prototype.initFromBytes = function(bytes) {
|
|||
var keyBytes = bytes.slice(45, 78);
|
||||
|
||||
var isPrivate =
|
||||
(this.version == constants.mainnet.bip32privkey ||
|
||||
this.version == constants.testnet.bip32privkey);
|
||||
(this.version == networks.mainnet.bip32privkey ||
|
||||
this.version == networks.testnet.bip32privkey);
|
||||
|
||||
var isPublic =
|
||||
(this.version == constants.mainnet.bip32pubkey ||
|
||||
this.version == constants.testnet.bip32pubkey);
|
||||
(this.version == networks.mainnet.bip32pubkey ||
|
||||
this.version == networks.testnet.bip32pubkey);
|
||||
|
||||
if (isPrivate && keyBytes[0] == 0) {
|
||||
this.keypair = new Keypair();
|
||||
|
@ -130,13 +130,13 @@ BIP32.prototype.buildxpubkey = function() {
|
|||
|
||||
var v = null;
|
||||
switch (this.version) {
|
||||
case constants.mainnet.bip32pubkey:
|
||||
case constants.mainnet.bip32privkey:
|
||||
v = constants.mainnet.bip32pubkey;
|
||||
case networks.mainnet.bip32pubkey:
|
||||
case networks.mainnet.bip32privkey:
|
||||
v = networks.mainnet.bip32pubkey;
|
||||
break;
|
||||
case constants.testnet.bip32pubkey:
|
||||
case constants.testnet.bip32privkey:
|
||||
v = constants.testnet.bip32pubkey;
|
||||
case networks.testnet.bip32pubkey:
|
||||
case networks.testnet.bip32privkey:
|
||||
v = networks.testnet.bip32pubkey;
|
||||
break;
|
||||
default:
|
||||
throw new Error('Unknown version');
|
||||
|
@ -248,8 +248,8 @@ BIP32.prototype.deriveChild = function(i) {
|
|||
var usePrivate = (i & 0x80000000) != 0;
|
||||
|
||||
var isPrivate =
|
||||
(this.version == constants.mainnet.bip32privkey ||
|
||||
this.version == constants.testnet.bip32privkey);
|
||||
(this.version == networks.mainnet.bip32privkey ||
|
||||
this.version == networks.testnet.bip32privkey);
|
||||
|
||||
if (usePrivate && (!this.hasprivkey || !isPrivate))
|
||||
throw new Error('Cannot do private key derivation without private key');
|
||||
|
@ -316,8 +316,8 @@ BIP32.prototype.deriveChild = function(i) {
|
|||
|
||||
BIP32.prototype.toString = function() {
|
||||
var isPrivate =
|
||||
(this.version == constants.mainnet.bip32privkey ||
|
||||
this.version == constants.testnet.bip32privkey);
|
||||
(this.version == networks.mainnet.bip32privkey ||
|
||||
this.version == networks.testnet.bip32privkey);
|
||||
|
||||
if (isPrivate)
|
||||
return this.xprivkeyString();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var Hash = require('./crypto/hash');
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var Varint = require('./protocol/varint');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
var Varint = require('./encoding/varint');
|
||||
var Transaction = require('./transaction');
|
||||
var Blockheader = require('./blockheader');
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
|
||||
var Blockheader = function Blockheader(version, prevblockidbuf, merklerootbuf, time, bits, nonce) {
|
||||
if (!(this instanceof Blockheader))
|
||||
|
|
|
@ -22,7 +22,4 @@ exports.testnet = {
|
|||
bip32privkey: 0x04358394,
|
||||
};
|
||||
|
||||
exports.ephemeral = {
|
||||
prefix: 0x0f,
|
||||
identity: 0x02
|
||||
};
|
||||
exports.livenet = exports.mainnet;
|
|
@ -3,8 +3,8 @@
|
|||
var BN = require('./crypto/bn');
|
||||
var Point = require('./crypto/point');
|
||||
var Random = require('./crypto/random');
|
||||
var constants = require('./protocol/constants');
|
||||
var base58check = require('./protocol/base58check');
|
||||
var networks = require('./networks');
|
||||
var base58check = require('./encoding/base58check');
|
||||
|
||||
var Privkey = function Privkey(bn) {
|
||||
if (!(this instanceof Privkey))
|
||||
|
@ -50,7 +50,7 @@ Privkey.prototype.fromRandom = function() {
|
|||
Privkey.prototype.validate = function() {
|
||||
if (!this.bn.lt(Point.getN()))
|
||||
throw new Error('Number must be less than N');
|
||||
if (typeof constants[this.networkstr] === undefined)
|
||||
if (typeof networks[this.networkstr] === undefined)
|
||||
throw new Error('Must specify the networkstr ("mainnet" or "testnet")');
|
||||
if (typeof this.compressed !== 'boolean')
|
||||
throw new Error('Must specify whether the corresponding public key is compressed or not (true or false)');
|
||||
|
@ -68,9 +68,9 @@ Privkey.prototype.toWIF = function() {
|
|||
var privbuf = this.bn.toBuffer({size: 32});
|
||||
var buf;
|
||||
if (compressed)
|
||||
buf = Buffer.concat([new Buffer([constants[networkstr].privkey]), this.bn.toBuffer({size: 32}), new Buffer([0x01])]);
|
||||
buf = Buffer.concat([new Buffer([networks[networkstr].privkey]), this.bn.toBuffer({size: 32}), new Buffer([0x01])]);
|
||||
else
|
||||
buf = Buffer.concat([new Buffer([constants[networkstr].privkey]), this.bn.toBuffer({size: 32})]);
|
||||
buf = Buffer.concat([new Buffer([networks[networkstr].privkey]), this.bn.toBuffer({size: 32})]);
|
||||
|
||||
return base58check.encode(buf);
|
||||
};
|
||||
|
@ -85,9 +85,9 @@ Privkey.prototype.fromWIF = function(str) {
|
|||
else
|
||||
throw new Error('Length of buffer must be 33 (uncompressed) or 34 (compressed)');
|
||||
|
||||
if (buf[0] === constants.mainnet.privkey)
|
||||
if (buf[0] === networks.mainnet.privkey)
|
||||
this.networkstr = 'mainnet';
|
||||
else if (buf[0] === constants.testnet.privkey)
|
||||
else if (buf[0] === networks.testnet.privkey)
|
||||
this.networkstr = 'testnet';
|
||||
else
|
||||
throw new Error('Invalid networkstr');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
var Opcode = require('./opcode');
|
||||
|
||||
var Script = function Script(buf) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var Varint = require('./protocol/varint');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var Varint = require('./encoding/varint');
|
||||
var Hash = require('./crypto/hash');
|
||||
var Txin = require('./txin');
|
||||
var Txout = require('./txout');
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var Varint = require('./protocol/varint');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
var Varint = require('./encoding/varint');
|
||||
var Script = require('./script');
|
||||
|
||||
var Txin = function Txin(txidbuf, txoutnum, scriptvi, script, seqnum) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var BN = require('./crypto/bn');
|
||||
var BufferReader = require('./protocol/bufferreader');
|
||||
var BufferWriter = require('./protocol/bufferwriter');
|
||||
var Varint = require('./protocol/varint');
|
||||
var BufferReader = require('./encoding/bufferreader');
|
||||
var BufferWriter = require('./encoding/bufferwriter');
|
||||
var Varint = require('./encoding/varint');
|
||||
var Script = require('./script');
|
||||
|
||||
var Txout = function Txout(valuebn, scriptvi, script) {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var constants = bitcore.constants;
|
||||
var BIP32 = bitcore.BIP32;
|
||||
|
||||
describe('BIP32', function() {
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var Varint = bitcore.encoding.Varint;
|
||||
var BufferReader = bitcore.encoding.BufferReader;
|
||||
var Blockheader = bitcore.Blockheader;
|
||||
var Block = bitcore.Block;
|
||||
var BufferReader = bitcore.BufferReader;
|
||||
var Varint = bitcore.Varint;
|
||||
var Transaction = bitcore.Transaction;
|
||||
|
||||
describe('Block', function() {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var BufferReader = bitcore.encoding.BufferReader;
|
||||
var Blockheader = bitcore.Blockheader;
|
||||
var BufferReader = bitcore.BufferReader;
|
||||
|
||||
describe('Blockheader', function() {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var bn = bitcore.BN;
|
||||
var bn = bitcore.crypto.BN;
|
||||
var Privkey = bitcore.Privkey;
|
||||
var Pubkey = bitcore.Pubkey;
|
||||
var Keypair = bitcore.Keypair;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var Networks = bitcore.Networks;
|
||||
|
||||
describe('Networks', function() {
|
||||
|
||||
it('should contain all Networks', function() {
|
||||
should.exist(Networks.livenet);
|
||||
should.exist(Networks.testnet);
|
||||
should.exist(Networks.mainnet);
|
||||
});
|
||||
describe('contain all constants for livenet and testnet', function() {
|
||||
for (var key in Networks.livenet) {
|
||||
if (Networks.livenet.hasOwnProperty(key)) {
|
||||
it('all should contain '+key, function() {
|
||||
Networks.testnet.hasOwnProperty(key).should.equal(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var BN = bitcore.crypto.BN;
|
||||
var Point = bitcore.crypto.Point;
|
||||
var Privkey = bitcore.Privkey;
|
||||
var BN = bitcore.BN;
|
||||
var Point = bitcore.Point;
|
||||
|
||||
describe('Privkey', function() {
|
||||
var hex = '96c132224121b509b7d0a16245e957d9192609c5637c6228311287b1be21627a';
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('../../');
|
||||
var constants = bitcore.Constants;
|
||||
|
||||
describe('Constants', function() {
|
||||
|
||||
it('should contain all constants for livenet and testnet', function() {
|
||||
for (var key in constants.livenet) {
|
||||
if (constants.livenet.hasOwnProperty(key)) {
|
||||
constants.testnet.hasOwnProperty(key).should.equal(true);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var Point = bitcore.crypto.Point;
|
||||
var BN = bitcore.crypto.BN;
|
||||
var Pubkey = bitcore.Pubkey;
|
||||
var Point = bitcore.Point;
|
||||
var Bn = bitcore.BN;
|
||||
var Privkey = bitcore.Privkey;
|
||||
|
||||
describe('Pubkey', function() {
|
||||
|
@ -128,7 +128,7 @@ describe('Pubkey', function() {
|
|||
describe('#fromX', function() {
|
||||
|
||||
it('should create this known public key', function() {
|
||||
var x = Bn.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var x = BN.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var pk = new Pubkey();
|
||||
pk.fromX(true, x);
|
||||
pk.point.getX().toString(16).should.equal('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a');
|
||||
|
@ -140,7 +140,7 @@ describe('Pubkey', function() {
|
|||
describe('#toBuffer', function() {
|
||||
|
||||
it('should return this compressed DER format', function() {
|
||||
var x = Bn.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var x = BN.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var pk = new Pubkey();
|
||||
pk.fromX(true, x);
|
||||
pk.toBuffer().toString('hex').should.equal('031ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a');
|
||||
|
@ -151,14 +151,14 @@ describe('Pubkey', function() {
|
|||
describe('#toDER', function() {
|
||||
|
||||
it('should return this compressed DER format', function() {
|
||||
var x = Bn.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var x = BN.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var pk = new Pubkey();
|
||||
pk.fromX(true, x);
|
||||
pk.toDER(true).toString('hex').should.equal('031ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a');
|
||||
});
|
||||
|
||||
it('should return this uncompressed DER format', function() {
|
||||
var x = Bn.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var x = BN.fromBuffer(new Buffer('1ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a', 'hex'));
|
||||
var pk = new Pubkey();
|
||||
pk.fromX(true, x);
|
||||
pk.toDER(false).toString('hex').should.equal('041ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a7baad41d04514751e6851f5304fd243751703bed21b914f6be218c0fa354a341');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var BN = bitcore.BN;
|
||||
var BN = bitcore.crypto.BN;
|
||||
var Signature = bitcore.Signature;
|
||||
|
||||
describe('Signature', function() {
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var Varint = bitcore.Varint;
|
||||
var Varint = bitcore.encoding.Varint;
|
||||
var BufferReader = bitcore.encoding.BufferReader;
|
||||
var Transaction = bitcore.Transaction;
|
||||
var Txin = bitcore.Txin;
|
||||
var Txout = bitcore.Txout;
|
||||
var BufferReader = bitcore.BufferReader;
|
||||
|
||||
describe('Transaction', function() {
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var Varint = bitcore.encoding.Varint;
|
||||
var BufferReader = bitcore.encoding.BufferReader;
|
||||
var Script = bitcore.Script;
|
||||
var Txin = bitcore.Txin;
|
||||
var Varint = bitcore.Varint;
|
||||
var BufferReader = bitcore.BufferReader;
|
||||
|
||||
describe('Txin', function() {
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
var should = require('chai').should();
|
||||
var bitcore = require('..');
|
||||
var BN = bitcore.BN;
|
||||
var BN = bitcore.crypto.BN;
|
||||
var Varint = bitcore.encoding.Varint;
|
||||
var BufferReader = bitcore.encoding.BufferReader;
|
||||
var Txout = bitcore.Txout;
|
||||
var Script = bitcore.Script;
|
||||
var Varint = bitcore.Varint;
|
||||
var BufferReader = bitcore.BufferReader;
|
||||
|
||||
describe('Txout', function() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue