* Test whether the output script is pay-to-scripthash. Note that * bitcoin itself requires scripthashes to be in strict minimaldata * encoding. Using `OP_HASH160 OP_PUSHDATA1 [hash] OP_EQUAL` will * _not_ be recognized as a scripthash. * @returns {Boolean}
()
| 1978 | */ |
| 1979 | |
| 1980 | isScripthash() { |
| 1981 | return this.raw.length === 23 |
| 1982 | && this.raw[0] === opcodes.OP_HASH160 |
| 1983 | && this.raw[1] === 0x14 |
| 1984 | && this.raw[22] === opcodes.OP_EQUAL; |
| 1985 | } |
| 1986 | |
| 1987 | /** |
| 1988 | * Get P2SH hash if present. |
no outgoing calls
no test coverage detected