|
@ -193,21 +193,21 @@ Script.prototype.getMultiSigInfo = function() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var nsigs = this.chunks[0] - 80; //see OP_2-OP_16;
|
|
|
var nsigs = this.chunks[0] - 80; //see OP_2-OP_16;
|
|
|
var npks = this.chunks[this.chunks.length - 2] - 80; //see OP_2-OP_16;
|
|
|
var npubkeys = this.chunks[this.chunks.length - 2] - 80; //see OP_2-OP_16;
|
|
|
|
|
|
|
|
|
var pks = []; |
|
|
var pubkeys = []; |
|
|
for (var i = 1; i < this.chunks.length - 2; i++) { |
|
|
for (var i = 1; i < this.chunks.length - 2; i++) { |
|
|
pks.push(this.chunks[i]); |
|
|
pubkeys.push(this.chunks[i]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (pks.length != npks) { |
|
|
if (pubkeys.length != npubkeys) { |
|
|
throw new Error("Script.getMultiSigInfo(): Amount of PKs does not match what the script specifies."); |
|
|
throw new Error("Script.getMultiSigInfo(): Amount of PKs does not match what the script specifies."); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
nsigs : nsigs, |
|
|
nsigs : nsigs, |
|
|
npks : npks, |
|
|
npubkeys : npubkeys, |
|
|
pks : pks |
|
|
pubkeys : pubkeys |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|