* Get the script's "subscript" starting at a separator. * @param {Number} index - The last separator to sign/verify beyond. * @returns {Script} Subscript.
(index)
| 444 | */ |
| 445 | |
| 446 | getSubscript(index) { |
| 447 | if (index === 0) |
| 448 | return this.clone(); |
| 449 | |
| 450 | const script = new Script(); |
| 451 | |
| 452 | for (let i = index; i < this.code.length; i++) { |
| 453 | const op = this.code[i]; |
| 454 | |
| 455 | if (op.value === -1) |
| 456 | break; |
| 457 | |
| 458 | script.code.push(op); |
| 459 | } |
| 460 | |
| 461 | return script.compile(); |
| 462 | } |
| 463 | |
| 464 | /** |
| 465 | * Get the script's "subscript" starting at a separator. |
no test coverage detected