@open-e2ee/signal-protocol-sdk 8.1.0 → 9.0.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/ADAPTERS.md +13 -31
- package/ARCHITECTURE.md +5 -7
- package/CHANGELOG.md +258 -0
- package/README.md +36 -48
- package/SECURITY.md +2 -2
- package/client/README.md +9 -0
- package/device/README.md +16 -7
- package/dist/client/client.d.ts +25 -16
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +115 -95
- package/dist/client/client.js.map +1 -1
- package/dist/client/config.d.ts +10 -17
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/event-hooks.js +27 -0
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/group-outbox.d.ts +31 -1
- package/dist/client/group-outbox.d.ts.map +1 -1
- package/dist/client/group-outbox.js +67 -58
- package/dist/client/group-outbox.js.map +1 -1
- package/dist/client/group-receive-authorization.d.ts +5 -0
- package/dist/client/group-receive-authorization.d.ts.map +1 -0
- package/dist/client/group-receive-authorization.js +32 -0
- package/dist/client/group-receive-authorization.js.map +1 -0
- package/dist/client/group-sender-key-operations.d.ts +15 -0
- package/dist/client/group-sender-key-operations.d.ts.map +1 -0
- package/dist/client/group-sender-key-operations.js +31 -0
- package/dist/client/group-sender-key-operations.js.map +1 -0
- package/dist/client/groups.d.ts +3 -1
- package/dist/client/groups.d.ts.map +1 -1
- package/dist/client/groups.js +5 -2
- package/dist/client/groups.js.map +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts +9 -1
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
- package/dist/client/hosted-anonymous-delivery.js +61 -22
- package/dist/client/hosted-anonymous-delivery.js.map +1 -1
- package/dist/client/hosted-transport.d.ts +7 -0
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +44 -6
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/key-rotation.d.ts.map +1 -1
- package/dist/client/key-rotation.js +2 -4
- package/dist/client/key-rotation.js.map +1 -1
- package/dist/client/prekeys.d.ts.map +1 -1
- package/dist/client/prekeys.js +1 -1
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/relay-device-refusal.d.ts +32 -0
- package/dist/client/relay-device-refusal.d.ts.map +1 -0
- package/dist/client/relay-device-refusal.js +36 -0
- package/dist/client/relay-device-refusal.js.map +1 -0
- package/dist/client/relay-subscription.d.ts +2 -0
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +3 -1
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/relay-work.d.ts +26 -0
- package/dist/client/relay-work.d.ts.map +1 -1
- package/dist/client/relay-work.js +37 -0
- package/dist/client/relay-work.js.map +1 -1
- package/dist/client/sealed-sender.d.ts.map +1 -1
- package/dist/client/sealed-sender.js +12 -17
- package/dist/client/sealed-sender.js.map +1 -1
- package/dist/client/sender-key-distribution.d.ts.map +1 -1
- package/dist/client/sender-key-distribution.js +4 -1
- package/dist/client/sender-key-distribution.js.map +1 -1
- package/dist/client/sessions.d.ts.map +1 -1
- package/dist/client/sessions.js +2 -4
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/signal-service-cipher.d.ts +94 -6
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +483 -184
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +7 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/index.d.ts +27 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/pq/kyber.d.ts +1 -1
- package/dist/internal/crypto/pq/kyber.js +1 -1
- package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
- package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.js +5 -2
- package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +5 -2
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/groups/wire.d.ts +0 -2
- package/dist/internal/groups/wire.d.ts.map +1 -1
- package/dist/internal/groups/wire.js +0 -6
- package/dist/internal/groups/wire.js.map +1 -1
- package/dist/internal/manager/manager.d.ts +8 -7
- package/dist/internal/manager/manager.d.ts.map +1 -1
- package/dist/internal/manager/manager.js +34 -37
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts +0 -17
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -1
- package/dist/internal/protocol/double-ratchet/ratchet.js +0 -4
- package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/certificate.d.ts +2 -32
- package/dist/internal/protocol/sealed-sender/certificate.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/certificate.js +4 -85
- package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/index.d.ts +2 -2
- package/dist/internal/protocol/sealed-sender/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/index.js +2 -6
- package/dist/internal/protocol/sealed-sender/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +0 -19
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +1 -48
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +9 -13
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +90 -95
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/index.d.ts +1 -1
- package/dist/internal/protocol/spqr/index.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/index.js +2 -2
- package/dist/internal/protocol/spqr/index.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts +0 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +4 -12
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +1 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/serialize.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/serialize.js +1 -4
- package/dist/internal/protocol/spqr/serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/spqr.d.ts +1 -1
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.js +2 -3
- package/dist/internal/protocol/spqr/spqr.js.map +1 -1
- package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
- package/dist/internal/protocol/x3dh/x3dh.js +1 -1
- package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.d.ts +3 -54
- package/dist/internal/protocol/zk/credentials/credentials.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.js +4 -91
- package/dist/internal/protocol/zk/credentials/credentials.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts +3 -64
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/endorsements.js +4 -134
- package/dist/internal/protocol/zk/credentials/endorsements.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/index.d.ts +3 -3
- package/dist/internal/protocol/zk/credentials/index.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/index.js +3 -3
- package/dist/internal/protocol/zk/credentials/index.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/issuance.d.ts +3 -26
- package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/issuance.js +3 -80
- package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.d.ts +4 -73
- package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.js +4 -152
- package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +1 -61
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.js +2 -196
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +1 -86
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js +1 -152
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
- package/dist/internal/protocol/zk/groups/index.d.ts +4 -4
- package/dist/internal/protocol/zk/groups/index.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/index.js +4 -4
- package/dist/internal/protocol/zk/groups/index.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +2 -57
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-credential.js +2 -174
- package/dist/internal/protocol/zk/groups/profile-key-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/server-params.d.ts +8 -72
- package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/server-params.js +8 -108
- package/dist/internal/protocol/zk/groups/server-params.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/sign.d.ts +1 -2
- package/dist/internal/protocol/zk/proofs/sign.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/sign.js +2 -11
- package/dist/internal/protocol/zk/proofs/sign.js.map +1 -1
- package/dist/internal/sesame/device-registry.d.ts +24 -4
- package/dist/internal/sesame/device-registry.d.ts.map +1 -1
- package/dist/internal/sesame/device-registry.js +55 -28
- package/dist/internal/sesame/device-registry.js.map +1 -1
- package/dist/internal/sesame/manager.d.ts +79 -11
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +381 -280
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/session/cipher.d.ts +0 -5
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +3 -9
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/internal/session/ratchet.d.ts.map +1 -1
- package/dist/internal/session/ratchet.js +0 -2
- package/dist/internal/session/ratchet.js.map +1 -1
- package/dist/internal/session/record-locks.d.ts +46 -0
- package/dist/internal/session/record-locks.d.ts.map +1 -0
- package/dist/internal/session/record-locks.js +72 -0
- package/dist/internal/session/record-locks.js.map +1 -0
- package/dist/local/store/expo/adapter.d.ts +8 -2
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +24 -3
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/driver.d.ts +7 -0
- package/dist/local/store/expo/driver.d.ts.map +1 -1
- package/dist/local/store/expo/driver.js +16 -0
- package/dist/local/store/expo/driver.js.map +1 -1
- package/dist/local/store/key-value/adapter.d.ts +3 -3
- package/dist/local/store/key-value/adapter.d.ts.map +1 -1
- package/dist/local/store/key-value/adapter.js +91 -53
- package/dist/local/store/key-value/adapter.js.map +1 -1
- package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -1
- package/dist/local/store/key-value/backend-conformance.js +25 -0
- package/dist/local/store/key-value/backend-conformance.js.map +1 -1
- package/dist/local/store/key-value/batch.d.ts +3 -1
- package/dist/local/store/key-value/batch.d.ts.map +1 -1
- package/dist/local/store/key-value/batch.js +9 -1
- package/dist/local/store/key-value/batch.js.map +1 -1
- package/dist/local/store/key-value/storage.d.ts +6 -0
- package/dist/local/store/key-value/storage.d.ts.map +1 -1
- package/dist/local/store/key-value/transactional-backend.d.ts +1 -1
- package/dist/local/store/key-value/transactional-backend.js +1 -1
- package/dist/local/store/memory/adapter.d.ts +13 -3
- package/dist/local/store/memory/adapter.d.ts.map +1 -1
- package/dist/local/store/memory/adapter.js +122 -73
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/reliability.d.ts +16 -0
- package/dist/local/store/reliability.d.ts.map +1 -1
- package/dist/local/store/reliability.js +58 -28
- package/dist/local/store/reliability.js.map +1 -1
- package/dist/local/store/sqlite/migrations.d.ts.map +1 -1
- package/dist/local/store/sqlite/migrations.js +18 -0
- package/dist/local/store/sqlite/migrations.js.map +1 -1
- package/dist/local/store/sqlite/models/skipped-sender-key.d.ts +3 -3
- package/dist/local/store/sqlite/models/skipped-sender-key.d.ts.map +1 -1
- package/dist/local/store/sqlite/models/skipped-sender-key.js +13 -17
- package/dist/local/store/sqlite/models/skipped-sender-key.js.map +1 -1
- package/dist/local/store/sqlite/store.d.ts +3 -3
- package/dist/local/store/sqlite/store.d.ts.map +1 -1
- package/dist/local/store/sqlite/store.js +53 -23
- package/dist/local/store/sqlite/store.js.map +1 -1
- package/dist/local/store/web/adapter.d.ts +3 -3
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +122 -73
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/vault/electron-safe-storage.d.ts.map +1 -1
- package/dist/local/vault/electron-safe-storage.js +15 -2
- package/dist/local/vault/electron-safe-storage.js.map +1 -1
- package/dist/profile/index.d.ts +2 -1
- package/dist/profile/index.d.ts.map +1 -1
- package/dist/profile/index.js +2 -1
- package/dist/profile/index.js.map +1 -1
- package/dist/profile/own-profile-key.d.ts +42 -0
- package/dist/profile/own-profile-key.d.ts.map +1 -0
- package/dist/profile/own-profile-key.js +64 -0
- package/dist/profile/own-profile-key.js.map +1 -0
- package/dist/profile/profile-key.d.ts +1 -34
- package/dist/profile/profile-key.d.ts.map +1 -1
- package/dist/profile/profile-key.js +3 -63
- package/dist/profile/profile-key.js.map +1 -1
- package/dist/profile/update-service.js +1 -1
- package/dist/profile/update-service.js.map +1 -1
- package/dist/remote/relay/index.d.ts +4 -7
- package/dist/remote/relay/index.d.ts.map +1 -1
- package/dist/remote/relay/index.js +5 -7
- package/dist/remote/relay/index.js.map +1 -1
- package/dist/remote/relay/types.d.ts +3 -3
- package/dist/types/api.d.ts +29 -8
- package/dist/types/api.d.ts.map +1 -1
- package/dist/username/link.d.ts.map +1 -1
- package/dist/username/link.js +1 -5
- package/dist/username/link.js.map +1 -1
- package/dist/utils/bounded-fan-out.d.ts +99 -0
- package/dist/utils/bounded-fan-out.d.ts.map +1 -0
- package/dist/utils/bounded-fan-out.js +180 -0
- package/dist/utils/bounded-fan-out.js.map +1 -0
- package/dist/utils/keyed-lock.d.ts +16 -0
- package/dist/utils/keyed-lock.d.ts.map +1 -0
- package/dist/utils/keyed-lock.js +39 -0
- package/dist/utils/keyed-lock.js.map +1 -0
- package/dist/versions.d.ts +3 -3
- package/dist/versions.js +3 -3
- package/dist/zk/credentials.d.ts +2 -2
- package/dist/zk/credentials.js +2 -2
- package/dist/zk/groups.d.ts +3 -3
- package/dist/zk/groups.d.ts.map +1 -1
- package/dist/zk/groups.js +3 -3
- package/dist/zk/groups.js.map +1 -1
- package/docs/ASSURANCE.md +69 -28
- package/docs/CLIENT_COMPOSITION.md +9 -3
- package/docs/DEVIATIONS.md +45 -27
- package/docs/GETTING_STARTED.md +42 -320
- package/docs/INTERFACES.md +7 -7
- package/docs/PACKAGE_SURFACE.md +14 -16
- package/docs/RECIPES.md +6 -112
- package/groups/README.md +9 -1
- package/hooks/README.md +11 -2
- package/local/store/README.md +26 -6
- package/local/store/expo/README.md +18 -5
- package/local/store/key-value/README.md +5 -3
- package/local/store/node/README.md +2 -1
- package/local/store/web-sqlite/README.md +28 -8
- package/local/vault/README.md +21 -2
- package/package.json +1 -30
- package/remote/README.md +12 -78
- package/remote/object-store/convex-r2/README.md +20 -42
- package/remote/relay/README.md +21 -18
- package/zk/README.md +6 -7
- package/dist/client/dual-store.d.ts +0 -70
- package/dist/client/dual-store.d.ts.map +0 -1
- package/dist/client/dual-store.js +0 -123
- package/dist/client/dual-store.js.map +0 -1
- package/dist/client/multi-device.d.ts +0 -74
- package/dist/client/multi-device.d.ts.map +0 -1
- package/dist/client/multi-device.js +0 -105
- package/dist/client/multi-device.js.map +0 -1
- package/dist/groups/server.d.ts +0 -10
- package/dist/groups/server.d.ts.map +0 -1
- package/dist/groups/server.js +0 -6
- package/dist/groups/server.js.map +0 -1
- package/dist/internal/encoding/index.d.ts +0 -2
- package/dist/internal/encoding/index.d.ts.map +0 -1
- package/dist/internal/encoding/index.js +0 -2
- package/dist/internal/encoding/index.js.map +0 -1
- package/dist/internal/groups/server-engine.d.ts +0 -118
- package/dist/internal/groups/server-engine.d.ts.map +0 -1
- package/dist/internal/groups/server-engine.js +0 -1268
- package/dist/internal/groups/server-engine.js.map +0 -1
- package/dist/internal/protocol/index.d.ts +0 -24
- package/dist/internal/protocol/index.d.ts.map +0 -1
- package/dist/internal/protocol/index.js +0 -9
- package/dist/internal/protocol/index.js.map +0 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +0 -56
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +0 -1
- package/dist/internal/protocol/sealed-sender/trust-root.js +0 -90
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +0 -1
- package/dist/internal/protocol/triple-ratchet/index.d.ts +0 -21
- package/dist/internal/protocol/triple-ratchet/index.d.ts.map +0 -1
- package/dist/internal/protocol/triple-ratchet/index.js +0 -19
- package/dist/internal/protocol/triple-ratchet/index.js.map +0 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +0 -233
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +0 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.js +0 -254
- package/dist/internal/protocol/triple-ratchet/ratchet.js.map +0 -1
- package/dist/internal/protocol/zk/proofs/index.d.ts +0 -13
- package/dist/internal/protocol/zk/proofs/index.d.ts.map +0 -1
- package/dist/internal/protocol/zk/proofs/index.js +0 -7
- package/dist/internal/protocol/zk/proofs/index.js.map +0 -1
- package/dist/local/store/sqlite/index.d.ts +0 -20
- package/dist/local/store/sqlite/index.d.ts.map +0 -1
- package/dist/local/store/sqlite/index.js +0 -18
- package/dist/local/store/sqlite/index.js.map +0 -1
- package/dist/remote/object-store/convex-r2/server/index.d.ts +0 -2
- package/dist/remote/object-store/convex-r2/server/index.d.ts.map +0 -1
- package/dist/remote/object-store/convex-r2/server/index.js +0 -2
- package/dist/remote/object-store/convex-r2/server/index.js.map +0 -1
- package/dist/remote/object-store/convex-r2/server.d.ts +0 -129
- package/dist/remote/object-store/convex-r2/server.d.ts.map +0 -1
- package/dist/remote/object-store/convex-r2/server.js +0 -244
- package/dist/remote/object-store/convex-r2/server.js.map +0 -1
- package/dist/remote/relay/memory/adapter.d.ts +0 -252
- package/dist/remote/relay/memory/adapter.d.ts.map +0 -1
- package/dist/remote/relay/memory/adapter.js +0 -1058
- package/dist/remote/relay/memory/adapter.js.map +0 -1
- package/dist/remote/relay/memory/failures.d.ts +0 -58
- package/dist/remote/relay/memory/failures.d.ts.map +0 -1
- package/dist/remote/relay/memory/failures.js +0 -124
- package/dist/remote/relay/memory/failures.js.map +0 -1
- package/dist/remote/relay/memory/group-server.d.ts +0 -13
- package/dist/remote/relay/memory/group-server.d.ts.map +0 -1
- package/dist/remote/relay/memory/group-server.js +0 -19
- package/dist/remote/relay/memory/group-server.js.map +0 -1
- package/dist/remote/relay/memory/index.d.ts +0 -11
- package/dist/remote/relay/memory/index.d.ts.map +0 -1
- package/dist/remote/relay/memory/index.js +0 -7
- package/dist/remote/relay/memory/index.js.map +0 -1
- package/examples/browser/README.md +0 -35
- package/examples/browser/index.html +0 -27
- package/examples/browser/src/exchange.ts +0 -69
- package/examples/browser/src/main.ts +0 -63
- package/examples/browser/src/style.css +0 -9
- package/examples/browser/src/worker.ts +0 -10
- package/examples/browser/vite.config.ts +0 -9
- package/remote/relay/memory/README.md +0 -72
- package/scripts/oe-groups.mjs +0 -166
package/ADAPTERS.md
CHANGED
|
@@ -18,8 +18,10 @@ The relay interface handles server-owned Signal Protocol state:
|
|
|
18
18
|
Use:
|
|
19
19
|
|
|
20
20
|
- the OpenE2EE Signal Protocol Relay through `createHostedSignalProtocolClient()` from the package root
|
|
21
|
-
-
|
|
22
|
-
|
|
21
|
+
- a custom client transport that implements `SignalProtocolRelayServer`
|
|
22
|
+
|
|
23
|
+
The published package contains client code and transport contracts. It does not
|
|
24
|
+
include a relay server implementation.
|
|
23
25
|
|
|
24
26
|
### Storage: `SignalProtocolLocalStore`
|
|
25
27
|
|
|
@@ -74,8 +76,6 @@ Optional encrypted file upload/download support for two-layer attachment encrypt
|
|
|
74
76
|
Use:
|
|
75
77
|
|
|
76
78
|
- `ConvexR2ObjectStore` from `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
|
77
|
-
- `defineConvexR2ObjectStore` from the server-only
|
|
78
|
-
`@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2/server` entry point
|
|
79
79
|
- `S3ObjectStore` from `@open-e2ee/signal-protocol-sdk/remote/object-store/s3`
|
|
80
80
|
- or a custom implementation
|
|
81
81
|
|
|
@@ -85,9 +85,8 @@ credentials remain on the backend.
|
|
|
85
85
|
|
|
86
86
|
Upload requests carry a retry/idempotency `requestId`. The backend returns the
|
|
87
87
|
canonical `objectId` used in encrypted attachment pointers. Provider keys stay
|
|
88
|
-
private to the backend. The
|
|
89
|
-
|
|
90
|
-
functions retain authentication, authorization, and persistence.
|
|
88
|
+
private to the backend. The application supplies the object-store broker and
|
|
89
|
+
owns its authentication, authorization, persistence, and provider integration.
|
|
91
90
|
|
|
92
91
|
### Local secret vault: `SignalProtocolLocalSecretVault`
|
|
93
92
|
|
|
@@ -153,27 +152,11 @@ const signal = await createHostedSignalProtocolClient({
|
|
|
153
152
|
See the [Expo storage guide](./local/store/expo/README.md) for the required
|
|
154
153
|
database and SQLCipher bootstrap.
|
|
155
154
|
|
|
156
|
-
###
|
|
157
|
-
|
|
158
|
-
<!-- doc-snippet:run adapters-shared-relay expect="" -->
|
|
159
|
-
```ts
|
|
160
|
-
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
161
|
-
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
162
|
-
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
163
|
-
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
155
|
+
### Sandbox development
|
|
164
156
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
identity: { userId: "alice" },
|
|
169
|
-
adapters: { storage: inMemoryStore(), relay },
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
const bob = await createSignalProtocolClient({
|
|
173
|
-
identity: { userId: "bob" },
|
|
174
|
-
adapters: { storage: inMemoryStore(), relay },
|
|
175
|
-
});
|
|
176
|
-
```
|
|
157
|
+
Use a Sandbox connection URL from the OpenE2EE console with the hosted client.
|
|
158
|
+
The same authentication and device-local storage contracts apply in Sandbox.
|
|
159
|
+
See the [client guide](./client/README.md#with-relay).
|
|
177
160
|
|
|
178
161
|
## Security Expectations
|
|
179
162
|
|
|
@@ -231,10 +214,9 @@ const signal = await createSignalProtocolClient({
|
|
|
231
214
|
|
|
232
215
|
## Verifiable adapter design
|
|
233
216
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
reaching into client internals.
|
|
217
|
+
The in-memory local store supports temporary device state during development.
|
|
218
|
+
Use the Signal Protocol Relay Sandbox for authenticated delivery. Applications
|
|
219
|
+
can supply custom adapters through the public client contracts.
|
|
238
220
|
|
|
239
221
|
## Related Docs
|
|
240
222
|
|
package/ARCHITECTURE.md
CHANGED
|
@@ -41,7 +41,7 @@ compatibility shim when a boundary is wrong.
|
|
|
41
41
|
| Public feature surfaces | [blocking/](./blocking/), [groups/](./groups/), [media/](./media/), [profile/](./profile/), [sealed-sender/](./sealed-sender/), [username/](./username/), [zk/](./zk/) | App-facing helpers that compose protocol, media, or account-state behavior without joining the inward dependency hierarchy |
|
|
42
42
|
| Public utility surfaces | [encoding/](./encoding/), [files/](./files/), [hooks/](./hooks/), [utils/](./utils/), `logger.ts`, `server-clock.ts`, `versions.ts` | Stable helpers, React hooks, logging, clock estimation, version metadata, and file/encoding utilities |
|
|
43
43
|
| Local adapters | [local/](./local/) | Local protocol stores and secret vault integrations |
|
|
44
|
-
| Remote adapters | [remote/](./remote/) | Relay and object-store ports plus
|
|
44
|
+
| Remote adapters | [remote/](./remote/) | Relay and object-store ports plus hosted, R2, and S3 client adapters |
|
|
45
45
|
| Device features | [device/](./device/) | Device IDs, provisioning, linked-device lifecycle and transfer |
|
|
46
46
|
|
|
47
47
|
## Documentation Ownership
|
|
@@ -75,9 +75,7 @@ Platform and backend integrations are explicit subpaths such as:
|
|
|
75
75
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
76
76
|
- `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
77
77
|
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
78
|
-
- `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
|
|
79
78
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
|
80
|
-
- `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2/server`
|
|
81
79
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/s3`
|
|
82
80
|
- `@open-e2ee/signal-protocol-sdk/client/compose`
|
|
83
81
|
- `@open-e2ee/signal-protocol-sdk/device`
|
|
@@ -128,10 +126,10 @@ policy fields `protocol.postQuantum` and `protocol.braid`.
|
|
|
128
126
|
|
|
129
127
|
The provider-neutral object-store port separates a retry/idempotency
|
|
130
128
|
`requestId`, the canonical `objectId` carried in encrypted pointers, and the
|
|
131
|
-
private provider key. The Convex R2 client entry calls
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
private provider key. The Convex R2 client entry calls application-owned broker functions.
|
|
130
|
+
The application owns the R2 component, authentication, authorization, object
|
|
131
|
+
records, credentials, and bucket. The published package contains client adapters
|
|
132
|
+
and contracts. Relay and object-store server implementations run separately.
|
|
135
133
|
|
|
136
134
|
`types/protocol-config.ts` owns protocol-domain configuration and constants shared by client, session, protocol, and adapters:
|
|
137
135
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,263 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
9.0.0 is a major release. The entries below give the details. To upgrade from
|
|
6
|
+
8.2.0:
|
|
7
|
+
|
|
8
|
+
1. **Reset group Sender Key state.** Sender Keys now use format `v2`. Discard
|
|
9
|
+
queued group sends, reset sender-key state on every device, and
|
|
10
|
+
redistribute keys with upgraded peers.
|
|
11
|
+
2. **Update custom local stores.** A receive commit applies
|
|
12
|
+
`SenderKeyReceiveCommit.skippedKeys` atomically with the record. Skipped
|
|
13
|
+
keys carry `senderKeyId`. Key-value backends implement
|
|
14
|
+
`pruneSkippedSenderKeys` inside `atomicWrite`.
|
|
15
|
+
3. **Use only client exports.** The public package no longer exports relay
|
|
16
|
+
implementations, the group server engine, or credential and certificate
|
|
17
|
+
issuers.
|
|
18
|
+
4. **Check group IDs on receive.** With a group store, a managed-format group
|
|
19
|
+
ID needs verified local state. `onGroupSenderKeyRotated` receives the raw
|
|
20
|
+
group ID.
|
|
21
|
+
|
|
22
|
+
- **Fixed: overlapping Braid sessions complete their key exchanges independently.**
|
|
23
|
+
The incremental KEM no longer caches a commitment shared across sessions.
|
|
24
|
+
It no longer rejects a valid encapsulation key from an interleaved session.
|
|
25
|
+
Interleaved sessions now use their own key material, including after state restore.
|
|
26
|
+
The wire format and persisted state format remain unchanged.
|
|
27
|
+
- **Corrected: SPQR recovery and key-derivation documentation.** Braid recovery
|
|
28
|
+
depends on delivered chunks and peer replies, with no fixed message-count bound.
|
|
29
|
+
The notes now describe the production message-key expansion and supported limits.
|
|
30
|
+
- **Fixed: managed announcement groups enforce the sender's role.** Both
|
|
31
|
+
encryption paths require an administrator. All group message receive paths
|
|
32
|
+
apply the same rule before consuming a message key. Member key distributions
|
|
33
|
+
and ad-hoc Sender Keys remain available.
|
|
34
|
+
- **Fixed: group receives fail closed for a managed group ID without a master key.**
|
|
35
|
+
With a group store, a raw group ID in the managed format (the 32-byte group
|
|
36
|
+
identifier in lowercase hex) requires verified local state on every receive
|
|
37
|
+
path. Ad-hoc Sender Keys remain available for IDs in other formats. The public
|
|
38
|
+
group receive methods accept ad-hoc Sender Keys without a group store.
|
|
39
|
+
- **Fixed: membership changes rotate the active sender key.** The callback
|
|
40
|
+
used a prefixed group identifier for a separate record. Sends continued
|
|
41
|
+
using the old record, which let removed members decrypt new messages. The
|
|
42
|
+
callback now uses the send path's raw identifier and persists pending key
|
|
43
|
+
distribution. The next send distributes the new key before its ciphertext.
|
|
44
|
+
Restart and outbox write failure preserve that pending distribution.
|
|
45
|
+
- **Fixed: public Sender Key operations use one record for raw and prefixed group IDs.**
|
|
46
|
+
- **Changed: `onGroupSenderKeyRotated` receives the raw group ID.** Automatic
|
|
47
|
+
and manual rotation pass the ID without the `open-e2ee:group:` prefix.
|
|
48
|
+
- **Changed: Sender Key getters wait for an active operation on the group.**
|
|
49
|
+
`hasGroupSenderKey`, `getGroupSenderKeyDistribution`, and
|
|
50
|
+
`getGroupSenderKeyStats` return state after an active send, rotation, or
|
|
51
|
+
receive for that group completes.
|
|
52
|
+
- **Fixed: concurrent sends cannot overwrite completed group key rotation.**
|
|
53
|
+
Group operations share a lock through preparation, persistence, and relay
|
|
54
|
+
posting. Pending distributions stay paired with their ciphertext. An older
|
|
55
|
+
outbox retry preserves a later key's pending distribution.
|
|
56
|
+
- **Fixed: client stop releases group receive lock waits held behind a group send.**
|
|
57
|
+
- **Fixed: a group attachment upload no longer blocks receives for that group.**
|
|
58
|
+
The group lock covers the Sender Key work only. A separate ordering lock
|
|
59
|
+
keeps sends to the group in order across the upload.
|
|
60
|
+
- **Fixed: hooks of a group send run after the group lock.** A hook such as
|
|
61
|
+
`onSessionEstablished` that called `hasGroupSenderKey` for the same group
|
|
62
|
+
deadlocked the send. The client now calls these hooks after the group
|
|
63
|
+
operation finishes.
|
|
64
|
+
- **Corrected: group implementation ownership.** Signal publishes its group
|
|
65
|
+
server in `storage-service`. The internal SDK contains the enforcing engine
|
|
66
|
+
used by the OpenE2EE Signal Protocol Relay.
|
|
67
|
+
- **Fixed: Sender Keys archive rollback.** Distribution processing and local
|
|
68
|
+
rotation update the cache after storage succeeds. A failed write preserves
|
|
69
|
+
delayed messages through later receives, retries, and manager restarts.
|
|
70
|
+
- **Fixed: Sender Keys cache isolation.** Group, sender, and device tuples now
|
|
71
|
+
retain separate archived states when identifiers contain delimiters.
|
|
72
|
+
This preserves delayed messages and record ownership across creation,
|
|
73
|
+
rotation, deletion, and manager restarts. Cache lookups no longer use
|
|
74
|
+
another tuple's archived key.
|
|
75
|
+
- **Fixed: atomic group receives.** Skipped-key additions and eviction now commit with state and
|
|
76
|
+
optional received content. Current and archived generations use this boundary,
|
|
77
|
+
including receives without a durable ID. Custom local stores must apply
|
|
78
|
+
`SenderKeyReceiveCommit.skippedKeys` atomically with the record. Custom
|
|
79
|
+
key-value backends must implement `pruneSkippedSenderKeys` inside `atomicWrite`.
|
|
80
|
+
- **Fixed: skipped Sender Keys remain separate across rotations.** Each stored
|
|
81
|
+
key now includes its distribution identifier. A delayed message uses the
|
|
82
|
+
correct generation even when two generations share the same chain index.
|
|
83
|
+
Atomic receive commits consume only that generation's key. Custom local
|
|
84
|
+
stores must add `senderKeyId` to skipped-key lookup, storage, and deletion.
|
|
85
|
+
`SenderKeyReceiveCommit.consumedSkippedKey` now carries the identifier and index.
|
|
86
|
+
- **Changed: Sender Keys use HKDF-Extract before HKDF-Expand.** This corrects
|
|
87
|
+
message-key derivation to match the reference algorithm. Sender-key state
|
|
88
|
+
and distribution messages now require `senderKeyVersion: 'v2'`. Signed
|
|
89
|
+
frames require version byte `0x44`. Old state, distributions, and frames
|
|
90
|
+
fail closed. Before upgrading, discard queued group sends and reset group
|
|
91
|
+
sender-key state on every device. Then redistribute keys with upgraded peers.
|
|
92
|
+
|
|
93
|
+
SQLite discards skipped keys from its old schema because they lack generation
|
|
94
|
+
identifiers. This pre-launch break provides no legacy derivation or reader.
|
|
95
|
+
- **Breaking: public exports contain only client code.** Relay implementations
|
|
96
|
+
and the group server engine stay private. The public package also excludes
|
|
97
|
+
credential issuers, certificate issuers, and the group administration CLI.
|
|
98
|
+
The private repository retains these implementations and entry points.
|
|
99
|
+
Client transports, storage adapters, group encryption, credential receipt,
|
|
100
|
+
and presentation remain public. Public guides use OpenE2EE Signal Protocol Relay.
|
|
101
|
+
- **Changed: public exports check a declaration inventory.** Each mixed module
|
|
102
|
+
classifies its client and server declarations. An unclassified declaration or
|
|
103
|
+
class member fails the export. TypeDoc generates API documentation from the
|
|
104
|
+
projected client source. Build and package checks verify that the public
|
|
105
|
+
artifact excludes server code. Release checks also verify SDK imports in
|
|
106
|
+
source examples, declarations, and generated documentation against public exports.
|
|
107
|
+
|
|
108
|
+
## 8.2.0
|
|
109
|
+
|
|
110
|
+
- **Changed: a group send posts to the member devices at the same time.**
|
|
111
|
+
Before, a group send posted each sender-key distribution message, each
|
|
112
|
+
device post, and each copy for the sender's other devices one after the
|
|
113
|
+
other. Now each phase of a group send posts at the same time, under the
|
|
114
|
+
client's bound of 4 relay requests, and a phase starts only after the phase
|
|
115
|
+
before it settles: the sender-key distribution messages, then their
|
|
116
|
+
confirmation, then the group message and its device posts, then the copies.
|
|
117
|
+
A failure for one device does not stop the other devices of the phase.
|
|
118
|
+
After every device of the phase settles, the send rejects with the error of
|
|
119
|
+
the first failed device in member order. When a distribution message fails,
|
|
120
|
+
the stored send keeps only the distribution messages that the relay did not
|
|
121
|
+
accept, so a replay with the same `clientMessageId` posts only those. The
|
|
122
|
+
sessions for the members are set up at the same time, and the index in the
|
|
123
|
+
`clientMessageId` of each distribution message follows the member order.
|
|
124
|
+
- **Changed: a group send that distributes a new sender key reads each
|
|
125
|
+
member's device list once.** Before, such a send read the list of a member
|
|
126
|
+
up to three times: to prepare the distribution, to set up the sessions, and
|
|
127
|
+
to send the group message. The device posts of one group send check and
|
|
128
|
+
refresh the group's endorsements one at a time, so one refresh serves them
|
|
129
|
+
all.
|
|
130
|
+
- **Changed: a direct send posts to each device of the recipient at the same
|
|
131
|
+
time.** Before, a direct send posted to one device after the other. A
|
|
132
|
+
failure for one device stopped the posts to the devices after it. Now the
|
|
133
|
+
send posts to every device at the same time, and a failure for one device
|
|
134
|
+
does not stop the other devices. After every device settles, the send
|
|
135
|
+
rejects with the error of the first failed device in recipient order. The
|
|
136
|
+
copies for the sender's other devices start only after every device post
|
|
137
|
+
settles. These copies, and the copies of read state and other account
|
|
138
|
+
state, also post at the same time. A replay with the same `clientMessageId`
|
|
139
|
+
posts to every device again. A relay that remembers the result of a device
|
|
140
|
+
does not store the message again. After the hosted Relay forgets a result
|
|
141
|
+
(60 s), that device gets a second copy, and the recipient drops it as a
|
|
142
|
+
duplicate. When two sealed-sender posts of one send fail authorization,
|
|
143
|
+
the access mode steps down two times, to `DISABLED`, as before.
|
|
144
|
+
- **Changed: one client has at most 4 relay requests in flight.** The device
|
|
145
|
+
posts and copies of a direct send, the prekey fetches of session setup, and
|
|
146
|
+
the requests of hosted sealed-sender delivery share this bound. The clients
|
|
147
|
+
that use one hosted Relay transport share one bound. A request that finds
|
|
148
|
+
the 4 slots full waits, and the waiting requests start in the order that
|
|
149
|
+
they came.
|
|
150
|
+
- **Changed: a direct send through the hosted Relay posts before it reads
|
|
151
|
+
the recipient's device list, when this process read the list less than
|
|
152
|
+
5 min before.** Before, a direct send to a recipient whose list was more
|
|
153
|
+
than 60 s old waited for the device-list read before it posted. Now the
|
|
154
|
+
send posts to the known devices, reads the list, and in the same send posts
|
|
155
|
+
the same message to each device that the list newly shows. A device linked
|
|
156
|
+
60 s to 300 s before a send now receives that send. A send after a restart,
|
|
157
|
+
after 5 min, or after reads that failed, still waits for the read. The
|
|
158
|
+
stored send records the pending read, so a replay reads the list before it
|
|
159
|
+
completes. Sender key distribution, and sends through the Convex and memory
|
|
160
|
+
relays, keep the read before the post.
|
|
161
|
+
- **Changed: a direct send through the hosted Relay that posts before the
|
|
162
|
+
read drops a removed device.** Before, a send threw the Relay's `NOT_FOUND`
|
|
163
|
+
when a post named the mailbox of a device that the recipient had removed.
|
|
164
|
+
Now such a send waits for its device-list read, drops that device from the
|
|
165
|
+
send and its result, and succeeds. A `NOT_FOUND` for a device that the list
|
|
166
|
+
still shows, or when the read fails, still fails the send. A send that does
|
|
167
|
+
not read the list, because the last read is less than 60 s old, still
|
|
168
|
+
throws.
|
|
169
|
+
- **Fixed: a sealed-sender send through the hosted Relay repairs a device
|
|
170
|
+
that the Relay refuses as `STALE_DEVICE`.** The identified path fetched a
|
|
171
|
+
new prekey bundle and sent again, but the sealed path threw. Now both paths
|
|
172
|
+
repair the device.
|
|
173
|
+
- **Fixed: a device-list time later than the clock counts as old.** When the
|
|
174
|
+
wall clock went back, a send used the old list until the clock passed that
|
|
175
|
+
time again. Now the send reads the list.
|
|
176
|
+
- **Fixed: an app entry that awaits SDK work at the top level finishes.**
|
|
177
|
+
When a bundler splits code, each module that the SDK loaded with `import()`
|
|
178
|
+
got its own chunk. That chunk imported the app's entry chunk, so it waited
|
|
179
|
+
for the entry module to finish evaluation. An entry module that awaited a
|
|
180
|
+
send or a sync at the top level never finished, and the SDK work stopped. In
|
|
181
|
+
a Vite 8 build, the first send stopped. Now the SDK loads with `import()`
|
|
182
|
+
only a module that imports nothing, so no SDK chunk imports the entry chunk.
|
|
183
|
+
The SDK loads the other modules with static imports.
|
|
184
|
+
- **Changed: session setup fetches the prekey bundles of a recipient's
|
|
185
|
+
devices in parallel.** Before, a send that set up sessions with a
|
|
186
|
+
recipient fetched one prekey bundle for each device in turn. Now the
|
|
187
|
+
fetches run at the same time, and one client has at most 4 of these relay
|
|
188
|
+
requests in flight, also when it sets up sessions with more than one
|
|
189
|
+
recipient. The client then establishes the sessions one at a time, so
|
|
190
|
+
every device gets its session and its device record on every store. A
|
|
191
|
+
device with no bundle, or a device whose fetch fails, does not stop the
|
|
192
|
+
other devices.
|
|
193
|
+
- **Fixed: an encrypted Expo store on the web fails before it uses the
|
|
194
|
+
vault.** The web build of `expo-sqlite` has no SQLCipher, and Expo
|
|
195
|
+
SecureStore has no web implementation. `expoStore()` on the web rejected
|
|
196
|
+
with `KEY_STORAGE_ERROR` from the default vault, and with a custom vault it
|
|
197
|
+
wrote a key before it rejected. Now `expoStore()` and `resetExpoStore()`
|
|
198
|
+
reject with `SqliteEncryptionUnavailableError` (`KEY_STORAGE_ERROR`) when the
|
|
199
|
+
`expo-sqlite` build has no SQLCipher, before they use the vault or a file.
|
|
200
|
+
The same refusal applies to a native build without the `useSQLCipher`
|
|
201
|
+
option. `encryptionAtRest: false` still opens a store without encryption. The
|
|
202
|
+
guide names `./local/store/web-sqlite` for encrypted browser storage.
|
|
203
|
+
- **Fixed: the Electron vault names the Secret portal key.** On Linux, a
|
|
204
|
+
Chromium feature can make `safeStorage` use that key. The feature is
|
|
205
|
+
`SecretPortalKeyProviderUseForEncryption`, and the ciphertext starts with
|
|
206
|
+
`v12`. The vault refused that key, but its `KEY_STORAGE_ERROR` named the
|
|
207
|
+
fixed fallback key.
|
|
208
|
+
Now the error names the Secret portal. Outside a Flatpak or Snap sandbox,
|
|
209
|
+
the portal gives the same key to each Electron app of the user. The vault
|
|
210
|
+
still refuses the key, and the vault file does not change.
|
|
211
|
+
- **Fixed: concurrent SESAME writes for one user keep every change.** Each
|
|
212
|
+
write of a SESAME user record or device record reads the record, changes
|
|
213
|
+
it, and writes it back. Two concurrent writes for one user could both read
|
|
214
|
+
before either wrote, and the second write then removed the change of the
|
|
215
|
+
first: a device that a concurrent `addDevice` added, a session, or a
|
|
216
|
+
cleared verification flag. Now a per-user lock orders these writes in
|
|
217
|
+
`DefaultSesameManager`, on every store. The lock orders the writes of one
|
|
218
|
+
client process only. It does not order two browser tabs or two processes
|
|
219
|
+
that share one store.
|
|
220
|
+
- **Changed: hosted sealed-sender delivery reads the recipients at the same
|
|
221
|
+
time.** Before a sealed-sender send through the hosted Relay, the transport
|
|
222
|
+
reads the device directory of each recipient account that it has not
|
|
223
|
+
cached. It read one account after the other. Now it reads the accounts at
|
|
224
|
+
the same time, with one read for each account, also when two sends need
|
|
225
|
+
the same account. A direct send also delivers to each device of the
|
|
226
|
+
recipient at the same time. At most four of these requests are in flight
|
|
227
|
+
for each client. A failure for one device no longer stops the delivery to
|
|
228
|
+
the other devices. After every device settles, the send rejects with the
|
|
229
|
+
error of the first failed device in recipient order, and a successful send
|
|
230
|
+
returns the server timestamp of the last device in that order.
|
|
231
|
+
- **Fixed: SESAME writes and store sweeps keep a newer session.** A SESAME
|
|
232
|
+
write that carries a session read it before the protocol took the session
|
|
233
|
+
lock. When a send or a receive committed a newer session between that read
|
|
234
|
+
and the write, the write put the older session back, and the next send
|
|
235
|
+
used a message key again. `deleteStaleRecords()` and
|
|
236
|
+
`cleanupExpiredSessions()` read the records, decided, and wrote without a
|
|
237
|
+
lock, so they could delete a device that got a session after the read, or
|
|
238
|
+
write back a session and a verification flag that a SESAME write had
|
|
239
|
+
changed. Now these writes and each device change of a sweep take the
|
|
240
|
+
session lock of the device and then the per-user lock, and read the
|
|
241
|
+
records under them. A PreKeyMessage receive now compares the incoming
|
|
242
|
+
identity with the identity that the store pins when it writes. An identity
|
|
243
|
+
pinned while the message decrypts gets `pendingVerification` and an
|
|
244
|
+
identity change event. It is no longer replaced. The locks order one
|
|
245
|
+
client process only.
|
|
246
|
+
- **Fixed: key cleanup, session setup, and device removal keep a newer
|
|
247
|
+
session.** `cleanupExpiredKeys()` read the session and wrote it back
|
|
248
|
+
without the session lock. `establishSession()` registered the session
|
|
249
|
+
state that it read after the session was established. When a send
|
|
250
|
+
committed a newer state between the read and the write, the write put the
|
|
251
|
+
older state back, and the next send used a message key again. When the
|
|
252
|
+
device list of a recipient no longer listed a device, or listed a new
|
|
253
|
+
identity for it, the removal deleted the session under the per-user lock
|
|
254
|
+
only, so a send that was in progress could put the session of the removed
|
|
255
|
+
device back. Now the cleanup runs under the session lock. Session setup
|
|
256
|
+
registers the state of the session that the store holds under the session
|
|
257
|
+
lock. A device removal takes the session lock of the device and then the
|
|
258
|
+
per-user lock. Two device-list syncs for one recipient still run one after
|
|
259
|
+
the other. The locks order one client process only.
|
|
260
|
+
|
|
3
261
|
## 8.1.0
|
|
4
262
|
|
|
5
263
|
- **Changed: the web SQLite store is no longer experimental.** Its last
|
package/README.md
CHANGED
|
@@ -11,8 +11,6 @@ Add encrypted messaging to Expo, React Native, browser, and Node applications. T
|
|
|
11
11
|
|
|
12
12
|
The default policy requires post-quantum session establishment and ratcheting. The protocol implementation is open source under the MIT License or the Apache License 2.0, at your option.
|
|
13
13
|
|
|
14
|
-
[**Run an encrypted exchange in your browser**](https://open-e2ee.dev/playground) · [Edit on StackBlitz](https://stackblitz.com/fork/github/open-e2ee/signal-protocol-js/tree/v8.1.0/examples/browser) · [Run on Expo / Hermes](./examples/expo/README.md)
|
|
15
|
-
|
|
16
14
|
[](./LICENSE)
|
|
17
15
|
[](https://www.npmjs.com/package/@open-e2ee/signal-protocol-sdk)
|
|
18
16
|
[](https://www.npmjs.com/package/@open-e2ee/signal-protocol-sdk#provenance)
|
|
@@ -28,22 +26,20 @@ https://github.com/user-attachments/assets/d8002bc3-c037-41b6-8f48-4008f2d49e6c
|
|
|
28
26
|
|
|
29
27
|
The [visual demo](https://open-e2ee.dev/#demo) shows the envelope, ratchets, relay mailbox, and decrypted result. On desktop, type a message and inspect each step. On mobile, a recorded protocol run replays at reading pace. Displayed timings exclude network time.
|
|
30
28
|
|
|
31
|
-
The
|
|
32
|
-
|
|
33
|
-
Both examples use real protocol code and cryptography. An in-memory relay holds their envelopes. They need no account or backend project.
|
|
29
|
+
The demonstrations use real protocol code and cryptography. Application integration requires device-local storage and authenticated delivery.
|
|
34
30
|
|
|
35
31
|
## What the SDK handles
|
|
36
32
|
|
|
37
33
|
- **Session establishment and ratcheting.** PQXDH establishes sessions. The ML-KEM Braid ratchet adds post-quantum key updates. Required post-quantum operations fail closed.
|
|
38
34
|
- **Chat features.** Multi-device messaging, groups, sealed sender, encrypted attachments, and safety-number verification use the same package.
|
|
39
35
|
- **Device-local state.** Storage adapters keep identities, sessions, and message state on the device.
|
|
40
|
-
- **
|
|
36
|
+
- **Hosted delivery.** Connect to [OpenE2EE Signal Protocol Relay](https://open-e2ee.dev/relay) with the hosted client factory. Advanced integrations can supply a custom transport.
|
|
41
37
|
|
|
42
38
|
The relay never needs message plaintext or device private keys.
|
|
43
39
|
|
|
44
40
|
OpenE2EE implements a versioned profile of the published Signal Protocol specifications. It is not affiliated with Signal Messenger and is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate. See the [notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
|
|
45
41
|
|
|
46
|
-
Version `
|
|
42
|
+
Version `9.0.x`. Public APIs and persisted formats follow semantic versioning.
|
|
47
43
|
|
|
48
44
|
## Install
|
|
49
45
|
|
|
@@ -51,54 +47,46 @@ Version `8.1.x`. Public APIs and persisted formats follow semantic versioning.
|
|
|
51
47
|
npm install @open-e2ee/signal-protocol-sdk
|
|
52
48
|
```
|
|
53
49
|
|
|
54
|
-
Use a current Node LTS release for local development.
|
|
50
|
+
Use a current Node LTS release for local development. The storage guides list platform requirements.
|
|
55
51
|
|
|
56
|
-
##
|
|
52
|
+
## Connect to the Signal Protocol Relay
|
|
57
53
|
|
|
58
|
-
|
|
54
|
+
Create a Relay project in the [OpenE2EE console](https://console.open-e2ee.dev).
|
|
55
|
+
Configure its identity provider and copy the environment's connection URL.
|
|
56
|
+
Your application supplies a device-local store and `getIdentityAssertion`, which
|
|
57
|
+
returns a short-lived signed assertion for the signed-in user.
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
```ts
|
|
62
|
-
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
63
|
-
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
64
|
-
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
65
|
-
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
66
|
-
|
|
67
|
-
const relay = inMemoryRelay();
|
|
68
|
-
await relay.registerDevice("alice", { encryptedDeviceName: new ArrayBuffer(0) });
|
|
69
|
-
await relay.registerDevice("bob", { encryptedDeviceName: new ArrayBuffer(0) });
|
|
70
|
-
|
|
71
|
-
const alice = await createSignalProtocolClient({
|
|
72
|
-
identity: { userId: "alice" },
|
|
73
|
-
adapters: { storage: inMemoryStore(), relay },
|
|
74
|
-
});
|
|
75
|
-
const bob = await createSignalProtocolClient({
|
|
76
|
-
identity: { userId: "bob" },
|
|
77
|
-
adapters: { storage: inMemoryStore(), relay },
|
|
78
|
-
});
|
|
59
|
+
This example needs that application setup. It is not an offline script.
|
|
79
60
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
61
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
62
|
+
```ts
|
|
63
|
+
import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
64
|
+
|
|
65
|
+
const signal = await createHostedSignalProtocolClient({
|
|
66
|
+
adapters: { storage },
|
|
67
|
+
hosted: {
|
|
68
|
+
relayUrl,
|
|
69
|
+
getIdentityAssertion,
|
|
70
|
+
},
|
|
86
71
|
});
|
|
87
|
-
|
|
88
|
-
await alice.send("bob", "hello");
|
|
89
|
-
bob.startRelaySubscription();
|
|
90
|
-
await delivered;
|
|
91
72
|
```
|
|
92
73
|
|
|
93
|
-
|
|
74
|
+
Register a handler before you start incoming delivery. Persist each message
|
|
75
|
+
before the handler resolves, and use its ID to make repeated writes idempotent.
|
|
94
76
|
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
78
|
+
```ts
|
|
79
|
+
signal.registerHook("onMessageDecrypted", async (message) => {
|
|
80
|
+
await appMessages.accept(message);
|
|
81
|
+
});
|
|
82
|
+
signal.startRelaySubscription();
|
|
83
|
+
await signal.send(recipientUserId, "hello");
|
|
97
84
|
```
|
|
98
85
|
|
|
99
|
-
The
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
The hosted factory authenticates and registers the device, then publishes its
|
|
87
|
+
public prekeys. `send()` establishes the recipient sessions and sends encrypted
|
|
88
|
+
envelopes. The receive handler gets plaintext after device-local decryption.
|
|
89
|
+
See [client composition](./docs/CLIENT_COMPOSITION.md) for platform setup.
|
|
102
90
|
|
|
103
91
|
## Use your app’s storage and relay
|
|
104
92
|
|
|
@@ -106,14 +94,14 @@ Choose the device-local store for your runtime. Then supply a relay that authent
|
|
|
106
94
|
|
|
107
95
|
| Runtime | Storage path | Deployment boundary |
|
|
108
96
|
|---|---|---|
|
|
109
|
-
| Expo | [`expoStore`](./local/store/expo/README.md) | Enable SQLCipher in the expo-sqlite config plugin. The SDK owns the database file, its key, and its migrations. Requires a native development or release build.
|
|
97
|
+
| Expo | [`expoStore`](./local/store/expo/README.md) | Enable SQLCipher in the expo-sqlite config plugin. The SDK owns the database file, its key, and its migrations. Requires a native development or release build. Expo Go does not include SQLCipher. |
|
|
110
98
|
| Browser | [`webSqliteStore`](./local/store/web-sqlite/README.md) | Needs the origin private file system and a CSP that allows `'wasm-unsafe-eval'`. The SDK owns the database file, its key, and its migrations. The key sits in IndexedDB in the same origin, so same-origin JavaScript can read it. Without the origin private file system, the open fails with `OPFS_UNAVAILABLE`. |
|
|
111
99
|
| Browser without the origin private file system | [`indexedDbStore`](./local/store/web/README.md) | Use a secure context and a restrictive CSP. Same-origin JavaScript can access stored records and their key. [Browser setup](https://docs.open-e2ee.dev/start/browser). |
|
|
112
100
|
| Bare React Native | [`reactNativeStore`](./local/store/react-native/README.md) | Enable SQLCipher with `"op-sqlite": { "sqlcipher": true }` in the app's `package.json`, and install `react-native-keychain`. The SDK owns the database file, its key, and its migrations. Requires a native build; with SQLCipher on, op-sqlite conflicts on iOS with `expo-sqlite`, `expo-updates`, and `use_frameworks!`. |
|
|
113
101
|
| Own key-value engine | [`keyValueStore`](./local/store/key-value/README.md) | Provide an atomic, durable key-value backend and a keychain-backed secret vault, and run the exported backend conformance kit. A Realm backend is included. |
|
|
114
102
|
| Node and Electron | [`nodeStore`](./local/store/node/README.md) | Install `better-sqlite3-multiple-ciphers` and pass a private directory on a local file system and a secret vault. In Electron, open it in the main process with the safeStorage vault. The SDK owns the database file, its key, and its migrations. |
|
|
115
103
|
|
|
116
|
-
React Native support starts at React Native 0.83.6 and Expo SDK 55. The peer ranges have no upper bound. CI checks these versions:
|
|
104
|
+
React Native support starts at React Native 0.83.6 and Expo SDK 55. The peer ranges have no upper bound. Internal CI checks these versions:
|
|
117
105
|
|
|
118
106
|
| CI check | Versions |
|
|
119
107
|
|---|---|
|
|
@@ -129,7 +117,7 @@ The [adapter guide](./ADAPTERS.md) defines every storage, relay, vault, and obje
|
|
|
129
117
|
|
|
130
118
|
## Security and assurance
|
|
131
119
|
|
|
132
|
-
The SDK is open source. Our engineering tests remain private. We publish the [testing methodology and dated results](./docs/ASSURANCE.md), including what readers can and cannot verify from this repository. Public CI rebuilds the package, checks types and dependencies, and
|
|
120
|
+
The SDK is open source. Our engineering tests remain private. We publish the [testing methodology and dated results](./docs/ASSURANCE.md), including what readers can and cannot verify from this repository. Public CI rebuilds the client package, checks types and dependencies, and validates the public import surface.
|
|
133
121
|
|
|
134
122
|
> Reviewed continuously by adversarial AI agents; not audited by any independent firm.
|
|
135
123
|
|
package/SECURITY.md
CHANGED
package/client/README.md
CHANGED
|
@@ -33,6 +33,15 @@ await signal.encryptMessage(bob, 'hello');
|
|
|
33
33
|
|
|
34
34
|
### With relay
|
|
35
35
|
|
|
36
|
+
Create a Relay project in the OpenE2EE console and configure its identity
|
|
37
|
+
provider. Copy the environment connection URL into your application. Supply
|
|
38
|
+
`getIdentityAssertion` from your authentication integration. It returns a
|
|
39
|
+
short-lived signed assertion for the signed-in user.
|
|
40
|
+
|
|
41
|
+
The hosted factory registers the device and publishes its public prekeys.
|
|
42
|
+
The published SDK contains client code and transport contracts. Relay server
|
|
43
|
+
implementations run separately.
|
|
44
|
+
|
|
36
45
|
<!-- doc-snippet:skip requires-external-context -->
|
|
37
46
|
```ts
|
|
38
47
|
import { createHostedSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
package/device/README.md
CHANGED
|
@@ -28,15 +28,24 @@ and lifecycle state in the `SignalProtocolLocalSecretVault` that the
|
|
|
28
28
|
application passes, and they take platform metadata as an input. They omit each
|
|
29
29
|
metadata field that the application does not supply.
|
|
30
30
|
|
|
31
|
-
Two platform entries read that metadata
|
|
31
|
+
Two platform entries read that metadata. Install the peers of the entry that
|
|
32
|
+
you use.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- `@open-e2ee/signal-protocol-sdk/device/react-native` reads `react-native` and
|
|
36
|
-
`react-native-device-info`.
|
|
34
|
+
`@open-e2ee/signal-protocol-sdk/device/expo` reads `react-native` 0.83.6 or
|
|
35
|
+
later, `expo-constants` 55.0.7 or later, and `expo-device` 55.0.15 or later.
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
```sh
|
|
38
|
+
npx expo install react-native expo-constants expo-device
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`@open-e2ee/signal-protocol-sdk/device/react-native` reads `react-native`
|
|
42
|
+
0.83.6 or later and `react-native-device-info` 15.0.1 or later.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npm install react-native react-native-device-info
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The lifecycle core is available from:
|
|
40
49
|
|
|
41
50
|
<!-- doc-snippet:skip requires-external-context -->
|
|
42
51
|
```ts
|