lib/bitid.js
function Bitid(params) {
  params = params || {};
  var self = this;

  this._nonce = params.nonce;
  this.callback = url.parse(params.callback, true);
  this.signature = params.signature;
  this.address = params.address;
  this.unsecure = params.unsecure;
  this._uri = !params.uri ? buildURI() : url.parse(params.uri, true);

  function buildURI() {
    var uri = self.callback;
    uri.protocol = SCHEME;
    var params = {};
    params[PARAM_NONCE] = self._nonce;
    if(self.unsecure) params[PARAM_UNSECURE] = 1;
    uri.query = params;
    uri.href = url.format(uri);

    return uri;
  }
}
function Bitid(params) {
  params = params || {};
  var self = this;

  this._nonce = params.nonce;
  this.callback = url.parse(params.callback, true);
  this.signature = params.signature;
  this.address = params.address;
  this.unsecure = params.unsecure;
  this._uri = !params.uri ? buildURI() : url.parse(params.uri, true);

  function buildURI() {
    var uri = self.callback;
    uri.protocol = SCHEME;
    var params = {};
    params[PARAM_NONCE] = self._nonce;
    if(self.unsecure) params[PARAM_UNSECURE] = 1;
    uri.query = params;
    uri.href = url.format(uri);

    return uri;
  }
}
function Bitid ( params ) { params = params || { } ; var self = this ; this . _nonce = params . nonce ; this . callback = url . parse ( params . callback , true ) ; this . signature = params . signature ; this . address = params . address ; this . unsecure = params . unsecure ; this . _uri = ! params . uri ? buildURI ( ) : url . parse ( params . uri , true ) ; function buildURI ( ) { var uri = self . callback ; uri . protocol = SCHEME ; var params = { } ; params [ PARAM_NONCE ] = self . _nonce ; if ( self . unsecure ) params [ PARAM_UNSECURE ] = 1 ; uri . query = params ; uri . href = url . format ( uri ) ; return uri ; } }
Initialize a new `Bitid` with the given `params`

@param {JSON} params
@api public
Initialize a new Bitid with the given params