MCPcopy Index your code
hub / github.com/bcoin-org/bcoin / isScripthash

Method isScripthash

lib/script/script.js:1980–1985  ·  view source on GitHub ↗

* 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}

()

Source from the content-addressed store, hash-verified

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.

Callers 15

getTypeMethod · 0.95
getScripthashMethod · 0.95
getScripthashSigopsMethod · 0.95
getWitnessSigopsMethod · 0.95
compressScriptFunction · 0.45
sizeScriptFunction · 0.45
estimateSizeMethod · 0.45
getAddressInfoMethod · 0.45
fromAddressMethod · 0.45
verifyMethod · 0.45
sizeScriptFunction · 0.45
signRawTransactionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected