code: function CoinSelector(tx, options) {
    if (!(this instanceof CoinSelector))
      return new CoinSelector(tx, options);
  
    this.tx = tx.clone();
    this.coins = [];
    this.outputValue = 0;
    this.index = 0;
    this.chosen = [];
    this.change = 0;
    this.fee = CoinSelector.MIN_FEE;
  
    this.selection = 'value';
    this.subtractFee = false;
    this.subtractIndex = -1;
    this.height = -1;
    this.depth = -1;
    this.hardFee = -1;
    this.rate = CoinSelector.FEE_RATE;
    this.maxFee = -1;
    this.round = false;
    this.changeAddress = null;
  
    // Needed for size estimation.
    this.estimate = null;
  
    if (options)
      this.fromOptions(options);
  }
docs: Coin Selector
  @alias module:primitives.CoinSelector
  @constructor
  @param {TX} tx
  @param {Object?} options