notifyUI (opts = {}) {
    const { type, message, level, image, link, sound } = opts

    if (!_isString(type) || !_isString(message)) {
      throw new Error(`notified with invalid type/message: ${type}/${message}`)
    }

    if (!this._isOpen) {
      throw new Error('socket not open')
    }

    if (!this._isAuthenticated) {
      throw new Error('socket not authenticated')
    }

    this.send([0, 'n', null, {
      type: UCM_NOTIFICATION_TYPE,
      info: {
        type,
        message,
        level,
        image,
        link,
        sound
      }
    }])
  }
Sends a broadcast notification, which will be received by any active UI
websocket connections (at bitfinex.com), triggering a desktop notification.

In the future our mobile app will also support spawning native push
notifications in response to incoming ucm-notify-ui packets.

@param {object} opts - options
@param {string} [opts.message] - message to display
@param {string} [opts.type] - notification type, 'ucm-*' for broadcasts
@param {string} [opts.level] - 'info', 'error', or 'success'
@param {string} [opts.image] - link to an image to be shown
@param {string} [opts.link] - URL the notification should forward too
@param {string} [opts.sound] - URL of sound to play
@throws an error if given no type or message, or the instance is not open
  and authenticated