src/kad/contact.js
function Contact (options) {
  if (!(this instanceof Contact)) {
    return new Contact(options)
  }

  assert(options instanceof Object, 'Invalid options were supplied')

  Object.defineProperty(this, 'nodeID', {
    value: options.nodeID || this._createNodeID(),
    configurable: false,
    enumerable: true
  })

  assert(utils.isValidKey(this.nodeID), 'Invalid nodeID was supplied')

  this.seen()
}
function Contact (options) {
  if (!(this instanceof Contact)) {
    return new Contact(options)
  }

  assert(options instanceof Object, 'Invalid options were supplied')

  Object.defineProperty(this, 'nodeID', {
    value: options.nodeID || this._createNodeID(),
    configurable: false,
    enumerable: true
  })

  assert(utils.isValidKey(this.nodeID), 'Invalid nodeID was supplied')

  this.seen()
}
The base class from which custom contacts inherit; used by the included
{@link AddressPortContact}. Nodes provide each other with contact
information which indicates how others should communicate with them.
@constructor
@param {Object} options
@param {String} options.nodeID - Optional known 160 bit node ID