@open-e2ee/signal-protocol-sdk 13.5.2 → 14.1.0
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/CHANGELOG.md +369 -0
- package/README.md +9 -8
- package/SECURITY.md +2 -2
- package/client/README.md +5 -3
- package/device/README.md +4 -3
- package/dist/client/client.d.ts +20 -55
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +133 -165
- package/dist/client/client.js.map +1 -1
- package/dist/client/content-adapter.d.ts +35 -6
- package/dist/client/content-adapter.d.ts.map +1 -1
- package/dist/client/content-adapter.js +28 -0
- package/dist/client/content-adapter.js.map +1 -1
- package/dist/client/event-hooks.d.ts +22 -11
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/group-fetcher.d.ts.map +1 -1
- package/dist/client/group-fetcher.js +43 -0
- package/dist/client/group-fetcher.js.map +1 -1
- package/dist/client/group-key-sync.d.ts +65 -0
- package/dist/client/group-key-sync.d.ts.map +1 -0
- package/dist/client/group-key-sync.js +286 -0
- package/dist/client/group-key-sync.js.map +1 -0
- package/dist/client/group-outbox.d.ts +20 -6
- package/dist/client/group-outbox.d.ts.map +1 -1
- package/dist/client/group-outbox.js +153 -80
- package/dist/client/group-outbox.js.map +1 -1
- package/dist/client/group-receive-authorization.d.ts +16 -9
- package/dist/client/group-receive-authorization.d.ts.map +1 -1
- package/dist/client/group-receive-authorization.js +25 -16
- package/dist/client/group-receive-authorization.js.map +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts +13 -1
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
- package/dist/client/hosted-anonymous-delivery.js +48 -5
- package/dist/client/hosted-anonymous-delivery.js.map +1 -1
- package/dist/client/hosted-mailbox-subscription.d.ts +6 -5
- package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -1
- package/dist/client/hosted-mailbox-subscription.js +4 -8
- package/dist/client/hosted-mailbox-subscription.js.map +1 -1
- package/dist/client/hosted-sandbox-identity.d.ts +66 -3
- package/dist/client/hosted-sandbox-identity.d.ts.map +1 -1
- package/dist/client/hosted-sandbox-identity.js +136 -45
- package/dist/client/hosted-sandbox-identity.js.map +1 -1
- package/dist/client/hosted-transport.d.ts +12 -0
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +85 -43
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/hosted.d.ts +13 -10
- package/dist/client/hosted.d.ts.map +1 -1
- package/dist/client/hosted.js +13 -10
- package/dist/client/hosted.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/receive-queue.d.ts +3 -4
- package/dist/client/receive-queue.d.ts.map +1 -1
- package/dist/client/receive-queue.js +24 -32
- package/dist/client/receive-queue.js.map +1 -1
- package/dist/client/relay-period-close.d.ts +35 -0
- package/dist/client/relay-period-close.d.ts.map +1 -0
- package/dist/client/relay-period-close.js +63 -0
- package/dist/client/relay-period-close.js.map +1 -0
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +4 -9
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/retry-request-envelope.d.ts +4 -2
- package/dist/client/retry-request-envelope.d.ts.map +1 -1
- package/dist/client/retry-request-envelope.js +6 -4
- package/dist/client/retry-request-envelope.js.map +1 -1
- package/dist/client/retry-request-lifecycle.d.ts +7 -8
- package/dist/client/retry-request-lifecycle.d.ts.map +1 -1
- package/dist/client/retry-request-lifecycle.js +10 -7
- package/dist/client/retry-request-lifecycle.js.map +1 -1
- package/dist/client/retry-terminal-recovery.d.ts +14 -15
- package/dist/client/retry-terminal-recovery.d.ts.map +1 -1
- package/dist/client/retry-terminal-recovery.js +16 -17
- package/dist/client/retry-terminal-recovery.js.map +1 -1
- package/dist/client/retry-utils.d.ts +22 -0
- package/dist/client/retry-utils.d.ts.map +1 -1
- package/dist/client/retry-utils.js +30 -0
- package/dist/client/retry-utils.js.map +1 -1
- package/dist/client/send-deadline.d.ts +3 -2
- package/dist/client/send-deadline.d.ts.map +1 -1
- package/dist/client/send-deadline.js +6 -1
- package/dist/client/send-deadline.js.map +1 -1
- package/dist/client/send-timestamp.d.ts +71 -14
- package/dist/client/send-timestamp.d.ts.map +1 -1
- package/dist/client/send-timestamp.js +87 -19
- package/dist/client/send-timestamp.js.map +1 -1
- package/dist/client/signal-service-cipher.d.ts +125 -13
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +413 -102
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +21 -16
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/groups/key-sync-ledger.d.ts +65 -0
- package/dist/internal/groups/key-sync-ledger.d.ts.map +1 -0
- package/dist/internal/groups/key-sync-ledger.js +104 -0
- package/dist/internal/groups/key-sync-ledger.js.map +1 -0
- package/dist/internal/groups/receive-record.d.ts +4 -1
- package/dist/internal/groups/receive-record.d.ts.map +1 -1
- package/dist/internal/groups/receive-record.js.map +1 -1
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +14 -0
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/local/store/conformance/cases/durability.d.ts.map +1 -1
- package/dist/local/store/conformance/cases/durability.js +6 -0
- package/dist/local/store/conformance/cases/durability.js.map +1 -1
- package/dist/local/store/conformance/records.d.ts.map +1 -1
- package/dist/local/store/conformance/records.js +3 -0
- package/dist/local/store/conformance/records.js.map +1 -1
- package/dist/local/store/expo/adapter.js +2 -2
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/key-value/adapter.d.ts +6 -5
- package/dist/local/store/key-value/adapter.d.ts.map +1 -1
- package/dist/local/store/key-value/adapter.js +21 -19
- package/dist/local/store/key-value/adapter.js.map +1 -1
- package/dist/local/store/key-value/receive-work.d.ts +0 -5
- package/dist/local/store/key-value/receive-work.d.ts.map +1 -1
- package/dist/local/store/key-value/receive-work.js +0 -16
- package/dist/local/store/key-value/receive-work.js.map +1 -1
- package/dist/local/store/node/adapter.js +2 -2
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/react-native/adapter.js +2 -2
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/receive-work.d.ts +32 -32
- package/dist/local/store/receive-work.d.ts.map +1 -1
- package/dist/local/store/receive-work.js +112 -65
- package/dist/local/store/receive-work.js.map +1 -1
- package/dist/local/store/received-content.d.ts +0 -5
- package/dist/local/store/received-content.d.ts.map +1 -1
- package/dist/local/store/received-content.js +0 -17
- package/dist/local/store/received-content.js.map +1 -1
- package/dist/local/store/reliability.d.ts +191 -53
- package/dist/local/store/reliability.d.ts.map +1 -1
- package/dist/local/store/reliability.js +517 -37
- package/dist/local/store/reliability.js.map +1 -1
- package/dist/local/store/sqlite/key-storage/metadata.d.ts +1 -8
- package/dist/local/store/sqlite/key-storage/metadata.d.ts.map +1 -1
- package/dist/local/store/sqlite/key-storage/metadata.js +1 -18
- package/dist/local/store/sqlite/key-storage/metadata.js.map +1 -1
- package/dist/local/store/sqlite/migrations.d.ts.map +1 -1
- package/dist/local/store/sqlite/migrations.js +8 -0
- package/dist/local/store/sqlite/migrations.js.map +1 -1
- package/dist/local/store/sqlite/store.d.ts +5 -5
- package/dist/local/store/sqlite/store.d.ts.map +1 -1
- package/dist/local/store/sqlite/store.js +29 -9
- package/dist/local/store/sqlite/store.js.map +1 -1
- package/dist/local/store/web/adapter.d.ts +11 -10
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +69 -51
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web-sqlite/adapter.js +2 -2
- package/dist/local/store/web-sqlite/adapter.js.map +1 -1
- package/dist/remote/relay/request-admission.d.ts +5 -3
- package/dist/remote/relay/request-admission.d.ts.map +1 -1
- package/dist/remote/relay/request-admission.js +2 -1
- package/dist/remote/relay/request-admission.js.map +1 -1
- package/dist/remote/relay/types.d.ts +1 -1
- package/dist/types/api.d.ts +50 -71
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +52 -18
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +58 -17
- package/dist/types/errors.js.map +1 -1
- package/docs/ASSURANCE.md +8 -8
- package/docs/CLIENT_COMPOSITION.md +4 -2
- package/docs/DEVIATIONS.md +175 -11
- package/docs/ERROR_HANDLING.md +38 -23
- package/docs/GETTING_STARTED.md +22 -2
- package/local/store/README.md +32 -8
- package/package.json +7 -2
- package/remote/relay/README.md +4 -2
package/local/store/README.md
CHANGED
|
@@ -301,7 +301,8 @@ The kit has these cases:
|
|
|
301
301
|
- receive record listing: arrival order, then work ID order, an exclusive
|
|
302
302
|
`after` cursor, the default page size, and the filters
|
|
303
303
|
- receive record completion and usage
|
|
304
|
-
- durability after reopen: each kind of write survives a reopen
|
|
304
|
+
- durability after reopen: each kind of write survives a reopen, including a
|
|
305
|
+
metadata value in the shape of the group key sync ledger
|
|
305
306
|
- no plaintext at rest: the stored bytes hold no known plaintext. It runs
|
|
306
307
|
only when the store declares a cipher.
|
|
307
308
|
- protection declaration: `store.protection` is a valid declaration
|
|
@@ -348,6 +349,13 @@ An `SignalProtocolLocalStore` implementation must preserve:
|
|
|
348
349
|
encryption at rest and the custody of its key. Client creation fails
|
|
349
350
|
without one, and [Content Recovery](../../docs/PROTOCOL_POLICY.md#content-recovery)
|
|
350
351
|
reads it
|
|
352
|
+
- each metadata value across a close and a reopen, with an atomic
|
|
353
|
+
`compareAndSetMetadata` for one key. The group key sync ledger keeps, for
|
|
354
|
+
each group, the own devices whose `GroupKeySync` copy the relay accepted
|
|
355
|
+
and the own device that sent this device the key, under the metadata key
|
|
356
|
+
prefix `open-e2ee:group-key-sync:v1:`. A store that
|
|
357
|
+
loses a value causes one more `GroupKeySync` for each own device that the
|
|
358
|
+
value marked
|
|
351
359
|
|
|
352
360
|
## Session Record Shape
|
|
353
361
|
|
|
@@ -409,7 +417,7 @@ with `assertBackendConformance`.
|
|
|
409
417
|
|
|
410
418
|
## Design Notes
|
|
411
419
|
|
|
412
|
-
Reviewed: 2026-
|
|
420
|
+
Reviewed: 2026-11-02.
|
|
413
421
|
|
|
414
422
|
Receive records use the same encryption and transaction boundary as protocol state.
|
|
415
423
|
|
|
@@ -463,12 +471,28 @@ hash of the group ID, not the group ID. A SQLite store with
|
|
|
463
471
|
`encryptionAtRest: false` and the in-memory store keep the records without
|
|
464
472
|
encryption.
|
|
465
473
|
|
|
466
|
-
At
|
|
467
|
-
|
|
468
|
-
conversion marker
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
474
|
+
At each open, each durable store deletes every SDK 11 received-content row
|
|
475
|
+
and every converted receive record that waits for its envelope. It also
|
|
476
|
+
deletes the conversion marker of SDK 13.x. When the open deletes a row or a
|
|
477
|
+
record, the store logs one line with the code
|
|
478
|
+
`LEGACY_RECEIVED_CONTENT_DELETED` and two counts: `count`, the deleted rows and
|
|
479
|
+
records, and `readable`, the deleted rows that parsed. The line holds no key
|
|
480
|
+
and no value. No marker records the sweep. An interrupted sweep deletes the
|
|
481
|
+
rest at the next open, and an open that finds nothing logs nothing.
|
|
482
|
+
|
|
483
|
+
A readable SDK 11 row is in a store that SDK 12.0.0 or later never opened.
|
|
484
|
+
The first open of SDK 12.0.0 through 13.x converted each readable row to a
|
|
485
|
+
receive record that waits for its envelope, and deleted the row. The sweep
|
|
486
|
+
deletes each readable row and counts it in `readable`. The sweep relies on
|
|
487
|
+
the Relay retention constraint. The Relay keeps an undelivered envelope for
|
|
488
|
+
at most its retention period, 30 days in production. Where the constraint
|
|
489
|
+
holds, no SDK version gives the content of such a row to the application.
|
|
490
|
+
|
|
491
|
+
The constraint does not cover a device that received the content on SDK 11
|
|
492
|
+
inside the last 30 days. For that device, 13.x would convert the row and
|
|
493
|
+
complete it when the Relay delivers the envelope again. This release deletes
|
|
494
|
+
the row at first open instead, and the sweep does not restore it. The
|
|
495
|
+
in-memory store keeps no data across a restart and has no sweep.
|
|
472
496
|
|
|
473
497
|
The IndexedDB web store and the key-value store also encrypt each metadata
|
|
474
498
|
value with their store key. Their metadata key names stay in clear text. Some
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-e2ee/signal-protocol-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Pure TypeScript Signal Protocol SDK for encrypted chat in Expo, React Native, browsers, and Node. Post-quantum by default.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"open-e2ee",
|
|
@@ -422,8 +422,13 @@
|
|
|
422
422
|
"xcode": {
|
|
423
423
|
"uuid": "11.1.1"
|
|
424
424
|
},
|
|
425
|
+
"@expo/cli": {
|
|
426
|
+
"zod": "^4.6.6"
|
|
427
|
+
},
|
|
425
428
|
"brace-expansion": "^5.0.12",
|
|
426
|
-
"
|
|
429
|
+
"glob": "^14.0.2",
|
|
430
|
+
"image-size": "file:./vendor/image-size-disabled",
|
|
431
|
+
"minimatch": "^11.0.1"
|
|
427
432
|
},
|
|
428
433
|
"devDependencies": {
|
|
429
434
|
"@op-engineering/op-sqlite": "^18.2.5",
|
package/remote/relay/README.md
CHANGED
|
@@ -31,8 +31,10 @@ const signal = await createHostedSignalProtocolClient({
|
|
|
31
31
|
`oe new` writes `relayUrl` to `.env.local` as `OPEN_E2EE_RELAY_URL`, with the
|
|
32
32
|
public prefix of the framework in a Next.js, Expo, or Vite application. Supply
|
|
33
33
|
`storage` for this device and `getIdentityAssertion`. In a Sandbox environment,
|
|
34
|
-
pass `hostedRelaySandboxIdentity(storage)`. In production
|
|
35
|
-
|
|
34
|
+
pass `hostedRelaySandboxIdentity(storage)`. In a production project in
|
|
35
|
+
device-owned mode, pass `hostedRelayDeviceOwnedIdentity(storage)`. In a
|
|
36
|
+
production project in application-bound mode, pass a callback that returns an
|
|
37
|
+
assertion from your backend.
|
|
36
38
|
|
|
37
39
|
For advanced integrations, implement the `SignalProtocolRelayServer` client
|
|
38
40
|
transport against your own backend. That backend must authenticate
|