|
@ -254,11 +254,9 @@ Transaction.prototype.fromObject = function(transaction) { |
|
|
input.output.script = new Script(input.output.script); |
|
|
input.output.script = new Script(input.output.script); |
|
|
var txin; |
|
|
var txin; |
|
|
if (input.output.script.isPublicKeyHashOut()) { |
|
|
if (input.output.script.isPublicKeyHashOut()) { |
|
|
console.log('p2pkh'); |
|
|
|
|
|
console.log(input.output.script); |
|
|
console.log(input.output.script); |
|
|
txin = new Input.PublicKeyHash(input); |
|
|
txin = new Input.PublicKeyHash(input); |
|
|
} else if (input.output.script.isScriptHashOut() && input.publicKeys && input.threshold) { |
|
|
} else if (input.output.script.isScriptHashOut() && input.publicKeys && input.threshold) { |
|
|
console.log('p2sh'); |
|
|
|
|
|
txin = new Input.MultiSigScriptHash( |
|
|
txin = new Input.MultiSigScriptHash( |
|
|
input, input.publicKeys, input.threshold, input.signatures |
|
|
input, input.publicKeys, input.threshold, input.signatures |
|
|
); |
|
|
); |
|
|