|
|
@ -115,8 +115,8 @@ Script.prototype.isMultiSig = function() { |
|
|
|
this.chunks[this.chunks.length - 1] == Opcode.map.OP_CHECKMULTISIG); |
|
|
|
}; |
|
|
|
|
|
|
|
Script.prototype.isPubkeyHashScript = function() { |
|
|
|
// TODO: add more restrictions to chunks
|
|
|
|
Script.prototype.isPubkeyHashScriptSig = function() { |
|
|
|
// TODO: add more restrictions to chunks?
|
|
|
|
return (this.chunks.length == 2 && |
|
|
|
Buffer.isBuffer(this.chunks[0]) && |
|
|
|
Buffer.isBuffer(this.chunks[1])); |
|
|
@ -149,7 +149,7 @@ Script.prototype.countSignatures = function() { |
|
|
|
ret = l - 2; |
|
|
|
} |
|
|
|
// p2pubkeyhash
|
|
|
|
else if (this.isPubkeyHashScript()) { |
|
|
|
else if (this.isPubkeyHashScriptSig()) { |
|
|
|
ret = 1; |
|
|
|
} |
|
|
|
// p2pubkey
|
|
|
@ -176,7 +176,7 @@ Script.prototype.getSignatures = function() { |
|
|
|
} |
|
|
|
} |
|
|
|
// p2pubkeyhash
|
|
|
|
else if (this.isPubkeyHashScript()) { |
|
|
|
else if (this.isPubkeyHashScriptSig()) { |
|
|
|
ret.push(this.chunks[0]); |
|
|
|
} |
|
|
|
// p2pubkey
|
|
|
|