@mega-yfue/eufy-sdk 0.5.0-beta.91 → 0.5.0-beta.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16532,8 +16532,8 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
16532
16532
  * `resolveCipherKey`), run the ECIES unwrap with the ECC key, and `setLevel2Key()`. A cipher with no
16533
16533
  * ECC key uses its RSA key instead and holds the RSA-decrypted 16-byte key as the AES-128-ECB level-2
16534
16534
  * key. One-shot; emits `level2Ready` only when the AES-256-GCM key is negotiated, traces
16535
- * `level2-set-payload-only` instead for the AES-128-ECB key, and emits `error` on failure
16536
- * (non-fatal — level-1 traffic keeps working regardless).
16535
+ * `level2-set-payload-only` instead for the AES-128-ECB key, and emits `error` when the ECC unwrap
16536
+ * fails; an RSA unwrap failure is only traced (non-fatal either way — level-1 traffic keeps working).
16537
16537
  *
16538
16538
  * Every outcome settles the wait in {@link awaitLevel2Key}, because being one-shot is what makes a
16539
16539
  * failure final for this connection generation: nothing will retry it there, so a later command must be
@@ -16563,7 +16563,8 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
16563
16563
  if (!key) {
16564
16564
  this.trace({ phase: "level2-unavailable", reason: "derivation-failed", cipherId });
16565
16565
  this.settleLevel2();
16566
- this.emit("error", new Error(`level-2 key derivation failed (cipher_id ${cipherId})`));
16566
+ if (eccPrivHex)
16567
+ this.emit("error", new Error(`level-2 key derivation failed (cipher_id ${cipherId})`));
16567
16568
  return;
16568
16569
  }
16569
16570
  if (eccPrivHex) {