add buildermockv0 to show old / obsolete tx proposals

This commit is contained in:
Matias Alejo Garcia 2014-07-25 11:59:13 -03:00
commit 2008db932b
3 changed files with 36 additions and 3 deletions

View file

@ -0,0 +1,26 @@
'use strict';
var bitcore = require('bitcore');
var Transaction = bitcore.Transaction;
function BuilderMockV0 (data) {
this.vanilla = data;
this.tx = new Transaction();
this.tx.parse(new Buffer(data.tx, 'hex'));
};
BuilderMockV0.prototype.build = function() {
return this.tx;
};
BuilderMockV0.prototype.getSelectedUnspent = function() {
return [];
};
BuilderMockV0.prototype.toObj = function() {
return this.vanilla;
};
module.exports = BuilderMockV0;