@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
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database Key Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages the single database encryption key stored through the configured
|
|
5
|
-
* local secret vault. The default Expo vault uses `expo-secure-store`.
|
|
6
|
-
*
|
|
7
|
-
* Layer 1 (secret vault): Single 32-byte database encryption key
|
|
8
|
-
* Layer 2 (SQLCipher): Full-database encryption configured by the host app
|
|
9
|
-
*
|
|
10
|
-
* Security Properties:
|
|
11
|
-
* - Key generated once on first initialization
|
|
12
|
-
* - Key custody follows the configured secret-vault implementation
|
|
13
|
-
* - Key is loaded into application memory only when SQLCipher setup requires it
|
|
14
|
-
* - Protocol records remain in the application-owned encrypted database
|
|
15
|
-
*
|
|
16
|
-
* See docs/E2EE.md for architecture details.
|
|
17
|
-
*/
|
|
18
|
-
import { type Logger } from '../../../logger.js';
|
|
19
|
-
import type { SignalProtocolLocalSecretVault } from '../../../types/api.js';
|
|
20
|
-
/**
|
|
21
|
-
* Database Key Manager
|
|
22
|
-
*
|
|
23
|
-
* Handles generation, storage, and retrieval of the database encryption key.
|
|
24
|
-
* This key is used to encrypt/decrypt all Signal Protocol keys in the SQLite database.
|
|
25
|
-
*/
|
|
26
|
-
export declare class DatabaseKeyManager {
|
|
27
|
-
private cachedKey;
|
|
28
|
-
private initPromise;
|
|
29
|
-
private logger;
|
|
30
|
-
private secretVault;
|
|
31
|
-
constructor(secretVault?: SignalProtocolLocalSecretVault, providedLogger?: Logger);
|
|
32
|
-
setLogger(providedLogger?: Logger): void;
|
|
33
|
-
/**
|
|
34
|
-
* Initialize the database encryption key
|
|
35
|
-
*
|
|
36
|
-
* Generates and stores a new 32-byte key if one does not exist.
|
|
37
|
-
* This should be called once on app initialization.
|
|
38
|
-
* Uses initPromise pattern to prevent race conditions from concurrent calls.
|
|
39
|
-
*
|
|
40
|
-
* @returns true if key was generated, false if already exists
|
|
41
|
-
*/
|
|
42
|
-
initialize(): Promise<boolean>;
|
|
43
|
-
private _initialize;
|
|
44
|
-
/**
|
|
45
|
-
* Get the database encryption key
|
|
46
|
-
*
|
|
47
|
-
* Retrieves the key from the configured secret vault (or cache if available).
|
|
48
|
-
* Returns null if key does not exist (needs initialization).
|
|
49
|
-
*
|
|
50
|
-
* @returns Database encryption key or null
|
|
51
|
-
*/
|
|
52
|
-
getKey(): Promise<Uint8Array | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Get the database encryption key (throws if not initialized)
|
|
55
|
-
*
|
|
56
|
-
* Convenience method that throws when the key is missing.
|
|
57
|
-
* Use this when you expect the key to be initialized.
|
|
58
|
-
*
|
|
59
|
-
* @throws EncryptionError if key does not exist
|
|
60
|
-
* @returns Database encryption key
|
|
61
|
-
*/
|
|
62
|
-
getKeyOrThrow(): Promise<Uint8Array>;
|
|
63
|
-
/**
|
|
64
|
-
* Get the database password for SQLCipher
|
|
65
|
-
*
|
|
66
|
-
* Returns the database encryption key as a hex string for use with
|
|
67
|
-
* SQLCipher's PRAGMA key. Uses hex format (x'...') for full 256-bit entropy.
|
|
68
|
-
*
|
|
69
|
-
* @throws EncryptionError if key does not exist
|
|
70
|
-
* @returns SQLCipher-compatible password string
|
|
71
|
-
*/
|
|
72
|
-
getPassword(): Promise<string>;
|
|
73
|
-
/**
|
|
74
|
-
* Check if database encryption key exists
|
|
75
|
-
*
|
|
76
|
-
* @returns true if key exists, false otherwise
|
|
77
|
-
*/
|
|
78
|
-
hasKey(): Promise<boolean>;
|
|
79
|
-
/**
|
|
80
|
-
* Delete the database encryption key
|
|
81
|
-
*
|
|
82
|
-
* Deleting the active key makes the local SQLCipher database unreadable
|
|
83
|
-
* through this key path. The application remains responsible for database
|
|
84
|
-
* copies, backups, and coordinated account-reset cleanup. Only use for:
|
|
85
|
-
* - Account deletion
|
|
86
|
-
* - Factory reset
|
|
87
|
-
* - Controlled local reset
|
|
88
|
-
*
|
|
89
|
-
* @returns true if key was deleted, false if did not exist
|
|
90
|
-
*/
|
|
91
|
-
deleteKey(): Promise<boolean>;
|
|
92
|
-
/**
|
|
93
|
-
* Rotate the database encryption key
|
|
94
|
-
*
|
|
95
|
-
* Generates a new key and returns both old and new keys.
|
|
96
|
-
* Caller is responsible for:
|
|
97
|
-
* 1. Rekeying the SQLCipher database with the new key
|
|
98
|
-
* 2. Storing the new key in the configured secret vault
|
|
99
|
-
* 3. Deleting old key
|
|
100
|
-
*
|
|
101
|
-
* @returns Object with oldKey and newKey
|
|
102
|
-
*/
|
|
103
|
-
rotateKey(): Promise<{
|
|
104
|
-
oldKey: Uint8Array;
|
|
105
|
-
newKey: Uint8Array;
|
|
106
|
-
}>;
|
|
107
|
-
/**
|
|
108
|
-
* Complete key rotation after re-encryption
|
|
109
|
-
*
|
|
110
|
-
* Stores the new key in the configured secret vault and updates the cache.
|
|
111
|
-
* Call this only after the application has successfully rekeyed SQLCipher.
|
|
112
|
-
*
|
|
113
|
-
* @param newKey The new database encryption key
|
|
114
|
-
*/
|
|
115
|
-
completeKeyRotation(newKey: Uint8Array): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Clear cached key (security: minimize key in memory)
|
|
118
|
-
*
|
|
119
|
-
* Forces next getKey() to read from the configured secret vault.
|
|
120
|
-
* Call this when app goes to background.
|
|
121
|
-
*/
|
|
122
|
-
clearCache(): void;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Get singleton DatabaseKeyManager instance
|
|
126
|
-
*/
|
|
127
|
-
export declare function getDatabaseKeyManager(providedLogger?: Logger): DatabaseKeyManager;
|
|
128
|
-
/**
|
|
129
|
-
* Reset the singleton for controlled local teardown.
|
|
130
|
-
*/
|
|
131
|
-
export declare function resetDatabaseKeyManager(): void;
|
|
132
|
-
/**
|
|
133
|
-
* Clear cached database key from memory
|
|
134
|
-
*
|
|
135
|
-
* Security: Minimizes time sensitive key material stays in memory.
|
|
136
|
-
* Call this when app goes to background to reduce attack surface.
|
|
137
|
-
*
|
|
138
|
-
* The key will be re-read from the configured secret vault on next access.
|
|
139
|
-
* This is a no-op if the key manager has not been initialized.
|
|
140
|
-
*/
|
|
141
|
-
export declare function clearDatabaseKeyCache(): void;
|
|
142
|
-
//# sourceMappingURL=database-key.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-key.d.ts","sourceRoot":"","sources":["../../../../local/store/expo/database-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAA+B,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AA+BzE;;;;;GAKG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,WAAW,CAAiC;IAEpD,YACE,WAAW,GAAE,8BAA+E,EAC5F,cAAc,CAAC,EAAE,MAAM,EAIxB;IAED,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAEvC;IAED;;;;;;;;OAQG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAMnC;YAEa,WAAW;IA+BzB;;;;;;;OAOG;IACG,MAAM,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA8BzC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CASzC;IAED;;;;;;;;OAQG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAKnC;IAED;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAY/B;IAED;;;;;;;;;;;OAWG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAqBlC;IAED;;;;;;;;;;OAUG;IACG,SAAS,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,CAAC,CAwBrE;IAED;;;;;;;OAOG;IACG,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB3D;IAED;;;;;OAKG;IACH,UAAU,IAAI,IAAI,CAKjB;CAKF;AAOD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAOjF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAK9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C"}
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database Key Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages the single database encryption key stored through the configured
|
|
5
|
-
* local secret vault. The default Expo vault uses `expo-secure-store`.
|
|
6
|
-
*
|
|
7
|
-
* Layer 1 (secret vault): Single 32-byte database encryption key
|
|
8
|
-
* Layer 2 (SQLCipher): Full-database encryption configured by the host app
|
|
9
|
-
*
|
|
10
|
-
* Security Properties:
|
|
11
|
-
* - Key generated once on first initialization
|
|
12
|
-
* - Key custody follows the configured secret-vault implementation
|
|
13
|
-
* - Key is loaded into application memory only when SQLCipher setup requires it
|
|
14
|
-
* - Protocol records remain in the application-owned encrypted database
|
|
15
|
-
*
|
|
16
|
-
* See docs/E2EE.md for architecture details.
|
|
17
|
-
*/
|
|
18
|
-
import * as Crypto from 'expo-crypto';
|
|
19
|
-
import { EncryptionError, EncryptionErrorCode } from '../../../types/errors.js';
|
|
20
|
-
import { resolveSignalProtocolLogger } from '../../../logger.js';
|
|
21
|
-
import { bytesToHex } from '../../../encoding/index.js';
|
|
22
|
-
import { ExpoSecureStoreSignalProtocolSecretVault } from '../../vault/expo-secure-store.js';
|
|
23
|
-
/**
|
|
24
|
-
* Secret-vault identifier for the database encryption key
|
|
25
|
-
*/
|
|
26
|
-
const DB_ENCRYPTION_KEY_ID = 'signal_db_encryption_key';
|
|
27
|
-
/**
|
|
28
|
-
* Database encryption key size (AES-256)
|
|
29
|
-
*/
|
|
30
|
-
const DB_KEY_SIZE = 32; // 256 bits
|
|
31
|
-
function rootCauseMessage(error) {
|
|
32
|
-
let current = error;
|
|
33
|
-
while (current instanceof EncryptionError && current.originalError) {
|
|
34
|
-
current = current.originalError;
|
|
35
|
-
}
|
|
36
|
-
if (current instanceof Error && current.message) {
|
|
37
|
-
return current.message;
|
|
38
|
-
}
|
|
39
|
-
return String(current);
|
|
40
|
-
}
|
|
41
|
-
function storageErrorMessage(operation, error) {
|
|
42
|
-
return `${operation}: ${rootCauseMessage(error)}`;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Database Key Manager
|
|
46
|
-
*
|
|
47
|
-
* Handles generation, storage, and retrieval of the database encryption key.
|
|
48
|
-
* This key is used to encrypt/decrypt all Signal Protocol keys in the SQLite database.
|
|
49
|
-
*/
|
|
50
|
-
export class DatabaseKeyManager {
|
|
51
|
-
cachedKey = null;
|
|
52
|
-
initPromise = null;
|
|
53
|
-
logger;
|
|
54
|
-
secretVault;
|
|
55
|
-
constructor(secretVault = new ExpoSecureStoreSignalProtocolSecretVault(), providedLogger) {
|
|
56
|
-
this.secretVault = secretVault;
|
|
57
|
-
this.logger = resolveSignalProtocolLogger(providedLogger);
|
|
58
|
-
}
|
|
59
|
-
setLogger(providedLogger) {
|
|
60
|
-
this.logger = resolveSignalProtocolLogger(providedLogger);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Initialize the database encryption key
|
|
64
|
-
*
|
|
65
|
-
* Generates and stores a new 32-byte key if one does not exist.
|
|
66
|
-
* This should be called once on app initialization.
|
|
67
|
-
* Uses initPromise pattern to prevent race conditions from concurrent calls.
|
|
68
|
-
*
|
|
69
|
-
* @returns true if key was generated, false if already exists
|
|
70
|
-
*/
|
|
71
|
-
async initialize() {
|
|
72
|
-
if (this.initPromise) {
|
|
73
|
-
return this.initPromise;
|
|
74
|
-
}
|
|
75
|
-
this.initPromise = this._initialize();
|
|
76
|
-
return this.initPromise;
|
|
77
|
-
}
|
|
78
|
-
async _initialize() {
|
|
79
|
-
try {
|
|
80
|
-
// Check if key already exists
|
|
81
|
-
const existingKey = await this.getKey();
|
|
82
|
-
if (existingKey) {
|
|
83
|
-
this.logger.info('[DatabaseKeyManager] Database encryption key already exists');
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
this.logger.info('[DatabaseKeyManager] Generating new database encryption key...');
|
|
87
|
-
// Generate cryptographically secure random 32-byte key
|
|
88
|
-
const keyBytes = await Crypto.getRandomBytesAsync(DB_KEY_SIZE);
|
|
89
|
-
await this.secretVault.setSecret(DB_ENCRYPTION_KEY_ID, keyBytes);
|
|
90
|
-
// Cache the key
|
|
91
|
-
this.cachedKey = keyBytes;
|
|
92
|
-
this.logger.info('[DatabaseKeyManager] Database encryption key generated and stored');
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
this.initPromise = null; // Allow retry on failure
|
|
97
|
-
throw new EncryptionError(storageErrorMessage('Failed to initialize database encryption key', error), EncryptionErrorCode.KEY_STORAGE_ERROR, { originalError: error });
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Get the database encryption key
|
|
102
|
-
*
|
|
103
|
-
* Retrieves the key from the configured secret vault (or cache if available).
|
|
104
|
-
* Returns null if key does not exist (needs initialization).
|
|
105
|
-
*
|
|
106
|
-
* @returns Database encryption key or null
|
|
107
|
-
*/
|
|
108
|
-
async getKey() {
|
|
109
|
-
try {
|
|
110
|
-
// Return cached key if available
|
|
111
|
-
if (this.cachedKey) {
|
|
112
|
-
return this.cachedKey;
|
|
113
|
-
}
|
|
114
|
-
const keyBytes = await this.secretVault.getSecret(DB_ENCRYPTION_KEY_ID);
|
|
115
|
-
if (!keyBytes) {
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
// Validate key size
|
|
119
|
-
if (keyBytes.length !== DB_KEY_SIZE) {
|
|
120
|
-
throw new Error(`Invalid database key size: expected ${DB_KEY_SIZE} bytes, got ${keyBytes.length}`);
|
|
121
|
-
}
|
|
122
|
-
// Cache for future use
|
|
123
|
-
this.cachedKey = keyBytes;
|
|
124
|
-
return keyBytes;
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
throw new EncryptionError(storageErrorMessage('Failed to retrieve database encryption key', error), EncryptionErrorCode.KEY_STORAGE_ERROR, { originalError: error });
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Get the database encryption key (throws if not initialized)
|
|
132
|
-
*
|
|
133
|
-
* Convenience method that throws when the key is missing.
|
|
134
|
-
* Use this when you expect the key to be initialized.
|
|
135
|
-
*
|
|
136
|
-
* @throws EncryptionError if key does not exist
|
|
137
|
-
* @returns Database encryption key
|
|
138
|
-
*/
|
|
139
|
-
async getKeyOrThrow() {
|
|
140
|
-
const key = await this.getKey();
|
|
141
|
-
if (!key) {
|
|
142
|
-
throw new EncryptionError('Database encryption key not initialized. Call initialize() first.', EncryptionErrorCode.INITIALIZATION_FAILED);
|
|
143
|
-
}
|
|
144
|
-
return key;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Get the database password for SQLCipher
|
|
148
|
-
*
|
|
149
|
-
* Returns the database encryption key as a hex string for use with
|
|
150
|
-
* SQLCipher's PRAGMA key. Uses hex format (x'...') for full 256-bit entropy.
|
|
151
|
-
*
|
|
152
|
-
* @throws EncryptionError if key does not exist
|
|
153
|
-
* @returns SQLCipher-compatible password string
|
|
154
|
-
*/
|
|
155
|
-
async getPassword() {
|
|
156
|
-
const key = await this.getKeyOrThrow();
|
|
157
|
-
// Convert to hex string for SQLCipher (x'...' format gives full 256-bit entropy)
|
|
158
|
-
const hexKey = bytesToHex(key);
|
|
159
|
-
return `x'${hexKey}'`;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Check if database encryption key exists
|
|
163
|
-
*
|
|
164
|
-
* @returns true if key exists, false otherwise
|
|
165
|
-
*/
|
|
166
|
-
async hasKey() {
|
|
167
|
-
try {
|
|
168
|
-
const key = await this.getKey();
|
|
169
|
-
return key !== null;
|
|
170
|
-
}
|
|
171
|
-
catch (error) {
|
|
172
|
-
// If error retrieving, treat as not existing
|
|
173
|
-
this.logger.error('Error checking database key existence', {
|
|
174
|
-
category: 'DatabaseKeyManager',
|
|
175
|
-
error: error,
|
|
176
|
-
});
|
|
177
|
-
return false;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Delete the database encryption key
|
|
182
|
-
*
|
|
183
|
-
* Deleting the active key makes the local SQLCipher database unreadable
|
|
184
|
-
* through this key path. The application remains responsible for database
|
|
185
|
-
* copies, backups, and coordinated account-reset cleanup. Only use for:
|
|
186
|
-
* - Account deletion
|
|
187
|
-
* - Factory reset
|
|
188
|
-
* - Controlled local reset
|
|
189
|
-
*
|
|
190
|
-
* @returns true if key was deleted, false if did not exist
|
|
191
|
-
*/
|
|
192
|
-
async deleteKey() {
|
|
193
|
-
try {
|
|
194
|
-
const exists = await this.hasKey();
|
|
195
|
-
if (!exists) {
|
|
196
|
-
return false;
|
|
197
|
-
}
|
|
198
|
-
await this.secretVault.deleteSecret(DB_ENCRYPTION_KEY_ID);
|
|
199
|
-
// Clear cache
|
|
200
|
-
this.cachedKey = null;
|
|
201
|
-
this.logger.info('[DatabaseKeyManager] Database encryption key deleted');
|
|
202
|
-
return true;
|
|
203
|
-
}
|
|
204
|
-
catch (error) {
|
|
205
|
-
throw new EncryptionError(storageErrorMessage('Failed to delete database encryption key', error), EncryptionErrorCode.KEY_STORAGE_ERROR, { originalError: error });
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Rotate the database encryption key
|
|
210
|
-
*
|
|
211
|
-
* Generates a new key and returns both old and new keys.
|
|
212
|
-
* Caller is responsible for:
|
|
213
|
-
* 1. Rekeying the SQLCipher database with the new key
|
|
214
|
-
* 2. Storing the new key in the configured secret vault
|
|
215
|
-
* 3. Deleting old key
|
|
216
|
-
*
|
|
217
|
-
* @returns Object with oldKey and newKey
|
|
218
|
-
*/
|
|
219
|
-
async rotateKey() {
|
|
220
|
-
try {
|
|
221
|
-
// Get existing key
|
|
222
|
-
const oldKey = await this.getKeyOrThrow();
|
|
223
|
-
// Generate new key
|
|
224
|
-
const newKeyBytes = await Crypto.getRandomBytesAsync(DB_KEY_SIZE);
|
|
225
|
-
// Zero old cached key before replacing with new key
|
|
226
|
-
if (this.cachedKey) {
|
|
227
|
-
this.cachedKey.fill(0);
|
|
228
|
-
}
|
|
229
|
-
this.cachedKey = null;
|
|
230
|
-
this.logger.info('[DatabaseKeyManager] Database encryption key rotation initiated');
|
|
231
|
-
return { oldKey, newKey: newKeyBytes };
|
|
232
|
-
}
|
|
233
|
-
catch (error) {
|
|
234
|
-
throw new EncryptionError(storageErrorMessage('Failed to rotate database encryption key', error), EncryptionErrorCode.KEY_STORAGE_ERROR, { originalError: error });
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Complete key rotation after re-encryption
|
|
239
|
-
*
|
|
240
|
-
* Stores the new key in the configured secret vault and updates the cache.
|
|
241
|
-
* Call this only after the application has successfully rekeyed SQLCipher.
|
|
242
|
-
*
|
|
243
|
-
* @param newKey The new database encryption key
|
|
244
|
-
*/
|
|
245
|
-
async completeKeyRotation(newKey) {
|
|
246
|
-
try {
|
|
247
|
-
// Validate key size
|
|
248
|
-
if (newKey.length !== DB_KEY_SIZE) {
|
|
249
|
-
throw new Error(`Invalid key size: expected ${DB_KEY_SIZE} bytes`);
|
|
250
|
-
}
|
|
251
|
-
await this.secretVault.setSecret(DB_ENCRYPTION_KEY_ID, newKey);
|
|
252
|
-
// Update cache
|
|
253
|
-
this.cachedKey = newKey;
|
|
254
|
-
this.logger.info('[DatabaseKeyManager] Key rotation complete');
|
|
255
|
-
}
|
|
256
|
-
catch (error) {
|
|
257
|
-
throw new EncryptionError(storageErrorMessage('Failed to complete database key rotation', error), EncryptionErrorCode.KEY_STORAGE_ERROR, { originalError: error });
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Clear cached key (security: minimize key in memory)
|
|
262
|
-
*
|
|
263
|
-
* Forces next getKey() to read from the configured secret vault.
|
|
264
|
-
* Call this when app goes to background.
|
|
265
|
-
*/
|
|
266
|
-
clearCache() {
|
|
267
|
-
if (this.cachedKey) {
|
|
268
|
-
this.cachedKey.fill(0);
|
|
269
|
-
}
|
|
270
|
-
this.cachedKey = null;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Singleton instance
|
|
275
|
-
*/
|
|
276
|
-
let dbKeyManagerInstance = null;
|
|
277
|
-
/**
|
|
278
|
-
* Get singleton DatabaseKeyManager instance
|
|
279
|
-
*/
|
|
280
|
-
export function getDatabaseKeyManager(providedLogger) {
|
|
281
|
-
if (!dbKeyManagerInstance) {
|
|
282
|
-
dbKeyManagerInstance = new DatabaseKeyManager(undefined, providedLogger);
|
|
283
|
-
}
|
|
284
|
-
else if (providedLogger) {
|
|
285
|
-
dbKeyManagerInstance.setLogger(providedLogger);
|
|
286
|
-
}
|
|
287
|
-
return dbKeyManagerInstance;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Reset the singleton for controlled local teardown.
|
|
291
|
-
*/
|
|
292
|
-
export function resetDatabaseKeyManager() {
|
|
293
|
-
if (dbKeyManagerInstance) {
|
|
294
|
-
dbKeyManagerInstance.clearCache();
|
|
295
|
-
}
|
|
296
|
-
dbKeyManagerInstance = null;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Clear cached database key from memory
|
|
300
|
-
*
|
|
301
|
-
* Security: Minimizes time sensitive key material stays in memory.
|
|
302
|
-
* Call this when app goes to background to reduce attack surface.
|
|
303
|
-
*
|
|
304
|
-
* The key will be re-read from the configured secret vault on next access.
|
|
305
|
-
* This is a no-op if the key manager has not been initialized.
|
|
306
|
-
*/
|
|
307
|
-
export function clearDatabaseKeyCache() {
|
|
308
|
-
if (dbKeyManagerInstance) {
|
|
309
|
-
dbKeyManagerInstance.clearCache();
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
//# sourceMappingURL=database-key.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-key.js","sourceRoot":"","sources":["../../../../local/store/expo/database-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAe,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC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B,EAAE,CAAC;QAC1B,oBAAoB,GAAG,IAAI,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC;SAAM,IAAI,cAAc,EAAE,CAAC;QAC1B,oBAAoB,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,IAAI,oBAAoB,EAAE,CAAC;QACzB,oBAAoB,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC;IACD,oBAAoB,GAAG,IAAI,CAAC;AAC9B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB;IACnC,IAAI,oBAAoB,EAAE,CAAC;QACzB,oBAAoB,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { and as ormAnd, asc as ormAsc, count as ormCount, desc as ormDesc, eq as ormEq, gt as ormGt, gte as ormGte, inArray as ormInArray, isNotNull as ormIsNotNull, isNull as ormIsNull, lt as ormLt, lte as ormLte, ne as ormNe, notInArray as ormNotInArray, or as ormOr, sql as ormSql } from 'drizzle-orm';
|
|
2
|
-
import type { ExpoSQLiteDatabase } from 'drizzle-orm/expo-sqlite';
|
|
3
|
-
import type { SQLiteDatabase } from 'expo-sqlite';
|
|
4
|
-
import * as schema from './schema.js';
|
|
5
|
-
export type { AuthCredentialCacheRow, EcOneTimePreKey, EcSignedPreKey, GroupMasterKeyRow, GroupStateCacheRow, IdentityKey, KyberOneTimePreKey, KyberPreKey, MessageRecord, NewAuthCredentialCacheRow, NewEcOneTimePreKey, NewEcSignedPreKey, NewGroupMasterKeyRow, NewGroupStateCacheRow, NewIdentityKey, NewKyberOneTimePreKey, NewKyberPreKey, NewMessageRecord, NewProfileKey, NewRecipientIdentity, NewSenderKey, NewSkippedSenderKeyRow, NewSession, ProfileKey, RecipientIdentity, SenderKey, Session, SkippedSenderKeyRow, } from './schema.js';
|
|
6
|
-
export type SignalProtocolExpoDrizzleDB = ExpoSQLiteDatabase<typeof schema>;
|
|
7
|
-
export type SignalProtocolExpoRawDatabase = SQLiteDatabase;
|
|
8
|
-
export interface SignalProtocolExpoDbBindings {
|
|
9
|
-
getDrizzle?: () => Promise<SignalProtocolExpoDrizzleDB>;
|
|
10
|
-
getRawDatabase?: () => SignalProtocolExpoRawDatabase;
|
|
11
|
-
eq?: typeof ormEq;
|
|
12
|
-
and?: typeof ormAnd;
|
|
13
|
-
or?: typeof ormOr;
|
|
14
|
-
gt?: typeof ormGt;
|
|
15
|
-
gte?: typeof ormGte;
|
|
16
|
-
lt?: typeof ormLt;
|
|
17
|
-
lte?: typeof ormLte;
|
|
18
|
-
ne?: typeof ormNe;
|
|
19
|
-
isNull?: typeof ormIsNull;
|
|
20
|
-
isNotNull?: typeof ormIsNotNull;
|
|
21
|
-
inArray?: typeof ormInArray;
|
|
22
|
-
notInArray?: typeof ormNotInArray;
|
|
23
|
-
sql?: typeof ormSql;
|
|
24
|
-
desc?: typeof ormDesc;
|
|
25
|
-
asc?: typeof ormAsc;
|
|
26
|
-
count?: typeof ormCount;
|
|
27
|
-
profileKeys?: typeof schema.profileKeys;
|
|
28
|
-
identityKeys?: typeof schema.identityKeys;
|
|
29
|
-
recipientIdentities?: typeof schema.recipientIdentities;
|
|
30
|
-
ecSignedPreKeys?: typeof schema.ecSignedPreKeys;
|
|
31
|
-
ecOneTimePreKeys?: typeof schema.ecOneTimePreKeys;
|
|
32
|
-
kyberPreKeys?: typeof schema.kyberPreKeys;
|
|
33
|
-
kyberPreKeyUsed?: typeof schema.kyberPreKeyUsed;
|
|
34
|
-
kyberOneTimePreKeys?: typeof schema.kyberOneTimePreKeys;
|
|
35
|
-
sessions?: typeof schema.sessions;
|
|
36
|
-
senderKeys?: typeof schema.senderKeys;
|
|
37
|
-
skippedSenderKeys?: typeof schema.skippedSenderKeys;
|
|
38
|
-
messageRecords?: typeof schema.messageRecords;
|
|
39
|
-
groupMasterKeys?: typeof schema.groupMasterKeys;
|
|
40
|
-
groupStateCache?: typeof schema.groupStateCache;
|
|
41
|
-
authCredentialCache?: typeof schema.authCredentialCache;
|
|
42
|
-
}
|
|
43
|
-
export declare function configureSignalProtocolExpoDbBindings(next: SignalProtocolExpoDbBindings): void;
|
|
44
|
-
export declare function resetSignalProtocolExpoDbBindings(): void;
|
|
45
|
-
export declare function getDrizzle(): Promise<SignalProtocolExpoDrizzleDB>;
|
|
46
|
-
export declare function getRawDatabase(): SignalProtocolExpoRawDatabase;
|
|
47
|
-
export declare const eq: typeof ormEq;
|
|
48
|
-
export declare const and: typeof ormAnd;
|
|
49
|
-
export declare const or: typeof ormOr;
|
|
50
|
-
export declare const gt: typeof ormGt;
|
|
51
|
-
export declare const gte: typeof ormGte;
|
|
52
|
-
export declare const lt: typeof ormLt;
|
|
53
|
-
export declare const lte: typeof ormLte;
|
|
54
|
-
export declare const ne: typeof ormNe;
|
|
55
|
-
export declare const isNull: typeof ormIsNull;
|
|
56
|
-
export declare const isNotNull: typeof ormIsNotNull;
|
|
57
|
-
export declare const inArray: typeof ormInArray;
|
|
58
|
-
export declare const notInArray: typeof ormNotInArray;
|
|
59
|
-
export declare const sql: typeof ormSql;
|
|
60
|
-
export declare const desc: typeof ormDesc;
|
|
61
|
-
export declare const asc: typeof ormAsc;
|
|
62
|
-
export declare const count: typeof ormCount;
|
|
63
|
-
export declare const profileKeys: typeof schema.profileKeys;
|
|
64
|
-
export declare const identityKeys: typeof schema.identityKeys;
|
|
65
|
-
export declare const recipientIdentities: typeof schema.recipientIdentities;
|
|
66
|
-
export declare const ecSignedPreKeys: typeof schema.ecSignedPreKeys;
|
|
67
|
-
export declare const ecOneTimePreKeys: typeof schema.ecOneTimePreKeys;
|
|
68
|
-
export declare const kyberPreKeys: typeof schema.kyberPreKeys;
|
|
69
|
-
export declare const kyberPreKeyUsed: typeof schema.kyberPreKeyUsed;
|
|
70
|
-
export declare const kyberOneTimePreKeys: typeof schema.kyberOneTimePreKeys;
|
|
71
|
-
export declare const sessions: typeof schema.sessions;
|
|
72
|
-
export declare const senderKeys: typeof schema.senderKeys;
|
|
73
|
-
export declare const skippedSenderKeys: typeof schema.skippedSenderKeys;
|
|
74
|
-
export declare const messageRecords: typeof schema.messageRecords;
|
|
75
|
-
export declare const groupMasterKeys: typeof schema.groupMasterKeys;
|
|
76
|
-
export declare const groupStateCache: typeof schema.groupStateCache;
|
|
77
|
-
export declare const authCredentialCache: typeof schema.authCredentialCache;
|
|
78
|
-
export declare const tables: {
|
|
79
|
-
readonly profileKeys: typeof schema.profileKeys;
|
|
80
|
-
readonly identityKeys: typeof schema.identityKeys;
|
|
81
|
-
readonly recipientIdentities: typeof schema.recipientIdentities;
|
|
82
|
-
readonly ecSignedPreKeys: typeof schema.ecSignedPreKeys;
|
|
83
|
-
readonly ecOneTimePreKeys: typeof schema.ecOneTimePreKeys;
|
|
84
|
-
readonly kyberPreKeys: typeof schema.kyberPreKeys;
|
|
85
|
-
readonly kyberPreKeyUsed: typeof schema.kyberPreKeyUsed;
|
|
86
|
-
readonly kyberOneTimePreKeys: typeof schema.kyberOneTimePreKeys;
|
|
87
|
-
readonly sessions: typeof schema.sessions;
|
|
88
|
-
readonly skippedSenderKeys: typeof schema.skippedSenderKeys;
|
|
89
|
-
readonly senderKeys: typeof schema.senderKeys;
|
|
90
|
-
readonly messageRecords: typeof schema.messageRecords;
|
|
91
|
-
readonly groupMasterKeys: typeof schema.groupMasterKeys;
|
|
92
|
-
readonly groupStateCache: typeof schema.groupStateCache;
|
|
93
|
-
readonly authCredentialCache: typeof schema.authCredentialCache;
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=db.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../../local/store/expo/db.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,IAAI,MAAM,EACb,GAAG,I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