|
|
@ -657,6 +657,14 @@ Transaction.prototype.applySignature = function(signature) { |
|
|
|
}; |
|
|
|
|
|
|
|
Transaction.prototype.isFullySigned = function() { |
|
|
|
_.each(this.inputs, function(input) { |
|
|
|
if (input.isFullySigned === Input.prototype.isFullySigned) { |
|
|
|
throw new errors.Transaction.UnableToVerifySignature( |
|
|
|
'Unrecognized script kind, or not enough information to execute script.' + |
|
|
|
'This usually happens when creating a transaction from a serialized transaction' |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
return _.all(_.map(this.inputs, function(input) { |
|
|
|
return input.isFullySigned(); |
|
|
|
})); |
|
|
@ -664,6 +672,12 @@ Transaction.prototype.isFullySigned = function() { |
|
|
|
|
|
|
|
Transaction.prototype.isValidSignature = function(signature) { |
|
|
|
var self = this; |
|
|
|
if (this.inputs[signature.inputIndex].isValidSignature === Input.prototype.isValidSignature) { |
|
|
|
throw new errors.Transaction.UnableToVerifySignature( |
|
|
|
'Unrecognized script kind, or not enough information to execute script.' + |
|
|
|
'This usually happens when creating a transaction from a serialized transaction' |
|
|
|
); |
|
|
|
} |
|
|
|
return this.inputs[signature.inputIndex].isValidSignature(self, signature); |
|
|
|
}; |
|
|
|
|
|
|
|