* Get the witness program if present. * @returns {Program|null}
()
| 2106 | */ |
| 2107 | |
| 2108 | getProgram() { |
| 2109 | if (!this.isProgram()) |
| 2110 | return null; |
| 2111 | |
| 2112 | const version = this.getSmall(0); |
| 2113 | const data = this.getData(1); |
| 2114 | |
| 2115 | return new Program(version, data); |
| 2116 | } |
| 2117 | |
| 2118 | /** |
| 2119 | * Get the script to the equivalent witness |
no test coverage detected