Script = function Script(from) {
  if (!(this instanceof Script)) {
    return new Script(from);
  }
  this.chunks = [];

  if (BufferUtil.isBuffer(from)) {
    return Script.fromBuffer(from);
  } else if (from instanceof Address) {
    return Script.fromAddress(from);
  } else if (from instanceof Script) {
    return Script.fromBuffer(from.toBuffer());
  } else if (typeof from === 'string') {
    return Script.fromString(from);
  } else if (_.isObject(from) && Array.isArray(from.chunks)) {
    this.set(from);
  }
}
A bitcoin transaction script. Each transaction's inputs and outputs
has a script that is evaluated to validate it's spending.

See https://en.bitcoin.it/wiki/Script

@constructor
@param {Object|string|Buffer=} from optional data to populate script