MCPcopy
hub / github.com/bcoin-org/bcoin / fromNulldata

Method fromNulldata

lib/script/script.js:1559–1568  ·  view source on GitHub ↗

* Inject properties from a nulldata/opreturn script. * @private * @param {Buffer} flags

(flags)

Source from the content-addressed store, hash-verified

1557 */
1558
1559 fromNulldata(flags) {
1560 assert(Buffer.isBuffer(flags));
1561 assert(flags.length <= policy.MAX_OP_RETURN, 'Nulldata too large.');
1562
1563 this.clear();
1564 this.pushOp(opcodes.OP_RETURN);
1565 this.pushData(flags);
1566
1567 return this.compile();
1568 }
1569
1570 /**
1571 * Create a nulldata/opreturn script.

Callers 3

decompressScriptFunction · 0.80
decompressScriptFunction · 0.80
createRawTransactionMethod · 0.80

Calls 4

clearMethod · 0.95
pushOpMethod · 0.95
pushDataMethod · 0.95
compileMethod · 0.95

Tested by

no test coverage detected