code: function BIP150(bip151, host, outbound, db, key) {
    if (!(this instanceof BIP150))
      return new BIP150(bip151, host, outbound, db, key);
  
    EventEmitter.call(this);
  
    assert(bip151, 'BIP150 requires BIP151.');
    assert(typeof host === 'string', 'Hostname required.');
    assert(typeof outbound === 'boolean', 'Outbound flag required.');
    assert(db instanceof AuthDB, 'Auth DB required.');
    assert(Buffer.isBuffer(key), 'Identity key required.');
  
    this.bip151 = bip151;
    this.input = bip151.input;
    this.output = bip151.output;
    this.hostname = host;
    this.outbound = outbound;
    this.db = db;
    this.privateKey = key;
    this.publicKey = secp256k1.publicKeyCreate(key, true);
  
    this.peerIdentity = null;
    this.challengeReceived = false;
    this.replyReceived = false;
    this.proposeReceived = false;
    this.challengeSent = false;
    this.auth = false;
    this.completed = false;
    this.job = null;
    this.timeout = null;
    this.onAuth = null;
  
    this._init();
  }
docs: Represents a BIP150 input/output stream.
  @alias module:net.BIP150
  @constructor
  @param {BIP151} bip151
  @param {String} host
  @param {Boolean} outbound
  @param {AuthDB} db
  @param {Buffer} key - Identity key.
  @property {BIP151} bip151
  @property {BIP151Stream} input
  @property {BIP151Stream} output
  @property {String} hostname
  @property {Boolean} outbound
  @property {AuthDB} db
  @property {Buffer} privateKey
  @property {Buffer} publicKey
  @property {Buffer} peerIdentity
  @property {Boolean} challengeReceived
  @property {Boolean} replyReceived
  @property {Boolean} proposeReceived
  @property {Boolean} challengeSent
  @property {Boolean} auth
  @property {Boolean} completed