Removes applyMultisigs and adds setScriptSig
This commit is contained in:
parent
960d931010
commit
9af8d95daf
1 changed files with 4 additions and 5 deletions
|
@ -319,8 +319,9 @@ Transaction.prototype.sign = function(index, key, type, network) {
|
||||||
var script = Script.createOutputScript(address, network)
|
var script = Script.createOutputScript(address, network)
|
||||||
var hash = this.hashTransactionForSignature(script, index, type)
|
var hash = this.hashTransactionForSignature(script, index, type)
|
||||||
var sig = key.sign(hash).concat([type])
|
var sig = key.sign(hash).concat([type])
|
||||||
|
var scriptSig = Script.createInputScript(sig, key.pub)
|
||||||
|
|
||||||
this.ins[index].script = Script.createInputScript(sig, key.pub)
|
this.setScriptSig(index, scriptSig)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Takes outputs of the form [{ output: 'txhash:index', address: 'address' },...]
|
// Takes outputs of the form [{ output: 'txhash:index', address: 'address' },...]
|
||||||
|
@ -369,10 +370,8 @@ Transaction.prototype.p2shsign = function(index, script, key, type) {
|
||||||
return sig
|
return sig
|
||||||
}
|
}
|
||||||
|
|
||||||
Transaction.prototype.multisign = Transaction.prototype.p2shsign
|
Transaction.prototype.setScriptSig = function(index, script) {
|
||||||
|
this.ins[index].script = script
|
||||||
Transaction.prototype.applyMultisigs = function(index, script, sigs/*, type*/) {
|
|
||||||
this.ins[index].script = Script.createMultiSigInputScript(sigs, script)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Transaction.prototype.validateSig = function(index, script, sig, pub) {
|
Transaction.prototype.validateSig = function(index, script, sig, pub) {
|
||||||
|
|
Loading…
Reference in a new issue