@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/ADAPTERS.md
CHANGED
|
@@ -41,7 +41,7 @@ Use:
|
|
|
41
41
|
- `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
42
42
|
- or a custom implementation
|
|
43
43
|
|
|
44
|
-
### Remote object
|
|
44
|
+
### Remote object store: `SignalProtocolRemoteObjectStore`
|
|
45
45
|
|
|
46
46
|
Optional encrypted file upload/download support for two-layer attachment encryption.
|
|
47
47
|
|
|
@@ -54,10 +54,10 @@ Use:
|
|
|
54
54
|
- or a custom implementation
|
|
55
55
|
|
|
56
56
|
Both concrete adapters call an authenticated application-backend broker. The
|
|
57
|
-
app runtime receives only narrowly scoped, short-lived operations
|
|
57
|
+
app runtime receives only narrowly scoped, short-lived operations. Provider
|
|
58
58
|
credentials remain on the backend.
|
|
59
59
|
|
|
60
|
-
Upload requests carry a retry/idempotency `requestId
|
|
60
|
+
Upload requests carry a retry/idempotency `requestId`. The backend returns the
|
|
61
61
|
canonical `objectId` used in encrypted attachment pointers. Provider keys stay
|
|
62
62
|
private to the backend. The Convex server helper can supply generic validators,
|
|
63
63
|
R2 calls, expiry parsing, and metadata verification, while app-owned internal
|
|
@@ -67,7 +67,9 @@ functions retain authentication, authorization, and persistence.
|
|
|
67
67
|
|
|
68
68
|
### Minimal local client
|
|
69
69
|
|
|
70
|
+
<!-- doc-snippet:run adapters-local-client expect="" -->
|
|
70
71
|
```ts
|
|
72
|
+
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
71
73
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
72
74
|
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
73
75
|
|
|
@@ -79,6 +81,7 @@ const signal = await createSignalProtocolClient({
|
|
|
79
81
|
|
|
80
82
|
### Production client
|
|
81
83
|
|
|
84
|
+
<!-- doc-snippet:skip requires-production-adapters -->
|
|
82
85
|
```ts
|
|
83
86
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
84
87
|
import {
|
|
@@ -110,7 +113,9 @@ database and SQLCipher bootstrap.
|
|
|
110
113
|
|
|
111
114
|
### Local development with a shared relay
|
|
112
115
|
|
|
116
|
+
<!-- doc-snippet:run adapters-shared-relay expect="" -->
|
|
113
117
|
```ts
|
|
118
|
+
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
114
119
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
115
120
|
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
116
121
|
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
@@ -142,7 +147,7 @@ const bob = await createSignalProtocolClient({
|
|
|
142
147
|
- Protect local key material at rest.
|
|
143
148
|
- Keep contact identity trust decisions stable and explicit.
|
|
144
149
|
- Persist linked-device identity state atomically enough that startup verification cannot enter a half-linked state.
|
|
145
|
-
- Preserve session record semantics
|
|
150
|
+
- Preserve session record semantics. Do not treat sessions as opaque blobs without honoring update and archive behavior.
|
|
146
151
|
|
|
147
152
|
## Choosing a Shape
|
|
148
153
|
|
|
@@ -160,6 +165,7 @@ Prefer these composition patterns:
|
|
|
160
165
|
|
|
161
166
|
Use the public interfaces:
|
|
162
167
|
|
|
168
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
163
169
|
```ts
|
|
164
170
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
165
171
|
import type { ISignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay";
|
|
@@ -169,6 +175,7 @@ import type { ISignalProtocolLocalStore } from "@open-e2ee/signal-protocol-sdk/l
|
|
|
169
175
|
|
|
170
176
|
Then compose them through `createSignalProtocolClient()`:
|
|
171
177
|
|
|
178
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
172
179
|
```ts
|
|
173
180
|
const signal = await createSignalProtocolClient({
|
|
174
181
|
identity: { userId },
|
package/ARCHITECTURE.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
versioned profile based on selected public Signal Protocol specifications. It
|
|
7
7
|
owns client-side encryption, local protocol state, prekey lifecycle,
|
|
8
8
|
multi-device session orchestration, group sender keys, sealed sender,
|
|
9
|
-
profile/username helpers, and explicit local/remote adapter seams.
|
|
10
|
-
|
|
9
|
+
profile/username helpers, and explicit local/remote adapter seams.
|
|
10
|
+
|
|
11
|
+
For public security guarantees and protocol policy, see
|
|
11
12
|
[Security](./docs/SECURITY.md) and
|
|
12
13
|
[Protocol Policy](./docs/PROTOCOL_POLICY.md).
|
|
13
14
|
|
|
@@ -22,9 +23,9 @@ compatibility shim when a boundary is wrong.
|
|
|
22
23
|
|
|
23
24
|
- Crypto and protocol internals must be auditable from current code, not historical layout names.
|
|
24
25
|
- Public APIs should be narrow and explicit. Platform and backend adapters live on subpaths.
|
|
25
|
-
- Runtime dependencies point inward toward lower protocol layers.
|
|
26
|
+
- Runtime dependencies point inward toward lower protocol layers. The rule allows type-only imports where they describe ports or public contracts.
|
|
26
27
|
- Shared protocol strategy, reference-aligned limits, and HKDF info strings belong in `types/protocol-config.ts`, not in the client layer.
|
|
27
|
-
- Session record resolution belongs to `internal/session/session-resolver.ts
|
|
28
|
+
- Session record resolution belongs to `internal/session/session-resolver.ts`. SESAME orchestrates it but does not own the shared active/archive helper.
|
|
28
29
|
|
|
29
30
|
## Package Shape
|
|
30
31
|
|
|
@@ -55,6 +56,7 @@ modify the code.
|
|
|
55
56
|
|
|
56
57
|
The root package is core-only:
|
|
57
58
|
|
|
59
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
58
60
|
```ts
|
|
59
61
|
import {
|
|
60
62
|
SignalProtocolClient,
|
|
@@ -96,7 +98,7 @@ The executable layer map lives in [layers.ts](./layers.ts).
|
|
|
96
98
|
| 5 | Domain/Keys | `keys/` | Key types and generation |
|
|
97
99
|
| 6 | Domain/Crypto | `internal/crypto/` | Cryptographic primitives and low-level KDF/encryption helpers |
|
|
98
100
|
|
|
99
|
-
Runtime imports must point inward, toward equal or higher layer numbers. For example, Layer 3 may import Layer 4, 5, or 6
|
|
101
|
+
Runtime imports must point inward, toward equal or higher layer numbers. For example, Layer 3 may import Layer 4, 5, or 6. Layer 4 must not import Layer 3.
|
|
100
102
|
|
|
101
103
|
Shared non-layer modules:
|
|
102
104
|
|
|
@@ -151,6 +153,7 @@ This boundary prevents lower protocol/session layers from depending on the clien
|
|
|
151
153
|
|
|
152
154
|
Application code should prefer:
|
|
153
155
|
|
|
156
|
+
<!-- doc-snippet:skip requires-external-context -->
|
|
154
157
|
```ts
|
|
155
158
|
await createSignalProtocolClient({
|
|
156
159
|
identity: { userId },
|
|
@@ -159,22 +162,22 @@ await createSignalProtocolClient({
|
|
|
159
162
|
```
|
|
160
163
|
|
|
161
164
|
Strict post-quantum sessions and ML-KEM Braid are the defaults, so application
|
|
162
|
-
code should leave `protocol` unset unless the product
|
|
165
|
+
code should leave `protocol` unset unless the product made an explicit
|
|
163
166
|
compatibility decision. Advanced strategy fields remain available for
|
|
164
|
-
diagnostics, telemetry, and algorithm tuning
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
diagnostics, telemetry, and algorithm tuning. To choose compatibility fallback,
|
|
168
|
+
set `protocol.postQuantum: 'compatible'`. To choose direct SPQR, set
|
|
169
|
+
`protocol.braid: 'disabled'`.
|
|
167
170
|
|
|
168
|
-
Two strategy hooks report protocol events. `onProtocolSelected` fires
|
|
169
|
-
session establishment, from the handshake. `onBraidProgress`
|
|
170
|
-
braid-mode send and receive, from the SPQR seam that holds the
|
|
171
|
-
manager carries the strategy into `SessionCipher`, which passes
|
|
172
|
-
and `spqrRecv`.
|
|
173
|
-
the protocol path.
|
|
171
|
+
Two strategy hooks report protocol events. The hook `onProtocolSelected` fires
|
|
172
|
+
once per session establishment, from the handshake. The hook `onBraidProgress`
|
|
173
|
+
fires on every braid-mode send and receive, from the SPQR seam that holds the
|
|
174
|
+
braid state. The manager carries the strategy into `SessionCipher`, which passes
|
|
175
|
+
it to `spqrSend` and `spqrRecv`. The SDK guards both hooks, so a consumer that
|
|
176
|
+
throws cannot break the protocol path.
|
|
174
177
|
|
|
175
178
|
## Session Resolution
|
|
176
179
|
|
|
177
|
-
Session convergence is a SESAME behavior, but active/archive record manipulation
|
|
180
|
+
Session convergence is a SESAME behavior, but active/archive record manipulation belongs to shared session-domain logic.
|
|
178
181
|
|
|
179
182
|
- Owner: [internal/session/session-resolver.ts](./internal/session/session-resolver.ts)
|
|
180
183
|
- Consumed by: [internal/session/cipher.ts](./internal/session/cipher.ts) and [internal/sesame/manager.ts](./internal/sesame/manager.ts)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- **The README now provides a runnable encrypted round trip and a current demo.**
|
|
6
|
+
The quickstart exercises two SDK clients through the in-memory relay. The new
|
|
7
|
+
recording shows the same two-device and relay flow as the live desktop and
|
|
8
|
+
mobile demo.
|
|
9
|
+
|
|
10
|
+
- **Error-surface checks reject unresolved codes and cover media attachment
|
|
11
|
+
codes.** The analyser now reports forwarded code arguments in CI.
|
|
12
|
+
It also checks every `MediaAttachmentErrorCode` value.
|
|
13
|
+
This release removes `RemoteObjectStoreNotConfigured` because no media
|
|
14
|
+
operation could produce it.
|
|
15
|
+
|
|
16
|
+
- **The retry-request wire surface no longer includes
|
|
17
|
+
`RetryReason.INVALID_MESSAGE`.** No local failure produced it. The incoming
|
|
18
|
+
retry handler did not support it. Malformed ciphertext failures use the supported
|
|
19
|
+
`DECRYPTION_FAILED` recovery path.
|
|
20
|
+
|
|
21
|
+
- **Generated API pages and shipped documentation examples now have source
|
|
22
|
+
gates.** CI regenerates `docs/api` with pinned tool versions. It rejects a
|
|
23
|
+
diff. The snippet runner scans every packaged Markdown file and the internal
|
|
24
|
+
lifecycle docs. It executes every complete example and matches its output.
|
|
25
|
+
For an example that cannot run, it compiles every SDK name against the packed
|
|
26
|
+
package. A renamed or deleted export therefore fails the build in every
|
|
27
|
+
document that names it.
|
|
28
|
+
|
|
29
|
+
An example that previews an unreleased API declares the import paths that do
|
|
30
|
+
not exist yet. The build fails if one of them resolves. Only pseudocode is
|
|
31
|
+
exempt, and the build names each exempt block on its own line.
|
|
32
|
+
|
|
33
|
+
- **The error guide now documents all 33 `EncryptionErrorCode` values.** Its
|
|
34
|
+
session examples also use the current `ProtocolAddress` method signatures.
|
|
35
|
+
|
|
36
|
+
## 0.3.0
|
|
37
|
+
|
|
38
|
+
- **Breaking: seven error classes and sixteen `EncryptionErrorCode` members are
|
|
39
|
+
removed, because nothing in the library ever threw them.** Each class was
|
|
40
|
+
exported and paired with a type guard, so an application could branch on it —
|
|
41
|
+
but no code path constructed any of them, which made every one of those
|
|
42
|
+
branches dead code that read as handled. Removed, with their `is*` guards:
|
|
43
|
+
`IdentityKeyChangedError`, `SessionConflictError`,
|
|
44
|
+
`RegistrationIdChangedError`, and the four intermediate classes
|
|
45
|
+
`CryptoError`, `SessionError`, `ProtocolError` and `ClientError`. Removed
|
|
46
|
+
codes: `IDENTITY_KEY_CHANGED`, `IDENTITY_KEY_ERROR`, `SESSION_CONFLICT`,
|
|
47
|
+
`REGISTRATION_ID_CHANGED`, `INVALID_REGISTRATION_ID`, `MESSAGE_TOO_OLD`,
|
|
48
|
+
`INVALID_MESSAGE_VERSION`, `RATCHET_ERROR`, `DATABASE_ERROR`,
|
|
49
|
+
`DATABASE_LOCKED`, `KYBER_ERROR`, `KDF_ERROR`, `HMAC_VERIFICATION_FAILED`,
|
|
50
|
+
`SPQR_KEY_ALREADY_USED`, `SPQR_EPOCH_REGRESSION` and `UNKNOWN_ERROR`. The
|
|
51
|
+
enum goes from 49 members to 33.
|
|
52
|
+
|
|
53
|
+
What to use instead: an identity that changed is an identity that is not
|
|
54
|
+
trusted, and the library throws `UntrustedIdentityError` /
|
|
55
|
+
`UNTRUSTED_IDENTITY` for it from five sites on the session and sending
|
|
56
|
+
paths. Code branching on `isIdentityKeyChangedError` or on
|
|
57
|
+
`IDENTITY_KEY_CHANGED` was never reached and should branch on
|
|
58
|
+
`isUntrustedIdentityError` instead. The other removed names have no
|
|
59
|
+
replacement, because there was no event behind them.
|
|
60
|
+
|
|
61
|
+
- **`UntrustedIdentityError` and `isUntrustedIdentityError` are exported from
|
|
62
|
+
the package root.** They were reachable only from
|
|
63
|
+
`@open-e2ee/signal-protocol-sdk/types/errors`, while the error-handling guide
|
|
64
|
+
imported them from the root — so the first thing a reader copied did not
|
|
65
|
+
resolve. `StorageQuotaExceededError` also gains the
|
|
66
|
+
`isStorageQuotaExceededError` guard its five siblings already had.
|
|
67
|
+
|
|
68
|
+
- **Every documented error code is now traceable to a construction site.** A
|
|
69
|
+
check parses the library for the sites that decide whether a class can be
|
|
70
|
+
thrown, and fails the build when an exported error class or a declared code
|
|
71
|
+
survives with none — so the surface cannot drift back. Being named in a
|
|
72
|
+
`switch` counted as use before, which is what hid `IDENTITY_KEY_CHANGED`
|
|
73
|
+
through all nineteen releases that declared it and never threw it.
|
|
74
|
+
|
|
3
75
|
## 0.2.3
|
|
4
76
|
|
|
5
77
|
- **`@noble/post-quantum` 0.6.1 → 0.7.0.** Upstream hardening of the
|
package/COMMERCIAL.md
CHANGED
|
@@ -6,24 +6,24 @@ commercial path; the open-source path is the
|
|
|
6
6
|
|
|
7
7
|
## Do you need a commercial license?
|
|
8
8
|
|
|
9
|
-
You do **not** need one if your application complies with
|
|
9
|
+
You do **not** need one if your application complies with AGPLv3 — including
|
|
10
10
|
its network-use provision (section 13): users who interact with your service
|
|
11
11
|
over a network must be able to obtain the complete corresponding source of your
|
|
12
|
-
application under
|
|
12
|
+
application under AGPLv3.
|
|
13
13
|
|
|
14
14
|
You likely **do** need one if any of these describe your product:
|
|
15
15
|
|
|
16
16
|
- Closed-source or proprietary application, mobile or web, that ships or serves
|
|
17
17
|
this SDK.
|
|
18
|
-
- You cannot offer your application's source under
|
|
18
|
+
- You cannot offer your application's source under AGPLv3 terms — for
|
|
19
19
|
contractual, competitive, or policy reasons.
|
|
20
20
|
- You are embedding the SDK in a product you redistribute to customers who
|
|
21
|
-
will not receive
|
|
21
|
+
will not receive AGPLv3 source (OEM).
|
|
22
22
|
|
|
23
23
|
## What the commercial license changes
|
|
24
24
|
|
|
25
25
|
- **Grant.** The right to use, modify, and distribute the SDK in a proprietary
|
|
26
|
-
product, without the
|
|
26
|
+
product, without the AGPLv3 source-provision obligations.
|
|
27
27
|
- **Scope.** Licensed per product, covering `@open-e2ee/signal-protocol-sdk`
|
|
28
28
|
and its subpath adapters as named in your license record.
|
|
29
29
|
- **Support.** Any support terms are those stated in your order form; nothing
|
|
@@ -51,6 +51,6 @@ Growth and Enterprise start with an email.
|
|
|
51
51
|
|
|
52
52
|
## Evaluation
|
|
53
53
|
|
|
54
|
-
Evaluate under
|
|
54
|
+
Evaluate under AGPLv3 first — the full SDK, not a trial build. Nothing about
|
|
55
55
|
evaluation, prototyping, or internal proof-of-concept work requires a
|
|
56
56
|
commercial license before you ship to users.
|
package/NOTICE
CHANGED
|
@@ -25,5 +25,5 @@ This software is provided as is, without warranty, and is subject to the
|
|
|
25
25
|
limitation of liability in the LICENSE file. This notice does not modify the
|
|
26
26
|
license.
|
|
27
27
|
|
|
28
|
-
For commercial licensing options that do not require
|
|
28
|
+
For commercial licensing options that do not require AGPLv3 compliance, contact
|
|
29
29
|
licensing@open-e2ee.dev.
|
package/README.md
CHANGED
|
@@ -1,64 +1,50 @@
|
|
|
1
|
-
<img src="https://raw.githubusercontent.com/open-e2ee/design/v0.
|
|
1
|
+
<img src="https://raw.githubusercontent.com/open-e2ee/design/v0.8.0/brand/generated/open-e2ee-mark-adaptive.svg" alt="OpenE2EE" width="72" height="72">
|
|
2
2
|
|
|
3
3
|
# OpenE2EE Signal Protocol SDK
|
|
4
4
|
|
|
5
5
|
**End-to-end encrypted messaging for TypeScript apps. Signal Protocol, post-quantum by default, runs in Expo.**
|
|
6
6
|
|
|
7
7
|
[](https://github.com/open-e2ee/signal-protocol-js/blob/main/LICENSE)
|
|
8
|
-
[](https://www.typescriptlang.org/)
|
|
9
8
|
[](https://www.npmjs.com/package/@open-e2ee/signal-protocol-sdk)
|
|
10
|
-
[](./ARCHITECTURE.md)
|
|
11
10
|
[](https://www.npmjs.com/package/@open-e2ee/signal-protocol-sdk#provenance)
|
|
12
11
|
[](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml)
|
|
13
|
-
[](https://scorecard.dev/viewer/?uri=github.com/open-e2ee/signal-protocol-js)
|
|
14
|
-
[](https://www.bestpractices.dev/projects/14043)
|
|
15
12
|
|
|
16
13
|
[Website](https://open-e2ee.dev) ·
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[Security
|
|
21
|
-
[Protocol Policy](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PROTOCOL_POLICY.md) ·
|
|
22
|
-
[Deviations](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md)
|
|
14
|
+
[Documentation](https://docs.open-e2ee.dev) ·
|
|
15
|
+
[Live demo](https://open-e2ee.dev/#demo) ·
|
|
16
|
+
[API reference](https://docs.open-e2ee.dev/reference/api) ·
|
|
17
|
+
[Security](./SECURITY.md)
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
- **One TypeScript package.** Run the same protocol code in Expo, React Native, modern browsers, and Node.
|
|
20
|
+
- **Post-quantum by default.** The default policy requires PQXDH session establishment and the ML-KEM Braid post-quantum ratchet. Required post-quantum operations fail closed.
|
|
21
|
+
- **Messaging primitives included.** Build multi-device messaging, groups, sealed sender, encrypted attachments, and safety-number verification.
|
|
22
|
+
- **Your infrastructure, behind explicit interfaces.** Your application owns device-local storage. The relay is an interface, not a hosted service. The relay never needs message plaintext or device private keys.
|
|
23
|
+
- **AGPLv3, or a commercial license.** Proprietary applications that cannot meet AGPLv3 obligations can use a [commercial license](./COMMERCIAL.md).
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
- **Runs where your app runs.** Expo, React Native, modern browsers, and Node from one package.
|
|
28
|
-
- **Post-quantum by default.** PQXDH and ML-KEM session establishment are on without configuration, and fail closed.
|
|
29
|
-
- **Real messaging features.** Multi-device, groups, sealed sender, encrypted attachments, safety numbers.
|
|
30
|
-
- **Pluggable storage and relay.** Device-local storage is required and yours; the relay is an interface, not a hosted service.
|
|
31
|
-
- **AGPL-3.0-or-later, or a commercial license.** Building something closed-source? See [COMMERCIAL](https://github.com/open-e2ee/signal-protocol-js/blob/main/COMMERCIAL.md).
|
|
25
|
+
The protocol code ships without a native crypto module or platform crypto binary. The Expo SQLCipher store requires a development build and native project configuration.
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
Version `0.4.x`. Public APIs and persisted formats can change before `1.0`.
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
OpenE2EE implements a versioned profile of the published Signal Protocol specifications. It is not affiliated with Signal Messenger and is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate. Read the [full notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
|
|
36
30
|
|
|
37
|
-
## See
|
|
31
|
+
## See an encrypted round trip
|
|
38
32
|
|
|
39
|
-
[](https://open-e2ee.dev/#demo)
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Recorded from [open-e2ee.dev/demo](https://open-e2ee.dev/demo), which runs this package in the browser against the in-memory store and the in-memory relay: real protocol and cryptography, simulated in-memory infrastructure. Every scenario there prints the receiving device's own log, unedited.
|
|
35
|
+
The [live demo](https://open-e2ee.dev/#demo) runs two SDK clients against an in-memory relay. On desktop, type a message and inspect the envelope, ratchets, relay mailbox, and decrypted result. On mobile, the same protocol run replays at reading pace. The protocol and cryptography are real. The example simulates infrastructure in memory. Displayed timings exclude network time.
|
|
44
36
|
|
|
45
37
|
## Install
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
npm install @open-e2ee/signal-protocol-sdk
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Installing straight from the repository also works — the package compiles itself during install, so TypeScript is the only build requirement:
|
|
39
|
+
Requires Node 18 or later for the local example.
|
|
52
40
|
|
|
53
41
|
```bash
|
|
54
|
-
npm install
|
|
42
|
+
npm install @open-e2ee/signal-protocol-sdk
|
|
55
43
|
```
|
|
56
44
|
|
|
57
|
-
|
|
45
|
+
## Run a local encrypted round trip
|
|
58
46
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Two clients, one process, no account and no server. The relay holds the envelope; only Bob's device turns it back into text.
|
|
47
|
+
Save this as `quickstart.mjs`, then run `node quickstart.mjs`. It uses development-only in-memory adapters so that you can prove the message flow without a backend project.
|
|
62
48
|
|
|
63
49
|
<!-- doc-snippet:run readme-quick-start expect="alice: hello" -->
|
|
64
50
|
```ts
|
|
@@ -80,87 +66,73 @@ const bob = await createSignalProtocolClient({
|
|
|
80
66
|
adapters: { storage: inMemoryStore(), relay },
|
|
81
67
|
});
|
|
82
68
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
69
|
+
const delivered = new Promise((resolve) => {
|
|
70
|
+
bob.registerHook("onMessageDecrypted", async (message) => {
|
|
71
|
+
console.log(`${message.senderId}: ${message.content}`);
|
|
72
|
+
bob.stopRelaySubscription();
|
|
73
|
+
resolve(undefined);
|
|
74
|
+
});
|
|
89
75
|
});
|
|
90
76
|
|
|
91
|
-
await alice.send("bob", "hello");
|
|
92
|
-
bob.startRelaySubscription();
|
|
77
|
+
await alice.send("bob", "hello");
|
|
78
|
+
bob.startRelaySubscription();
|
|
79
|
+
await delivered;
|
|
93
80
|
```
|
|
94
81
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Next: [inspect what the relay actually stored](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/GETTING_STARTED.md), then compose the [Expo + Convex production client](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/CLIENT_COMPOSITION.md).
|
|
82
|
+
Expected output:
|
|
98
83
|
|
|
99
|
-
|
|
84
|
+
```text
|
|
85
|
+
alice: hello
|
|
86
|
+
```
|
|
100
87
|
|
|
101
|
-
|
|
88
|
+
The client factory creates or loads each device identity. When given a relay, it also publishes the public prekey bundle. `send()` fetches Bob's bundle and starts the required post-quantum session. It then gives ciphertext plus routing metadata to the relay. Bob's subscription retrieves and decrypts the envelope on his device.
|
|
102
89
|
|
|
103
|
-
|
|
104
|
-
|---|---|---|---|---|---|---|
|
|
105
|
-
| **`@open-e2ee/signal-protocol-sdk`** | Yes | Yes | Yes — `0.1.x`, active | Key agreement yes — PQXDH + ML-KEM, default and fails closed. Signatures no — identities are classical Ed25519 | Yes | Yes |
|
|
106
|
-
| [`@signalapp/libsignal-client`](https://github.com/signalapp/libsignal) | No — Node native addon; the 0.99.3 tarball ships binaries for macOS, Linux, and Windows only | No | Yes — very active; repo push 2026-07-31 | Key agreement yes | No — Rust core with TypeScript bindings | No (AGPL-3.0 only) |
|
|
107
|
-
| [`libsignal-protocol-javascript`](https://github.com/signalapp/libsignal-protocol-javascript) | No | Yes | No — archived, last push 2021-08-04 | No | No — JavaScript | No (GPL-3.0) |
|
|
108
|
-
| [`@privacyresearch/libsignal-protocol-typescript`](https://github.com/privacyresearchgroup/libsignal-protocol-typescript) | No documented React Native path | Yes | No — last npm publish 2023-05-06, last repo push 2023-07-18 | No | Yes | No (GPL-3.0) |
|
|
109
|
-
| [`ts-mls`](https://github.com/LukaJCB/ts-mls) | Not stated — browsers, Node, and serverless are the documented targets | Yes | Yes — very active; repo push 2026-08-03 | Key agreement and signatures — ML-KEM and ML-DSA-87 ciphersuites | Yes | Not needed (MIT) |
|
|
90
|
+
The in-memory store loses identities, sessions, and ratchet state on restart. The in-memory relay has no authentication, authorization, or durable storage. Do not ship either adapter. Continue with the [hosted Quickstart](https://docs.open-e2ee.dev/start/quickstart), which explains key custody, relay metadata, prekey replenishment, additional devices, and recovery policy.
|
|
110
91
|
|
|
111
|
-
|
|
92
|
+
## Move to production storage
|
|
112
93
|
|
|
113
|
-
|
|
94
|
+
Choose the device-local store for your runtime, then supply a relay that authenticates each device and implements your product's access policy.
|
|
114
95
|
|
|
115
|
-
|
|
96
|
+
| Runtime | Storage path | Deployment boundary |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| Expo | [`expoStore`](./local/store/expo/README.md) | Configure SQLCipher before schema access. Requires a development build; it does not run in Expo Go. |
|
|
99
|
+
| Browser | [`indexedDbStore`](./local/store/web/README.md) | IndexedDB persists encrypted records, but same-origin JavaScript can access the records and their key. Review CSP, XSS, dependencies, and service workers. |
|
|
100
|
+
| Bare React Native | [`reactNativeStore`](./local/store/react-native/README.md) | Provide an atomic, durable key-value backend and run the exported backend conformance kit. |
|
|
101
|
+
| Node | [`nodeStore`](./local/store/node/README.md) | Set an explicit private data directory on a trusted local filesystem. |
|
|
116
102
|
|
|
117
|
-
|
|
103
|
+
The [adapter guide](./ADAPTERS.md) defines every storage, relay, vault, and object-store boundary. The [client composition guide](./docs/CLIENT_COMPOSITION.md) shows an Expo and Convex integration.
|
|
118
104
|
|
|
119
|
-
|
|
105
|
+
## Security and assurance
|
|
120
106
|
|
|
121
|
-
|
|
107
|
+
The [assurance summary](./docs/ASSURANCE.md) states what the automated checks cover and what the public export does not contain. Public CI rebuilds, type-checks, audits, and runs this README example against the packed package.
|
|
122
108
|
|
|
123
|
-
|
|
109
|
+
JavaScript engines do not provide a machine-level constant-time contract or guaranteed zeroization. The [security model](./docs/SECURITY.md) defines the timing, same-process, storage, and metadata boundaries. The [protocol policy](./docs/PROTOCOL_POLICY.md) defines supported modes and fail-closed behavior.
|
|
124
110
|
|
|
125
|
-
|
|
126
|
-
|---|---|
|
|
127
|
-
| [X3DH](https://signal.org/docs/specifications/x3dh/) | Revision 1, 2016-11-04 |
|
|
128
|
-
| [PQXDH](https://signal.org/docs/specifications/pqxdh/) | Revision 3, 2023-05-24 (last updated 2024-01-23) |
|
|
129
|
-
| [Double Ratchet](https://signal.org/docs/specifications/doubleratchet/) | Revision 4, 2025-11-04 |
|
|
130
|
-
| [Sesame](https://signal.org/docs/specifications/sesame/) | Revision 2, 2017-04-14 |
|
|
131
|
-
| [ML-KEM Braid](https://signal.org/docs/specifications/mlkembraid/) | Revision 1, 2025-02-21 (last updated 2025-09-26) |
|
|
132
|
-
| [FIPS 203 (ML-KEM)](https://csrc.nist.gov/pubs/fips/203/final) | Final, 2024-08-13 |
|
|
133
|
-
| [RFC 8032 (Ed25519)](https://www.rfc-editor.org/rfc/rfc8032.html) | — |
|
|
111
|
+
Report a suspected vulnerability privately through the process in [SECURITY](./SECURITY.md). Do not open a public issue for it.
|
|
134
112
|
|
|
135
|
-
|
|
113
|
+
## Why developers choose this SDK
|
|
136
114
|
|
|
137
|
-
|
|
115
|
+
The SDK gives TypeScript applications one maintained package for required post-quantum session establishment and ratcheting, multi-device messaging, groups, sealed sender, attachments, and safety numbers. It keeps protocol state on the device and leaves the relay implementation to the application.
|
|
138
116
|
|
|
139
|
-
|
|
117
|
+
[Compare maintained alternatives and their limits.](https://open-e2ee.dev/product/#how-it-compares)
|
|
140
118
|
|
|
141
|
-
|
|
119
|
+
## Documentation
|
|
142
120
|
|
|
143
|
-
|
|
121
|
+
- [Getting started](./docs/GETTING_STARTED.md): the integration sequence and mental model.
|
|
122
|
+
- [Package surface](./docs/PACKAGE_SURFACE.md): root exports, subpaths, adapters, and core concepts.
|
|
123
|
+
- [Recipes](./docs/RECIPES.md): messaging, multi-device, attachments, and usernames.
|
|
124
|
+
- [Architecture](./ARCHITECTURE.md) and [adapters](./ADAPTERS.md): layer ownership and composition boundaries.
|
|
125
|
+
- [Integration interfaces](./docs/INTERFACES.md): contracts for custom stores, vaults, relays, and object stores.
|
|
126
|
+
- [Error handling](./docs/ERROR_HANDLING.md) and [troubleshooting](./TROUBLESHOOTING.md).
|
|
127
|
+
- [Deviations](./docs/DEVIATIONS.md): differences from the specifications and libsignal, with reasons and costs.
|
|
128
|
+
- [Hosted API reference](https://docs.open-e2ee.dev/reference/api): exported types and methods.
|
|
144
129
|
|
|
145
|
-
##
|
|
130
|
+
## Help and contributing
|
|
146
131
|
|
|
147
|
-
|
|
148
|
-
[docs.open-e2ee.dev](https://docs.open-e2ee.dev). The in-repo references below
|
|
149
|
-
are versioned with the code:
|
|
150
|
-
|
|
151
|
-
- [Getting Started](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/GETTING_STARTED.md) — installation, mental model, first working client.
|
|
152
|
-
- [Package Surface](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PACKAGE_SURFACE.md) — root exports, every subpath, adapter implementations, core concepts.
|
|
153
|
-
- [Recipes](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/RECIPES.md) — message flow, protocol policy, multi-device, attachments, usernames.
|
|
154
|
-
- [Client Composition](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/CLIENT_COMPOSITION.md) — production composition with Expo and Convex.
|
|
155
|
-
- [Architecture](https://github.com/open-e2ee/signal-protocol-js/blob/main/ARCHITECTURE.md) and [Adapters](https://github.com/open-e2ee/signal-protocol-js/blob/main/ADAPTERS.md) — layer model and composition boundaries.
|
|
156
|
-
- [Integration Interfaces](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/INTERFACES.md) — the interfaces to implement for custom storage, vaults, relays, and object stores.
|
|
157
|
-
- [Error Handling](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ERROR_HANDLING.md) and [Troubleshooting](https://github.com/open-e2ee/signal-protocol-js/blob/main/TROUBLESHOOTING.md).
|
|
158
|
-
- [E2EE concepts](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/E2EE.md) — what changes about your architecture when the relay cannot read.
|
|
159
|
-
- [Deviations](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md) — every difference from the Signal Protocol specifications and from `libsignal`, with reasons and costs.
|
|
160
|
-
- [API Reference](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/api/README.md) — generated from the exported declarations.
|
|
132
|
+
Open a [bug report](https://github.com/open-e2ee/signal-protocol-js/issues/new?template=bug_report.yml) or send [API and documentation feedback](https://github.com/open-e2ee/signal-protocol-js/issues/new?template=api_feedback.yml). Read [CONTRIBUTING](./CONTRIBUTING.md) before you propose code. Use the private process in [SECURITY](./SECURITY.md) for suspected vulnerabilities.
|
|
161
133
|
|
|
162
134
|
## License and warranty
|
|
163
135
|
|
|
164
|
-
Licensed under `AGPL-3.0-or-later
|
|
136
|
+
Licensed under AGPLv3 (`AGPL-3.0-or-later`). See [LICENSE](./LICENSE). A [commercial license](./COMMERCIAL.md) covers proprietary products that cannot meet AGPLv3 obligations.
|
|
165
137
|
|
|
166
|
-
The
|
|
138
|
+
The license provides the software **as is**, without warranties or conditions of any kind. To the extent that applicable law permits, copyright holders and contributors are not liable for damages that arise from its use. Your application must evaluate the SDK against its requirements and secure its deployment, storage, authentication, authorization, and operations. This summary does not modify the license.
|
package/SECURITY.md
CHANGED
|
@@ -7,8 +7,8 @@ backports.
|
|
|
7
7
|
|
|
8
8
|
| Version | Supported |
|
|
9
9
|
| ------- | ------------------ |
|
|
10
|
-
| 0.
|
|
11
|
-
| < 0.
|
|
10
|
+
| 0.4.x | :white_check_mark: |
|
|
11
|
+
| < 0.4.0 | :x: |
|
|
12
12
|
|
|
13
13
|
## Reporting a Vulnerability
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ We take security vulnerabilities seriously. If you discover a security issue, pl
|
|
|
22
22
|
the repository's [Security tab](https://github.com/open-e2ee/signal-protocol-js/security)
|
|
23
23
|
- Email: security@open-e2ee.dev
|
|
24
24
|
3. Include the following information:
|
|
25
|
-
-
|
|
25
|
+
- What the vulnerability is
|
|
26
26
|
- Steps to reproduce
|
|
27
27
|
- Potential impact
|
|
28
28
|
- Suggested fix (if any)
|
|
@@ -30,13 +30,16 @@ We take security vulnerabilities seriously. If you discover a security issue, pl
|
|
|
30
30
|
### Safe Harbor
|
|
31
31
|
|
|
32
32
|
We will not pursue legal action or law-enforcement referral against
|
|
33
|
-
good-faith security research on this codebase. Good faith means
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
good-faith security research on this codebase. Good faith means all of the
|
|
34
|
+
following:
|
|
35
|
+
|
|
36
|
+
- Make every effort to avoid privacy violations and data destruction.
|
|
37
|
+
- Use your own accounts and devices for testing.
|
|
38
|
+
- Do not exploit a finding beyond what you need to show it.
|
|
39
|
+
- Give us a reasonable window to remediate before public disclosure.
|
|
40
|
+
|
|
41
|
+
This applies to research on the SDK itself. Those applications' own policies
|
|
42
|
+
govern testing of deployed third-party applications that use the SDK.
|
|
40
43
|
|
|
41
44
|
### What to Expect
|
|
42
45
|
|
|
@@ -51,7 +54,7 @@ own policies.
|
|
|
51
54
|
### Disclosure Policy
|
|
52
55
|
|
|
53
56
|
- We follow responsible disclosure practices
|
|
54
|
-
- We will credit reporters
|
|
57
|
+
- We will credit reporters, unless a reporter requests anonymity
|
|
55
58
|
- We aim to release patches before public disclosure
|
|
56
59
|
- Public disclosure occurs after patch is available
|
|
57
60
|
|
|
@@ -112,7 +115,7 @@ write or that no copies exist.
|
|
|
112
115
|
However, JIT compilers may:
|
|
113
116
|
|
|
114
117
|
- Optimize away the zeroing before our check runs
|
|
115
|
-
- Copy values to CPU registers that
|
|
118
|
+
- Copy values to CPU registers that are not zeroed
|
|
116
119
|
- Leave copies in garbage-collected heap memory
|
|
117
120
|
|
|
118
121
|
**Garbage Collection**: Sensitive data in JavaScript objects may persist in heap memory until GC runs. We cannot force immediate collection or guarantee cleanup timing.
|
|
@@ -131,7 +134,7 @@ However, JIT compilers may:
|
|
|
131
134
|
Browser/runtime timing attacks are possible. Current source-level mitigations include:
|
|
132
135
|
|
|
133
136
|
- Full-scan equal-length comparison helpers on selected MAC/ciphertext paths
|
|
134
|
-
- Fixed
|
|
137
|
+
- Fixed work on both decapsulation candidates, then a masked choice between them
|
|
135
138
|
- Fixed-work rejection handling on selected authentication paths
|
|
136
139
|
|
|
137
140
|
These are not hard constant-time guarantees. Ed25519 signature verification
|