@open-e2ee/signal-protocol-sdk 0.2.3 → 0.4.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 +11 -4
- package/ARCHITECTURE.md +19 -16
- package/CHANGELOG.md +72 -0
- package/COMMERCIAL.md +6 -6
- package/NOTICE +1 -1
- package/README.md +65 -93
- package/SECURITY.md +16 -13
- package/TROUBLESHOOTING.md +12 -5
- package/blocking/README.md +7 -5
- package/client/README.md +15 -5
- package/device/README.md +13 -8
- package/dist/blocking/types.d.ts +2 -2
- package/dist/blocking/types.js +2 -2
- package/dist/client/client.d.ts +46 -45
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +61 -60
- package/dist/client/client.js.map +1 -1
- package/dist/client/config.d.ts +32 -32
- package/dist/client/constants.d.ts +7 -6
- package/dist/client/constants.d.ts.map +1 -1
- package/dist/client/constants.js +5 -4
- package/dist/client/constants.js.map +1 -1
- package/dist/client/dual-store.d.ts +2 -2
- package/dist/client/dual-store.js +2 -2
- package/dist/client/endorsement-manager.d.ts +14 -14
- package/dist/client/endorsement-manager.d.ts.map +1 -1
- package/dist/client/endorsement-manager.js +15 -15
- package/dist/client/endorsement-manager.js.map +1 -1
- package/dist/client/event-hooks.d.ts +16 -16
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js +1 -1
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/files.js +4 -4
- package/dist/client/files.js.map +1 -1
- package/dist/client/groups.d.ts.map +1 -1
- package/dist/client/groups.js +14 -4
- package/dist/client/groups.js.map +1 -1
- package/dist/client/headless.d.ts +7 -7
- package/dist/client/headless.d.ts.map +1 -1
- package/dist/client/headless.js +4 -4
- package/dist/client/key-rotation-core.d.ts +19 -17
- package/dist/client/key-rotation-core.d.ts.map +1 -1
- package/dist/client/key-rotation-core.js +35 -31
- package/dist/client/key-rotation-core.js.map +1 -1
- package/dist/client/key-rotation.d.ts +8 -8
- package/dist/client/key-rotation.js +8 -8
- package/dist/client/media.d.ts +1 -1
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +13 -11
- package/dist/client/messages.js.map +1 -1
- package/dist/client/multi-device.d.ts +5 -4
- package/dist/client/multi-device.d.ts.map +1 -1
- package/dist/client/multi-device.js.map +1 -1
- package/dist/client/prekeys.d.ts +7 -7
- package/dist/client/prekeys.js +10 -10
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/relay-subscription.d.ts +3 -0
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +7 -4
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/retry-utils.d.ts +5 -6
- package/dist/client/retry-utils.d.ts.map +1 -1
- package/dist/client/retry-utils.js +5 -12
- package/dist/client/retry-utils.js.map +1 -1
- package/dist/client/retry.js +7 -7
- package/dist/client/retry.js.map +1 -1
- package/dist/client/sealed-sender-ops.d.ts +3 -3
- package/dist/client/sealed-sender-ops.js +5 -5
- package/dist/client/sealed-sender-ops.js.map +1 -1
- package/dist/client/sessions.d.ts +2 -2
- package/dist/client/sessions.js +2 -2
- package/dist/client/signal-service-cipher.d.ts +9 -9
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +41 -40
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/state.d.ts +1 -1
- package/dist/client/state.js +1 -1
- package/dist/client/types.d.ts +19 -19
- package/dist/client/types.d.ts.map +1 -1
- package/dist/device/connection.d.ts +1 -1
- package/dist/device/connection.js +2 -2
- package/dist/device/connection.js.map +1 -1
- package/dist/device/constants.d.ts +4 -4
- package/dist/device/constants.js +3 -3
- package/dist/device/device-id.d.ts +4 -4
- package/dist/device/device-id.js +4 -4
- package/dist/device/expo-metadata.d.ts +13 -11
- package/dist/device/expo-metadata.d.ts.map +1 -1
- package/dist/device/expo-metadata.js +13 -11
- package/dist/device/expo-metadata.js.map +1 -1
- package/dist/device/lifecycle/manager.d.ts +6 -6
- package/dist/device/lifecycle/manager.js +7 -7
- package/dist/device/lifecycle/types.d.ts +13 -13
- package/dist/device/lifecycle/types.d.ts.map +1 -1
- package/dist/device/lifecycle/utils.d.ts +2 -2
- package/dist/device/lifecycle/utils.js +5 -5
- package/dist/device/lifecycle/utils.js.map +1 -1
- package/dist/device/provisioning.d.ts +5 -4
- package/dist/device/provisioning.d.ts.map +1 -1
- package/dist/device/provisioning.js +5 -4
- package/dist/device/provisioning.js.map +1 -1
- package/dist/device/transfer.d.ts +2 -2
- package/dist/device/transfer.js +3 -3
- package/dist/device/transfer.js.map +1 -1
- package/dist/encoding/index.d.ts +3 -4
- package/dist/encoding/index.d.ts.map +1 -1
- package/dist/encoding/index.js.map +1 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/hooks/use-connection-presence.d.ts +1 -1
- package/dist/hooks/use-connection-presence.js +7 -7
- package/dist/hooks/use-connection-presence.js.map +1 -1
- package/dist/hooks/use-group-membership.d.ts +2 -2
- package/dist/hooks/use-group-membership.d.ts.map +1 -1
- package/dist/hooks/use-group-membership.js +6 -6
- package/dist/hooks/use-group-membership.js.map +1 -1
- package/dist/hooks/use-key-rotation.js +3 -3
- package/dist/hooks/use-key-rotation.js.map +1 -1
- package/dist/hooks/use-single-flight.d.ts +2 -2
- package/dist/hooks/use-single-flight.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/ec/ed25519.d.ts +6 -6
- package/dist/internal/crypto/ec/ed25519.js +6 -6
- package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
- package/dist/internal/crypto/ec/x25519-validation.js +4 -2
- package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
- package/dist/internal/crypto/index.d.ts +2 -0
- package/dist/internal/crypto/index.d.ts.map +1 -1
- package/dist/internal/crypto/index.js +2 -0
- package/dist/internal/crypto/index.js.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.d.ts +9 -8
- package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.js +11 -10
- package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
- package/dist/internal/crypto/key-prefix.d.ts +3 -3
- package/dist/internal/crypto/key-prefix.js +3 -3
- package/dist/internal/crypto/pq/kyber.d.ts +7 -7
- package/dist/internal/crypto/pq/kyber.js +10 -10
- package/dist/internal/crypto/pq/kyber.js.map +1 -1
- package/dist/internal/crypto/random.d.ts +1 -1
- package/dist/internal/crypto/random.js +1 -1
- package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
- package/dist/internal/crypto/symmetric/aes.js +4 -4
- package/dist/internal/crypto/symmetric/aes.js.map +1 -1
- package/dist/internal/crypto/symmetric/mac.d.ts +1 -1
- package/dist/internal/crypto/symmetric/mac.js +3 -3
- package/dist/internal/crypto/symmetric/padding.js +1 -1
- package/dist/internal/crypto/symmetric/padding.js.map +1 -1
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts +7 -1
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts.map +1 -1
- package/dist/internal/crypto/symmetric/streaming-aead.js +10 -4
- package/dist/internal/crypto/symmetric/streaming-aead.js.map +1 -1
- package/dist/internal/crypto/utils.d.ts +2 -2
- package/dist/internal/crypto/utils.d.ts.map +1 -1
- package/dist/internal/crypto/utils.js +16 -14
- package/dist/internal/crypto/utils.js.map +1 -1
- package/dist/internal/crypto/validation.d.ts +4 -4
- package/dist/internal/crypto/validation.js +2 -2
- package/dist/internal/encoding/proto/envelope.d.ts +1 -1
- package/dist/internal/encoding/proto/envelope.js +1 -1
- package/dist/internal/encoding/proto/index.d.ts +4 -4
- package/dist/internal/encoding/proto/index.js +4 -4
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +28 -16
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +30 -18
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.d.ts +45 -35
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +54 -43
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
- package/dist/internal/encoding/proto/sender-key-message.js +2 -2
- package/dist/internal/encoding/proto/signal-message.d.ts +13 -13
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/signal-message.js +13 -13
- package/dist/internal/encoding/proto/signal-message.js.map +1 -1
- package/dist/internal/groups/access-control.d.ts +5 -5
- package/dist/internal/groups/access-control.js +6 -6
- package/dist/internal/groups/access-control.js.map +1 -1
- package/dist/internal/groups/change-actions.d.ts +4 -4
- package/dist/internal/groups/change-actions.js +3 -3
- package/dist/internal/groups/encrypted-state.js +1 -1
- package/dist/internal/groups/encrypted-state.js.map +1 -1
- package/dist/internal/groups/group-id.d.ts +1 -1
- package/dist/internal/groups/manager.d.ts +24 -23
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +40 -36
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/groups/server-engine.d.ts +29 -21
- package/dist/internal/groups/server-engine.d.ts.map +1 -1
- package/dist/internal/groups/server-engine.js +55 -50
- package/dist/internal/groups/server-engine.js.map +1 -1
- package/dist/internal/groups/trust-root.d.ts +2 -2
- package/dist/internal/groups/trust-root.js +2 -2
- package/dist/internal/groups/types.d.ts +4 -4
- package/dist/internal/groups/types.d.ts.map +1 -1
- package/dist/internal/groups/wire.d.ts +6 -7
- package/dist/internal/groups/wire.d.ts.map +1 -1
- package/dist/internal/groups/wire.js +6 -7
- package/dist/internal/groups/wire.js.map +1 -1
- package/dist/internal/manager/manager.d.ts +14 -12
- package/dist/internal/manager/manager.d.ts.map +1 -1
- package/dist/internal/manager/manager.js +47 -41
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.d.ts +8 -6
- package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.js +10 -8
- package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/index.d.ts +2 -2
- package/dist/internal/protocol/double-ratchet/index.js +2 -2
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts +4 -4
- package/dist/internal/protocol/double-ratchet/ratchet.js +6 -6
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts +21 -18
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
- package/dist/internal/protocol/pqxdh/pqxdh.js +48 -42
- package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +5 -5
- package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.js +11 -8
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +2 -2
- package/dist/internal/protocol/sealed-sender/delivery-token.js +2 -2
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +2 -2
- package/dist/internal/protocol/sealed-sender/encryption.js +2 -2
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +25 -23
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +32 -30
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +10 -9
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.js +10 -9
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.d.ts +13 -14
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.js +7 -8
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.d.ts +1 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.js +2 -2
- package/dist/internal/protocol/sealed-sender/v2-binary.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +16 -14
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +37 -34
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/braid-serialize.d.ts +6 -6
- package/dist/internal/protocol/spqr/braid-serialize.js +5 -5
- package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/braid.d.ts +3 -3
- package/dist/internal/protocol/spqr/braid.js +7 -7
- package/dist/internal/protocol/spqr/braid.js.map +1 -1
- package/dist/internal/protocol/spqr/index.js +1 -1
- package/dist/internal/protocol/spqr/index.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts +4 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js +4 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +2 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +15 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +15 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +11 -11
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +6 -6
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +2 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
- package/dist/internal/protocol/spqr/serialize.d.ts +12 -12
- package/dist/internal/protocol/spqr/serialize.js +5 -5
- package/dist/internal/protocol/spqr/spqr.d.ts +6 -6
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.js +47 -42
- package/dist/internal/protocol/spqr/spqr.js.map +1 -1
- package/dist/internal/protocol/spqr/validate.d.ts +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +12 -12
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.js +11 -11
- package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
- package/dist/internal/protocol/username/hash.d.ts.map +1 -1
- package/dist/internal/protocol/username/hash.js +6 -4
- package/dist/internal/protocol/username/hash.js.map +1 -1
- package/dist/internal/protocol/version.d.ts +3 -3
- package/dist/internal/protocol/version.js +1 -1
- package/dist/internal/protocol/x3dh/x3dh.d.ts +16 -16
- package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
- package/dist/internal/protocol/x3dh/x3dh.js +15 -15
- package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/attributes.d.ts +7 -7
- package/dist/internal/protocol/zk/credentials/attributes.js +7 -7
- package/dist/internal/protocol/zk/credentials/credentials.d.ts +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.js +1 -1
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts +11 -11
- package/dist/internal/protocol/zk/credentials/endorsements.js +14 -14
- package/dist/internal/protocol/zk/credentials/issuance.d.ts +5 -1
- package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/issuance.js +5 -1
- package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.d.ts +16 -16
- package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.js +18 -18
- package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +22 -16
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.js +19 -14
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +4 -4
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +4 -4
- package/dist/internal/protocol/zk/groups/group-params.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/group-params.js +2 -2
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +10 -9
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js +9 -8
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
- package/dist/internal/protocol/zk/groups/lizard.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/lizard.js +4 -4
- package/dist/internal/protocol/zk/groups/lizard.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts +3 -3
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js +3 -3
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +11 -11
- package/dist/internal/protocol/zk/groups/profile-key-credential.js +7 -7
- package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-struct.js +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-version.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-version.js +2 -2
- package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/server-params.js +1 -1
- package/dist/internal/protocol/zk/groups/uid-encryption.d.ts +4 -4
- package/dist/internal/protocol/zk/groups/uid-encryption.js +4 -4
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/uid-struct.js +3 -3
- package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/args.d.ts +3 -3
- package/dist/internal/protocol/zk/proofs/args.js +3 -3
- package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts +3 -3
- package/dist/internal/protocol/zk/proofs/sho-sha256.js +3 -3
- package/dist/internal/protocol/zk/proofs/sho.d.ts +8 -7
- package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/sho.js +8 -7
- package/dist/internal/protocol/zk/proofs/sho.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.d.ts +8 -6
- package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.js +8 -6
- package/dist/internal/protocol/zk/proofs/statement.js.map +1 -1
- package/dist/internal/sesame/manager.d.ts +23 -19
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +64 -54
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/sesame/types.d.ts +28 -27
- package/dist/internal/sesame/types.d.ts.map +1 -1
- package/dist/internal/sesame/types.js +2 -4
- package/dist/internal/sesame/types.js.map +1 -1
- package/dist/internal/sesame/validation.d.ts +2 -2
- package/dist/internal/sesame/validation.js +3 -3
- package/dist/internal/sesame/validation.js.map +1 -1
- package/dist/internal/session/builder.d.ts +8 -8
- package/dist/internal/session/builder.js +22 -22
- package/dist/internal/session/builder.js.map +1 -1
- package/dist/internal/session/cipher.d.ts +3 -3
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +51 -40
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/internal/session/decryption.js +11 -9
- package/dist/internal/session/decryption.js.map +1 -1
- package/dist/internal/session/factory.js +1 -1
- package/dist/internal/session/factory.js.map +1 -1
- package/dist/internal/session/handshake.d.ts +4 -4
- package/dist/internal/session/handshake.js +4 -4
- package/dist/internal/session/keys.d.ts +3 -4
- package/dist/internal/session/keys.d.ts.map +1 -1
- package/dist/internal/session/keys.js.map +1 -1
- package/dist/internal/session/ratchet.d.ts +8 -8
- package/dist/internal/session/ratchet.js +10 -10
- package/dist/internal/session/ratchet.js.map +1 -1
- package/dist/internal/session/session-resolver.d.ts +6 -6
- package/dist/internal/session/session-resolver.js +6 -6
- package/dist/internal/session/state.d.ts +12 -12
- package/dist/internal/session/state.d.ts.map +1 -1
- package/dist/internal/session/state.js +7 -7
- package/dist/internal/session/types.d.ts +20 -20
- package/dist/internal/session/types.d.ts.map +1 -1
- package/dist/internal/session/types.js +3 -3
- package/dist/internal/session/validation.d.ts +1 -1
- package/dist/internal/session/validation.js +4 -4
- package/dist/internal/session/validation.js.map +1 -1
- package/dist/keys/branded.d.ts +12 -12
- package/dist/keys/branded.js +3 -3
- package/dist/keys/generation.d.ts +4 -4
- package/dist/keys/generation.js +4 -4
- package/dist/keys/identity.d.ts +7 -7
- package/dist/keys/identity.d.ts.map +1 -1
- package/dist/keys/identity.js +7 -7
- package/dist/keys/identity.js.map +1 -1
- package/dist/keys/types.d.ts +16 -16
- package/dist/keys/types.d.ts.map +1 -1
- package/dist/layers.d.ts +1 -1
- package/dist/layers.js +1 -1
- package/dist/local/store/expo/adapter.d.ts +8 -8
- package/dist/local/store/expo/adapter.js +10 -10
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/database-key.d.ts +7 -7
- package/dist/local/store/expo/database-key.js +7 -7
- package/dist/local/store/expo/key-storage.d.ts +1 -1
- package/dist/local/store/expo/key-storage.js +4 -4
- package/dist/local/store/expo/key-storage.js.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts +6 -6
- package/dist/local/store/expo/models/kyber-prekey-used.js +3 -3
- package/dist/local/store/expo/models/kyber-prekey.d.ts +1 -1
- package/dist/local/store/expo/models/kyber-prekey.js +1 -1
- package/dist/local/store/expo/models/message-record.d.ts +2 -2
- package/dist/local/store/expo/models/message-record.d.ts.map +1 -1
- package/dist/local/store/expo/models/message-record.js +1 -1
- package/dist/local/store/expo/models/message-record.js.map +1 -1
- package/dist/local/store/expo/models/sender-key.d.ts +11 -10
- package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
- package/dist/local/store/expo/models/sender-key.js +11 -10
- package/dist/local/store/expo/models/sender-key.js.map +1 -1
- package/dist/local/store/expo/schema.d.ts +2 -2
- package/dist/local/store/expo/schema.js +2 -2
- package/dist/local/store/expo/secure-store-options.d.ts +1 -1
- package/dist/local/store/memory/adapter.d.ts +2 -2
- package/dist/local/store/memory/adapter.js +12 -12
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +5 -4
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/database-key.d.ts +8 -8
- package/dist/local/store/node/database-key.js +10 -10
- package/dist/local/store/node/database-key.js.map +1 -1
- package/dist/local/store/node/database.d.ts +5 -5
- package/dist/local/store/node/database.js +11 -11
- package/dist/local/store/node/database.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +6 -6
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +35 -32
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/backend-conformance.d.ts +11 -10
- package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -1
- package/dist/local/store/react-native/backend-conformance.js +13 -12
- package/dist/local/store/react-native/backend-conformance.js.map +1 -1
- package/dist/local/store/react-native/index.d.ts +1 -1
- package/dist/local/store/react-native/reference-backend.d.ts +14 -13
- package/dist/local/store/react-native/reference-backend.d.ts.map +1 -1
- package/dist/local/store/react-native/reference-backend.js +15 -14
- package/dist/local/store/react-native/reference-backend.js.map +1 -1
- package/dist/local/store/react-native/storage.d.ts +3 -3
- package/dist/local/store/web/adapter.d.ts +3 -3
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +30 -31
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web/index.d.ts +1 -1
- package/dist/local/vault/index.d.ts +2 -2
- package/dist/media/index.d.ts +11 -12
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +9 -10
- package/dist/media/index.js.map +1 -1
- package/dist/profile/contact-state.d.ts +1 -1
- package/dist/profile/contact-state.js +1 -1
- package/dist/profile/profile-key.d.ts +2 -2
- package/dist/profile/profile-key.js +7 -6
- package/dist/profile/profile-key.js.map +1 -1
- package/dist/remote/object-store/index.d.ts +1 -1
- package/dist/remote/object-store/s3/storage.d.ts +1 -1
- package/dist/remote/object-store/types.d.ts +4 -4
- package/dist/remote/object-store/types.d.ts.map +1 -1
- package/dist/remote/relay/convex/backend.d.ts +6 -6
- package/dist/remote/relay/convex/backend.d.ts.map +1 -1
- package/dist/remote/relay/convex/backend.js +4 -4
- package/dist/remote/relay/convex/backend.js.map +1 -1
- package/dist/remote/relay/convex/component/_generated/component.d.ts +2 -2
- package/dist/remote/relay/convex/component/_generated/component.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/accounts.d.ts +15 -13
- package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/accounts.js +31 -28
- package/dist/remote/relay/convex/component/accounts.js.map +1 -1
- package/dist/remote/relay/convex/component/certificates.js +1 -1
- package/dist/remote/relay/convex/component/cleanup.js +7 -7
- package/dist/remote/relay/convex/component/cleanup.js.map +1 -1
- package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/convex.config.js +10 -8
- package/dist/remote/relay/convex/component/convex.config.js.map +1 -1
- package/dist/remote/relay/convex/component/devices.d.ts +21 -20
- package/dist/remote/relay/convex/component/devices.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/devices.js +24 -23
- package/dist/remote/relay/convex/component/devices.js.map +1 -1
- package/dist/remote/relay/convex/component/groups.js +6 -6
- package/dist/remote/relay/convex/component/groups.js.map +1 -1
- package/dist/remote/relay/convex/component/messages.d.ts +2 -2
- package/dist/remote/relay/convex/component/messages.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/messages.js +90 -83
- package/dist/remote/relay/convex/component/messages.js.map +1 -1
- package/dist/remote/relay/convex/component/provisioning.d.ts +3 -3
- package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/provisioning.js +17 -16
- package/dist/remote/relay/convex/component/provisioning.js.map +1 -1
- package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/runtime.js +4 -2
- package/dist/remote/relay/convex/component/runtime.js.map +1 -1
- package/dist/remote/relay/convex/component/schema.d.ts +2 -2
- package/dist/remote/relay/convex/component/schema.js +26 -25
- package/dist/remote/relay/convex/component/schema.js.map +1 -1
- package/dist/remote/relay/convex/group-server.d.ts +3 -3
- package/dist/remote/relay/convex/group-server.js +3 -3
- package/dist/remote/relay/convex/relay.d.ts +3 -3
- package/dist/remote/relay/convex/relay.d.ts.map +1 -1
- package/dist/remote/relay/convex/relay.js +18 -17
- package/dist/remote/relay/convex/relay.js.map +1 -1
- package/dist/remote/relay/convex/types.d.ts +7 -7
- package/dist/remote/relay/convex/types.js +4 -4
- package/dist/remote/relay/memory/adapter.js +9 -9
- package/dist/remote/relay/memory/adapter.js.map +1 -1
- package/dist/remote/relay/types.d.ts +27 -27
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/safety/fingerprint.d.ts +7 -6
- package/dist/safety/fingerprint.d.ts.map +1 -1
- package/dist/safety/fingerprint.js +5 -4
- package/dist/safety/fingerprint.js.map +1 -1
- package/dist/safety/index.d.ts +6 -5
- package/dist/safety/index.d.ts.map +1 -1
- package/dist/safety/index.js +7 -6
- package/dist/safety/index.js.map +1 -1
- package/dist/safety/protobuf.js +2 -2
- package/dist/safety/protobuf.js.map +1 -1
- package/dist/safety/url.d.ts +5 -5
- package/dist/safety/url.js +6 -6
- package/dist/types/address.d.ts +2 -2
- package/dist/types/address.js +2 -2
- package/dist/types/api.d.ts +78 -73
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +63 -403
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +62 -537
- package/dist/types/errors.js.map +1 -1
- package/dist/types/messages.d.ts +16 -16
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +7 -7
- package/dist/types/messages.js.map +1 -1
- package/dist/types/protocol-config.d.ts +52 -49
- package/dist/types/protocol-config.d.ts.map +1 -1
- package/dist/types/protocol-config.js +36 -34
- package/dist/types/protocol-config.js.map +1 -1
- package/dist/types/protocol-constants.d.ts +2 -2
- package/dist/types/protocol-constants.js +2 -2
- package/dist/types/session.d.ts +62 -61
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +13 -14
- package/dist/types/session.js.map +1 -1
- package/dist/types/trust.d.ts +8 -8
- package/dist/types/trust.js +3 -3
- package/dist/utils/retry.d.ts +2 -1
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +4 -5
- package/dist/utils/retry.js.map +1 -1
- package/docs/ASSURANCE.md +89 -75
- package/docs/CLIENT_COMPOSITION.md +22 -15
- package/docs/DEVIATIONS.md +507 -425
- package/docs/DOCUMENTATION_STANDARDS.md +52 -24
- package/docs/E2EE.md +45 -42
- package/docs/ERROR_HANDLING.md +107 -152
- package/docs/GETTING_STARTED.md +44 -26
- package/docs/INTERFACES.md +32 -18
- package/docs/PACKAGE_SURFACE.md +24 -21
- package/docs/PROTOCOL_POLICY.md +25 -13
- package/docs/RECIPES.md +13 -4
- package/docs/SECURITY.md +72 -60
- package/encoding/README.md +3 -2
- package/files/README.md +2 -1
- package/groups/README.md +5 -3
- package/hooks/README.md +2 -2
- package/keys/README.md +17 -14
- package/local/store/README.md +84 -67
- package/local/store/expo/README.md +19 -12
- package/local/store/memory/README.md +6 -3
- package/local/store/node/README.md +9 -6
- package/local/store/react-native/README.md +16 -12
- package/local/store/web/README.md +32 -26
- package/local/vault/README.md +5 -4
- package/media/README.md +8 -5
- package/package.json +4 -2
- package/profile/README.md +8 -7
- package/remote/README.md +26 -18
- package/remote/object-store/README.md +9 -4
- package/remote/object-store/convex-r2/README.md +5 -3
- package/remote/object-store/s3/README.md +11 -5
- package/remote/relay/README.md +2 -0
- package/remote/relay/convex/README.md +6 -5
- package/remote/relay/convex/component/README.md +154 -124
- package/remote/relay/memory/README.md +8 -5
- package/safety/README.md +2 -1
- package/sealed-sender/README.md +4 -2
- package/types/README.md +2 -1
- package/username/README.md +1 -0
- package/utils/README.md +5 -4
- package/zk/README.md +1 -0
package/local/store/README.md
CHANGED
|
@@ -30,7 +30,7 @@ without coupling the client to a database or platform.
|
|
|
30
30
|
|
|
31
31
|
Use this for browser applications. It implements the full core store
|
|
32
32
|
contract, including SESAME records, sender-key state, retry message records,
|
|
33
|
-
and recovery helpers
|
|
33
|
+
and recovery helpers. It graduated from experimental by completing every
|
|
34
34
|
gate on the checklist below. Deployment still requires the origin-security
|
|
35
35
|
review described in the [web adapter guide](./web/README.md).
|
|
36
36
|
|
|
@@ -40,8 +40,8 @@ review described in the [web adapter guide](./web/README.md).
|
|
|
40
40
|
|
|
41
41
|
Use this for bare React Native applications that supply their own key-value
|
|
42
42
|
backend. It implements the full core store contract, including SESAME records,
|
|
43
|
-
sender-key state, retry message records, and recovery helpers
|
|
44
|
-
|
|
43
|
+
sender-key state, retry message records, and recovery helpers. It graduated
|
|
44
|
+
from experimental by completing every gate on the checklist below.
|
|
45
45
|
The supplied backend is the application's responsibility: verify it with the
|
|
46
46
|
exported backend-conformance kit described in the
|
|
47
47
|
[React Native adapter guide](./react-native/README.md).
|
|
@@ -49,75 +49,88 @@ exported backend-conformance kit described in the
|
|
|
49
49
|
#### Graduation checklist
|
|
50
50
|
|
|
51
51
|
The experimental label comes off an adapter when every item below is a named,
|
|
52
|
-
continuously running CI gate. Each gate tests the adapter's own contract
|
|
53
|
-
the promises `ISignalProtocolLocalStore` makes
|
|
54
|
-
|
|
55
|
-
honor its promises in, not the subject of a test.
|
|
52
|
+
continuously running CI gate. Each gate tests the adapter's own contract,
|
|
53
|
+
which is the set of promises `ISignalProtocolLocalStore` makes. No gate tests
|
|
54
|
+
the platform under it. Browsers, IndexedDB, and React Native are the
|
|
55
|
+
environment an adapter must honor its promises in, not the subject of a test.
|
|
56
56
|
|
|
57
|
-
`IndexedDbSignalProtocolStore` (graduated
|
|
57
|
+
`IndexedDbSignalProtocolStore` (graduated, and the gates keep running):
|
|
58
58
|
|
|
59
59
|
- [x] Storage contract suites pass in real Chromium, Firefox, and WebKit on
|
|
60
60
|
every change to the source repository. The suites are the same modules
|
|
61
61
|
the jest gate runs, so a matcher means the same thing in both gates.
|
|
62
|
-
- [x] Interruption tests
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
- [x] Interruption tests. The gate destroys a real tab mid-write, then
|
|
63
|
+
reopens the store from a fresh tab. The interrupted writes are an
|
|
64
|
+
atomic session/trust commit, an identity rotation, a fresh-database
|
|
65
|
+
bootstrap, and a prekey batch. The reopened store is readable on the
|
|
66
|
+
next `initialize()`. The store shows each atomic security commit as
|
|
67
|
+
fully applied or fully absent, never partial. Runs in all three
|
|
68
|
+
engines on every change to the source repository.
|
|
69
|
+
- [x] Multi-tab tests. Concurrent revision-checked writes from two real
|
|
70
|
+
tabs, over two live IndexedDB connections, resolve per the contract's
|
|
71
|
+
compare-and-set promise. That promise gives one winner per create
|
|
72
|
+
race. It tells the losers instead of silently overwriting them. A
|
|
73
|
+
rejected commit leaves no partial state. Runs in all three engines on
|
|
74
|
+
every change to the source repository.
|
|
74
75
|
- [x] Storage-pressure tests: quota exhaustion surfaces as the typed
|
|
75
76
|
`StorageQuotaExceededError` (`STORAGE_QUOTA_EXCEEDED`), never a silent
|
|
76
77
|
partial write. A jest suite drives quota-shaped backend failures
|
|
77
|
-
through every write path in the adapter
|
|
78
|
-
|
|
78
|
+
through every write path in the adapter. A real Chromium run exhausts
|
|
79
|
+
a clamped origin quota. That run observes the typed rejection, no
|
|
79
80
|
partial state, and a clean retry once space frees. Runs on every
|
|
80
81
|
change to the source repository.
|
|
81
82
|
- [x] Soak evidence: a long-run open/write/close cycle holds memory and
|
|
82
83
|
latency flat. A soak runner drives 2,000 full
|
|
83
84
|
construct/initialize/write/read/close cycles through the adapter in
|
|
84
|
-
one real Chromium page
|
|
85
|
-
ArrayBuffer backing stores
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`ReactNativeSignalProtocolStore` (graduated
|
|
92
|
-
|
|
93
|
-
- [x] Exported backend-conformance kit
|
|
94
|
-
application-supplied `storage` backend
|
|
95
|
-
the application runs against its own backend.
|
|
96
|
-
and `assertBackendConformance
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
85
|
+
one real Chromium page. It samples renderer memory, including
|
|
86
|
+
ArrayBuffer backing stores, after forced garbage collection. It fails
|
|
87
|
+
if the late-run median of memory or per-cycle latency grows beyond a
|
|
88
|
+
small tolerance over the early-run median. Runs on every change to the
|
|
89
|
+
source repository, and `npm run soak:web-store` runs longer sessions
|
|
90
|
+
on demand.
|
|
91
|
+
|
|
92
|
+
`ReactNativeSignalProtocolStore` (graduated, and the gates keep running):
|
|
93
|
+
|
|
94
|
+
- [x] Exported backend-conformance kit. The SDK cannot test an
|
|
95
|
+
application-supplied `storage` backend. Instead it ships the contract
|
|
96
|
+
suite the application runs against its own backend. The kit exports
|
|
97
|
+
`runBackendConformance` and `assertBackendConformance`, which execute
|
|
98
|
+
thirteen cases against any `ReactNativeKeyValueStorage`:
|
|
99
|
+
|
|
100
|
+
- round-trips
|
|
101
|
+
- key listing
|
|
102
|
+
- batch removal
|
|
103
|
+
- in-order atomic application
|
|
104
|
+
- checks evaluated against pre-batch state
|
|
105
|
+
- null-guarded creation
|
|
106
|
+
- all-or-nothing failure
|
|
107
|
+
- exact-userId session removal with in-batch visibility
|
|
108
|
+
- one winner between concurrent guarded batches
|
|
109
|
+
- durability across reopen
|
|
110
|
+
|
|
111
|
+
A jest gate proves the kit catches a non-atomic backend, a
|
|
112
|
+
prefix-matching session removal, and an unserialized backend, on every
|
|
113
|
+
change to the source repository.
|
|
114
|
+
- [x] Reference backend passes that kit on Hermes in CI. The SDK ships
|
|
115
|
+
`createReferenceReactNativeBackend`, which specifies the backend
|
|
116
|
+
contract in executable form. A named gate bundles the kit with esbuild
|
|
117
|
+
and runs it against the reference backend. That gate uses the
|
|
118
|
+
sha256-pinned Hermes CLI, the engine React Native ships with. It runs
|
|
119
|
+
on every change to the source repository. The runner requires an
|
|
120
|
+
explicit pass sentinel because Hermes exits 0 on an unhandled async
|
|
121
|
+
rejection.
|
|
122
|
+
- [x] Interruption tests against the reference backend. A simulated process
|
|
123
|
+
kill before commit leaves each atomic security write fully absent
|
|
124
|
+
after reopen. Those writes are a session/trust commit, an identity
|
|
125
|
+
rotation, and a trust verification. An identical retry then lands the
|
|
126
|
+
write fully applied. Runs on every change to the source repository.
|
|
127
|
+
- [x] Storage-pressure tests against the reference backend. Quota
|
|
128
|
+
exhaustion surfaces as the typed `StorageQuotaExceededError`
|
|
129
|
+
(`STORAGE_QUOTA_EXCEEDED`), never a silent partial write. A jest suite
|
|
130
|
+
drives quota-shaped backend failures through every write path. A
|
|
131
|
+
real-quota run observes the typed rejection, no partial state, and a
|
|
132
|
+
clean retry once space frees. Runs on every change to the source
|
|
133
|
+
repository.
|
|
121
134
|
|
|
122
135
|
### Node
|
|
123
136
|
|
|
@@ -129,6 +142,7 @@ state, retry message records, and recovery helpers.
|
|
|
129
142
|
|
|
130
143
|
## Composition
|
|
131
144
|
|
|
145
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
132
146
|
```ts
|
|
133
147
|
import { SignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
134
148
|
import { ExpoSignalProtocolStore } from '@open-e2ee/signal-protocol-sdk/local/store/expo';
|
|
@@ -156,6 +170,7 @@ An `ISignalProtocolLocalStore` implementation must preserve:
|
|
|
156
170
|
|
|
157
171
|
The current persisted session record shape is version `4`:
|
|
158
172
|
|
|
173
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
159
174
|
```ts
|
|
160
175
|
interface SessionRecord {
|
|
161
176
|
currentSession: SessionState | null;
|
|
@@ -165,16 +180,17 @@ interface SessionRecord {
|
|
|
165
180
|
}
|
|
166
181
|
```
|
|
167
182
|
|
|
168
|
-
|
|
183
|
+
The SDK rejects and resets older session formats instead of migrating them.
|
|
184
|
+
Version 4
|
|
169
185
|
binds both endpoint composite identities and their explicit identity types into
|
|
170
186
|
every live session.
|
|
171
187
|
|
|
172
188
|
## Atomic Security Commits
|
|
173
189
|
|
|
174
|
-
Contact trust and session creation/advancement share one atomic commit seam
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
190
|
+
Contact trust and session creation/advancement share one atomic commit seam.
|
|
191
|
+
Responder one-time-prekey consumption joins that same transaction. Separately,
|
|
192
|
+
one logical transaction accepts an identity rotation and deletes every bound
|
|
193
|
+
device session. An adapter must never publish only a subset of either
|
|
178
194
|
security transition. The shared adapter contract verifies
|
|
179
195
|
failure rollback, compare-and-swap behavior, one-time-prekey replay rejection,
|
|
180
196
|
and exact per-user session deletion.
|
|
@@ -183,8 +199,9 @@ For React Native, the supplied backend's `atomicWrite` is a security boundary,
|
|
|
183
199
|
not a batching optimization. It must commit `check`, `set`, `remove`, and
|
|
184
200
|
`removeSessionsForUser` operations in one crash-durable transaction. The final
|
|
185
201
|
operation must enumerate exact plaintext session metadata inside that same
|
|
186
|
-
transaction
|
|
187
|
-
can leave a concurrently-created session trusted under a rotated
|
|
202
|
+
transaction. An adapter that matches a prefix or enumerates before the
|
|
203
|
+
transaction can leave a concurrently-created session trusted under a rotated
|
|
204
|
+
identity.
|
|
188
205
|
|
|
189
206
|
## Design Notes
|
|
190
207
|
|
|
@@ -194,7 +211,7 @@ can leave a concurrently-created session trusted under a rotated identity.
|
|
|
194
211
|
integration helpers that a real app composes directly.
|
|
195
212
|
- An adapter carries the experimental label until every item on its
|
|
196
213
|
graduation checklist is a named, continuously running CI gate. Both the web
|
|
197
|
-
and bare React Native adapters
|
|
214
|
+
and bare React Native adapters completed theirs.
|
|
198
215
|
- Storage adapters should expose the real package contract instead of app-specific wrappers.
|
|
199
216
|
|
|
200
217
|
## Related Docs
|
|
@@ -6,8 +6,8 @@ the local secret-vault boundary.
|
|
|
6
6
|
|
|
7
7
|
## Why it exists
|
|
8
8
|
|
|
9
|
-
Signal Protocol state is larger and more transactional than
|
|
10
|
-
|
|
9
|
+
Signal Protocol state is larger and more transactional than the values
|
|
10
|
+
platform keychains hold. The adapter keeps a small database key in secure storage
|
|
11
11
|
and stores protocol records in the application's encrypted SQLite database.
|
|
12
12
|
The host owns database creation so it can compose these tables into its own
|
|
13
13
|
schema and transaction lifecycle.
|
|
@@ -18,6 +18,7 @@ Compose the exported table definitions into the application schema, configure
|
|
|
18
18
|
the database bindings once during bootstrap, and apply the database key before
|
|
19
19
|
the first query:
|
|
20
20
|
|
|
21
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
21
22
|
```ts
|
|
22
23
|
import {
|
|
23
24
|
configureSignalProtocolExpoDbBindings,
|
|
@@ -44,22 +45,28 @@ configureSignalProtocolExpoDbBindings({
|
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
`appDatabase.openEncryptedSignalProtocolDatabase` represents application-owned database
|
|
47
|
-
bootstrap. It must
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
bootstrap. It must:
|
|
49
|
+
|
|
50
|
+
- enable SQLCipher through the `expo-sqlite` native configuration
|
|
51
|
+
- apply the supplied key before schema access
|
|
52
|
+
- create or migrate the exported tables
|
|
53
|
+
- return the matching raw and Drizzle handles
|
|
54
|
+
|
|
55
|
+
SQLCipher requires a development build and is not available in Expo Go.
|
|
51
56
|
|
|
52
57
|
Every table this store exports holds material that must not leave the device.
|
|
53
|
-
That includes the group `sender_keys` and `skipped_sender_keys` tables
|
|
58
|
+
That includes the group `sender_keys` and `skipped_sender_keys` tables. Their
|
|
54
59
|
rows contain the sender chain key, the sender's private signature key, and
|
|
55
|
-
individual message keys
|
|
56
|
-
messages.
|
|
57
|
-
encrypts the database file itself
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
individual message keys. That material is enough to read and to forge a
|
|
61
|
+
sender's group messages. The store writes those rows unencrypted at the row
|
|
62
|
+
level, because SQLCipher encrypts the database file itself. The database key is
|
|
63
|
+
therefore the only thing that protects them.
|
|
64
|
+
|
|
65
|
+
Do not back these tables up to a server or sync them between devices.
|
|
60
66
|
|
|
61
67
|
## Client usage
|
|
62
68
|
|
|
69
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
63
70
|
```ts
|
|
64
71
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
65
72
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
`InMemorySignalProtocolStore` implements `ISignalProtocolLocalStore` in memory for examples, local
|
|
4
4
|
development, and deterministic application prototypes.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The protocol and cryptography are real. The adapter simulates the
|
|
7
|
+
infrastructure in memory.
|
|
7
8
|
|
|
8
9
|
## Why it exists
|
|
9
10
|
|
|
@@ -13,6 +14,7 @@ security or persistence boundary.
|
|
|
13
14
|
|
|
14
15
|
## Usage
|
|
15
16
|
|
|
17
|
+
<!-- doc-snippet:run memory-store-client expect="" -->
|
|
16
18
|
```ts
|
|
17
19
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
18
20
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
@@ -24,14 +26,15 @@ const client = await createSignalProtocolClient({
|
|
|
24
26
|
});
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
All keys, sessions, and trust decisions disappear when the process or
|
|
28
|
-
|
|
29
|
+
All keys, sessions, and trust decisions disappear when the process ends or the
|
|
30
|
+
application discards the adapter. Never use this adapter for production accounts.
|
|
29
31
|
|
|
30
32
|
## Deterministic storage failures
|
|
31
33
|
|
|
32
34
|
Failure mode is opt-in. A seed and cadence replay the same failing writes, or
|
|
33
35
|
you can target the next named store operation:
|
|
34
36
|
|
|
37
|
+
<!-- doc-snippet:run memory-store-failure-injection expect="" -->
|
|
35
38
|
```ts
|
|
36
39
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
37
40
|
import {
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
`NodeSignalProtocolStore` provides Node.js protocol storage using encrypted,
|
|
4
4
|
crash-durable filesystem state.
|
|
5
5
|
|
|
6
|
-
It implements all of `ISignalProtocolLocalStore
|
|
7
|
-
Kyber prekeys, Sesame device records, sender keys, and
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
It implements all of `ISignalProtocolLocalStore`. That covers identity,
|
|
7
|
+
prekeys, sessions, Kyber prekeys, Sesame device records, sender keys, and
|
|
8
|
+
message records. Multi-device and group flows therefore work in Node without a
|
|
9
|
+
custom adapter.
|
|
10
|
+
|
|
11
|
+
The class declares `implements ISignalProtocolLocalStore`, so the compiler
|
|
12
|
+
rejects any build that omits a member or changes its signature. That check is
|
|
13
|
+
the guarantee behind this paragraph, not a manual audit.
|
|
12
14
|
|
|
13
15
|
## Why it exists
|
|
14
16
|
|
|
@@ -18,6 +20,7 @@ boundary while allowing each deployment to choose an explicit data directory.
|
|
|
18
20
|
|
|
19
21
|
## Usage
|
|
20
22
|
|
|
23
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
21
24
|
```ts
|
|
22
25
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
23
26
|
import { nodeStore } from "@open-e2ee/signal-protocol-sdk/local/store/node";
|
|
@@ -11,6 +11,7 @@ needed for trust, session, and one-time-prekey transitions.
|
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
14
15
|
```ts
|
|
15
16
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
16
17
|
import {
|
|
@@ -30,16 +31,17 @@ const client = await createSignalProtocolClient({
|
|
|
30
31
|
The injected backend's `atomicWrite()` is a security boundary. It must evaluate
|
|
31
32
|
compare-and-swap checks and commit all writes, removals, and exact per-user
|
|
32
33
|
session deletion atomically and durably, including across process termination.
|
|
33
|
-
|
|
34
|
+
Independent writes committed one after another are not sufficient.
|
|
34
35
|
|
|
35
36
|
## Verifying your backend
|
|
36
37
|
|
|
37
38
|
The adapter's guarantees hold only over a backend that honors the
|
|
38
39
|
`ReactNativeKeyValueStorage` contract, and the SDK cannot test the backend
|
|
39
40
|
your application supplies. The package therefore exports a
|
|
40
|
-
backend-conformance kit
|
|
41
|
-
|
|
41
|
+
backend-conformance kit. Run it against your backend from your application's
|
|
42
|
+
own tests:
|
|
42
43
|
|
|
44
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
43
45
|
```ts
|
|
44
46
|
import {
|
|
45
47
|
assertBackendConformance,
|
|
@@ -54,17 +56,19 @@ await assertBackendConformance({
|
|
|
54
56
|
});
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
`assertBackendConformance` throws one error
|
|
58
|
-
`runBackendConformance` returns the structured
|
|
59
|
-
|
|
60
|
-
contract
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
The function `assertBackendConformance` throws one error that names every
|
|
60
|
+
failing case. The function `runBackendConformance` returns the structured
|
|
61
|
+
result instead. The SDK also ships `createReferenceReactNativeBackend`, which
|
|
62
|
+
specifies the contract in executable form. It is an in-memory backend that
|
|
63
|
+
passes the kit, and it is useful as a comparison point and as a test double.
|
|
64
|
+
|
|
65
|
+
Continuous integration runs the kit against the reference backend on the Hermes
|
|
66
|
+
engine. It also drives the adapter over that backend through interruption and
|
|
67
|
+
storage-pressure suites. The parent [storage guide](../README.md) holds the
|
|
68
|
+
checklist that graduated this adapter.
|
|
65
69
|
|
|
66
70
|
Key custody, crash durability, and backup behavior remain properties of your
|
|
67
|
-
chosen native storage engine
|
|
71
|
+
chosen native storage engine. The kit verifies contract semantics, and your
|
|
68
72
|
deployment review must still cover the engine itself.
|
|
69
73
|
|
|
70
74
|
See the parent [storage guide](../README.md), [adapter guide](../../../ADAPTERS.md),
|
|
@@ -11,6 +11,7 @@ the browser-origin threat model explicit.
|
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
14
15
|
```ts
|
|
15
16
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
16
17
|
import { indexedDbStore } from "@open-e2ee/signal-protocol-sdk/local/store/web";
|
|
@@ -24,8 +25,8 @@ const client = await createSignalProtocolClient({
|
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
The adapter persists identity keys, contact trust, prekeys, sessions, sender
|
|
27
|
-
keys, device records, and retry metadata.
|
|
28
|
-
AES-256-GCM.
|
|
28
|
+
keys, device records, and retry metadata. The adapter encrypts every record
|
|
29
|
+
with AES-256-GCM.
|
|
29
30
|
|
|
30
31
|
## Security boundary
|
|
31
32
|
|
|
@@ -41,12 +42,12 @@ therefore not an XSS defense.
|
|
|
41
42
|
|
|
42
43
|
Browser applications using this adapter should:
|
|
43
44
|
|
|
44
|
-
- enforce a restrictive Content Security Policy with response headers
|
|
45
|
-
- avoid inline/evaluated scripts and minimize third-party script execution
|
|
45
|
+
- enforce a restrictive Content Security Policy with response headers.
|
|
46
|
+
- avoid inline/evaluated scripts and minimize third-party script execution.
|
|
46
47
|
- protect authentication with secure, HttpOnly cookies where the application
|
|
47
|
-
architecture permits
|
|
48
|
-
- render untrusted content through framework escaping
|
|
49
|
-
- review dependency and service-worker update paths
|
|
48
|
+
architecture permits.
|
|
49
|
+
- render untrusted content through framework escaping.
|
|
50
|
+
- review dependency and service-worker update paths.
|
|
50
51
|
- provide an account-reset path that deletes the IndexedDB database and other
|
|
51
52
|
same-origin state.
|
|
52
53
|
|
|
@@ -66,27 +67,32 @@ above.
|
|
|
66
67
|
When a write exhausts the origin's storage quota, it rejects with the typed
|
|
67
68
|
`StorageQuotaExceededError` (code `STORAGE_QUOTA_EXCEEDED`). Every write
|
|
68
69
|
commits in one atomic transaction, so the error always means the write did
|
|
69
|
-
not persist
|
|
70
|
-
request more from the platform, then retry.
|
|
70
|
+
not persist. It never means a partial record. The application should free
|
|
71
|
+
space or request more from the platform, then retry.
|
|
71
72
|
|
|
72
73
|
The storage contract suites run against this adapter in real Chromium,
|
|
73
|
-
Firefox, and WebKit on every change to the source repository.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
the
|
|
74
|
+
Firefox, and WebKit on every change to the source repository. Three more
|
|
75
|
+
suites run beside them.
|
|
76
|
+
|
|
77
|
+
- A multi-tab suite drives concurrent revision-checked writes through two
|
|
78
|
+
live connections on one origin. That is the state a deployed application
|
|
79
|
+
enters when a user opens a second tab.
|
|
80
|
+
- An interruption suite destroys a tab while a write is in flight. It then
|
|
81
|
+
asserts that the reopened store is readable, and that every atomic
|
|
82
|
+
security commit landed all-or-nothing.
|
|
83
|
+
- A storage-pressure suite clamps the origin's quota in Chromium and
|
|
84
|
+
exhausts it. It asserts the typed rejection, intact prior state, and a
|
|
85
|
+
clean retry once space frees. Beside it, a jest suite drives quota-shaped
|
|
86
|
+
backend failures through every write path in the adapter.
|
|
87
|
+
|
|
88
|
+
A soak runner drives thousands of full open/write/read/close cycles through
|
|
89
|
+
the adapter in one Chromium page. It fails if per-cycle latency drifts
|
|
90
|
+
upward across the run. It also fails if memory drifts upward, including
|
|
91
|
+
ArrayBuffer backing stores, sampled after forced garbage collection.
|
|
92
|
+
|
|
93
|
+
The contract suites are the same modules the jest gate runs. Every assertion
|
|
94
|
+
targets this adapter's contract. The engines are the environment the adapter
|
|
95
|
+
must honor its promises in, not the subject of the tests.
|
|
90
96
|
|
|
91
97
|
See the parent [storage guide](../README.md), [adapter guide](../../../ADAPTERS.md),
|
|
92
98
|
and [security model](../../../docs/SECURITY.md).
|
package/local/vault/README.md
CHANGED
|
@@ -6,13 +6,14 @@ The local secret vault stores small bootstrap secrets through a minimal
|
|
|
6
6
|
## Why it exists
|
|
7
7
|
|
|
8
8
|
Platform secret managers are appropriate for tiny keys and bootstrap values,
|
|
9
|
-
but not full session databases.
|
|
10
|
-
`ISignalProtocolLocalStore` keeps platform limits explicit
|
|
11
|
-
vault-held wrapping key without placing every protocol record in the
|
|
12
|
-
keychain.
|
|
9
|
+
but not full session databases. A vault separate from
|
|
10
|
+
`ISignalProtocolLocalStore` keeps platform limits explicit. A local store can
|
|
11
|
+
then use a vault-held wrapping key without placing every protocol record in the
|
|
12
|
+
platform keychain.
|
|
13
13
|
|
|
14
14
|
## Expo usage
|
|
15
15
|
|
|
16
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
16
17
|
```ts
|
|
17
18
|
import { ExpoSecureStoreSignalProtocolSecretVault } from "@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store";
|
|
18
19
|
|
package/media/README.md
CHANGED
|
@@ -6,17 +6,19 @@ cleanup.
|
|
|
6
6
|
|
|
7
7
|
## Why it exists
|
|
8
8
|
|
|
9
|
-
Signal Protocol messages
|
|
10
|
-
|
|
9
|
+
Signal Protocol messages suit small encrypted payloads, not large binary
|
|
10
|
+
objects. Media therefore uses two encryption layers:
|
|
11
11
|
|
|
12
|
-
1. file bytes
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
1. the SDK encrypts file bytes locally, and only ciphertext enters the remote
|
|
13
|
+
object store.
|
|
14
|
+
2. the end-to-end encrypted message carries the key, digest, sizes, and opaque
|
|
15
|
+
object identifier.
|
|
15
16
|
|
|
16
17
|
The remote object store never receives the media key or plaintext.
|
|
17
18
|
|
|
18
19
|
## Upload and send
|
|
19
20
|
|
|
21
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
20
22
|
```ts
|
|
21
23
|
import {
|
|
22
24
|
createMediaAttachmentMessage,
|
|
@@ -42,6 +44,7 @@ await signal.send(
|
|
|
42
44
|
|
|
43
45
|
## Receive and open
|
|
44
46
|
|
|
47
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
45
48
|
```ts
|
|
46
49
|
import {
|
|
47
50
|
parseMediaAttachmentMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-e2ee/signal-protocol-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Signal Protocol E2EE SDK for TypeScript — Expo, React Native, browser, and Node. Post-quantum PQXDH and Double Ratchet.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"open-e2ee",
|
|
@@ -353,7 +353,8 @@
|
|
|
353
353
|
"build:fix-esm": "node ./scripts/fix-esm-specifiers.mjs ./dist",
|
|
354
354
|
"clean": "rm -rf dist",
|
|
355
355
|
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
356
|
-
"docs:api": "npx -y -p typedoc@0.28 -p typedoc-plugin-markdown@4 -p typescript@5.8 typedoc && node ./scripts/normalize-api-doc-paths.mjs",
|
|
356
|
+
"docs:api": "npx -y -p typedoc@0.28.20 -p typedoc-plugin-markdown@4.12.0 -p typescript@5.8.3 typedoc && node ./scripts/normalize-api-doc-paths.mjs",
|
|
357
|
+
"docs:api:check": "npm run docs:api && git diff --exit-code -- docs/api && test -z \"$(git ls-files --others --exclude-standard docs/api)\"",
|
|
357
358
|
"prepare": "npm run build",
|
|
358
359
|
"prepublishOnly": "npm run build"
|
|
359
360
|
},
|
|
@@ -435,6 +436,7 @@
|
|
|
435
436
|
"devDependencies": {
|
|
436
437
|
"@convex-dev/r2": "^0.10.2",
|
|
437
438
|
"@convex-dev/rate-limiter": "^0.3.2",
|
|
439
|
+
"@swc/core": "^1.15.43",
|
|
438
440
|
"@types/async-lock": "^1.4.0",
|
|
439
441
|
"@types/node": "^22.0.0",
|
|
440
442
|
"@types/react": "^19.0.0",
|
package/profile/README.md
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
# Encrypted Profiles
|
|
2
2
|
|
|
3
|
-
The profile module generates profile keys, encrypts padded profile fields,
|
|
4
|
-
stores the current user's profile key
|
|
5
|
-
and coordinates encrypted profile updates.
|
|
3
|
+
The profile module generates profile keys, encrypts padded profile fields, and
|
|
4
|
+
stores the current user's profile key. It also tracks received contact profile
|
|
5
|
+
state and coordinates encrypted profile updates.
|
|
6
6
|
|
|
7
7
|
## Why it exists
|
|
8
8
|
|
|
9
9
|
Profile data is application content with its own key lifecycle. Profile keys
|
|
10
|
-
travel only through end-to-end encrypted messages
|
|
10
|
+
travel only through end-to-end encrypted messages. The profile service stores
|
|
11
11
|
encrypted fields and does not receive those keys.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
15
16
|
```ts
|
|
16
17
|
import {
|
|
17
18
|
decryptProfileName,
|
|
@@ -28,13 +29,13 @@ const { name } = await decryptProfileName(profileKey, encryptedName);
|
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
Use `updateEncryptedProfile()` to stage and upload an encrypted profile through
|
|
31
|
-
an application-owned API. Profile-key rotation is a coordinated operation
|
|
32
|
-
|
|
32
|
+
an application-owned API. Profile-key rotation is a coordinated operation.
|
|
33
|
+
Persist the new encrypted snapshot, distribute the new key through encrypted
|
|
33
34
|
messages, and retain enough local state to recover from interruption.
|
|
34
35
|
|
|
35
36
|
`appProfileKeyStorage` implements `ProfileKeyStorage` with `getItem`,
|
|
36
37
|
`setItem`, and `deleteItem`. Configure it before the first profile-key call.
|
|
37
|
-
The built-in React Native path uses Expo SecureStore
|
|
38
|
+
The built-in React Native path uses Expo SecureStore. The browser fallback is
|
|
38
39
|
JavaScript-accessible localStorage. Node and server-side runtimes must provide a
|
|
39
40
|
persistent implementation if profile keys need to survive process restarts.
|
|
40
41
|
Storage confidentiality, backup, migration, and account-reset behavior remain
|