* Grab and deserialize the redeem script. * @returns {Script|null} Redeem script.
()
| 1687 | */ |
| 1688 | |
| 1689 | getRedeem() { |
| 1690 | let data = null; |
| 1691 | |
| 1692 | for (const op of this.code) { |
| 1693 | if (op.value === -1) |
| 1694 | return null; |
| 1695 | |
| 1696 | if (op.value > opcodes.OP_16) |
| 1697 | return null; |
| 1698 | |
| 1699 | data = op.data; |
| 1700 | } |
| 1701 | |
| 1702 | if (!data) |
| 1703 | return null; |
| 1704 | |
| 1705 | return Script.fromRaw(data); |
| 1706 | } |
| 1707 | |
| 1708 | /** |
| 1709 | * Get the standard script type. |
no test coverage detected