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

Method fromJSON

lib/script/script.js:425–428  ·  view source on GitHub ↗

* Inject properties from json object. * @private * @param {String} json

(json)

Source from the content-addressed store, hash-verified

423 */
424
425 fromJSON(json) {
426 assert(typeof json === 'string', 'Code must be a string.');
427 return this.fromRaw(Buffer.from(json, 'hex'));
428 }
429
430 /**
431 * Instantiate script from a hex string.

Callers

nothing calls this directly

Calls 2

fromRawMethod · 0.95
fromMethod · 0.80

Tested by

no test coverage detected