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

Method fromArray

lib/script/script.js:168–177  ·  view source on GitHub ↗

* Inject properties from an array of * of buffers and numbers. * @private * @param {Array} code * @returns {Script}

(code)

Source from the content-addressed store, hash-verified

166 */
167
168 fromArray(code) {
169 assert(Array.isArray(code));
170
171 this.clear();
172
173 for (const op of code)
174 this.push(op);
175
176 return this.compile();
177 }
178
179 /**
180 * Instantiate script from an array

Callers 1

fromOptionsMethod · 0.95

Calls 3

clearMethod · 0.95
pushMethod · 0.95
compileMethod · 0.95

Tested by

no test coverage detected