src/wallet/masterkey.js
function MasterKey(options) {
  if (!(this instanceof MasterKey))
    return new MasterKey(options);

  this.encrypted = false;
  this.iv = null;
  this.ciphertext = null;
  this.key = null;
  this.mnemonic = null;

  this.alg = MasterKey.alg.PBKDF2;
  this.N = 50000;
  this.r = 0;
  this.p = 0;

  this.aesKey = null;
  this.timer = null;
  this.until = 0;
  this._onTimeout = this.lock.bind(this);
  this.locker = new Lock();

  if (options)
    this.fromOptions(options);
}
function MasterKey(options) {
  if (!(this instanceof MasterKey))
    return new MasterKey(options);

  this.encrypted = false;
  this.iv = null;
  this.ciphertext = null;
  this.key = null;
  this.mnemonic = null;

  this.alg = MasterKey.alg.PBKDF2;
  this.N = 50000;
  this.r = 0;
  this.p = 0;

  this.aesKey = null;
  this.timer = null;
  this.until = 0;
  this._onTimeout = this.lock.bind(this);
  this.locker = new Lock();

  if (options)
    this.fromOptions(options);
}
function MasterKey ( options ) { if ( ! ( this instanceof MasterKey ) ) return new MasterKey ( options ) ; this . encrypted = false ; this . iv = null ; this . ciphertext = null ; this . key = null ; this . mnemonic = null ; this . alg = MasterKey . alg . PBKDF2 ; this . N = 50000 ; this . r = 0 ; this . p = 0 ; this . aesKey = null ; this . timer = null ; this . until = 0 ; this . _onTimeout = this . lock . bind ( this ) ; this . locker = new Lock ( ) ; if ( options ) this . fromOptions ( options ) ; }
Master BIP32 key which can exist
in a timed out encrypted state.
@alias module:wallet.MasterKey
@constructor
@param {Object} options
Master BIP32 key which can exist in a timed out encrypted state .