@open-e2ee/signal-protocol-sdk 7.2.0 → 8.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 +54 -7
- package/ARCHITECTURE.md +1 -0
- package/CHANGELOG.md +503 -0
- package/README.md +9 -5
- package/SECURITY.md +2 -2
- package/THIRD_PARTY_NOTICES.md +429 -0
- package/client/README.md +1 -2
- package/device/README.md +50 -19
- package/dist/client/client.d.ts +31 -5
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +149 -90
- package/dist/client/client.js.map +1 -1
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js +2 -0
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/files.d.ts.map +1 -1
- package/dist/client/files.js +19 -2
- package/dist/client/files.js.map +1 -1
- package/dist/client/headless.d.ts +1 -1
- package/dist/client/headless.js +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
- package/dist/client/hosted-anonymous-delivery.js +2 -1
- package/dist/client/hosted-anonymous-delivery.js.map +1 -1
- package/dist/client/hosted-connection.d.ts +1 -1
- package/dist/client/hosted-connection.d.ts.map +1 -1
- package/dist/client/hosted-connection.js +8 -12
- package/dist/client/hosted-connection.js.map +1 -1
- package/dist/client/hosted-group-authority.d.ts.map +1 -1
- package/dist/client/hosted-group-authority.js +2 -1
- package/dist/client/hosted-group-authority.js.map +1 -1
- package/dist/client/hosted-groups.d.ts.map +1 -1
- package/dist/client/hosted-groups.js +2 -1
- package/dist/client/hosted-groups.js.map +1 -1
- package/dist/client/hosted-push.d.ts.map +1 -1
- package/dist/client/hosted-push.js +2 -1
- package/dist/client/hosted-push.js.map +1 -1
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +10 -11
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/hosted-trust.d.ts +11 -11
- package/dist/client/hosted-trust.d.ts.map +1 -1
- package/dist/client/hosted-trust.js +12 -12
- package/dist/client/hosted-trust.js.map +1 -1
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +6 -1
- package/dist/client/messages.js.map +1 -1
- package/dist/client/multi-device.d.ts.map +1 -1
- package/dist/client/multi-device.js +2 -1
- package/dist/client/multi-device.js.map +1 -1
- package/dist/client/relay-work.d.ts +30 -0
- package/dist/client/relay-work.d.ts.map +1 -0
- package/dist/client/relay-work.js +189 -0
- package/dist/client/relay-work.js.map +1 -0
- package/dist/client/retry.d.ts.map +1 -1
- package/dist/client/retry.js +2 -0
- package/dist/client/retry.js.map +1 -1
- package/dist/client/sessions.d.ts.map +1 -1
- package/dist/client/sessions.js +3 -0
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/signal-service-cipher.d.ts +19 -11
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +48 -46
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/state.d.ts +8 -0
- package/dist/client/state.d.ts.map +1 -1
- package/dist/client/state.js +11 -0
- package/dist/client/state.js.map +1 -1
- package/dist/device/connection.d.ts +1 -1
- package/dist/device/connection.d.ts.map +1 -1
- package/dist/device/connection.js +4 -11
- package/dist/device/connection.js.map +1 -1
- package/dist/device/device-id.d.ts +10 -4
- package/dist/device/device-id.d.ts.map +1 -1
- package/dist/device/device-id.js +15 -9
- package/dist/device/device-id.js.map +1 -1
- package/dist/device/device-name-crypto.d.ts.map +1 -1
- package/dist/device/device-name-crypto.js +2 -2
- package/dist/device/device-name-crypto.js.map +1 -1
- package/dist/device/expo/index.d.ts +25 -8
- package/dist/device/expo/index.d.ts.map +1 -1
- package/dist/device/expo/index.js +58 -8
- package/dist/device/expo/index.js.map +1 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +3 -2
- package/dist/device/index.js.map +1 -1
- package/dist/device/lifecycle/index.d.ts +4 -2
- package/dist/device/lifecycle/index.d.ts.map +1 -1
- package/dist/device/lifecycle/index.js.map +1 -1
- package/dist/device/lifecycle/manager.d.ts +12 -14
- package/dist/device/lifecycle/manager.d.ts.map +1 -1
- package/dist/device/lifecycle/manager.js +52 -97
- package/dist/device/lifecycle/manager.js.map +1 -1
- package/dist/device/lifecycle/types.d.ts +26 -16
- package/dist/device/lifecycle/types.d.ts.map +1 -1
- package/dist/device/lifecycle/utils.d.ts +8 -4
- package/dist/device/lifecycle/utils.d.ts.map +1 -1
- package/dist/device/lifecycle/utils.js +12 -16
- package/dist/device/lifecycle/utils.js.map +1 -1
- package/dist/device/provisioning.d.ts.map +1 -1
- package/dist/device/provisioning.js +6 -8
- package/dist/device/provisioning.js.map +1 -1
- package/dist/device/react-native/index.d.ts +40 -0
- package/dist/device/react-native/index.d.ts.map +1 -0
- package/dist/device/react-native/index.js +74 -0
- package/dist/device/react-native/index.js.map +1 -0
- package/dist/device/transfer.d.ts +15 -7
- package/dist/device/transfer.d.ts.map +1 -1
- package/dist/device/transfer.js +30 -22
- package/dist/device/transfer.js.map +1 -1
- package/dist/device/types.d.ts +15 -7
- package/dist/device/types.d.ts.map +1 -1
- package/dist/device/types.js.map +1 -1
- package/dist/device/vault-text.d.ts +13 -0
- package/dist/device/vault-text.d.ts.map +1 -0
- package/dist/device/vault-text.js +17 -0
- package/dist/device/vault-text.js.map +1 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/index.d.ts +3 -3
- package/dist/internal/crypto/index.d.ts.map +1 -1
- package/dist/internal/crypto/index.js +3 -3
- package/dist/internal/crypto/index.js.map +1 -1
- package/dist/internal/crypto/random-host.d.ts +1 -1
- package/dist/internal/crypto/random-host.d.ts.map +1 -1
- package/dist/internal/crypto/random-host.js +3 -2
- package/dist/internal/crypto/random-host.js.map +1 -1
- package/dist/internal/crypto/random-host.native.d.ts +6 -1
- package/dist/internal/crypto/random-host.native.d.ts.map +1 -1
- package/dist/internal/crypto/random-host.native.js +14 -10
- package/dist/internal/crypto/random-host.native.js.map +1 -1
- package/dist/internal/crypto/random-host.node.d.ts +1 -1
- package/dist/internal/crypto/random-host.node.d.ts.map +1 -1
- package/dist/internal/crypto/random-host.node.js +1 -1
- package/dist/internal/crypto/random-host.node.js.map +1 -1
- package/dist/internal/crypto/random.d.ts +12 -3
- package/dist/internal/crypto/random.d.ts.map +1 -1
- package/dist/internal/crypto/random.js +14 -3
- package/dist/internal/crypto/random.js.map +1 -1
- package/dist/internal/crypto/utils.d.ts.map +1 -1
- package/dist/internal/crypto/utils.js +10 -6
- package/dist/internal/crypto/utils.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.d.ts +2 -0
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +2 -1
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/encoding/proto/signal-message.d.ts +1 -0
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/signal-message.js +2 -1
- package/dist/internal/encoding/proto/signal-message.js.map +1 -1
- package/dist/internal/groups/authority-certificate.d.ts.map +1 -1
- package/dist/internal/groups/authority-certificate.js +2 -1
- package/dist/internal/groups/authority-certificate.js.map +1 -1
- package/dist/internal/groups/encrypted-state.d.ts.map +1 -1
- package/dist/internal/groups/encrypted-state.js +9 -7
- package/dist/internal/groups/encrypted-state.js.map +1 -1
- package/dist/internal/groups/invite-link.d.ts.map +1 -1
- package/dist/internal/groups/invite-link.js +2 -1
- package/dist/internal/groups/invite-link.js.map +1 -1
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +5 -5
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/groups/sdk-store.d.ts.map +1 -1
- package/dist/internal/groups/sdk-store.js +4 -3
- package/dist/internal/groups/sdk-store.js.map +1 -1
- package/dist/internal/groups/server-engine.d.ts +6 -1
- package/dist/internal/groups/server-engine.d.ts.map +1 -1
- package/dist/internal/groups/server-engine.js +11 -15
- package/dist/internal/groups/server-engine.js.map +1 -1
- package/dist/internal/groups/wire.d.ts.map +1 -1
- package/dist/internal/groups/wire.js +2 -1
- package/dist/internal/groups/wire.js.map +1 -1
- package/dist/internal/platform/blob.d.ts +10 -0
- package/dist/internal/platform/blob.d.ts.map +1 -0
- package/dist/internal/platform/blob.js +30 -0
- package/dist/internal/platform/blob.js.map +1 -0
- package/dist/internal/platform/env.d.ts +13 -0
- package/dist/internal/platform/env.d.ts.map +1 -0
- package/dist/internal/platform/env.js +17 -0
- package/dist/internal/platform/env.js.map +1 -0
- package/dist/internal/platform/index.d.ts +5 -0
- package/dist/internal/platform/index.d.ts.map +1 -0
- package/dist/internal/platform/index.js +5 -0
- package/dist/internal/platform/index.js.map +1 -0
- package/dist/internal/platform/url.d.ts +72 -0
- package/dist/internal/platform/url.d.ts.map +1 -0
- package/dist/internal/platform/url.js +275 -0
- package/dist/internal/platform/url.js.map +1 -0
- package/dist/internal/platform/utf8.d.ts +28 -0
- package/dist/internal/platform/utf8.d.ts.map +1 -0
- package/dist/internal/platform/utf8.js +167 -0
- package/dist/internal/platform/utf8.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +1 -1
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/delivery-token.js +5 -10
- package/dist/internal/protocol/sealed-sender/delivery-token.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +2 -4
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +4 -3
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts +4 -4
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +8 -10
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js.map +1 -1
- package/dist/internal/protocol/username/hash.d.ts.map +1 -1
- package/dist/internal/protocol/username/hash.js +18 -3
- package/dist/internal/protocol/username/hash.js.map +1 -1
- package/dist/internal/protocol/username/link.d.ts.map +1 -1
- package/dist/internal/protocol/username/link.js +2 -1
- package/dist/internal/protocol/username/link.js.map +1 -1
- package/dist/internal/protocol/username/proof.d.ts.map +1 -1
- package/dist/internal/protocol/username/proof.js +2 -1
- package/dist/internal/protocol/username/proof.js.map +1 -1
- package/dist/internal/sesame/device-registry.d.ts +16 -3
- package/dist/internal/sesame/device-registry.d.ts.map +1 -1
- package/dist/internal/sesame/device-registry.js +10 -7
- package/dist/internal/sesame/device-registry.js.map +1 -1
- package/dist/internal/sesame/index.d.ts +1 -1
- package/dist/internal/sesame/index.d.ts.map +1 -1
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +3 -2
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/session/index.d.ts +1 -2
- package/dist/internal/session/index.d.ts.map +1 -1
- package/dist/internal/session/index.js +1 -1
- package/dist/internal/session/index.js.map +1 -1
- package/dist/internal/session/validation.d.ts +0 -80
- package/dist/internal/session/validation.d.ts.map +1 -1
- package/dist/internal/session/validation.js +0 -134
- package/dist/internal/session/validation.js.map +1 -1
- package/dist/local/store/device-record.d.ts +18 -0
- package/dist/local/store/device-record.d.ts.map +1 -0
- package/dist/local/store/device-record.js +34 -0
- package/dist/local/store/device-record.js.map +1 -0
- package/dist/local/store/expo/adapter.d.ts +59 -238
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +83 -640
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/driver.d.ts +16 -0
- package/dist/local/store/expo/driver.d.ts.map +1 -0
- package/dist/local/store/expo/driver.js +141 -0
- package/dist/local/store/expo/driver.js.map +1 -0
- package/dist/local/store/expo/index.d.ts +3 -12
- package/dist/local/store/expo/index.d.ts.map +1 -1
- package/dist/local/store/expo/index.js +1 -8
- package/dist/local/store/expo/index.js.map +1 -1
- package/dist/local/store/expo/maintenance.d.ts +3 -2
- package/dist/local/store/expo/maintenance.d.ts.map +1 -1
- package/dist/local/store/expo/maintenance.js +5 -34
- package/dist/local/store/expo/maintenance.js.map +1 -1
- package/dist/local/store/index.d.ts +10 -5
- package/dist/local/store/index.d.ts.map +1 -1
- package/dist/local/store/index.js +10 -5
- package/dist/local/store/index.js.map +1 -1
- package/dist/local/store/key-value/adapter.d.ts +326 -0
- package/dist/local/store/key-value/adapter.d.ts.map +1 -0
- package/dist/local/store/key-value/adapter.js +1472 -0
- package/dist/local/store/key-value/adapter.js.map +1 -0
- package/dist/local/store/{react-native → key-value}/backend-conformance.d.ts +6 -6
- package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -0
- package/dist/local/store/{react-native → key-value}/backend-conformance.js +3 -3
- package/dist/local/store/key-value/backend-conformance.js.map +1 -0
- package/dist/local/store/key-value/batch.d.ts +41 -0
- package/dist/local/store/key-value/batch.d.ts.map +1 -0
- package/dist/local/store/key-value/batch.js +77 -0
- package/dist/local/store/key-value/batch.js.map +1 -0
- package/dist/local/store/key-value/device-record.d.ts +23 -0
- package/dist/local/store/key-value/device-record.d.ts.map +1 -0
- package/dist/local/store/key-value/device-record.js +33 -0
- package/dist/local/store/key-value/device-record.js.map +1 -0
- package/dist/local/store/key-value/index.d.ts +24 -0
- package/dist/local/store/key-value/index.d.ts.map +1 -0
- package/dist/local/store/key-value/index.js +8 -0
- package/dist/local/store/key-value/index.js.map +1 -0
- package/dist/local/store/key-value/realm/index.d.ts +83 -0
- package/dist/local/store/key-value/realm/index.d.ts.map +1 -0
- package/dist/local/store/key-value/realm/index.js +102 -0
- package/dist/local/store/key-value/realm/index.js.map +1 -0
- package/dist/local/store/{react-native → key-value}/storage.d.ts +6 -6
- package/dist/local/store/key-value/storage.d.ts.map +1 -0
- package/dist/local/store/key-value/storage.js.map +1 -0
- package/dist/local/store/key-value/transactional-backend.d.ts +50 -0
- package/dist/local/store/key-value/transactional-backend.d.ts.map +1 -0
- package/dist/local/store/key-value/transactional-backend.js +90 -0
- package/dist/local/store/key-value/transactional-backend.js.map +1 -0
- package/dist/local/store/key-value/value-key.d.ts +34 -0
- package/dist/local/store/key-value/value-key.d.ts.map +1 -0
- package/dist/local/store/key-value/value-key.js +83 -0
- package/dist/local/store/key-value/value-key.js.map +1 -0
- package/dist/local/store/memory/adapter.d.ts +8 -0
- package/dist/local/store/memory/adapter.d.ts.map +1 -1
- package/dist/local/store/memory/adapter.js +60 -75
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/node/adapter.d.ts +74 -130
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +83 -727
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/index.d.ts +8 -6
- package/dist/local/store/node/index.d.ts.map +1 -1
- package/dist/local/store/node/index.js +3 -7
- package/dist/local/store/node/index.js.map +1 -1
- package/dist/local/store/node/maintenance.d.ts +5 -0
- package/dist/local/store/node/maintenance.d.ts.map +1 -0
- package/dist/local/store/node/maintenance.js +7 -0
- package/dist/local/store/node/maintenance.js.map +1 -0
- package/dist/local/store/node/owner-lock.d.ts +26 -0
- package/dist/local/store/node/owner-lock.d.ts.map +1 -0
- package/dist/local/store/node/owner-lock.js +88 -0
- package/dist/local/store/node/owner-lock.js.map +1 -0
- package/dist/local/store/react-native/adapter.d.ts +63 -274
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +80 -1406
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/index.d.ts +7 -19
- package/dist/local/store/react-native/index.d.ts.map +1 -1
- package/dist/local/store/react-native/index.js +2 -7
- package/dist/local/store/react-native/index.js.map +1 -1
- package/dist/local/store/react-native/maintenance.d.ts +5 -0
- package/dist/local/store/react-native/maintenance.d.ts.map +1 -0
- package/dist/local/store/react-native/maintenance.js +7 -0
- package/dist/local/store/react-native/maintenance.js.map +1 -0
- package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.d.ts +38 -0
- package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.d.ts.map +1 -0
- package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.js +196 -0
- package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.js.map +1 -0
- package/dist/local/store/sqlite/database.d.ts +20 -0
- package/dist/local/store/sqlite/database.d.ts.map +1 -0
- package/dist/local/store/sqlite/database.js +41 -0
- package/dist/local/store/sqlite/database.js.map +1 -0
- package/dist/local/store/sqlite/driver.d.ts +138 -0
- package/dist/local/store/sqlite/driver.d.ts.map +1 -0
- package/dist/local/store/sqlite/driver.js +10 -0
- package/dist/local/store/sqlite/driver.js.map +1 -0
- package/dist/local/store/sqlite/encryption.d.ts +61 -0
- package/dist/local/store/sqlite/encryption.d.ts.map +1 -0
- package/dist/local/store/sqlite/encryption.js +98 -0
- package/dist/local/store/sqlite/encryption.js.map +1 -0
- package/dist/local/store/sqlite/errors.d.ts +70 -0
- package/dist/local/store/sqlite/errors.d.ts.map +1 -0
- package/dist/local/store/sqlite/errors.js +101 -0
- package/dist/local/store/sqlite/errors.js.map +1 -0
- package/dist/local/store/sqlite/executor.d.ts +22 -0
- package/dist/local/store/sqlite/executor.d.ts.map +1 -0
- package/dist/local/store/sqlite/executor.js +129 -0
- package/dist/local/store/sqlite/executor.js.map +1 -0
- package/dist/local/store/sqlite/index.d.ts +20 -0
- package/dist/local/store/sqlite/index.d.ts.map +1 -0
- package/dist/local/store/sqlite/index.js +18 -0
- package/dist/local/store/sqlite/index.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/account.d.ts +45 -0
- package/dist/local/store/sqlite/key-storage/account.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/account.js +125 -0
- package/dist/local/store/sqlite/key-storage/account.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/contact-identities.d.ts +19 -0
- package/dist/local/store/sqlite/key-storage/contact-identities.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/contact-identities.js +85 -0
- package/dist/local/store/sqlite/key-storage/contact-identities.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/context.d.ts +19 -0
- package/dist/local/store/sqlite/key-storage/context.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/context.js +18 -0
- package/dist/local/store/sqlite/key-storage/context.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/identity-keys.d.ts +18 -0
- package/dist/local/store/sqlite/key-storage/identity-keys.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/identity-keys.js +88 -0
- package/dist/local/store/sqlite/key-storage/identity-keys.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/index.d.ts +108 -0
- package/dist/local/store/sqlite/key-storage/index.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/index.js +241 -0
- package/dist/local/store/sqlite/key-storage/index.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/message-records.d.ts +41 -0
- package/dist/local/store/sqlite/key-storage/message-records.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/message-records.js +133 -0
- package/dist/local/store/sqlite/key-storage/message-records.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/metadata.d.ts +16 -0
- package/dist/local/store/sqlite/key-storage/metadata.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/metadata.js +53 -0
- package/dist/local/store/sqlite/key-storage/metadata.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/one-time-prekeys.d.ts +36 -0
- package/dist/local/store/sqlite/key-storage/one-time-prekeys.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/one-time-prekeys.js +129 -0
- package/dist/local/store/sqlite/key-storage/one-time-prekeys.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/session-trust.d.ts +10 -0
- package/dist/local/store/sqlite/key-storage/session-trust.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/session-trust.js +88 -0
- package/dist/local/store/sqlite/key-storage/session-trust.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/sessions.d.ts +50 -0
- package/dist/local/store/sqlite/key-storage/sessions.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/sessions.js +209 -0
- package/dist/local/store/sqlite/key-storage/sessions.js.map +1 -0
- package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts +69 -0
- package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts.map +1 -0
- package/dist/local/store/sqlite/key-storage/signed-prekeys.js +219 -0
- package/dist/local/store/sqlite/key-storage/signed-prekeys.js.map +1 -0
- package/dist/local/store/sqlite/maintenance.d.ts +7 -0
- package/dist/local/store/sqlite/maintenance.d.ts.map +1 -0
- package/dist/local/store/sqlite/maintenance.js +32 -0
- package/dist/local/store/sqlite/maintenance.js.map +1 -0
- package/dist/local/store/sqlite/migrations.d.ts +31 -0
- package/dist/local/store/sqlite/migrations.d.ts.map +1 -0
- package/dist/local/store/sqlite/migrations.js +232 -0
- package/dist/local/store/sqlite/migrations.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/ec-one-time-prekey.d.ts +17 -22
- package/dist/local/store/sqlite/models/ec-one-time-prekey.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/ec-one-time-prekey.js +61 -99
- package/dist/local/store/sqlite/models/ec-one-time-prekey.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/ec-signed-prekey.d.ts +22 -25
- package/dist/local/store/sqlite/models/ec-signed-prekey.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/ec-signed-prekey.js +82 -128
- package/dist/local/store/sqlite/models/ec-signed-prekey.js.map +1 -0
- package/dist/local/store/sqlite/models/identity-key-id.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/identity-key-id.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/index.d.ts +5 -5
- package/dist/local/store/sqlite/models/index.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/index.js +12 -5
- package/dist/local/store/sqlite/models/index.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-one-time-prekey.d.ts +17 -20
- package/dist/local/store/sqlite/models/kyber-one-time-prekey.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-one-time-prekey.js +65 -105
- package/dist/local/store/sqlite/models/kyber-one-time-prekey.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-prekey-used.d.ts +3 -3
- package/dist/local/store/sqlite/models/kyber-prekey-used.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-prekey-used.js +13 -25
- package/dist/local/store/sqlite/models/kyber-prekey-used.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-prekey.d.ts +16 -19
- package/dist/local/store/sqlite/models/kyber-prekey.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/kyber-prekey.js +67 -111
- package/dist/local/store/sqlite/models/kyber-prekey.js.map +1 -0
- package/dist/local/store/sqlite/models/local-identity.d.ts +51 -0
- package/dist/local/store/sqlite/models/local-identity.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/local-identity.js +150 -0
- package/dist/local/store/sqlite/models/local-identity.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/message-record.d.ts +15 -44
- package/dist/local/store/sqlite/models/message-record.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/message-record.js +43 -109
- package/dist/local/store/sqlite/models/message-record.js.map +1 -0
- package/dist/local/store/sqlite/models/recipient-identity.d.ts +21 -0
- package/dist/local/store/sqlite/models/recipient-identity.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/recipient-identity.js +59 -0
- package/dist/local/store/sqlite/models/recipient-identity.js.map +1 -0
- package/dist/local/store/sqlite/models/replaced-prekeys.d.ts +23 -0
- package/dist/local/store/sqlite/models/replaced-prekeys.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/replaced-prekeys.js +42 -0
- package/dist/local/store/sqlite/models/replaced-prekeys.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/sender-key.d.ts +22 -23
- package/dist/local/store/sqlite/models/sender-key.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/sender-key.js +66 -94
- package/dist/local/store/sqlite/models/sender-key.js.map +1 -0
- package/dist/local/store/sqlite/models/sesame-user-record.d.ts +32 -0
- package/dist/local/store/sqlite/models/sesame-user-record.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/sesame-user-record.js +78 -0
- package/dist/local/store/sqlite/models/sesame-user-record.js.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/session.d.ts +24 -20
- package/dist/local/store/sqlite/models/session.d.ts.map +1 -0
- package/dist/local/store/{expo → sqlite}/models/session.js +54 -72
- package/dist/local/store/sqlite/models/session.js.map +1 -0
- package/dist/local/store/sqlite/models/skipped-sender-key.d.ts +24 -0
- package/dist/local/store/sqlite/models/skipped-sender-key.d.ts.map +1 -0
- package/dist/local/store/sqlite/models/skipped-sender-key.js +62 -0
- package/dist/local/store/sqlite/models/skipped-sender-key.js.map +1 -0
- package/dist/local/store/sqlite/op-sqlite-driver.d.ts +14 -0
- package/dist/local/store/sqlite/op-sqlite-driver.d.ts.map +1 -0
- package/dist/local/store/sqlite/op-sqlite-driver.js +180 -0
- package/dist/local/store/sqlite/op-sqlite-driver.js.map +1 -0
- package/dist/local/store/sqlite/open-store.d.ts +83 -0
- package/dist/local/store/sqlite/open-store.d.ts.map +1 -0
- package/dist/local/store/sqlite/open-store.js +177 -0
- package/dist/local/store/sqlite/open-store.js.map +1 -0
- package/dist/local/store/sqlite/schema.d.ts +102 -0
- package/dist/local/store/sqlite/schema.d.ts.map +1 -0
- package/dist/local/store/sqlite/schema.js +61 -0
- package/dist/local/store/sqlite/schema.js.map +1 -0
- package/dist/local/store/sqlite/store.d.ts +199 -0
- package/dist/local/store/sqlite/store.d.ts.map +1 -0
- package/dist/local/store/sqlite/store.js +494 -0
- package/dist/local/store/sqlite/store.js.map +1 -0
- package/dist/local/store/sqlite/web/driver.d.ts +50 -0
- package/dist/local/store/sqlite/web/driver.d.ts.map +1 -0
- package/dist/local/store/sqlite/web/driver.js +169 -0
- package/dist/local/store/sqlite/web/driver.js.map +1 -0
- package/dist/local/store/sqlite/web/protocol.d.ts +80 -0
- package/dist/local/store/sqlite/web/protocol.d.ts.map +1 -0
- package/dist/local/store/sqlite/web/protocol.js +13 -0
- package/dist/local/store/sqlite/web/protocol.js.map +1 -0
- package/dist/local/store/sqlite/web/sqlite3mc/sqlite3.mjs +14526 -0
- package/dist/local/store/sqlite/web/sqlite3mc/sqlite3.wasm +0 -0
- package/dist/local/store/sqlite/web/worker.d.ts +36 -0
- package/dist/local/store/sqlite/web/worker.d.ts.map +1 -0
- package/dist/local/store/sqlite/web/worker.js +616 -0
- package/dist/local/store/sqlite/web/worker.js.map +1 -0
- package/dist/local/store/web/adapter.d.ts +5 -14
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +119 -106
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web/device-record.d.ts +23 -0
- package/dist/local/store/web/device-record.d.ts.map +1 -0
- package/dist/local/store/web/device-record.js +31 -0
- package/dist/local/store/web/device-record.js.map +1 -0
- package/dist/local/store/web-sqlite/adapter.d.ts +98 -0
- package/dist/local/store/web-sqlite/adapter.d.ts.map +1 -0
- package/dist/local/store/web-sqlite/adapter.js +151 -0
- package/dist/local/store/web-sqlite/adapter.js.map +1 -0
- package/dist/local/store/web-sqlite/index.d.ts +14 -0
- package/dist/local/store/web-sqlite/index.d.ts.map +1 -0
- package/dist/local/store/web-sqlite/index.js +3 -0
- package/dist/local/store/web-sqlite/index.js.map +1 -0
- package/dist/local/store/web-sqlite/maintenance.d.ts +5 -0
- package/dist/local/store/web-sqlite/maintenance.d.ts.map +1 -0
- package/dist/local/store/web-sqlite/maintenance.js +7 -0
- package/dist/local/store/web-sqlite/maintenance.js.map +1 -0
- package/dist/local/store/web-sqlite/store-locks.d.ts +33 -0
- package/dist/local/store/web-sqlite/store-locks.d.ts.map +1 -0
- package/dist/local/store/web-sqlite/store-locks.js +60 -0
- package/dist/local/store/web-sqlite/store-locks.js.map +1 -0
- package/dist/local/vault/electron-safe-storage.d.ts +45 -0
- package/dist/local/vault/electron-safe-storage.d.ts.map +1 -0
- package/dist/local/vault/electron-safe-storage.js +212 -0
- package/dist/local/vault/electron-safe-storage.js.map +1 -0
- package/dist/local/vault/index.d.ts +4 -2
- package/dist/local/vault/index.d.ts.map +1 -1
- package/dist/local/vault/indexed-db.d.ts +37 -0
- package/dist/local/vault/indexed-db.d.ts.map +1 -0
- package/dist/local/vault/indexed-db.js +102 -0
- package/dist/local/vault/indexed-db.js.map +1 -0
- package/dist/local/vault/react-native-keychain.d.ts +12 -0
- package/dist/local/vault/react-native-keychain.d.ts.map +1 -0
- package/dist/local/vault/react-native-keychain.js +71 -0
- package/dist/local/vault/react-native-keychain.js.map +1 -0
- package/dist/local/vault/require.d.ts +10 -0
- package/dist/local/vault/require.d.ts.map +1 -0
- package/dist/local/vault/require.js +16 -0
- package/dist/local/vault/require.js.map +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +2 -1
- package/dist/logger.js.map +1 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +2 -1
- package/dist/media/index.js.map +1 -1
- package/dist/profile/contact-state.d.ts.map +1 -1
- package/dist/profile/contact-state.js +2 -4
- package/dist/profile/contact-state.js.map +1 -1
- package/dist/profile/index.d.ts +0 -1
- package/dist/profile/index.d.ts.map +1 -1
- package/dist/profile/index.js +0 -2
- package/dist/profile/index.js.map +1 -1
- package/dist/profile/profile-key.d.ts +16 -11
- package/dist/profile/profile-key.d.ts.map +1 -1
- package/dist/profile/profile-key.js +29 -29
- package/dist/profile/profile-key.js.map +1 -1
- package/dist/profile/update-service.d.ts +6 -0
- package/dist/profile/update-service.d.ts.map +1 -1
- package/dist/profile/update-service.js +3 -1
- package/dist/profile/update-service.js.map +1 -1
- package/dist/remote/object-store/validation.d.ts.map +1 -1
- package/dist/remote/object-store/validation.js +2 -1
- package/dist/remote/object-store/validation.js.map +1 -1
- package/dist/remote/relay/memory/adapter.d.ts +2 -3
- package/dist/remote/relay/memory/adapter.d.ts.map +1 -1
- package/dist/remote/relay/memory/adapter.js +22 -30
- package/dist/remote/relay/memory/adapter.js.map +1 -1
- package/dist/remote/relay/memory/failures.d.ts.map +1 -1
- package/dist/remote/relay/memory/failures.js +2 -1
- package/dist/remote/relay/memory/failures.js.map +1 -1
- package/dist/remote/relay/memory/group-server.d.ts +5 -1
- package/dist/remote/relay/memory/group-server.d.ts.map +1 -1
- package/dist/remote/relay/memory/group-server.js +11 -1
- package/dist/remote/relay/memory/group-server.js.map +1 -1
- package/dist/safety/url.d.ts.map +1 -1
- package/dist/safety/url.js +21 -26
- package/dist/safety/url.js.map +1 -1
- package/dist/types/api.d.ts +15 -2
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +97 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +105 -1
- package/dist/types/errors.js.map +1 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +2 -1
- package/dist/types/session.js.map +1 -1
- package/dist/utils/retry.d.ts +2 -0
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +4 -2
- package/dist/utils/retry.js.map +1 -1
- package/docs/ASSURANCE.md +80 -8
- package/docs/CLIENT_COMPOSITION.md +1 -2
- package/docs/DEVIATIONS.md +1 -1
- package/docs/ERROR_HANDLING.md +6 -0
- package/docs/GETTING_STARTED.md +1 -2
- package/docs/PACKAGE_SURFACE.md +29 -11
- package/docs/RECIPES.md +1 -2
- package/examples/browser/index.html +1 -1
- package/local/store/README.md +117 -37
- package/local/store/expo/README.md +67 -47
- package/local/store/key-value/README.md +278 -0
- package/local/store/node/README.md +206 -46
- package/local/store/react-native/README.md +120 -61
- package/local/store/web/README.md +9 -0
- package/local/store/web-sqlite/README.md +202 -0
- package/local/vault/README.md +115 -2
- package/package.json +42 -23
- package/profile/README.md +9 -11
- package/remote/README.md +1 -2
- package/dist/local/store/expo/database-key.d.ts +0 -142
- package/dist/local/store/expo/database-key.d.ts.map +0 -1
- package/dist/local/store/expo/database-key.js +0 -312
- package/dist/local/store/expo/database-key.js.map +0 -1
- package/dist/local/store/expo/db.d.ts +0 -95
- package/dist/local/store/expo/db.d.ts.map +0 -1
- package/dist/local/store/expo/db.js +0 -147
- package/dist/local/store/expo/db.js.map +0 -1
- package/dist/local/store/expo/key-storage.d.ts +0 -429
- package/dist/local/store/expo/key-storage.d.ts.map +0 -1
- package/dist/local/store/expo/key-storage.js +0 -1361
- package/dist/local/store/expo/key-storage.js.map +0 -1
- package/dist/local/store/expo/models/ec-one-time-prekey.d.ts.map +0 -1
- package/dist/local/store/expo/models/ec-one-time-prekey.js.map +0 -1
- package/dist/local/store/expo/models/ec-signed-prekey.d.ts.map +0 -1
- package/dist/local/store/expo/models/ec-signed-prekey.js.map +0 -1
- package/dist/local/store/expo/models/identity-key-id.d.ts.map +0 -1
- package/dist/local/store/expo/models/identity-key-id.js.map +0 -1
- package/dist/local/store/expo/models/index.d.ts.map +0 -1
- package/dist/local/store/expo/models/index.js.map +0 -1
- package/dist/local/store/expo/models/kyber-one-time-prekey.d.ts.map +0 -1
- package/dist/local/store/expo/models/kyber-one-time-prekey.js.map +0 -1
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts.map +0 -1
- package/dist/local/store/expo/models/kyber-prekey-used.js.map +0 -1
- package/dist/local/store/expo/models/kyber-prekey.d.ts.map +0 -1
- package/dist/local/store/expo/models/kyber-prekey.js.map +0 -1
- package/dist/local/store/expo/models/local-identity.d.ts +0 -52
- package/dist/local/store/expo/models/local-identity.d.ts.map +0 -1
- package/dist/local/store/expo/models/local-identity.js +0 -166
- package/dist/local/store/expo/models/local-identity.js.map +0 -1
- package/dist/local/store/expo/models/message-record.d.ts.map +0 -1
- package/dist/local/store/expo/models/message-record.js.map +0 -1
- package/dist/local/store/expo/models/recipient-identity.d.ts +0 -21
- package/dist/local/store/expo/models/recipient-identity.d.ts.map +0 -1
- package/dist/local/store/expo/models/recipient-identity.js +0 -66
- package/dist/local/store/expo/models/recipient-identity.js.map +0 -1
- package/dist/local/store/expo/models/replaced-prekey-utils.d.ts +0 -33
- package/dist/local/store/expo/models/replaced-prekey-utils.d.ts.map +0 -1
- package/dist/local/store/expo/models/replaced-prekey-utils.js +0 -54
- package/dist/local/store/expo/models/replaced-prekey-utils.js.map +0 -1
- package/dist/local/store/expo/models/sender-key.d.ts.map +0 -1
- package/dist/local/store/expo/models/sender-key.js.map +0 -1
- package/dist/local/store/expo/models/session.d.ts.map +0 -1
- package/dist/local/store/expo/models/session.js.map +0 -1
- package/dist/local/store/expo/schema.d.ts +0 -1917
- package/dist/local/store/expo/schema.d.ts.map +0 -1
- package/dist/local/store/expo/schema.js +0 -197
- package/dist/local/store/expo/schema.js.map +0 -1
- package/dist/local/store/node/database-encryption.d.ts +0 -109
- package/dist/local/store/node/database-encryption.d.ts.map +0 -1
- package/dist/local/store/node/database-encryption.js +0 -202
- package/dist/local/store/node/database-encryption.js.map +0 -1
- package/dist/local/store/node/database-file-commit.d.ts +0 -8
- package/dist/local/store/node/database-file-commit.d.ts.map +0 -1
- package/dist/local/store/node/database-file-commit.js +0 -62
- package/dist/local/store/node/database-file-commit.js.map +0 -1
- package/dist/local/store/node/database-key.d.ts +0 -129
- package/dist/local/store/node/database-key.d.ts.map +0 -1
- package/dist/local/store/node/database-key.js +0 -293
- package/dist/local/store/node/database-key.js.map +0 -1
- package/dist/local/store/node/database-lock.d.ts +0 -8
- package/dist/local/store/node/database-lock.d.ts.map +0 -1
- package/dist/local/store/node/database-lock.js +0 -44
- package/dist/local/store/node/database-lock.js.map +0 -1
- package/dist/local/store/node/database.d.ts +0 -226
- package/dist/local/store/node/database.d.ts.map +0 -1
- package/dist/local/store/node/database.js +0 -813
- package/dist/local/store/node/database.js.map +0 -1
- package/dist/local/store/react-native/backend-conformance.d.ts.map +0 -1
- package/dist/local/store/react-native/backend-conformance.js.map +0 -1
- package/dist/local/store/react-native/reference-backend.d.ts +0 -43
- package/dist/local/store/react-native/reference-backend.d.ts.map +0 -1
- package/dist/local/store/react-native/reference-backend.js +0 -178
- package/dist/local/store/react-native/reference-backend.js.map +0 -1
- package/dist/local/store/react-native/storage.d.ts.map +0 -1
- package/dist/local/store/react-native/storage.js.map +0 -1
- package/dist/profile/storage.d.ts +0 -61
- package/dist/profile/storage.d.ts.map +0 -1
- package/dist/profile/storage.js +0 -145
- package/dist/profile/storage.js.map +0 -1
- /package/dist/local/store/{react-native → key-value}/storage.js +0 -0
- /package/dist/local/store/{expo → sqlite}/models/identity-key-id.d.ts +0 -0
- /package/dist/local/store/{expo → sqlite}/models/identity-key-id.js +0 -0
package/ADAPTERS.md
CHANGED
|
@@ -33,15 +33,39 @@ The storage interface handles client-owned Signal Protocol state:
|
|
|
33
33
|
|
|
34
34
|
Use:
|
|
35
35
|
|
|
36
|
-
- `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
37
|
-
-
|
|
36
|
+
- `expoStore` and `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo` (`await expoStore()` opens the SDK-owned SQLCipher database; `resetExpoStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store)
|
|
37
|
+
- `reactNativeStore` and `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native` (bare React Native: `await reactNativeStore()` opens the SDK-owned SQLCipher database on op-sqlite with its key in the react-native-keychain vault; `resetReactNativeStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store)
|
|
38
38
|
- `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web`
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
39
|
+
- `webSqliteStore` and `WebSqliteSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web-sqlite` (`await webSqliteStore()` opens the SDK-owned SQLite database in the origin private file system, encrypted in a Wasm worker; `resetWebSqliteStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store; the page's Content Security Policy must allow `'wasm-unsafe-eval'`)
|
|
40
|
+
- `KeyValueSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/key-value` (use `await KeyValueSignalProtocolStore.create({ storage, vault })` with a caller-provided key-value backend, verified with the exported backend-conformance kit, and a secret vault that holds the value key)
|
|
41
|
+
- `createRealmKeyValueBackend` from `@open-e2ee/signal-protocol-sdk/local/store/key-value/realm` (a key-value backend over an application-installed Realm)
|
|
42
|
+
- `createTransactionalKeyValueBackend` from `@open-e2ee/signal-protocol-sdk/local/store/key-value` (a key-value backend over another engine's transaction, through a synchronous `KeyValueTransaction` handle; the SDK applies each `atomicWrite` batch inside the transaction)
|
|
43
|
+
- `nodeStore` and `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node` (`await nodeStore({ directory, vault })` opens the SDK-owned SQLCipher database on the `better-sqlite3-multiple-ciphers` peer; `resetNodeStore` deletes it and opens an empty one; one process at a time owns the file; `createPreKeyMaintenanceStore` takes an open store)
|
|
41
44
|
- `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
42
45
|
- or a custom implementation
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
On React Native and Expo, the SDK reads random bytes only from the global `crypto.getRandomValues`. Install `react-native-get-random-values` 2.x or `react-native-quick-crypto`, and load it before the first SDK call. Without a global source, the SDK throws `SecureRandomUnavailableError`.
|
|
48
|
+
|
|
49
|
+
### Local secret vault: `SignalProtocolLocalSecretVault`
|
|
50
|
+
|
|
51
|
+
The device ID, the device-lifecycle state, the own profile key, and the value
|
|
52
|
+
key of the key-value store live in the vault that the application passes. The SDK does not choose a vault, and it
|
|
53
|
+
never writes these secrets to `localStorage`. A call without a vault throws an
|
|
54
|
+
`EncryptionError` with code `SECRET_VAULT_REQUIRED`.
|
|
55
|
+
|
|
56
|
+
Use:
|
|
57
|
+
|
|
58
|
+
- `ExpoSecureStoreSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`
|
|
59
|
+
- or a custom implementation
|
|
60
|
+
|
|
61
|
+
### Device metadata
|
|
62
|
+
|
|
63
|
+
The shared `./device` entries take platform metadata as an input and omit each
|
|
64
|
+
field that the application does not supply. These entries read it from the
|
|
65
|
+
platform:
|
|
66
|
+
|
|
67
|
+
- `@open-e2ee/signal-protocol-sdk/device/expo` (`react-native`, `expo-constants`, `expo-device`)
|
|
68
|
+
- `@open-e2ee/signal-protocol-sdk/device/react-native` (`react-native`, `react-native-device-info`)
|
|
45
69
|
|
|
46
70
|
### Remote object store: `SignalProtocolRemoteObjectStore`
|
|
47
71
|
|
|
@@ -65,6 +89,30 @@ private to the backend. The Convex server helper can supply generic validators,
|
|
|
65
89
|
R2 calls, expiry parsing, and metadata verification, while app-owned internal
|
|
66
90
|
functions retain authentication, authorization, and persistence.
|
|
67
91
|
|
|
92
|
+
### Local secret vault: `SignalProtocolLocalSecretVault`
|
|
93
|
+
|
|
94
|
+
Stores small bootstrap secrets, such as a database encryption key, in the
|
|
95
|
+
platform secret store, apart from the local store.
|
|
96
|
+
|
|
97
|
+
Use:
|
|
98
|
+
|
|
99
|
+
- `ExpoSecureStoreSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`
|
|
100
|
+
- `ReactNativeKeychainSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/react-native-keychain` (optional peer `react-native-keychain` 10.0.0 or later)
|
|
101
|
+
- `ElectronSafeStorageSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/electron-safe-storage`, in the Electron main process, with the app's `safeStorage`
|
|
102
|
+
- or a custom implementation
|
|
103
|
+
|
|
104
|
+
The Expo and React Native adapters keep the secret on this device. The Electron
|
|
105
|
+
adapter keeps only ciphertexts in a file that the app names, and the key that
|
|
106
|
+
decrypts them stays in the OS secret store. It fails closed on the Linux
|
|
107
|
+
`basic_text` backend. The react-native-keychain adapter
|
|
108
|
+
sets fixed options that the application cannot change: iOS
|
|
109
|
+
`AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`, Android `AES_GCM_NO_AUTH` storage at the
|
|
110
|
+
`SECURE_SOFTWARE` level, and no `cloudSync` key. react-native-keychain 10.0.0
|
|
111
|
+
turns iCloud sync on for any `cloudSync` value, `false` included
|
|
112
|
+
([issue #800](https://github.com/oblador/react-native-keychain/issues/800)).
|
|
113
|
+
The [secret-vault guide](./local/vault/README.md) gives the reason for each
|
|
114
|
+
option.
|
|
115
|
+
|
|
68
116
|
## Composition
|
|
69
117
|
|
|
70
118
|
### Minimal local client
|
|
@@ -88,11 +136,10 @@ const signal = await createSignalProtocolClient({
|
|
|
88
136
|
import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
89
137
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
90
138
|
|
|
91
|
-
// Initialize the application-owned Expo/SQLCipher database bindings first.
|
|
92
139
|
const signal = await createHostedSignalProtocolClient({
|
|
93
140
|
adapters: {
|
|
94
141
|
// Expo storage owns this device's private keys and session state.
|
|
95
|
-
storage: expoStore(),
|
|
142
|
+
storage: await expoStore(),
|
|
96
143
|
},
|
|
97
144
|
hosted: {
|
|
98
145
|
// The environment-scoped connection URL from the OpenE2EE console.
|
package/ARCHITECTURE.md
CHANGED
|
@@ -73,6 +73,7 @@ import {
|
|
|
73
73
|
Platform and backend integrations are explicit subpaths such as:
|
|
74
74
|
|
|
75
75
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
76
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
76
77
|
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
77
78
|
- `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
|
|
78
79
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,508 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
8.0.0 is a major release. The entries below give the details. To upgrade from
|
|
6
|
+
7.2.0:
|
|
7
|
+
|
|
8
|
+
1. **React Native and Expo: install a global random source.** Install
|
|
9
|
+
`react-native-get-random-values` 2.x or `react-native-quick-crypto`, and
|
|
10
|
+
load it before the first SDK call.
|
|
11
|
+
2. **Pass a secret vault.** The profile key, the device ID, the
|
|
12
|
+
device-lifecycle state, and the key-value store's value key live in a
|
|
13
|
+
`SignalProtocolLocalSecretVault` that the app passes. A call without one
|
|
14
|
+
throws `SECRET_VAULT_REQUIRED`. Bare React Native apps can use
|
|
15
|
+
`./local/vault/react-native-keychain`, Expo apps
|
|
16
|
+
`./local/vault/expo-secure-store`, and Electron apps
|
|
17
|
+
`./local/vault/electron-safe-storage`.
|
|
18
|
+
3. **Key-value store: change the import and the names.** The store moves from
|
|
19
|
+
`./local/store/react-native` to `./local/store/key-value`, and its names
|
|
20
|
+
drop the `ReactNative` prefix. To keep existing data, move its value key
|
|
21
|
+
into the vault before the first open.
|
|
22
|
+
4. **Bare React Native: `./local/store/react-native` is now the SQLite
|
|
23
|
+
store.** `reactNativeStore()` opens an SDK-owned SQLCipher database on the
|
|
24
|
+
optional peer `@op-engineering/op-sqlite` 18.2.5 or later, with the
|
|
25
|
+
op-sqlite SQLCipher build turned on.
|
|
26
|
+
5. **Expo: await the store.** Replace `expoStore()` with `await expoStore()`.
|
|
27
|
+
The SDK owns the database, its schema, and its key.
|
|
28
|
+
6. **Node and Electron: open the new SQLCipher store.** `nodeStore({
|
|
29
|
+
directory, vault })` opens an SDK-owned SQLCipher database on the optional
|
|
30
|
+
peer `better-sqlite3-multiple-ciphers` 13.0.3 or later. It does not read
|
|
31
|
+
the files of the 7.2.0 Node store.
|
|
32
|
+
7. **Remove the deleted names.** The `./local/store/expo/db` and
|
|
33
|
+
`./local/store/expo/schema` entries, the Expo database and key functions,
|
|
34
|
+
the profile-key storage functions, `createReferenceReactNativeBackend`, and
|
|
35
|
+
the `drizzle-orm`, `expo-crypto`, and `fs-native-extensions` peers are
|
|
36
|
+
removed.
|
|
37
|
+
8. **Hosted Relay: copy the connection URL from the console again.** The
|
|
38
|
+
API path and the developer environment kind changed, and the sandbox and
|
|
39
|
+
staging hosts moved to new names.
|
|
40
|
+
|
|
41
|
+
Browser apps can also use the new `./local/store/web-sqlite` store, an
|
|
42
|
+
encrypted SQLite database in the origin private file system. It is optional,
|
|
43
|
+
and the IndexedDB store stays at `./local/store/web`.
|
|
44
|
+
|
|
45
|
+
- **Removed: the optional `expo-crypto` peer.** The SDK does not load
|
|
46
|
+
`expo-crypto`, so `package.json` no longer lists it. An app that installed
|
|
47
|
+
`expo-crypto` only for the SDK can uninstall it.
|
|
48
|
+
- **Added: web SQLite store gates in WebKit.** A macOS job runs the web
|
|
49
|
+
SQLite store's contract, interruption, and multi-tab gates in WebKit on
|
|
50
|
+
each change to the web SQLite store, the SQLite core, the storage contract,
|
|
51
|
+
the key vault, the gate, or a dependency. Linux WebKit (WebKitGTK) has no
|
|
52
|
+
origin private file system, so the web SQLite store does not run there. In
|
|
53
|
+
each job that must run these gates, a gate that skips for want of the
|
|
54
|
+
origin private file system fails. The store stays experimental: its
|
|
55
|
+
storage-pressure and soak gates do not exist yet.
|
|
56
|
+
- **Fixed: the SQLite stores report full storage as
|
|
57
|
+
`StorageQuotaExceededError`.** When the database file cannot grow because
|
|
58
|
+
the disk or the storage quota is full, a write on the Expo, bare React
|
|
59
|
+
Native, Node, or web SQLite store rejects with `StorageQuotaExceededError`
|
|
60
|
+
(`STORAGE_QUOTA_EXCEEDED`), with the SQLite error as `originalError`. It
|
|
61
|
+
rejected with the SQLite error or a `KEY_STORAGE_ERROR`, and the web SQLite
|
|
62
|
+
store reported a full origin quota as a disk I/O error. The rejected write
|
|
63
|
+
does not persist, the store stays open, and the write succeeds after space
|
|
64
|
+
frees.
|
|
65
|
+
- **Changed: each store and vault guide names the optional peers of its
|
|
66
|
+
entry.** Each guide has an install command for the peers that its entry
|
|
67
|
+
loads. For example, `./local/store/web` and `./local/store/web-sqlite` need
|
|
68
|
+
`idb`, and a bundler fails the app build without it.
|
|
69
|
+
- **Fixed: a group delete deletes the skipped sender keys.** The in-memory,
|
|
70
|
+
key-value, and IndexedDB stores kept them after
|
|
71
|
+
`deleteAllSenderKeysForGroup`. These keys decrypt skipped group messages.
|
|
72
|
+
The stores now delete them together with the sender keys of the group. A
|
|
73
|
+
group whose identifier starts with the identifier of the deleted group
|
|
74
|
+
keeps its keys.
|
|
75
|
+
- **Fixed: sender keys no longer collide.** Group `a` with sender `b:c` and
|
|
76
|
+
group `a:b` with sender `c` shared keys. In the in-memory and IndexedDB
|
|
77
|
+
stores, they shared one sender key record. In IndexedDB, they also shared
|
|
78
|
+
one skipped key. In database version 7, a sender key record has an array
|
|
79
|
+
key of group, sender, and device. The key of a skipped key adds the index,
|
|
80
|
+
and a group index finds the skipped keys of a group. The in-memory store
|
|
81
|
+
keys both with JSON arrays.
|
|
82
|
+
- **Changed: IndexedDB version 7 deletes stored sender keys.** The upgrade
|
|
83
|
+
deletes the version 6 sender key records and skipped keys. After the
|
|
84
|
+
upgrade, each group needs a new sender key distribution before its messages
|
|
85
|
+
decrypt. A late message for a deleted skipped key does not decrypt.
|
|
86
|
+
- **Fixed: `deleteAllSenderKeysForGroup` on the Expo store deletes the
|
|
87
|
+
group's skipped message keys.** On a store from `expoStore()`, it deleted
|
|
88
|
+
the group's sender keys and kept each skipped message key, which still
|
|
89
|
+
decrypts its message after the group is gone.
|
|
90
|
+
- **Fixed: the Expo store keeps SESAME user records and device identity
|
|
91
|
+
pins.** On a store from `expoStore()`, `setUserRecord` stored nothing, and
|
|
92
|
+
`setDeviceRecord` stored only the session. A user or device with no session
|
|
93
|
+
had no record, and `getDeviceRecord` returned the identity from the contact
|
|
94
|
+
trust store, not the pin that was set. The store now returns each user and
|
|
95
|
+
device that was set, with the pin that was set and the device's current
|
|
96
|
+
session, if any. `setDeviceRecord` and `deleteDeviceRecord` change the
|
|
97
|
+
record and its session together or not at all. `getAllUserIds` and
|
|
98
|
+
`getSesameDeviceIds` list the users and devices that were set, as on the
|
|
99
|
+
other stores.
|
|
100
|
+
- **Fixed: the Expo store keeps a registration ID that is set before the
|
|
101
|
+
identity key.** On a store from `expoStore()`, `setLocalRegistrationId` did
|
|
102
|
+
nothing until an identity key was stored.
|
|
103
|
+
- **Fixed: a client on the key-value store can send after it establishes a
|
|
104
|
+
session.** `./local/store/key-value` (`./local/store/react-native` before
|
|
105
|
+
the move) lost the session from each SESAME device record, so every send
|
|
106
|
+
failed with `No active session`. It also returned the device identity pin as
|
|
107
|
+
a plain object, not its bytes, after a reopen. The store now joins each
|
|
108
|
+
device with the session under its session key, and it keeps the pin bytes.
|
|
109
|
+
- **Fixed: a client on the IndexedDB store can send after it establishes a
|
|
110
|
+
session.** `./local/store/web` returned each SESAME device record with no
|
|
111
|
+
session, so every send failed with `No active session`. `getUserRecord` and
|
|
112
|
+
`getDeviceRecord` on the IndexedDB store, and `getUserRecord` on the
|
|
113
|
+
in-memory store, now join each device with the session under its address,
|
|
114
|
+
and the stored identity pin wins over one derived from the session. On the
|
|
115
|
+
IndexedDB store, `setDeviceRecord` writes the device and its session in one
|
|
116
|
+
transaction, and `deleteDeviceRecord` removes the session with the device.
|
|
117
|
+
- **Fixed: the in-memory store returns no session for a device whose session
|
|
118
|
+
is deleted.** After `deleteSessionRecord`, `getDeviceRecord` and
|
|
119
|
+
`getUserRecord` on `./local/store/memory` returned the session that
|
|
120
|
+
`setDeviceRecord` stored earlier. The store now keeps each device without
|
|
121
|
+
its session and joins the device with the session under its address, as
|
|
122
|
+
the other stores do. `setDeviceRecord` rejects a session record that is not
|
|
123
|
+
current, and `setUserRecord` stores no session.
|
|
124
|
+
- **Added: `./local/store/web-sqlite`, a web store on encrypted SQLite.**
|
|
125
|
+
`webSqliteStore(options?)` opens an SDK-owned SQLite database in the origin
|
|
126
|
+
private file system. The SQLite3 Multiple Ciphers Wasm engine runs in a
|
|
127
|
+
dedicated module worker and encrypts the whole file. On first use the store
|
|
128
|
+
creates the database key in the secret vault, by default IndexedDB in the
|
|
129
|
+
same origin, then the file. Each open applies the SDK migrations.
|
|
130
|
+
`resetWebSqliteStore(options?)` deletes the file, creates a new key, and
|
|
131
|
+
opens an empty store. `createPreKeyMaintenanceStore` takes an open store.
|
|
132
|
+
The tabs of an origin share the database, and the opens and resets of a
|
|
133
|
+
name run one at a time across the tabs. A reset fails with `INVALID_STATE`
|
|
134
|
+
while any tab has the store open. The page's Content Security Policy must
|
|
135
|
+
allow `'wasm-unsafe-eval'` for the worker; without it, the open fails with
|
|
136
|
+
`SQLITE_ENGINE_UNAVAILABLE`. A context without OPFS gets
|
|
137
|
+
`OPFS_UNAVAILABLE`. The key in IndexedDB protects a copy of the database
|
|
138
|
+
file; it is not an XSS defense.
|
|
139
|
+
- **Breaking: the SDK owns the Expo database.** `expoStore(options?)`
|
|
140
|
+
opens an SDK-owned SQLCipher database in the `expo-sqlite` default
|
|
141
|
+
directory. On first use it creates the database key in the secret vault
|
|
142
|
+
(Expo SecureStore by default), then the file. Each open applies the SDK
|
|
143
|
+
migrations. `ExpoSignalProtocolStore` has no public constructor, and
|
|
144
|
+
`close()` closes the store. An open fails with `LOCAL_STORE_KEY_LOST` when
|
|
145
|
+
the file exists and the vault holds no key for it. It fails with
|
|
146
|
+
`INVALID_STATE` when a store of the process holds the same name, or when a
|
|
147
|
+
newer SDK wrote the file. `createPreKeyMaintenanceStore` takes the open
|
|
148
|
+
store. The options accept `encryptionAtRest: false`, which opens a
|
|
149
|
+
plaintext database and does not use the vault. An open with the other
|
|
150
|
+
setting than the one that created the file fails with
|
|
151
|
+
`SqliteKeyMismatchError` (`KEY_STORAGE_ERROR`), not `LOCAL_STORE_KEY_LOST`.
|
|
152
|
+
Keep application tables in a separate database file.
|
|
153
|
+
- **Breaking: `expoStore()` is now async.** It returns a promise of the open
|
|
154
|
+
store. Replace `expoStore()` with `await expoStore()`.
|
|
155
|
+
`ExpoSignalProtocolStoreFactoryOptions` is now `ExpoSignalProtocolStoreOptions`.
|
|
156
|
+
- **Breaking: the Expo module functions that exposed the database or its key
|
|
157
|
+
are removed.** The `./local/store/expo` entry no longer exports
|
|
158
|
+
`getKeyStorage`, `resetKeyStorage`, `getDatabaseKeyManager`,
|
|
159
|
+
`resetDatabaseKeyManager`, `clearDatabaseKeyCache`, `getPrimaryIdentityKey`,
|
|
160
|
+
or `getContactIdentity`. The `./local/store/expo/db` entry, with
|
|
161
|
+
`configureSignalProtocolExpoDbBindings`,
|
|
162
|
+
`resetSignalProtocolExpoDbBindings`, `getDrizzle`, `getRawDatabase`, and its
|
|
163
|
+
tables, is removed. The `./local/store/expo/schema` entry is removed. The
|
|
164
|
+
`drizzle-orm` peer dependency is removed.
|
|
165
|
+
- **Breaking: `ExpoSignalProtocolStore.getDatabaseKey()` is removed.** The
|
|
166
|
+
database key stays in the secret vault, and the store does not return it.
|
|
167
|
+
- **Changed: `clearAllKeys` on the Expo store empties every table and keeps
|
|
168
|
+
the database key.** The file stays open with the same key.
|
|
169
|
+
`resetExpoStore(options?)` is the full teardown: it deletes the database
|
|
170
|
+
file, creates a new key, and opens an empty store. It is the only way to
|
|
171
|
+
open a store whose key is lost.
|
|
172
|
+
- **Added: `@open-e2ee/signal-protocol-sdk/local/vault/electron-safe-storage`.**
|
|
173
|
+
`ElectronSafeStorageSignalProtocolSecretVault` is a
|
|
174
|
+
`SignalProtocolLocalSecretVault` for the Electron main process. The app
|
|
175
|
+
passes its own `safeStorage`, so the SDK does not import `electron`. The
|
|
176
|
+
vault encrypts each secret with `safeStorage` and keeps only the ciphertexts
|
|
177
|
+
in a file that the app names. It fails closed when async encryption is not
|
|
178
|
+
available, on the Linux `basic_text` and `unknown` backends, and on Linux
|
|
179
|
+
when a ciphertext does not start with `v11`. A `v10` ciphertext means that
|
|
180
|
+
no secret service answered, so `safeStorage` used its fixed fallback key.
|
|
181
|
+
- **Added: the optional peer `better-sqlite3-multiple-ciphers` 13.0.3 or
|
|
182
|
+
later.** The SQLite store for Node and Electron uses it. An app that does
|
|
183
|
+
not use that store does not install it.
|
|
184
|
+
- **Breaking: the Node store is an SDK-owned SQLCipher database.**
|
|
185
|
+
`nodeStore(options)` takes `{ directory, vault }` in place of the optional
|
|
186
|
+
`{ dataDir }`, and opens an encrypted SQLite database on
|
|
187
|
+
`better-sqlite3-multiple-ciphers` in `directory`. On first use it creates
|
|
188
|
+
the database key in `vault`, then the file. The options also accept `name`,
|
|
189
|
+
`encryptionAtRest: false`, and `logger`, as the Expo store does. It runs in
|
|
190
|
+
Node and in the Electron main process; in Electron, pass the safeStorage
|
|
191
|
+
vault. `NodeSignalProtocolStore` has no public constructor, and
|
|
192
|
+
`NodeSignalProtocolStoreConfig` is now `NodeSignalProtocolStoreOptions`.
|
|
193
|
+
`close()` closes the store. An open fails with `LOCAL_STORE_KEY_LOST` when
|
|
194
|
+
the file exists and the vault holds no key for it, and with
|
|
195
|
+
`INVALID_STATE` when a store of the process holds the same file or a newer
|
|
196
|
+
SDK wrote it. The store does not read the files of the earlier Node store.
|
|
197
|
+
Keep application tables in a separate database file.
|
|
198
|
+
- **Breaking: the `fs-native-extensions` peer dependency is removed.**
|
|
199
|
+
- **The Node store has one owner process.** An open store holds the owner
|
|
200
|
+
lock `<name>.lock` beside the database until `close()`, and the operating
|
|
201
|
+
system releases it when the process exits. An open or a reset in another
|
|
202
|
+
process fails at once with `SqliteStoreInUseError` (`KEY_STORAGE_ERROR`),
|
|
203
|
+
before it reads the vault or touches the file.
|
|
204
|
+
- **Added: `resetNodeStore(options)`, `createPreKeyMaintenanceStore(store)`,
|
|
205
|
+
and `sqliteDatabaseKeySlot(path)` on `./local/store/node`.**
|
|
206
|
+
`resetNodeStore` deletes the database file, creates a new key, and opens an
|
|
207
|
+
empty store. `sqliteDatabaseKeySlot` names the vault slot of the key for a
|
|
208
|
+
database path, so an app can move the key when it moves the directory.
|
|
209
|
+
- **Changed: the Node store has the semantics of the Expo store.** A user
|
|
210
|
+
record is the aggregate of the user's sessions, so `setUserRecord` stores
|
|
211
|
+
nothing. `setDeviceRecord` does not pin the identity key of a device,
|
|
212
|
+
`setDeviceSession` does not require a registered device, and
|
|
213
|
+
`setLocalRegistrationId` stores nothing before the identity key.
|
|
214
|
+
`deleteAllSenderKeysForGroup` keeps the group's skipped sender keys.
|
|
215
|
+
- **The Expo store runs on a shared SQLite core.** The store's schema,
|
|
216
|
+
queries, and transactions move from the Expo entry to an internal core that
|
|
217
|
+
runs on any SQLite binding. Every statement and transaction on the
|
|
218
|
+
database goes through one queue, so concurrent store calls no longer
|
|
219
|
+
collide in `BEGIN` or `ROLLBACK`. A save that replaces a signed prekey with
|
|
220
|
+
the same key ID now zeroes the private key that it replaces.
|
|
221
|
+
- **The Expo account wipe empties every SDK table.** `clearAllKeys` and
|
|
222
|
+
`wipeAllSignalProtocolData` on the Expo store now empty every SDK table, as
|
|
223
|
+
the web and Node stores do. This adds the metadata, sender keys, skipped
|
|
224
|
+
sender keys, message records, profile keys, group master keys, group state
|
|
225
|
+
cache, and auth credential cache, and for `clearAllKeys` the KEM one-time
|
|
226
|
+
prekeys.
|
|
227
|
+
- **A bare React Native app can bundle the SDK.** The root entry no longer
|
|
228
|
+
uses `export * as` to export the `safety`, `keys`, `encoding`, `blocking`,
|
|
229
|
+
and `media` namespaces. `@react-native/babel-preset` has no transform for
|
|
230
|
+
that syntax, so Metro in a bare React Native app rejected the whole bundle.
|
|
231
|
+
The namespaces and their members do not change.
|
|
232
|
+
- **Added: `EncryptionErrorCode.SQLITE_ENGINE_UNAVAILABLE`,
|
|
233
|
+
`EncryptionErrorCode.OPFS_UNAVAILABLE`, and
|
|
234
|
+
`EncryptionErrorCode.OPFS_FILE_BUSY`.** The web SQLite store fails with
|
|
235
|
+
these codes when its Wasm engine cannot load in its worker, when the browser context has no OPFS storage for it, or when it
|
|
236
|
+
cannot open its database file this time, usually because another tab still
|
|
237
|
+
holds the file. Retry after `OPFS_FILE_BUSY`; the file is unchanged. An
|
|
238
|
+
exhaustive `switch` over `EncryptionErrorCode` needs the three new cases.
|
|
239
|
+
- **Changed: the package ships the SQLite3 Multiple Ciphers 2.5.1 Wasm
|
|
240
|
+
engine.** `dist/local/store/sqlite/web/sqlite3mc/` holds `sqlite3.mjs` and
|
|
241
|
+
`sqlite3.wasm` from the signed release, about 1.5 MB. `sqlite3.wasm` is
|
|
242
|
+
unmodified. `sqlite3.mjs` carries two recorded patches, so a failed pool
|
|
243
|
+
install never deletes the database files and a failed attach holds no file
|
|
244
|
+
handle. Both files are pinned by sha256. Only the worker of
|
|
245
|
+
`./local/store/web-sqlite` loads them. `THIRD_PARTY_NOTICES.md` lists their
|
|
246
|
+
licenses.
|
|
247
|
+
- **Added: the bare React Native SQLite store at `./local/store/react-native`.**
|
|
248
|
+
`reactNativeStore(options?)` opens an SDK-owned SQLCipher database on
|
|
249
|
+
op-sqlite, with its key in the react-native-keychain vault by default, on
|
|
250
|
+
the same SQLite core and with the same options, errors, and reset as
|
|
251
|
+
`expoStore`. `resetReactNativeStore(options?)` deletes the database
|
|
252
|
+
and opens an empty store, and `createPreKeyMaintenanceStore` takes the open
|
|
253
|
+
store. `close()` checkpoints the write-ahead log into the database file
|
|
254
|
+
before it closes the connection. The app turns on the op-sqlite SQLCipher build with
|
|
255
|
+
`"op-sqlite": { "sqlcipher": true }` in its `package.json`. Without it, an
|
|
256
|
+
encrypted open fails with `KEY_STORAGE_ERROR` before it creates a file.
|
|
257
|
+
`@op-engineering/op-sqlite` 18.2.5 or later is an optional peer, and only
|
|
258
|
+
this entry imports it.
|
|
259
|
+
- **Breaking: the own profile key lives in the application's secret vault.**
|
|
260
|
+
The SDK no longer writes the profile key to `localStorage`, and it no longer
|
|
261
|
+
picks a storage by platform. `getOwnProfileKey`, `setOwnProfileKey`,
|
|
262
|
+
`getOrCreateOwnProfileKey`, `getOwnProfileKeyBase64`, and
|
|
263
|
+
`rotateOwnProfileKey` take a `SignalProtocolLocalSecretVault` as their first
|
|
264
|
+
argument. `updateEncryptedProfile` takes a `vault` parameter when it gets no
|
|
265
|
+
`profileKey`. The vault holds the key as its raw 32 bytes under
|
|
266
|
+
`signal_profile_key_v1`. To upgrade, pass the vault to each call. On Expo,
|
|
267
|
+
use `ExpoSecureStoreSignalProtocolSecretVault` from
|
|
268
|
+
`@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`. Remove each
|
|
269
|
+
use of `setProfileKeyStorage`, `getProfileKeyStorage`,
|
|
270
|
+
`resetProfileKeyStorage`, `createMemoryStorage`, and `ProfileKeyStorage`.
|
|
271
|
+
These exports are deleted.
|
|
272
|
+
- **Breaking: the device ID and the device-lifecycle state live in the
|
|
273
|
+
application's secret vault.** `getDeviceId` and `preloadDeviceId` take the
|
|
274
|
+
vault as their first argument. `DeviceLifecycleDeps` has a `vault` field in
|
|
275
|
+
place of `secureStore`, and the `DeviceLifecycleSecureStore` type is
|
|
276
|
+
deleted. The vault holds each value as UTF-8 text. To upgrade, pass the same
|
|
277
|
+
vault to `DeviceLifecycleManager`, `getDeviceId`, and `preloadDeviceId`. The
|
|
278
|
+
SDK does not read the plain SecureStore values that an earlier version
|
|
279
|
+
wrote, so reset the device when you upgrade.
|
|
280
|
+
- **Breaking: a call without a vault throws `SECRET_VAULT_REQUIRED`.** Each
|
|
281
|
+
function above, and the `DeviceLifecycleManager` constructor, throws an
|
|
282
|
+
`EncryptionError` with the new code `EncryptionErrorCode.SECRET_VAULT_REQUIRED`
|
|
283
|
+
when the vault is absent. The error context names the operation.
|
|
284
|
+
- **Breaking: the shared `./device` entries import no platform package.**
|
|
285
|
+
`./device`, `./device/device-id`, and `./device/lifecycle` now load without
|
|
286
|
+
Expo, React Native, or `react-native-device-info`. They take platform
|
|
287
|
+
metadata as input, and they omit each field that the application does not
|
|
288
|
+
supply. To upgrade:
|
|
289
|
+
- Spread `getDeviceLifecyclePlatform()` into the `DeviceLifecycleManager`
|
|
290
|
+
dependencies. `DeviceLifecycleDeps` extends the new
|
|
291
|
+
`DeviceLifecyclePlatform` type: `generateDeviceName`,
|
|
292
|
+
`getDeviceFingerprint`, `deviceType`, `platform`, `osVersion`, and
|
|
293
|
+
`appVersion`, each optional. Without `generateDeviceName`, the device name
|
|
294
|
+
is `Unknown Device`. Without `getDeviceFingerprint`, registration sends no
|
|
295
|
+
`idfv` and does not reclaim a device.
|
|
296
|
+
- Pass the same facts to `getLocalDeviceMetadata`, which now takes them as
|
|
297
|
+
its argument.
|
|
298
|
+
- Pass a `TransferDeviceInfo` to `generateTransferQRCode`,
|
|
299
|
+
`prepareNewDeviceTransfer`, `createEmptyBackup`, `createDeviceBackup`, and
|
|
300
|
+
`prepareOldDeviceTransferWithBackup`. Get it from
|
|
301
|
+
`getTransferDeviceInfo()`, or pass `{}` to send no metadata. The QR code
|
|
302
|
+
omits `deviceType` when the metadata has no platform, and
|
|
303
|
+
`TransferQRCode.deviceType` is optional.
|
|
304
|
+
- **Added: `./device/react-native`.** It reads device metadata on bare React
|
|
305
|
+
Native through `react-native` and `react-native-device-info`, and it reaches
|
|
306
|
+
no Expo package. It exports `getDeviceMetadata`, `getTransferDeviceInfo`,
|
|
307
|
+
and `getDeviceLifecyclePlatform`. Its lifecycle facts include a fingerprint
|
|
308
|
+
from `getUniqueId()`.
|
|
309
|
+
- **Changed: `./device/expo` reads the lifecycle and transfer metadata.** It
|
|
310
|
+
now imports `expo-device` too, and it adds `getTransferDeviceInfo` and
|
|
311
|
+
`getDeviceLifecyclePlatform`. Expo has no device fingerprint without another
|
|
312
|
+
package, so its lifecycle facts have no `getDeviceFingerprint`. Supply one
|
|
313
|
+
to keep reclaim detection.
|
|
314
|
+
- **Added: a secret vault for bare React Native apps.**
|
|
315
|
+
`ReactNativeKeychainSignalProtocolSecretVault` from
|
|
316
|
+
`@open-e2ee/signal-protocol-sdk/local/vault/react-native-keychain` stores
|
|
317
|
+
vault secrets with `react-native-keychain`, a new optional peer at 10.0.0 or
|
|
318
|
+
later. The adapter sets fixed options that the app cannot change: iOS
|
|
319
|
+
`AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`, Android `AES_GCM_NO_AUTH` storage at
|
|
320
|
+
the `SECURE_SOFTWARE` level, and no `cloudSync` key. The secret stays on the
|
|
321
|
+
device. react-native-keychain 10.0.0 turns iCloud sync on for any
|
|
322
|
+
`cloudSync` value, `false` included, so the adapter never sends that key.
|
|
323
|
+
- **Breaking: React Native and Expo apps must install a global random
|
|
324
|
+
source.** The SDK reads random bytes on React Native only from the global
|
|
325
|
+
`crypto.getRandomValues`. It no longer uses `expo-crypto` for random bytes,
|
|
326
|
+
and the key-value store no longer imports `expo-crypto`. To
|
|
327
|
+
upgrade, install `react-native-get-random-values` 2.x or
|
|
328
|
+
`react-native-quick-crypto`, and load it before the first SDK call.
|
|
329
|
+
Without a global source, the SDK throws `SecureRandomUnavailableError`.
|
|
330
|
+
- Added: `SecureRandomUnavailableError`, with the code
|
|
331
|
+
`SECURE_RANDOM_UNAVAILABLE` and the guard `isSecureRandomUnavailableError`,
|
|
332
|
+
exported from `/types`. The SDK throws it when the runtime has no
|
|
333
|
+
cryptographically secure random source.
|
|
334
|
+
- **Breaking: `getGroupServiceIds` on the in-memory relay is now
|
|
335
|
+
asynchronous.** It returns a `Promise`. To upgrade, `await` each call.
|
|
336
|
+
- **Breaking: `GroupAuthorizationServerEngine` takes its runtime as a
|
|
337
|
+
required argument.** The engine no longer picks a host random source, so a
|
|
338
|
+
server bundle of the engine reaches no client platform seam. To upgrade,
|
|
339
|
+
pass a `GroupServerEngineRuntime` with `now` and `randomBytes` as the second
|
|
340
|
+
constructor argument. The in-memory relay's
|
|
341
|
+
`InMemoryGroupAuthorizationServer` still supplies its own runtime.
|
|
342
|
+
- Fixed: the username discriminator had a small bias toward low values. The
|
|
343
|
+
SDK now draws it with rejection sampling, so each value in the range has
|
|
344
|
+
the same probability.
|
|
345
|
+
- **Fixed: on React Native, the hosted Relay socket did not open.** The SDK
|
|
346
|
+
built the socket URL with the `protocol` setter of `URL`, and the React
|
|
347
|
+
Native `URL` has no setters. Now the SDK builds the URL itself.
|
|
348
|
+
- **Fixed: on React Native, `isVerifyUrl`, `parseVerifyUrl`, and
|
|
349
|
+
`parseProvisioningQR` accepted a lookalike custom-scheme link,** such as
|
|
350
|
+
`signalprotocol://verify-evil`. The React Native `URL` reads no host or path
|
|
351
|
+
for a custom scheme. The SDK now parses these links, the relay connection
|
|
352
|
+
URL, Web Push endpoints, object store URLs, and TUS upload locations with
|
|
353
|
+
its own parser, which gives the same result on every runtime.
|
|
354
|
+
- **Changed: the SDK rejects a URL that is not in a canonical form.** Upgrade
|
|
355
|
+
step: give each URL as ASCII, without credentials, a fragment, an empty
|
|
356
|
+
query (`?` with nothing after it), or a `.` or `..` path segment. Write the
|
|
357
|
+
host in the form that a WHATWG `URL` gives, and do not use an `xn--` label,
|
|
358
|
+
an IPv4 address in a short or hexadecimal form, or an IPv6 address in a
|
|
359
|
+
non-compressed form. Do not write a port with a leading zero. Percent-encode
|
|
360
|
+
a space, a non-ASCII character, and a `'` in a query. This applies to the
|
|
361
|
+
verification and provisioning links and their `VerifyLinkConfig` and link
|
|
362
|
+
prefix, the relay connection URL, Web Push endpoints, and object store
|
|
363
|
+
upload and download URLs. A TUS server must return a `Location` that is an
|
|
364
|
+
absolute URL, a path that starts with `/`, or a relative path, not a
|
|
365
|
+
network-path reference that starts with `//`. A query value that is not
|
|
366
|
+
valid UTF-8 now makes a verification or provisioning link invalid.
|
|
367
|
+
- **Changed: `encryptFile` and `decryptFile` throw an `EncryptionError` with
|
|
368
|
+
the new code `BINARY_BLOB_UNAVAILABLE` when the runtime's `Blob` cannot hold
|
|
369
|
+
bytes.** The React Native `Blob` rejects binary parts and has no
|
|
370
|
+
`arrayBuffer()` or `text()`, so these methods cannot work there. They now
|
|
371
|
+
throw before they touch the session, so the key message stays unconsumed.
|
|
372
|
+
Upgrade step: on React Native, use `streamingEncrypt` and `streamingDecrypt`
|
|
373
|
+
from `@open-e2ee/signal-protocol-sdk/files`.
|
|
374
|
+
- **Fixed: on a React Native runtime without `Buffer`, `TextDecoder`, or
|
|
375
|
+
`structuredClone`, the stores, the relay clients, and message decoding
|
|
376
|
+
failed.** These parts now use the SDK's base64, UTF-8, and clone functions.
|
|
377
|
+
UTF-8 decoding uses the runtime's `TextDecoder` only when it passes a
|
|
378
|
+
conformance check, and a built-in WHATWG decoder otherwise, so invalid
|
|
379
|
+
UTF-8 gives the same result on every runtime.
|
|
380
|
+
- Changed: the Expo store models decode base64 strictly. A stored key that is
|
|
381
|
+
not padded standard base64 with zero trailing bits now fails to load.
|
|
382
|
+
Before, the models skipped invalid characters. The SDK writes only this
|
|
383
|
+
form, so the change affects only a row that was changed by hand.
|
|
384
|
+
- Fixed: the Convex relay's `subscribe` threw in a browser that loads the SDK
|
|
385
|
+
without a bundler `define`, where there is no `process` global. It now
|
|
386
|
+
falls back to polling there, as it does when `EXPO_PUBLIC_CONVEX_URL` is not
|
|
387
|
+
set.
|
|
388
|
+
- **Fixed: the Expo store's `getDetailedStats()` and full data wipe now
|
|
389
|
+
complete.** Before, both read or deleted a table that does not exist, so
|
|
390
|
+
`getDetailedStats()` failed and the wipe (`wipeAllSignalProtocolData()` on
|
|
391
|
+
the store from `getKeyStorage()`) rolled back. The `users` count is now the
|
|
392
|
+
number of distinct users that have a session.
|
|
393
|
+
- Fixed: on the Expo store, a signed prekey that reuses the ID of a replaced
|
|
394
|
+
signed prekey is now the current signed prekey. Before, the store kept the
|
|
395
|
+
replaced mark, so `getEcSignedPreKey()` returned `null`.
|
|
396
|
+
- Fixed: `createPreKeyMaintenanceStore().cullReplacedPreKeys()` on the Expo
|
|
397
|
+
store now culls the four prekey tables one at a time. Before, it opened
|
|
398
|
+
four transactions at the same time on one connection, and the cull failed
|
|
399
|
+
with "cannot start a transaction within a transaction".
|
|
400
|
+
- **Breaking: the key-value store moves to `./local/store/key-value`.** In
|
|
401
|
+
7.2.0, `./local/store/react-native` exported it. Change each import of the
|
|
402
|
+
key-value store from `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
403
|
+
to `@open-e2ee/signal-protocol-sdk/local/store/key-value`.
|
|
404
|
+
`./local/store/react-native` now exports the bare React Native SQLite
|
|
405
|
+
store.
|
|
406
|
+
- **Breaking: the key-value store names drop the React Native prefix.** The
|
|
407
|
+
store works over any key-value backend, so its names do not name a
|
|
408
|
+
platform. Change each name:
|
|
409
|
+
- `ReactNativeSignalProtocolStore` → `KeyValueSignalProtocolStore`
|
|
410
|
+
- `reactNativeStore` → `keyValueStore`
|
|
411
|
+
- `ReactNativeStoreFactoryOptions` → `KeyValueSignalProtocolStoreOptions`,
|
|
412
|
+
which `create`, `reset`, and `keyValueStore` all take
|
|
413
|
+
- `ReactNativeKeyValueStorage` → `KeyValueStorage`
|
|
414
|
+
- `ReactNativeKeyValueOperation` → `KeyValueOperation`
|
|
415
|
+
- **Breaking: the key-value store keeps its value key in a secret vault.**
|
|
416
|
+
Before, the store wrote its 32-byte value key into the same key-value
|
|
417
|
+
backend as the data it encrypted, under `@signal:databaseKey`, and logged a
|
|
418
|
+
warning. Pass a `SignalProtocolLocalSecretVault` backed by the platform
|
|
419
|
+
keychain or keystore, such as `ReactNativeKeychainSignalProtocolSecretVault`,
|
|
420
|
+
as `vault` to `create`, `reset`, or `keyValueStore`. Without a vault,
|
|
421
|
+
each of them throws `SECRET_VAULT_REQUIRED`. To keep
|
|
422
|
+
existing data, before the first open on this version, read the base64 value
|
|
423
|
+
of `@signal:databaseKey` from your backend, write its decoded bytes to the
|
|
424
|
+
vault under `signal_key_value_encryption_key`, and remove
|
|
425
|
+
`@signal:databaseKey` from the backend. The key-value store guide describes
|
|
426
|
+
key custody.
|
|
427
|
+
- **Breaking: a lost value key is an error, not a new key.** When the backend
|
|
428
|
+
holds store data and the vault holds no key, `create` rejects with an
|
|
429
|
+
`EncryptionError` whose code is the new `LOCAL_STORE_KEY_LOST`, and it
|
|
430
|
+
changes nothing. Before, a missing key gave a new key that could not read
|
|
431
|
+
the old data. Catch the code, and then restore the vault entry or call
|
|
432
|
+
`KeyValueSignalProtocolStore.reset({ storage, vault })`. `reset` deletes
|
|
433
|
+
every store record, and then makes a new key. If the process stops between
|
|
434
|
+
the two steps, the next `create` opens an empty store.
|
|
435
|
+
- **Breaking: `createReferenceReactNativeBackend` is no longer exported.** It
|
|
436
|
+
is now test code of the SDK. To verify your backend, use
|
|
437
|
+
`assertBackendConformance` or `runBackendConformance`, which stay exported.
|
|
438
|
+
To get an in-memory backend for your own tests, write one that passes the
|
|
439
|
+
kit.
|
|
440
|
+
- Added: `./local/store/key-value/realm` with `createRealmKeyValueBackend`, a
|
|
441
|
+
key-value backend over an open Realm. The SDK does not import `realm` and
|
|
442
|
+
does not declare it as a dependency or peer. Your application installs
|
|
443
|
+
`realm` and adds `realmKeyValueSchema` to its schema list. Each store write
|
|
444
|
+
runs in one `realm.write` transaction. The adapter is tested with the
|
|
445
|
+
conformance kit on realm 20.2.0 in Node. Realm has no maintainer since
|
|
446
|
+
2025-09-30. The key-value store guide lists its known build issues.
|
|
447
|
+
- Added: `createTransactionalKeyValueBackend` in `./local/store/key-value`,
|
|
448
|
+
with the types `TransactionalKeyValueEngine`, `KeyValueTransaction`, and
|
|
449
|
+
`KeyValueReader`. It makes a key-value backend from an engine's own
|
|
450
|
+
transaction and a synchronous handle with `get`, `set`, `delete`, and
|
|
451
|
+
`keysWithPrefix`. The SDK applies each `atomicWrite` batch inside that
|
|
452
|
+
transaction, so a backend does not copy the batch rules. The Realm backend
|
|
453
|
+
uses it. To upgrade a backend that you wrote for an engine with
|
|
454
|
+
transactions, replace its `atomicWrite` code with this function and run the
|
|
455
|
+
conformance kit again. The key-value store guide has an op-sqlite sketch.
|
|
456
|
+
- **Fixed: `stop()` resolved while a relay delivery or a retry request was in
|
|
457
|
+
progress.** The decrypt then went on after logout and wrote to the store
|
|
458
|
+
after the app could have closed it. `stop()` now resolves only after the SDK
|
|
459
|
+
work of the deliveries, retry requests, and receipt sends in progress
|
|
460
|
+
finishes. It does not wait for app hooks, so a hook can await `stop()`. This
|
|
461
|
+
includes the session hooks of a resend for a retry request, when the resend
|
|
462
|
+
sets up a session with a new or stale device. Another resend to the same
|
|
463
|
+
user that waits while such a hook runs stops waiting and sends nothing, and
|
|
464
|
+
its message record stays for the next retry request. When a hook returns
|
|
465
|
+
after `stop()`, the SDK drops the work after the hook and writes nothing
|
|
466
|
+
more. The relay delivers the envelope again after the next start, and the
|
|
467
|
+
hook gets the plaintext again. A delivery that fails is logged and no longer
|
|
468
|
+
rejects as an unhandled promise.
|
|
469
|
+
- **Breaking: the managed Signal Protocol Relay hosts use the lane tokens.**
|
|
470
|
+
The SDK pins `https://sandbox.relay.open-e2ee.dev`,
|
|
471
|
+
`https://stage.relay.open-e2ee.dev`, and
|
|
472
|
+
`https://stage-sandbox.relay.open-e2ee.dev`.
|
|
473
|
+
`https://relay.open-e2ee.dev` does not change. A connection URL on
|
|
474
|
+
`development.relay.open-e2ee.dev`, `staging.relay.open-e2ee.dev`, or
|
|
475
|
+
`staging-customer-development.relay.open-e2ee.dev` is now invalid. Copy the
|
|
476
|
+
connection URL from the console again.
|
|
477
|
+
- **Breaking: the Signal Protocol Relay API path is `/signal/v1/*`.** A
|
|
478
|
+
connection URL is now `https://<host>/signal/v1/connection/<key>`, and the
|
|
479
|
+
SDK sends each request under `/signal/v1/`. The SDK rejects a connection URL
|
|
480
|
+
with the old `/v1/connection/` path, and a connection document whose
|
|
481
|
+
`protocolEndpoint` is not `<origin>/signal/v1`.
|
|
482
|
+
- **Breaking: the developer environment kind is `sandbox`.** The
|
|
483
|
+
`environment` of a hosted Relay connection is now `'sandbox' |
|
|
484
|
+
'production'`. The SDK rejects a connection document that names the old
|
|
485
|
+
kind. The Relay gives a sandbox publishable key the prefix `pk_sandbox_`.
|
|
486
|
+
|
|
487
|
+
- **A bare React Native example.** `examples/react-native` runs the encrypted
|
|
488
|
+
exchange in a React Native 0.87.1 app with no Expo module. Alice uses
|
|
489
|
+
`reactNativeStore()` on the op-sqlite SQLCipher build, with the database key
|
|
490
|
+
in `react-native-keychain`. On each launch, the app logs the SQLCipher
|
|
491
|
+
version and the first 16 bytes of the SDK database file, and requires that a
|
|
492
|
+
wrong key fails the open of an SDK database. The run fails when the build has
|
|
493
|
+
no SQLCipher or when the file starts with the plaintext SQLite header. CI
|
|
494
|
+
builds the release APK and runs it twice on an Android emulator, and requires
|
|
495
|
+
these lines on each run. On every change, CI also builds the example's Metro
|
|
496
|
+
release bundle with the packed SDK and the stock Babel preset, and compiles
|
|
497
|
+
it with Hermes.
|
|
498
|
+
|
|
499
|
+
- **The Expo example checks that SQLCipher encrypts its database.** On each launch,
|
|
500
|
+
`examples/expo` logs the SQLCipher version and the first 16 bytes of the SDK
|
|
501
|
+
database file. The run fails when the build has no SQLCipher or when the
|
|
502
|
+
file starts with the plaintext SQLite header. The Android emulator job
|
|
503
|
+
requires both lines on each run. The example now depends on
|
|
504
|
+
`expo-file-system` to read the file.
|
|
505
|
+
|
|
3
506
|
## 7.2.0
|
|
4
507
|
|
|
5
508
|
- **Fixed: a send now reaches every device that the relay lists for the
|