MCPcopy Create free account
hub / github.com/bcoin-org/bcoin / toASM

Method toASM

lib/script/script.js:353–363  ·  view source on GitHub ↗

* Format the script as bitcoind asm. * @param {Boolean?} decode - Attempt to decode hash types. * @returns {String} Human-readable script.

(decode)

Source from the content-addressed store, hash-verified

351 */
352
353 toASM(decode) {
354 if (this.isNulldata())
355 decode = false;
356
357 const out = [];
358
359 for (const op of this.code)
360 out.push(op.toASM(decode));
361
362 return out.join(' ');
363 }
364
365 /**
366 * Re-encode the script internally. Useful if you

Callers

nothing calls this directly

Calls 3

isNulldataMethod · 0.95
joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected