@voidly/agent-sdk 3.4.3 → 3.4.5

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.d.ts CHANGED
@@ -211,6 +211,8 @@ declare class VoidlyAgent {
211
211
  private _persistKey;
212
212
  private _transportPrefs;
213
213
  private _onRatchetReset?;
214
+ private _sendLocks;
215
+ private _decryptLock;
214
216
  private constructor();
215
217
  /**
216
218
  * Register a new agent on the Voidly relay.
@@ -357,6 +359,7 @@ declare class VoidlyAgent {
357
359
  /** Disable padding for this message */
358
360
  noPadding?: boolean;
359
361
  }): Promise<SendResult>;
362
+ private _sendInner;
360
363
  /**
361
364
  * Receive and decrypt messages. Decryption happens locally.
362
365
  * The relay server returns raw ciphertext — never touches private keys.
@@ -374,8 +377,13 @@ declare class VoidlyAgent {
374
377
  * Returns decrypted messages AND IDs of messages that failed to decrypt.
375
378
  * Failed messages should be marked as read on the relay — they are permanently
376
379
  * undecryptable and will poison the queue if left unread (Signal-style handling).
380
+ *
381
+ * v3.4.2: Global mutex — SSE and poll can both call _decryptMessages concurrently.
382
+ * Both would read the same peer's ratchet state, advance it independently, and
383
+ * the second one would overwrite the first's changes → ratchet desync.
377
384
  */
378
385
  private _decryptMessages;
386
+ private _decryptMessagesInner;
379
387
  /**
380
388
  * Delete a message by ID (must be sender or recipient).
381
389
  */