URI = function(data, knownParams) {
  if (!(this instanceof URI)) {
    return new URI(data, knownParams);
  }

  this.extras = {};
  this.knownParams = knownParams || [];
  this.address = this.network = this.amount = this.message = null;

  if (typeof(data) === 'string') {
    var params = URI.parse(data);
    if (params.amount) {
      params.amount = this._parseAmount(params.amount);
    }
    this._fromObject(params);
  } else if (typeof(data) === 'object') {
    this._fromObject(data);
  } else {
    throw new TypeError('Unrecognized data format.');
  }
}
Bitcore URI

Instantiate an URI from a bitcoin URI String or an Object. An URI instance
can be created with a bitcoin uri string or an object. All instances of
URI are valid, the static method isValid allows checking before instantiation.

All standard parameters can be found as members of the class, the address
is represented using an {Address} instance and the amount is represented in
satoshis. Any other non-standard parameters can be found under the extra member.

@example
```javascript

var uri = new URI('bitcoin:12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu?amount=1.2');
console.log(uri.address, uri.amount);
```

@param {string|Object} data - A bitcoin URI string or an Object
@param {Array.<string>=} knownParams - Required non-standard params
@throws {TypeError} Invalid bitcoin address
@throws {TypeError} Invalid amount
@throws {Error} Unknown required argument
@returns {URI} A new valid and frozen instance of URI
@constructor