docs: function Consumer(opts) {
    /*jshint maxstatements: 30*/
    /*jshint maxcomplexity: 10*/
    opts = opts || {};
  
    /**
     * @type {bitcore.Network}
     * @desc Either 'livenet' or 'testnet'
     */
    this.network = Networks.get(opts.network || 'livenet');
    /**
     * @type number
     * @desc The expiration date for the channel, in seconds since UNIX epoch
     */
    this.expires = opts.expires || Math.round(new Date().getTime() / 1000) + ONE_DAY;
  
    /**
     * @type bitcore.PrivateKey
     * @desc This is the key used for the 2-of-2 locking of funds
     */
    this.commitmentKey = new PrivateKey(opts.commitmentKey);
  
    /**
     * @type {bitcore.PublicKey}
     */
    this.providerPublicKey = new PublicKey(opts.providerPublicKey);
  
    /**
     * @type {bitcore.Address|string}
     * @desc The address where the server will be paid.
     */
    this.providerAddress = opts.providerAddress ? new Address(opts.providerAddress) : this.providerPublicKey.toAddress();
  
    /**
     * @type bitcore.PrivateKey
     * @desc A private key for funding the channel. An alternative implementation could
     * provide a list of unspent outputs and the keys needed to sign the outputs
     */
    $.checkArgument(opts.fundingKey instanceof PrivateKey, 'fundingKey is expected to be a PrivateKey');
    this.fundingKey = opts.fundingKey;
  
    /**
     * @type bitcore.Address
     * @desc The address where the user will pay to fund the channel
     */
    this.fundingAddress = this.fundingKey.toAddress();
  
    $.checkArgument(opts.refundAddress, 'refundAddress is expected');
  
    if (opts.refundAddress instanceof Address) {
      /**
       * @type bitcore.Address
       * @desc The address where the refund will go to (also used for the change)
       */
      this.refundAddress = opts.refundAddress;
    } else {
      this.refundAddress = new Address(opts.refundAddress);
    }
  
    /**
     * @name Consumer#commitmentTx
     * @type Commitment
     * @desc The commitment transaction for this channel
     */
    this.commitmentTx = new Commitment({
      publicKeys: [this.commitmentKey.publicKey, this.providerPublicKey],
      network: this.network
    });
  }