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

Method getProgram

lib/script/script.js:2108–2116  ·  view source on GitHub ↗

* Get the witness program if present. * @returns {Program|null}

()

Source from the content-addressed store, hash-verified

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

Callers 3

getWitnessSigopsMethod · 0.95
toJSONMethod · 0.45
verifyProgramMethod · 0.45

Calls 3

isProgramMethod · 0.95
getSmallMethod · 0.95
getDataMethod · 0.95

Tested by

no test coverage detected