diff --git a/src/script.js b/src/script.js index 003e95f..793f227 100644 --- a/src/script.js +++ b/src/script.js @@ -419,7 +419,7 @@ Script.createMultisigOutputScript = function(m, pubKeys) { } // {signature} {pubKey} -Script.createInputScript = function(signature, pubKey) { +Script.createPubKeyHashScriptSig = function(signature, pubKey) { var script = new Script() script.writeBytes(signature) script.writeBytes(pubKey.toBuffer()) diff --git a/src/transaction.js b/src/transaction.js index c610056..f346125 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -320,7 +320,7 @@ Transaction.prototype.sign = function(index, key, type, network) { var script = Script.createOutputScript(address, network) var signature = this.signScriptSig(index, script, key, type) - var scriptSig = Script.createInputScript(signature, key.pub) + var scriptSig = Script.createPubKeyHashScriptSig(signature, key.pub) this.setScriptSig(index, scriptSig) }