@open-e2ee/signal-protocol-sdk 7.1.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 +55 -6
- package/ARCHITECTURE.md +1 -0
- package/CHANGELOG.md +565 -0
- package/README.md +19 -5
- package/SECURITY.md +2 -2
- package/THIRD_PARTY_NOTICES.md +429 -0
- package/TROUBLESHOOTING.md +10 -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-lifecycle.d.ts +6 -2
- package/dist/client/relay-lifecycle.d.ts.map +1 -1
- package/dist/client/relay-lifecycle.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 +39 -16
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +100 -60
- 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/client/types.d.ts +5 -1
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.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/hooks/use-key-rotation.d.ts.map +1 -1
- package/dist/hooks/use-key-rotation.js +2 -1
- package/dist/hooks/use-key-rotation.js.map +1 -1
- 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 +22 -6
- package/dist/internal/sesame/device-registry.d.ts.map +1 -1
- package/dist/internal/sesame/device-registry.js +18 -12
- 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 +7 -8
- package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -0
- package/dist/local/store/{react-native → key-value}/backend-conformance.js +4 -5
- 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 -273
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +80 -1405
- 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 +81 -8
- package/docs/CLIENT_COMPOSITION.md +1 -2
- package/docs/DEVIATIONS.md +27 -3
- 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 -34
- package/local/store/expo/README.md +67 -47
- package/local/store/key-value/README.md +278 -0
- package/local/store/node/README.md +206 -45
- package/local/store/react-native/README.md +121 -52
- 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 +61 -42
- 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/docs/ASSURANCE.md
CHANGED
|
@@ -16,16 +16,16 @@ Private testing also exists in other open-source projects. [SQLite publishes som
|
|
|
16
16
|
|
|
17
17
|
Engineering CI runs the default automated checks on pull requests and changes to the main branch. Release preparation requires a passing run.
|
|
18
18
|
|
|
19
|
-
Most recent full run on 2026-09-
|
|
19
|
+
Most recent full run on 2026-09-28:
|
|
20
20
|
|
|
21
21
|
| | |
|
|
22
22
|
|---|---|
|
|
23
|
-
| Test modules |
|
|
24
|
-
| Test cases |
|
|
25
|
-
| Passed |
|
|
26
|
-
| Skipped |
|
|
23
|
+
| Test modules | 466 |
|
|
24
|
+
| Test cases | 8,563 |
|
|
25
|
+
| Passed | 8,559 |
|
|
26
|
+
| Skipped | 4 |
|
|
27
27
|
| Failed | 0 |
|
|
28
|
-
| Wall time |
|
|
28
|
+
| Wall time | 434 s |
|
|
29
29
|
|
|
30
30
|
The total counts test cases. One test case can contain several assertions. Separate commands run the longer performance and endurance checks.
|
|
31
31
|
|
|
@@ -38,14 +38,87 @@ Release tooling generates this table from a completed run. It refuses results fr
|
|
|
38
38
|
- **Generated inputs:** check protocol and encoding properties across randomized inputs.
|
|
39
39
|
- **Messaging flows:** exercise device fanout, groups, device linking, provisioning, PNI-to-ACI changes, and relay delivery.
|
|
40
40
|
- **Storage contracts:** check persistence, concurrency, interruption, recovery, and storage pressure at adapter boundaries.
|
|
41
|
-
- **Runtime behavior:** run the browser storage contracts in Chromium, Firefox, and WebKit. Run the React Native
|
|
41
|
+
- **Runtime behavior:** run the browser storage contracts in Chromium, Firefox, and WebKit. Run each public flow on the Hermes V1 command-line engine that React Native 0.86 uses, with only the globals of a bare React Native app. A committed list records each flow step that fails on that engine and its error. The job fails when a result differs from that list. Run release builds of the Expo example and the bare React Native example on an Android emulator. Both use Hermes V1. The Expo build uses Expo SDK 57 and React Native 0.86, and the bare build uses React Native 0.87.1.
|
|
42
42
|
- **Public API:** check exported types, import paths, documented calls, and expected example output against the packed package.
|
|
43
|
+
- **React Native hosts:** add the packed package to React Native and Expo projects without an override of peer conflicts. The projects cover React Native 0.83 through 0.87 and the Expo SDK 55 through 57 lines. Build the Expo example's Hermes bundle on Expo SDK 55 and 57.
|
|
43
44
|
- **Errors:** check construction sites for exported error classes and codes. Reject unresolved code forwarding.
|
|
44
45
|
|
|
45
46
|
The browser storage job also runs 2,000 open, write, read, and close cycles. It checks for upward memory and latency drift.
|
|
46
47
|
|
|
47
48
|
A storage contract check does not prove a full encrypted exchange. The [browser example](../examples/browser/README.md) and [Expo example](../examples/expo/README.md) exercise message encryption, delivery, and decryption.
|
|
48
49
|
|
|
50
|
+
## SQLite store checks
|
|
51
|
+
|
|
52
|
+
Four package entries keep device-local state in a SQLite database: `./local/store/node`, `./local/store/expo`, `./local/store/react-native`, and `./local/store/web-sqlite`. A Tauri app uses `./local/store/web-sqlite`. Each row gives one runtime claim and the check that proves it. Rows that do not name public CI run in the project's engineering CI. A check runs on each pull request and each change to the main branch, unless its row says otherwise.
|
|
53
|
+
|
|
54
|
+
### Node and the Electron main process: `./local/store/node`
|
|
55
|
+
|
|
56
|
+
| Claim | Check | What the check runs |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| The store passes the shared storage contract on an encrypted file. | Default automated checks: Linux, Node 26 | The storage contract on `nodeStore` and the `better-sqlite3-multiple-ciphers` binding. |
|
|
59
|
+
| The driver writes SQLCipher 4 files. An encrypted file has no SQLite header, and a wrong key fails with a typed error. | Node store job: Linux, macOS, and Windows, each with Node 22 and Node 26 | Real files on the prebuilt binding. |
|
|
60
|
+
| Without `encryptionAtRest: false`, the store refuses a binding that has no cipher. The store refuses a file that has the other encryption setting. | Node store job: the same six runners | Real files on the prebuilt binding. |
|
|
61
|
+
| The store writes its key to the vault before it creates the file. A file without a key fails as a lost key and does not change. | Node store job: the same six runners | Real files and a vault. |
|
|
62
|
+
| One process at a time owns a store. After the owner process is killed, the next open succeeds and reads the committed data. | Node store job: the same six runners | A child process holds the store. The parent process tries to open it, then kills the child and opens it. |
|
|
63
|
+
| Every part of the store interface survives a close and a new open of the directory. | Node store job: the same six runners | Real files on the prebuilt binding. |
|
|
64
|
+
| In the Electron main process, the store passes the shared storage contract with its key in the real `safeStorage`. The file has no SQLite header, and the vault file keeps only a ciphertext of the key. | Electron store job: Linux, macOS, and Windows | Electron from its npm package, with the GNOME keyring through libsecret on Linux, the Keychain on macOS, and DPAPI on Windows. A pull request runs this job only when it changes the store, the vault, the storage contract, the job, or a dependency. |
|
|
65
|
+
| On Linux, the vault refuses the `basic_text` backend of `safeStorage`. The store does not open, and no key reaches the disk. | Electron store job: Linux | Electron with `--password-store=basic`. |
|
|
66
|
+
| On Linux, the vault refuses the fixed fallback key that `safeStorage` uses when no secret service answers. The store does not open, and no key reaches the disk. | Electron store job: Linux | Electron with `--password-store=gnome-libsecret` and no unlocked keyring on the D-Bus session. |
|
|
67
|
+
|
|
68
|
+
### Expo: `./local/store/expo`
|
|
69
|
+
|
|
70
|
+
| Claim | Check | What the check runs |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| The store passes the shared storage contract. | Default automated checks: Linux, Node 26 | The storage contract on the `expo-sqlite` JavaScript layer over `node:sqlite`. This check runs no native module and no SQLCipher. |
|
|
73
|
+
| A release build of the Expo example stores its state with SQLCipher on Android and keeps it across a process restart. | Android emulator job | A release APK on Hermes V1, run twice on an Android API 36 x86_64 emulator. Each run must log a SQLCipher version and a database header that is not the SQLite header. The second run must resume the stored identity and complete an exchange. This job runs on a change to the main branch that can reach the React Native runtime, and on demand. It does not run on a pull request. |
|
|
74
|
+
| The Expo example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Public CI (`Checks`) | The Android bundle of the Expo example with the packed package, on Expo SDK 55 and Expo SDK 57. |
|
|
75
|
+
|
|
76
|
+
The Hermes flow job does not load a SQLite store. Its flows use the memory and key-value stores. The Android emulator job is the only CI job that runs the Expo store on Hermes.
|
|
77
|
+
|
|
78
|
+
### Bare React Native: `./local/store/react-native`
|
|
79
|
+
|
|
80
|
+
| Claim | Check | What the check runs |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| The store passes the shared storage contract on an encrypted file. | Default automated checks: Linux, Node 26 | The storage contract on `reactNativeStore` over a Node test double of op-sqlite. The double runs SQLite3 Multiple Ciphers in its SQLCipher 4 mode through the `better-sqlite3-multiple-ciphers` binding. |
|
|
83
|
+
| The first open writes a new 32-byte key to the keychain, with access after the first unlock on this device only. The file has no SQLite header, and that key opens it. A key that does not open the file fails with `KEY_STORAGE_ERROR`. | Default automated checks: Linux, Node 26 | The entry on the op-sqlite test double, with a test double of `react-native-keychain`. |
|
|
84
|
+
| A file without its key fails with `LOCAL_STORE_KEY_LOST` and does not change. A reset opens an empty store with a new key. | Default automated checks: Linux, Node 26 | The same test doubles. |
|
|
85
|
+
| Without `encryptionAtRest: false`, the store refuses an op-sqlite build without SQLCipher and creates no file. A plaintext file opened with encryption fails as a key mismatch and does not change. | Default automated checks: Linux, Node 26 | The same test doubles. The double answers as an op-sqlite build without SQLCipher. |
|
|
86
|
+
| Two parallel first opens of one name write one key, and the second open fails with `INVALID_STATE`. An open or a reset of a name that an open store holds fails with `INVALID_STATE`. | Default automated checks: Linux, Node 26 | The same test doubles. |
|
|
87
|
+
| A release build of the bare React Native example stores its state with SQLCipher on Android, with the default keychain vault, and keeps it across a process restart. A key that does not open the file fails with `KEY_STORAGE_ERROR`. | Android emulator job | A release APK on Hermes V1 with the native op-sqlite SQLCipher build, run twice on an Android API 36 x86_64 emulator. Each run must log a SQLCipher version, a database header that is not the SQLite header, and a wrong-key open that fails with `SqliteKeyMismatchError`. The second run must resume the stored identity and complete an exchange. This job runs on a change to the main branch that can reach the React Native runtime, and on demand. It does not run on a pull request. |
|
|
88
|
+
| The bare React Native example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Public CI (`Checks`) | The Android release bundle of the bare React Native example with the packed package. |
|
|
89
|
+
|
|
90
|
+
The Android emulator job is the only CI job that runs this store on Hermes with the native op-sqlite module. No CI job runs it on iOS. On 2026-09-28, a manual check of a development build of the SDK before 8.0.0 ran the bare React Native example in the iOS 26.2 simulator with Xcode 26.3. Each of four launches logged a SQLCipher version, a database header that is not the SQLite header, and the wrong-key failure. Each launch after the first resumed the stored identity.
|
|
91
|
+
|
|
92
|
+
### Web: `./local/store/web-sqlite`
|
|
93
|
+
|
|
94
|
+
| Claim | Check | What the check runs |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| The store passes the shared storage contract in a real browser, with the Wasm engine in its worker and the file in the origin private file system (OPFS). | Browser storage job: Chromium and Firefox on Linux. WebKit store job: WebKit on macOS | The page has a Content Security Policy that adds only `'wasm-unsafe-eval'`. |
|
|
97
|
+
| An encrypted file keeps no plaintext in OPFS. A wrong key and no key cannot read it. The web driver reads a SQLCipher 4 file that the Node driver wrote. | Browser storage job: Chromium and Firefox on Linux. WebKit store job: WebKit on macOS | Real files in OPFS. |
|
|
98
|
+
| Two tabs share one file, and a tab hands it over only between transactions. A tab that dies in a transaction leaves the file readable without the writes of that transaction. | Browser storage job: Chromium and Firefox on Linux. WebKit store job: WebKit on macOS | Two real tabs of one origin. |
|
|
99
|
+
| Two tabs that open a new store at the same time write one key. A reset fails with `INVALID_STATE` while another tab has the store open. | Browser storage job: Chromium and Firefox on Linux. WebKit store job: WebKit on macOS | Two real tabs of one origin. |
|
|
100
|
+
| Without `'wasm-unsafe-eval'`, the open fails with `SQLITE_ENGINE_UNAVAILABLE` and writes no key. | Browser storage job: Chromium and Firefox on Linux. WebKit store job: WebKit on macOS | A page under a policy without `'wasm-unsafe-eval'`. |
|
|
101
|
+
| When the origin quota is full, a write and an atomic commit reject with `STORAGE_QUOTA_EXCEEDED` and leave no partial state. The store stays open, and after the clamp is removed, the same commit succeeds. | Browser storage job: Chromium on Linux | A DevTools protocol call clamps the origin quota, and the store fills its real file in OPFS. Firefox and WebKit have no such call, so they do not run this check. |
|
|
102
|
+
| A worker without OPFS synchronous access handles fails with `OPFS_UNAVAILABLE` before it loads the engine. | Browser storage job: Chromium, Firefox, and WebKit on Linux | WebKit on Linux (WebKitGTK) has no OPFS synchronous access handles, so there WebKit runs only these checks and the checks that need no OPFS. |
|
|
103
|
+
|
|
104
|
+
The WebKit store job runs Playwright's WebKit on macOS, where WebKit has OPFS synchronous access handles. It runs only on a change to the web SQLite store, the SQLite core, the storage contract, the key vault, the job, or a dependency. In the browser storage job for Chromium and Firefox and in the WebKit store job, a check that skips for want of OPFS fails.
|
|
105
|
+
|
|
106
|
+
The code-generation check in public CI runs the README example with the memory store. It does not load a SQLite store.
|
|
107
|
+
|
|
108
|
+
### Tauri
|
|
109
|
+
|
|
110
|
+
No CI job runs a Tauri app. A Tauri 2 app uses `./local/store/web-sqlite` in its webview, with no Tauri-specific SDK code, so the web rows above check the same code in browsers. The [web SQLite store guide](../local/store/web-sqlite/README.md#tauri) gives the Tauri setup. On 2026-09-28, a manual check of a development build of the SDK before 8.0.0, in a Tauri 2.12.0 app, passed in WKWebView on macOS 15.7.2 and in the iOS 18.0 simulator. The check covered a two-device exchange, a close and reopen, an app relaunch, a relaunch after the app was killed with both stores open, and the store locks.
|
|
111
|
+
|
|
112
|
+
### UNVERIFIED
|
|
113
|
+
|
|
114
|
+
No CI job checks these items:
|
|
115
|
+
|
|
116
|
+
- **Safari.** The WebKit store job runs Playwright's WebKit, not Safari. No check ran the web store in Safari.
|
|
117
|
+
- **Tauri on WebView2 (Windows), the Android WebView, and WebKitGTK (Linux).** WebKitGTK 2.54 has no OPFS synchronous access handles, so the expected result of the open is `OPFS_UNAVAILABLE`. No run observed it.
|
|
118
|
+
- **The React Native store on iOS and on physical devices.** No CI job opens `./local/store/react-native` on iOS. The manual check used only the iOS simulator. No check ran the store on a physical Android or iOS device.
|
|
119
|
+
- **iOS devices.** No CI job runs on iOS. The manual checks used only the iOS simulator.
|
|
120
|
+
- **A packaged Electron app.** The Electron store job runs Electron from its npm package, not from an app build.
|
|
121
|
+
|
|
49
122
|
## Runtime checks for 2.0.1
|
|
50
123
|
|
|
51
124
|
On 2026-09-12, the browser example completed encrypted exchanges in Chromium, Firefox, and WebKit. Nine checks covered fresh messages, replies, repeated runs, cancellation, reset, and worker-load errors under CSP.
|
|
@@ -54,7 +127,7 @@ The Expo example completed encrypted exchanges in development and release builds
|
|
|
54
127
|
|
|
55
128
|
Both platforms used SQLCipher 4.7.0. After a process restart, Alice retained her identity and completed another exchange. Release builds ran with Metro stopped. These results establish behavior on the listed targets, not device performance.
|
|
56
129
|
|
|
57
|
-
These application checks are separate from the recurring browser-storage and Hermes
|
|
130
|
+
These application checks are separate from the recurring browser-storage and Hermes flow jobs.
|
|
58
131
|
|
|
59
132
|
## Review status
|
|
60
133
|
|
|
@@ -34,11 +34,10 @@ const signal = await createSignalProtocolClient({
|
|
|
34
34
|
import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
35
35
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
36
36
|
|
|
37
|
-
// Initialize the application-owned Expo/SQLCipher database bindings first.
|
|
38
37
|
const signal = await createHostedSignalProtocolClient({
|
|
39
38
|
adapters: {
|
|
40
39
|
// Expo storage owns this device's private keys and session state.
|
|
41
|
-
storage: expoStore(),
|
|
40
|
+
storage: await expoStore(),
|
|
42
41
|
},
|
|
43
42
|
hosted: {
|
|
44
43
|
// The environment-scoped connection URL from the OpenE2EE console.
|
package/docs/DEVIATIONS.md
CHANGED
|
@@ -82,7 +82,7 @@ model and what is out of scope.
|
|
|
82
82
|
| **Padding** | — | **Extension.** ISO 7816-4 bit padding to 160-byte buckets inside the library | Length hiding by default rather than left to the application | `libsignal` does not pad at this layer; Signal Messenger's apps do. PKCS#7 then adds a block, so ciphertext lands 16 bytes past each boundary |
|
|
83
83
|
| **SPQR / ML-KEM Braid** | ML-KEM Braid rev. 1 | **Deviation.** Same protocol, same KDF labels, same Reed–Solomon parameters, byte-identical message framing — except `hek = SHA3-256(ek_seed ‖ ek_vector)`, the operand order the specification states, which is the reverse of `libsignal`'s implementation | The normative text was followed over the executable reference | Wire-visible. Headers, ciphertexts, and shared secrets diverge; a braid session cannot complete a single epoch against `libsignal`'s implementation. Also means the KEM is not FIPS 203 in braid mode |
|
|
84
84
|
| **Triple Ratchet** | `libsignal` `triple_ratchet.rs` | **Faithful.** The PQ secret enters as the HKDF salt at message-key expansion, same label, same order | — | The braiding construction follows the ML-KEM Braid specification |
|
|
85
|
-
| **Sesame** | Sesame rev. 2 | **Deviation** on session expiry (§4.2 applies only to unacknowledged sessions)
|
|
85
|
+
| **Sesame** | Sesame rev. 2 | **Deviation** on session expiry (§4.2 applies only to unacknowledged sessions), on deleted devices (hard-removed rather than marked stale), and on device-list currency (the sender reads the relay's list at most once per 60 s instead of the server rejecting a stale send). **Extensions:** QR provisioning, device transfer, encrypted device names, identity-change gating, a 5-device cap | Product requirements the specification does not address | Hard deletion **drops the MAXLATENCY window, so in-flight messages from a just-removed device become permanently undecryptable**. A device linked or removed less than 60 s ago can miss a send or still receive one. Device transfer clones ratchet state, which weakens the forward-secrecy bound |
|
|
86
86
|
| **Sealed sender** | `libsignal` `sealed_sender.rs` | **Faithful** on the multi-recipient transport labels, KEM, AES-256-GCM-SIV, binary format, and `0x3FFF` registration-ID mask. **Extension:** sender and server certificates require signed Relay scope and issuer validity under operator-owned Ed25519 roots | Binds anonymous delivery to one Relay deployment and supports explicit issuer rotation and revocation | The transport follows `libsignal`; certificates are not interchangeable with Signal Messenger or another deployment |
|
|
87
87
|
| **Delivery token** | `libsignal` `profile_key.rs` | **Faithful.** `deriveAccessKey` follows `libsignal`'s `ProfileKey::derive_access_key`, and reproduces `libsignal`'s published known-answer values | — | Not an SDK invention, despite what the module name suggests |
|
|
88
88
|
| **Sender keys** | `libsignal` `sender_keys.rs` | **Deviation.** Protobuf field numbers and `0x33` framing match, and the `0x01`/`0x02` seeds match, but message-key derivation **omits HKDF-Extract**, signatures are Ed25519 not XEdDSA, and `distributionUuid` carries a UTF-8 string rather than 16 UUID bytes | The Ed25519 choice follows the identity profile; the missing Extract appears unintentional | Group message keys differ from `libsignal`'s for the same chain key. Confirmed numerically, not merely by inspection |
|
|
@@ -474,7 +474,7 @@ Two related extensions go with this. A `processedChains` map rejects messages
|
|
|
474
474
|
that bear a ratchet key from a retired chain
|
|
475
475
|
(`internal/protocol/double-ratchet/ratchet.ts:141-153`), which closes a replay gap
|
|
476
476
|
that `libsignal` handles only through its five-chain window. Self-sessions get a
|
|
477
|
-
finite 100,000-message skip limit (`internal/session/validation.ts:
|
|
477
|
+
finite 100,000-message skip limit (`internal/session/validation.ts:252-260`)
|
|
478
478
|
where `libsignal` uses `usize::MAX`.
|
|
479
479
|
|
|
480
480
|
### 3.4 Session archiving and serialization
|
|
@@ -681,7 +681,8 @@ The per-user identity model is one of the two models the specification permits
|
|
|
681
681
|
§3.1 and §3.3 require an implementation to mark a removed device's record stale
|
|
682
682
|
and keep it for MAXLATENCY. Messages already in flight from that device then
|
|
683
683
|
still decrypt. The SDK removes the record immediately
|
|
684
|
-
(`internal/sesame/manager.ts:2098-2102`).
|
|
684
|
+
(`internal/sesame/manager.ts:2098-2102`). A send also removes, immediately, each
|
|
685
|
+
device record that the relay no longer lists for the recipient (§5.5).
|
|
685
686
|
|
|
686
687
|
**State the consequence plainly. A message that a device sent moments before its
|
|
687
688
|
removal becomes permanently undecryptable.** The specification's staleness window
|
|
@@ -753,6 +754,29 @@ sign a server-issued nonce with its identity private key. Registration therefore
|
|
|
753
754
|
trusts the relay more than §6.3 assumes. A deployment that needs proof of
|
|
754
755
|
possession must add it at the application layer.
|
|
755
756
|
|
|
757
|
+
### 5.5 The sender reads the device list; the server does not reject a stale send
|
|
758
|
+
|
|
759
|
+
§3.3 steps 3 and 4 make the server the check. The server accepts a send only
|
|
760
|
+
when the sender's list of device IDs is current, and otherwise rejects it with
|
|
761
|
+
the old and new device IDs. The Signal Protocol Relay takes one message per
|
|
762
|
+
device and has no whole-user device-set check, so it cannot reject a send
|
|
763
|
+
that omits a device.
|
|
764
|
+
|
|
765
|
+
The SDK therefore reads the recipient's device list from the relay
|
|
766
|
+
(`getActiveDevices`) before a direct send or a sender key distribution, when
|
|
767
|
+
the last read for that recipient is more than 60 s old
|
|
768
|
+
(`RECIPIENT_DEVICE_LIST_FRESH_MILLISECONDS` in
|
|
769
|
+
`client/signal-service-cipher.ts`). It makes a session for each listed device
|
|
770
|
+
that has none, and removes each local device record that the relay does not
|
|
771
|
+
list. The time of the last read is kept in memory only, so a restarted client
|
|
772
|
+
reads the list on its first send to each recipient.
|
|
773
|
+
|
|
774
|
+
**Consequence.** A device linked less than 60 s before a send can miss that
|
|
775
|
+
send, and a device removed less than 60 s before a send can still receive it.
|
|
776
|
+
The SESAME stale-device-list retry loop (`StaleDeviceListError`) stays in
|
|
777
|
+
`internal/sesame/manager.ts`, but no caller supplies a device-list version, so
|
|
778
|
+
it never runs.
|
|
779
|
+
|
|
756
780
|
---
|
|
757
781
|
|
|
758
782
|
## 6. Sealed sender
|
package/docs/ERROR_HANDLING.md
CHANGED
|
@@ -117,12 +117,18 @@ holds each member to a production construction site.
|
|
|
117
117
|
|---|---|---|
|
|
118
118
|
| `KEY_STORAGE_ERROR` | A key-storage operation failed. | Inspect `originalError`, then retry or reinitialize storage. |
|
|
119
119
|
| `STORAGE_QUOTA_EXCEEDED` | The storage origin ran out of space. | Free storage space, then retry the rejected write. |
|
|
120
|
+
| `SECRET_VAULT_REQUIRED` | An operation that keeps a local secret ran without a `SignalProtocolLocalSecretVault`. | Pass a vault, such as `ExpoSecureStoreSignalProtocolSecretVault`, or the application's own. |
|
|
121
|
+
| `LOCAL_STORE_KEY_LOST` | A local store holds data, but its secret vault holds no key for that data. | Restore the vault entry, or reset the store. A reset deletes the local data. |
|
|
122
|
+
| `SQLITE_ENGINE_UNAVAILABLE` | The SQLite Wasm engine did not load in its web worker. Usually the worker's Content Security Policy does not allow `'wasm-unsafe-eval'`. | Allow `'wasm-unsafe-eval'` in `script-src` on the worker script response, and serve the Wasm file as `application/wasm`. |
|
|
123
|
+
| `OPFS_UNAVAILABLE` | The browser cannot keep a SQLite database in the origin private file system, for example in a private or ephemeral context. | Use the IndexedDB store in this runtime. |
|
|
124
|
+
| `OPFS_FILE_BUSY` | The web SQLite store could not open its database file this time, usually because another tab of the origin still holds the file. The file is unchanged. | Retry later. Do not change to another store: the data stays in this one. |
|
|
120
125
|
|
|
121
126
|
### Initialization and Protocol Policy Errors
|
|
122
127
|
|
|
123
128
|
| Code | Cause | Application response |
|
|
124
129
|
|---|---|---|
|
|
125
130
|
| `INITIALIZATION_FAILED` | Client or group initialization failed. | Inspect `originalError` and the configuration. |
|
|
131
|
+
| `SECURE_RANDOM_UNAVAILABLE` | The runtime has no global `crypto.getRandomValues`. The SDK throws `SecureRandomUnavailableError` from `@open-e2ee/signal-protocol-sdk/types`. | On React Native and Expo, install `react-native-get-random-values` 2.x or `react-native-quick-crypto` and load it before the first SDK call. |
|
|
126
132
|
| `PQXDH_REQUIRED` | Policy requires PQXDH, but the peer lacks required keys. | Wait for new peer keys or queue the message. |
|
|
127
133
|
| `PQXDH_FAILED` | The PQXDH exchange failed. | Abort setup and inspect `originalError`. |
|
|
128
134
|
| `TRIPLE_RATCHET_REQUIRED` | Triple Ratchet policy lacks a PQXDH session. | Establish the required PQXDH session first. |
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -324,11 +324,10 @@ hosted client:
|
|
|
324
324
|
import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
325
325
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
326
326
|
|
|
327
|
-
// Initialize the application-owned Expo/SQLCipher database bindings first.
|
|
328
327
|
const signal = await createHostedSignalProtocolClient({
|
|
329
328
|
adapters: {
|
|
330
329
|
// Expo storage owns this device's private keys and session state.
|
|
331
|
-
storage: expoStore(),
|
|
330
|
+
storage: await expoStore(),
|
|
332
331
|
},
|
|
333
332
|
hosted: {
|
|
334
333
|
// The environment-scoped connection URL from the OpenE2EE console.
|
package/docs/PACKAGE_SURFACE.md
CHANGED
|
@@ -83,6 +83,7 @@ Expo storage or the Convex R2 object store.
|
|
|
83
83
|
- `@open-e2ee/signal-protocol-sdk/device/expo`
|
|
84
84
|
- `@open-e2ee/signal-protocol-sdk/device/lifecycle`
|
|
85
85
|
- `@open-e2ee/signal-protocol-sdk/device/provisioning`
|
|
86
|
+
- `@open-e2ee/signal-protocol-sdk/device/react-native`
|
|
86
87
|
- `@open-e2ee/signal-protocol-sdk/encoding`
|
|
87
88
|
- `@open-e2ee/signal-protocol-sdk/encoding/hex`
|
|
88
89
|
- `@open-e2ee/signal-protocol-sdk/files`
|
|
@@ -101,14 +102,17 @@ Expo storage or the Convex R2 object store.
|
|
|
101
102
|
- `@open-e2ee/signal-protocol-sdk/server-clock`
|
|
102
103
|
- `@open-e2ee/signal-protocol-sdk/local/store`
|
|
103
104
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
104
|
-
- `@open-e2ee/signal-protocol-sdk/local/store/
|
|
105
|
-
- `@open-e2ee/signal-protocol-sdk/local/store/
|
|
105
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/key-value`
|
|
106
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/key-value/realm`
|
|
106
107
|
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
107
108
|
- `@open-e2ee/signal-protocol-sdk/local/store/node`
|
|
108
109
|
- `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
109
110
|
- `@open-e2ee/signal-protocol-sdk/local/store/web`
|
|
111
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/web-sqlite`
|
|
110
112
|
- `@open-e2ee/signal-protocol-sdk/local/vault`
|
|
113
|
+
- `@open-e2ee/signal-protocol-sdk/local/vault/electron-safe-storage`
|
|
111
114
|
- `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`
|
|
115
|
+
- `@open-e2ee/signal-protocol-sdk/local/vault/react-native-keychain`
|
|
112
116
|
- `@open-e2ee/signal-protocol-sdk/types`
|
|
113
117
|
- `@open-e2ee/signal-protocol-sdk/types/address`
|
|
114
118
|
- `@open-e2ee/signal-protocol-sdk/types/messages`
|
|
@@ -150,16 +154,30 @@ Expo storage or the Convex R2 object store.
|
|
|
150
154
|
|
|
151
155
|
### Storage implementations
|
|
152
156
|
|
|
153
|
-
- `ExpoSignalProtocolStore` for Expo
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
- `ExpoSignalProtocolStore` / `await expoStore()` for Expo (the SDK owns the
|
|
158
|
+
SQLCipher database, its key, and its migrations; `resetExpoStore()` deletes
|
|
159
|
+
the database and opens an empty store; `createPreKeyMaintenanceStore(store)`
|
|
160
|
+
runs replaced-prekey maintenance on an open store)
|
|
161
|
+
- `ReactNativeSignalProtocolStore` / `await reactNativeStore()` for
|
|
162
|
+
bare React Native (the SDK owns the SQLCipher database on op-sqlite, its key
|
|
163
|
+
in the react-native-keychain vault, and its migrations;
|
|
164
|
+
`resetReactNativeStore()` deletes the database and opens an empty store)
|
|
158
165
|
- `IndexedDbSignalProtocolStore` / `indexedDbStore()` for browsers
|
|
159
|
-
- `
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
- `WebSqliteSignalProtocolStore` / `await webSqliteStore()` for browsers with
|
|
167
|
+
the origin private file system (the SDK owns the SQLite database in a Wasm
|
|
168
|
+
worker, its key, and its migrations; the page's Content Security Policy
|
|
169
|
+
needs `'wasm-unsafe-eval'`)
|
|
170
|
+
- `KeyValueSignalProtocolStore` / `keyValueStore()` for an application that
|
|
171
|
+
brings its own key-value engine (provide your own key-value backend and
|
|
172
|
+
verify it with the exported
|
|
173
|
+
backend-conformance kit, or use `createRealmKeyValueBackend()` from
|
|
174
|
+
`local/store/key-value/realm`; the value key lives in a secret vault)
|
|
175
|
+
- `NodeSignalProtocolStore` / `await nodeStore({ directory, vault })` for Node
|
|
176
|
+
and the Electron main process (the SDK owns the SQLCipher database on the
|
|
177
|
+
`better-sqlite3-multiple-ciphers` peer, its key, and its migrations;
|
|
178
|
+
`resetNodeStore()` deletes the database and opens an empty store;
|
|
179
|
+
`createPreKeyMaintenanceStore(store)` runs replaced-prekey maintenance on an
|
|
180
|
+
open store; `sqliteDatabaseKeySlot(path)` names the vault slot of the key)
|
|
163
181
|
- `InMemorySignalProtocolStore` / `inMemoryStore()` for local development
|
|
164
182
|
- custom implementations via `SignalProtocolLocalStore`
|
|
165
183
|
|
package/docs/RECIPES.md
CHANGED
|
@@ -100,11 +100,10 @@ through the `onMessageDecrypted` hook.
|
|
|
100
100
|
import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
101
101
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
102
102
|
|
|
103
|
-
// Initialize the application-owned Expo/SQLCipher database bindings first.
|
|
104
103
|
const signal = await createHostedSignalProtocolClient({
|
|
105
104
|
adapters: {
|
|
106
105
|
// Expo storage owns this device's private keys and session state.
|
|
107
|
-
storage: expoStore(),
|
|
106
|
+
storage: await expoStore(),
|
|
108
107
|
},
|
|
109
108
|
hosted: {
|
|
110
109
|
// The environment-scoped connection URL from the OpenE2EE console.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<p id="status" role="status">Ready</p>
|
|
20
20
|
<pre id="output" aria-label="Execution output" tabindex="0"></pre>
|
|
21
21
|
<p>The browser console shows the same results. Ciphertext changes on each run.</p>
|
|
22
|
-
<p><a href="https://github.com/open-e2ee/signal-protocol-js/tree/
|
|
22
|
+
<p><a href="https://github.com/open-e2ee/signal-protocol-js/tree/v8.0.0/examples/browser/src/exchange.ts">Read the exchange code</a> · <a href="https://stackblitz.com/fork/github/open-e2ee/signal-protocol-js/tree/v8.0.0/examples/browser">Edit on StackBlitz</a></p>
|
|
23
23
|
<p>Continue with <a href="https://docs.open-e2ee.dev/start/browser">browser storage</a>, <a href="https://docs.open-e2ee.dev/start/expo">Expo / Hermes setup</a>, or <a href="https://open-e2ee.dev/relay">the OpenE2EE Signal Protocol Relay for separate devices</a>.</p>
|
|
24
24
|
</main>
|
|
25
25
|
<script type="module" src="/src/main.ts"></script>
|
package/local/store/README.md
CHANGED
|
@@ -15,10 +15,8 @@ without coupling the client to a database or platform.
|
|
|
15
15
|
|
|
16
16
|
### Primary supported adapter
|
|
17
17
|
|
|
18
|
-
- `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
19
|
-
-
|
|
20
|
-
`getKeyStorage`, `getDatabaseKeyManager`, `clearDatabaseKeyCache`, and
|
|
21
|
-
`createPreKeyMaintenanceStore`
|
|
18
|
+
- `expoStore` and `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
19
|
+
- `resetExpoStore` and `createPreKeyMaintenanceStore` from the same entry
|
|
22
20
|
|
|
23
21
|
### Local development
|
|
24
22
|
|
|
@@ -34,17 +32,49 @@ and recovery helpers. It graduated from experimental by completing every
|
|
|
34
32
|
gate on the checklist below. Deployment still requires the origin-security
|
|
35
33
|
review described in the [web adapter guide](./web/README.md).
|
|
36
34
|
|
|
35
|
+
- `webSqliteStore` and `WebSqliteSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web-sqlite`
|
|
36
|
+
- `resetWebSqliteStore` and `createPreKeyMaintenanceStore` from the same entry
|
|
37
|
+
|
|
38
|
+
This store keeps the same state in an SDK-owned SQLite database in the origin
|
|
39
|
+
private file system. SQLite3 Multiple Ciphers encrypts the whole file in a Wasm
|
|
40
|
+
worker, and the database key lives in a secret vault, by default IndexedDB in
|
|
41
|
+
the same origin. The page's Content Security Policy must allow
|
|
42
|
+
`'wasm-unsafe-eval'`. A context without the origin private file system gets
|
|
43
|
+
`OPFS_UNAVAILABLE`. The [web SQLite store guide](./web-sqlite/README.md) covers
|
|
44
|
+
the policy, the tabs, and the security boundary. This store is experimental:
|
|
45
|
+
one item on its graduation checklist below is open.
|
|
46
|
+
|
|
47
|
+
A Tauri 2 app uses this store in its webview. See the
|
|
48
|
+
[Tauri section](./web-sqlite/README.md#tauri).
|
|
49
|
+
|
|
37
50
|
### Bare React Native
|
|
38
51
|
|
|
39
|
-
- `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
52
|
+
- `reactNativeStore` and `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
53
|
+
- `resetReactNativeStore` and `createPreKeyMaintenanceStore` from the same entry
|
|
54
|
+
|
|
55
|
+
Use this for bare React Native applications. It opens an SDK-owned SQLCipher
|
|
56
|
+
database on op-sqlite, with its key in the react-native-keychain vault, on the
|
|
57
|
+
same SQLite core as the Expo store. It needs the op-sqlite SQLCipher build and
|
|
58
|
+
a native build of the app. The [React Native SQLite guide](./react-native/README.md)
|
|
59
|
+
covers the setup and the iOS build conflicts.
|
|
40
60
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
from
|
|
61
|
+
### Own key-value engine
|
|
62
|
+
|
|
63
|
+
- `KeyValueSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/key-value` (create it with `await KeyValueSignalProtocolStore.create({ storage, vault })` and provide your own key-value backend and secret vault)
|
|
64
|
+
- `createRealmKeyValueBackend` from `@open-e2ee/signal-protocol-sdk/local/store/key-value/realm` (a key-value backend over an open Realm that your application installs)
|
|
65
|
+
|
|
66
|
+
Use this for applications that supply their own key-value backend, for
|
|
67
|
+
example Realm on bare React Native. It implements the full core store
|
|
68
|
+
contract, including SESAME records, sender-key state, retry message records,
|
|
69
|
+
and recovery helpers. It graduated from experimental by completing every gate
|
|
70
|
+
on the checklist below.
|
|
45
71
|
The supplied backend is the application's responsibility: verify it with the
|
|
46
72
|
exported backend-conformance kit described in the
|
|
47
|
-
[
|
|
73
|
+
[key-value store guide](./key-value/README.md).
|
|
74
|
+
The value key lives only in the supplied vault. Data without its key is an
|
|
75
|
+
error, not a reset. The store reads random bytes from the global
|
|
76
|
+
`crypto.getRandomValues`, so a React Native application installs
|
|
77
|
+
`react-native-get-random-values` 2.x or `react-native-quick-crypto`.
|
|
48
78
|
|
|
49
79
|
#### Graduation checklist
|
|
50
80
|
|
|
@@ -89,13 +119,52 @@ environment an adapter must honor its promises in, not the subject of a test.
|
|
|
89
119
|
source repository, and `npm run soak:web-store` runs longer sessions
|
|
90
120
|
on demand.
|
|
91
121
|
|
|
92
|
-
`
|
|
122
|
+
`WebSqliteSignalProtocolStore` (experimental, with one item open):
|
|
123
|
+
|
|
124
|
+
- [x] Storage contract suites pass in real Chromium, Firefox, and WebKit.
|
|
125
|
+
The suites are the same modules the jest gate runs. They run against
|
|
126
|
+
the store on the web driver in a real tab, under a Content Security
|
|
127
|
+
Policy that adds only `'wasm-unsafe-eval'`. Chromium and Firefox run
|
|
128
|
+
on every change to the source repository. Linux WebKit (WebKitGTK) has
|
|
129
|
+
no origin private file system, so the web SQLite store does not run
|
|
130
|
+
there, and the Linux job proves only `OPFS_UNAVAILABLE` in it. A macOS
|
|
131
|
+
WebKit job runs the suites on each change to the web SQLite store, the
|
|
132
|
+
SQLite core, the storage contract, the key vault, the gate, or a
|
|
133
|
+
dependency, not on every change. In each job, a suite that skips for
|
|
134
|
+
want of the origin private file system fails.
|
|
135
|
+
- [x] Interruption tests. The gate closes a real tab inside an open
|
|
136
|
+
`BEGIN IMMEDIATE` transaction, the kind of transaction that each store
|
|
137
|
+
commit runs in, while a second tab waits to open the same file. The
|
|
138
|
+
second tab reads the file without the uncommitted writes,
|
|
139
|
+
`PRAGMA integrity_check` returns `ok`, and a new write lands. A crashed
|
|
140
|
+
worker gives `SQLITE_ENGINE_UNAVAILABLE`, and the next open starts a
|
|
141
|
+
new worker. Runs in the three engines on the schedule above.
|
|
142
|
+
- [x] Multi-tab tests. Two real tabs share one open file, and each reads
|
|
143
|
+
the other's writes. A read from the second tab waits while the first
|
|
144
|
+
tab holds a write transaction, then sees the committed rows. Two tabs
|
|
145
|
+
that open a new store at the same time write one database key, and
|
|
146
|
+
that key opens the file. A reset gives `INVALID_STATE` while another
|
|
147
|
+
tab has the store open. Runs in the three engines on the schedule
|
|
148
|
+
above.
|
|
149
|
+
- [x] Storage-pressure tests. A real Chromium run clamps the origin quota
|
|
150
|
+
and fills the file in the origin private file system until a write
|
|
151
|
+
fails. A single write and an atomic session and trust commit each
|
|
152
|
+
reject with the typed `StorageQuotaExceededError`
|
|
153
|
+
(`STORAGE_QUOTA_EXCEEDED`). The rejected writes leave no partial state:
|
|
154
|
+
no row of the write, no pinned identity, and the one-time prekey stays.
|
|
155
|
+
The store stays open. After the clamp is removed, the same commit
|
|
156
|
+
succeeds, new writes land, and `PRAGMA integrity_check` returns `ok`.
|
|
157
|
+
Runs in Chromium on the schedule above. The quota clamp is a DevTools
|
|
158
|
+
protocol call, so Firefox and WebKit do not run it.
|
|
159
|
+
- [ ] Soak evidence. No soak gate runs against this store.
|
|
160
|
+
|
|
161
|
+
`KeyValueSignalProtocolStore` (graduated, and the gates keep running):
|
|
93
162
|
|
|
94
163
|
- [x] Exported backend-conformance kit. The SDK cannot test an
|
|
95
164
|
application-supplied `storage` backend. Instead it ships the contract
|
|
96
165
|
suite the application runs against its own backend. The kit exports
|
|
97
166
|
`runBackendConformance` and `assertBackendConformance`, which execute
|
|
98
|
-
thirteen cases against any `
|
|
167
|
+
thirteen cases against any `KeyValueStorage`:
|
|
99
168
|
|
|
100
169
|
- round-trips
|
|
101
170
|
- key listing
|
|
@@ -111,14 +180,14 @@ environment an adapter must honor its promises in, not the subject of a test.
|
|
|
111
180
|
A jest gate proves the kit catches a non-atomic backend, a
|
|
112
181
|
prefix-matching session removal, and an unserialized backend, on every
|
|
113
182
|
change to the source repository.
|
|
114
|
-
- [x] Reference backend passes that kit on Hermes in CI. The
|
|
115
|
-
|
|
116
|
-
contract in executable form.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
rejection.
|
|
183
|
+
- [x] Reference backend passes that kit on Hermes in CI. The source
|
|
184
|
+
repository holds an in-memory reference backend, which specifies the
|
|
185
|
+
backend contract in executable form. It is not part of the package. On
|
|
186
|
+
each source-repository change, a named gate bundles the kit and runs it
|
|
187
|
+
on the reference backend. That gate uses the Hermes V1 CLI that React
|
|
188
|
+
Native 0.86 uses, with only the globals of a bare React Native app. The
|
|
189
|
+
runner requires an explicit pass line for each case because Hermes
|
|
190
|
+
exits 0 on an unhandled async rejection.
|
|
122
191
|
- [x] Interruption tests against the reference backend. A simulated process
|
|
123
192
|
kill before commit leaves each atomic security write fully absent
|
|
124
193
|
after reopen. Those writes are a session/trust commit, an identity
|
|
@@ -134,26 +203,29 @@ environment an adapter must honor its promises in, not the subject of a test.
|
|
|
134
203
|
|
|
135
204
|
### Node
|
|
136
205
|
|
|
137
|
-
- `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node`
|
|
206
|
+
- `nodeStore` and `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node`
|
|
138
207
|
|
|
139
|
-
Use this for
|
|
140
|
-
|
|
141
|
-
|
|
208
|
+
Use this for Node and the Electron main process. `await nodeStore({ directory,
|
|
209
|
+
vault })` opens an SDK-owned SQLCipher database on the
|
|
210
|
+
`better-sqlite3-multiple-ciphers` peer, with its key in the vault that the app
|
|
211
|
+
passes. The [Node guide](./node/README.md) covers the owner lock, a lost key,
|
|
212
|
+
and reset.
|
|
142
213
|
|
|
143
214
|
## Composition
|
|
144
215
|
|
|
145
216
|
<!-- doc-snippet:skip requires-external-context -->
|
|
146
217
|
```ts
|
|
147
218
|
import { DefaultSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
148
|
-
import {
|
|
219
|
+
import { expoStore } from '@open-e2ee/signal-protocol-sdk/local/store/expo';
|
|
149
220
|
|
|
150
|
-
// Configure the application-owned Expo/SQLCipher database bindings first.
|
|
151
221
|
const signal = await DefaultSignalProtocolClient.create(userId, {
|
|
152
|
-
storage:
|
|
222
|
+
storage: await expoStore(),
|
|
153
223
|
});
|
|
154
224
|
```
|
|
155
225
|
|
|
156
|
-
The [Expo guide](./expo/README.md)
|
|
226
|
+
The [Expo guide](./expo/README.md) covers the native build and the database key.
|
|
227
|
+
The [React Native SQLite guide](./react-native/README.md) covers the same for
|
|
228
|
+
bare React Native.
|
|
157
229
|
|
|
158
230
|
## Storage Responsibilities
|
|
159
231
|
|
|
@@ -195,7 +267,7 @@ security transition. The shared adapter contract verifies
|
|
|
195
267
|
failure rollback, compare-and-swap behavior, one-time-prekey replay rejection,
|
|
196
268
|
and exact per-user session deletion.
|
|
197
269
|
|
|
198
|
-
For
|
|
270
|
+
For the key-value store, the supplied backend's `atomicWrite` is a security boundary,
|
|
199
271
|
not a batching optimization. It must commit `check`, `set`, `remove`, and
|
|
200
272
|
`removeSessionsForUser` operations in one crash-durable transaction. The final
|
|
201
273
|
operation must enumerate exact plaintext session metadata inside that same
|
|
@@ -211,10 +283,16 @@ The `commitSessionTrust` method commits received content, ratchet state, contact
|
|
|
211
283
|
The `storeSenderKeyRecord` method commits received content and skipped-key consumption together.
|
|
212
284
|
|
|
213
285
|
An adapter must reject the complete transaction if any write fails.
|
|
286
|
+
When the database file of a SQLite store cannot grow because the disk or the
|
|
287
|
+
storage quota is full, the write rejects with `StorageQuotaExceededError`
|
|
288
|
+
(`STORAGE_QUOTA_EXCEEDED`). SQLite rolls the write back, and the store stays
|
|
289
|
+
open. Free space, then retry the write.
|
|
214
290
|
`getReceivedContent`, `deleteReceivedContent`, and `deleteExpiredReceivedContent`
|
|
215
291
|
own recovery and cleanup. Generic unencrypted metadata cannot hold this content.
|
|
216
|
-
|
|
217
|
-
|
|
292
|
+
Expo, bare React Native, and Node use SQLCipher, and the web SQLite store
|
|
293
|
+
encrypts its whole file with SQLite3 Multiple Ciphers. The IndexedDB web store
|
|
294
|
+
and the key-value store encrypt each content record with their existing store
|
|
295
|
+
key.
|
|
218
296
|
|
|
219
297
|
The SDK removes content after durable handling and retains separate bounded
|
|
220
298
|
duplicate evidence. Cleanup uses the existing thirty-day retry horizon.
|
|
@@ -224,9 +302,12 @@ The host application must use idempotent writes keyed by message ID.
|
|
|
224
302
|
still requires review of key custody, backups, and host security.
|
|
225
303
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo` is also the package home for Expo-specific
|
|
226
304
|
integration helpers that a real app composes directly.
|
|
305
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/react-native` is the same SQLite
|
|
306
|
+
store for bare React Native, on op-sqlite and the react-native-keychain vault.
|
|
227
307
|
- An adapter carries the experimental label until every item on its
|
|
228
|
-
graduation checklist is a named, continuously running CI gate.
|
|
229
|
-
and
|
|
308
|
+
graduation checklist is a named, continuously running CI gate. The IndexedDB
|
|
309
|
+
web adapter and the key-value adapter completed theirs. The web SQLite store
|
|
310
|
+
has one item open.
|
|
230
311
|
- Storage adapters should expose the real package contract instead of app-specific wrappers.
|
|
231
312
|
|
|
232
313
|
## Related Docs
|
|
@@ -236,6 +317,8 @@ The host application must use idempotent writes keyed by message ID.
|
|
|
236
317
|
- [remote/README.md](../../remote/README.md)
|
|
237
318
|
- [Expo adapter](./expo/README.md)
|
|
238
319
|
- [Node adapter](./node/README.md)
|
|
239
|
-
- [
|
|
320
|
+
- [Web SQLite store](./web-sqlite/README.md)
|
|
321
|
+
- [React Native SQLite store](./react-native/README.md)
|
|
322
|
+
- [Key-value store](./key-value/README.md)
|
|
240
323
|
- [Web adapter](./web/README.md)
|
|
241
324
|
- [In-memory adapter](./memory/README.md)
|