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

Method getRedeem

lib/script/script.js:1689–1706  ·  view source on GitHub ↗

* Grab and deserialize the redeem script. * @returns {Script|null} Redeem script.

()

Source from the content-addressed store, hash-verified

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.

Callers 3

getScripthashSigopsMethod · 0.45
getWitnessSigopsMethod · 0.45
input-test.jsFile · 0.45

Calls 1

fromRawMethod · 0.45

Tested by

no test coverage detected