* Inject properties from json object. * @private * @param {String} json
(json)
| 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. |