• Open a websocket connection from the new device. Returns a promise that resolves with the new ID and a signed certificate.

    Parameters

    • oddCrypto: Implementation

      ODD crypto implementation

    • opts: {
          code: string;
          host: string;
          humanReadableDeviceName: string;
          query?: string;
      }

      Parameters

      • code: string

        The string used as an ID for the websocket, obtained from the parent device

      • host: string

        URL for the websocket server

      • humanReadableDeviceName: string

        A name for this device

      • Optionalquery?: string

        Can add a token here that you use for auth

    Returns Promise<{
        certificate: Certificate;
        identity: Identity;
    }>

    A promise that will resolve with the new identity object, and a signed certificate that authorizes this new device.