code: function WalletDB(options) {
    if (!(this instanceof WalletDB))
      return new WalletDB(options);
  
    AsyncObject.call(this);
  
    this.options = new WalletOptions(options);
  
    this.network = this.options.network;
    this.logger = this.options.logger.context('wallet');
    this.workers = this.options.workers;
  
    this.client = this.options.client;
    this.feeRate = this.options.feeRate;
  
    this.db = LDB(this.options);
    this.rpc = new RPC(this);
    this.primary = null;
    this.http = null;
  
    if (!HTTPServer.unsupported) {
      this.http = new HTTPServer({
        walletdb: this,
        network: this.network,
        logger: this.logger,
        prefix: this.options.prefix,
        apiKey: this.options.apiKey,
        walletAuth: this.options.walletAuth,
        noAuth: this.options.noAuth,
        host: this.options.host,
        port: this.options.port,
        ssl: this.options.ssl
      });
    }
  
    this.state = new ChainState();
    this.wallets = new Map();
    this.depth = 0;
    this.rescanning = false;
    this.bound = false;
  
    this.readLock = new MappedLock();
    this.writeLock = new Lock();
    this.txLock = new Lock();
    this.locker = new Lock();
  
    this.widCache = new LRU(10000);
    this.pathMapCache = new LRU(100000);
  
    this.filter = new Bloom();
  
    this._init();
  }
docs: WalletDB
  @alias module:wallet.WalletDB
  @constructor
  @param {Object} options
  @param {String?} options.name - Database name.
  @param {String?} options.location - Database file location.
  @param {String?} options.db - Database backend (`"leveldb"` by default).
  @param {Boolean?} options.verify - Verify transactions as they
  come in (note that this will not happen on the worker pool).
  @property {Boolean} loaded