Merge pull request #78 from maraoz/bug/fix-node-Transaction
fix Transaction for node
This commit is contained in:
commit
b63c7067e8
|
@ -14,7 +14,7 @@ module.exports.Opcode = require('./Opcode');
|
||||||
module.exports.util = require('./util/util');
|
module.exports.util = require('./util/util');
|
||||||
module.exports.Script = require('./Script');
|
module.exports.Script = require('./Script');
|
||||||
module.exports.SINKey = require('./SINKey');
|
module.exports.SINKey = require('./SINKey');
|
||||||
//module.exports.Transaction = require('./Transaction');
|
module.exports.Transaction = require('./Transaction');
|
||||||
|
|
||||||
|
|
||||||
if (typeof process.versions === 'undefined') {
|
if (typeof process.versions === 'undefined') {
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"binary": "=0.3.0",
|
"binary": "=0.3.0",
|
||||||
"step": "=0.0.4",
|
"step": "=0.0.4",
|
||||||
"buffers": "=0.1.1",
|
"buffers": "=0.1.1",
|
||||||
"buffertools": "=1.1.1",
|
"buffertools": "~2.0.1",
|
||||||
"mocha": ">=1.15.1",
|
"mocha": ">=1.15.1",
|
||||||
"browserify-bignum": "git://github.com/maraoz/browserify-bignum.git"
|
"browserify-bignum": "git://github.com/maraoz/browserify-bignum.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@ var should = chai.should();
|
||||||
var TransactionModule = bitcore.Transaction;
|
var TransactionModule = bitcore.Transaction;
|
||||||
var Transaction;
|
var Transaction;
|
||||||
|
|
||||||
describe.skip('Transaction', function() {
|
describe('Transaction', function() {
|
||||||
it('should initialze the main object', function() {
|
it('should initialze the main object', function() {
|
||||||
should.exist(TransactionModule);
|
should.exist(TransactionModule);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var crypto = require('crypto');
|
var crypto = require('crypto');
|
||||||
var bignum = require('bignum');
|
var bignum = require('bignum');
|
||||||
var Binary = require('binary');
|
var Binary = require('binary');
|
||||||
var Put = require('bufferput');
|
var Put = require('bufferput');
|
||||||
|
require('buffertools').extend();
|
||||||
|
|
||||||
var sha256 = exports.sha256 = function (data) {
|
var sha256 = exports.sha256 = function (data) {
|
||||||
return new Buffer(crypto.createHash('sha256').update(data).digest('binary'), 'binary');
|
return new Buffer(crypto.createHash('sha256').update(data).digest('binary'), 'binary');
|
||||||
|
|
Loading…
Reference in New Issue