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

Method fromNum

lib/script/opcode.js:506–509  ·  view source on GitHub ↗

* Instantiate an opcode from a ScriptNum. * @param {ScriptNumber} num * @returns {Opcode}

(num)

Source from the content-addressed store, hash-verified

504 */
505
506 static fromNum(num) {
507 assert(ScriptNum.isScriptNum(num));
508 return this.fromData(num.encode());
509 }
510
511 /**
512 * Instantiate an opcode from a Number.

Callers 2

fromIntMethod · 0.95
toFormatMethod · 0.45

Calls 3

fromDataMethod · 0.95
isScriptNumMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected