@open-e2ee/signal-protocol-sdk 0.1.0-alpha.1 → 0.1.0-alpha.11
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 +24 -24
- package/ARCHITECTURE.md +4 -4
- package/CHANGELOG.md +1370 -0
- package/COMMERCIAL.md +56 -0
- package/NOTICE +3 -1
- package/README.md +40 -35
- package/SECURITY.md +15 -1
- package/blocking/README.md +5 -5
- package/client/README.md +5 -5
- package/device/README.md +3 -1
- package/dist/blocking/index.d.ts +2 -2
- package/dist/blocking/index.d.ts.map +1 -1
- package/dist/blocking/index.js +1 -1
- package/dist/blocking/index.js.map +1 -1
- package/dist/blocking/manager.d.ts +7 -7
- package/dist/blocking/manager.d.ts.map +1 -1
- package/dist/blocking/manager.js +3 -3
- package/dist/blocking/manager.js.map +1 -1
- package/dist/blocking/types.d.ts +4 -4
- package/dist/blocking/types.d.ts.map +1 -1
- package/dist/blocking/types.js +1 -1
- package/dist/client/client.d.ts +48 -41
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +160 -101
- package/dist/client/client.js.map +1 -1
- package/dist/client/compose.d.ts +15 -10
- package/dist/client/compose.d.ts.map +1 -1
- package/dist/client/compose.js +2 -0
- package/dist/client/compose.js.map +1 -1
- package/dist/client/config.d.ts +68 -34
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/content-adapter.d.ts +4 -4
- package/dist/client/content-adapter.d.ts.map +1 -1
- package/dist/client/content-adapter.js +1 -1
- package/dist/client/content-adapter.js.map +1 -1
- package/dist/client/dual-store.d.ts +5 -5
- package/dist/client/dual-store.d.ts.map +1 -1
- package/dist/client/dual-store.js.map +1 -1
- package/dist/client/endorsement-manager.d.ts +23 -2
- package/dist/client/endorsement-manager.d.ts.map +1 -1
- package/dist/client/endorsement-manager.js +37 -12
- package/dist/client/endorsement-manager.js.map +1 -1
- package/dist/client/event-hooks.d.ts +1 -1
- package/dist/client/groups.d.ts +29 -29
- package/dist/client/groups.d.ts.map +1 -1
- package/dist/client/groups.js +54 -37
- package/dist/client/groups.js.map +1 -1
- package/dist/client/headless.d.ts +12 -12
- package/dist/client/headless.d.ts.map +1 -1
- package/dist/client/headless.js +9 -9
- package/dist/client/headless.js.map +1 -1
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/key-rotation-core.d.ts +11 -11
- package/dist/client/key-rotation-core.d.ts.map +1 -1
- package/dist/client/key-rotation-core.js +22 -22
- package/dist/client/key-rotation-core.js.map +1 -1
- package/dist/client/media.d.ts +2 -2
- package/dist/client/media.js +5 -5
- package/dist/client/media.js.map +1 -1
- package/dist/client/messages.js +2 -2
- package/dist/client/messages.js.map +1 -1
- package/dist/client/prekeys.js +1 -1
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/relay-subscription.d.ts +2 -2
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +18 -1
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/retry.js +1 -1
- package/dist/client/retry.js.map +1 -1
- package/dist/client/sealed-sender-ops.d.ts +28 -2
- package/dist/client/sealed-sender-ops.d.ts.map +1 -1
- package/dist/client/sealed-sender-ops.js +40 -10
- package/dist/client/sealed-sender-ops.js.map +1 -1
- package/dist/client/sessions.d.ts.map +1 -1
- package/dist/client/sessions.js +3 -0
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/signal-service-cipher.d.ts +34 -11
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +149 -75
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +28 -15
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/device/connection.js +2 -2
- package/dist/device/connection.js.map +1 -1
- package/dist/device/device-id.d.ts.map +1 -1
- package/dist/device/device-id.js +4 -4
- package/dist/device/device-id.js.map +1 -1
- package/dist/device/expo-metadata.d.ts +26 -0
- package/dist/device/expo-metadata.d.ts.map +1 -0
- package/dist/device/expo-metadata.js +33 -0
- package/dist/device/expo-metadata.js.map +1 -0
- package/dist/device/index.d.ts +1 -1
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +5 -1
- package/dist/device/index.js.map +1 -1
- package/dist/device/provisioning.d.ts +9 -17
- package/dist/device/provisioning.d.ts.map +1 -1
- package/dist/device/provisioning.js +13 -30
- package/dist/device/provisioning.js.map +1 -1
- package/dist/device/transfer.d.ts.map +1 -1
- package/dist/device/transfer.js +14 -14
- package/dist/device/transfer.js.map +1 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/groups/index.d.ts +4 -4
- package/dist/groups/index.d.ts.map +1 -1
- package/dist/groups/index.js +3 -3
- package/dist/groups/index.js.map +1 -1
- package/dist/hooks/use-connection-presence.d.ts +5 -5
- package/dist/hooks/use-connection-presence.d.ts.map +1 -1
- package/dist/hooks/use-connection-presence.js +5 -5
- package/dist/hooks/use-connection-presence.js.map +1 -1
- package/dist/hooks/use-group-membership.d.ts +2 -2
- package/dist/hooks/use-key-rotation.js +2 -2
- package/dist/hooks/use-key-rotation.js.map +1 -1
- package/dist/index.d.ts +29 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
- package/dist/internal/crypto/ec/x25519-validation.js +4 -4
- package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
- package/dist/internal/crypto/index.d.ts +1 -1
- package/dist/internal/crypto/index.d.ts.map +1 -1
- package/dist/internal/crypto/index.js +2 -2
- package/dist/internal/crypto/index.js.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.d.ts +1 -1
- package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.js +2 -2
- package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
- package/dist/internal/crypto/key-prefix.d.ts +1 -1
- package/dist/internal/crypto/key-prefix.js +1 -1
- package/dist/internal/crypto/pq/kyber.d.ts +1 -1
- package/dist/internal/crypto/pq/kyber.js +1 -1
- package/dist/internal/crypto/random.d.ts +9 -0
- package/dist/internal/crypto/random.d.ts.map +1 -1
- package/dist/internal/crypto/random.js +16 -0
- package/dist/internal/crypto/random.js.map +1 -1
- package/dist/internal/crypto/symmetric/aes-gcm-siv.d.ts +1 -1
- package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
- package/dist/internal/crypto/symmetric/mac.d.ts +3 -3
- package/dist/internal/crypto/symmetric/mac.js +3 -3
- package/dist/internal/crypto/utils.d.ts +2 -2
- package/dist/internal/crypto/utils.js +2 -2
- package/dist/internal/encoding/proto/envelope.d.ts +21 -21
- package/dist/internal/encoding/proto/envelope.d.ts.map +1 -1
- package/dist/internal/encoding/proto/envelope.js +25 -25
- package/dist/internal/encoding/proto/envelope.js.map +1 -1
- package/dist/internal/encoding/proto/index.d.ts +2 -2
- package/dist/internal/encoding/proto/index.d.ts.map +1 -1
- package/dist/internal/encoding/proto/index.js +3 -3
- package/dist/internal/encoding/proto/index.js.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +5 -5
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +4 -4
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.d.ts +261 -6
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +468 -6
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.d.ts +4 -3
- package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.js +97 -76
- package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
- package/dist/internal/encoding/proto/signal-message.d.ts +39 -34
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/signal-message.js +236 -152
- package/dist/internal/encoding/proto/signal-message.js.map +1 -1
- package/dist/internal/groups/access-control.d.ts +170 -0
- package/dist/internal/groups/access-control.d.ts.map +1 -0
- package/dist/internal/groups/access-control.js +284 -0
- package/dist/internal/groups/access-control.js.map +1 -0
- package/dist/internal/groups/change-actions.d.ts +57 -0
- package/dist/internal/groups/change-actions.d.ts.map +1 -0
- package/dist/internal/groups/change-actions.js +827 -0
- package/dist/internal/groups/change-actions.js.map +1 -0
- package/dist/internal/groups/change-authorization.d.ts +16 -0
- package/dist/internal/groups/change-authorization.d.ts.map +1 -0
- package/dist/internal/groups/change-authorization.js +120 -0
- package/dist/internal/groups/change-authorization.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/encrypted-state.d.ts +12 -2
- package/dist/internal/groups/encrypted-state.d.ts.map +1 -0
- package/dist/internal/{groups-v2 → groups}/encrypted-state.js +122 -22
- package/dist/internal/groups/encrypted-state.js.map +1 -0
- package/dist/internal/groups/group-id.d.ts +9 -9
- package/dist/internal/groups/group-id.d.ts.map +1 -1
- package/dist/internal/groups/group-id.js +11 -12
- package/dist/internal/groups/group-id.js.map +1 -1
- package/dist/internal/groups/index.d.ts +16 -6
- package/dist/internal/groups/index.d.ts.map +1 -1
- package/dist/internal/groups/index.js +9 -1
- package/dist/internal/groups/index.js.map +1 -1
- package/dist/internal/groups/invite-link.d.ts.map +1 -0
- package/dist/internal/groups/invite-link.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/manager.d.ts +212 -43
- package/dist/internal/groups/manager.d.ts.map +1 -0
- package/dist/internal/groups/manager.js +1945 -0
- package/dist/internal/groups/manager.js.map +1 -0
- package/dist/internal/groups/sdk-store.d.ts +32 -0
- package/dist/internal/groups/sdk-store.d.ts.map +1 -0
- package/dist/internal/groups/sdk-store.js +111 -0
- package/dist/internal/groups/sdk-store.js.map +1 -0
- package/dist/internal/groups/server-engine.d.ts +98 -0
- package/dist/internal/groups/server-engine.d.ts.map +1 -0
- package/dist/internal/groups/server-engine.js +1235 -0
- package/dist/internal/groups/server-engine.js.map +1 -0
- package/dist/internal/groups/trust-root.d.ts +32 -0
- package/dist/internal/groups/trust-root.d.ts.map +1 -0
- package/dist/internal/groups/trust-root.js +91 -0
- package/dist/internal/groups/trust-root.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/types.d.ts +190 -41
- package/dist/internal/groups/types.d.ts.map +1 -0
- package/dist/internal/{groups-v2 → groups}/types.js +3 -2
- package/dist/internal/groups/types.js.map +1 -0
- package/dist/internal/groups/wire.d.ts +68 -0
- package/dist/internal/groups/wire.d.ts.map +1 -0
- package/dist/internal/groups/wire.js +708 -0
- package/dist/internal/groups/wire.js.map +1 -0
- package/dist/internal/manager/manager.d.ts +4 -4
- package/dist/internal/manager/manager.d.ts.map +1 -1
- package/dist/internal/manager/manager.js +28 -17
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.d.ts +1 -1
- package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.js +10 -10
- package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts +3 -3
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -1
- package/dist/internal/protocol/double-ratchet/ratchet.js +3 -3
- package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -1
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
- package/dist/internal/protocol/pqxdh/pqxdh.js +3 -3
- package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +32 -18
- 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 +35 -21
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +8 -14
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +9 -4
- package/dist/internal/protocol/sealed-sender/encryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.js +7 -15
- package/dist/internal/protocol/sealed-sender/encryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +56 -11
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +278 -158
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +45 -0
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/trust-root.js +77 -0
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/types.d.ts +65 -10
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.js +44 -1
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
- package/dist/internal/protocol/sender-keys/index.d.ts +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +41 -4
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +113 -12
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/index.d.ts +1 -1
- package/dist/internal/protocol/spqr/index.js +1 -1
- package/dist/internal/protocol/spqr/message.d.ts +1 -1
- package/dist/internal/protocol/spqr/message.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js +2 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +8 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +335 -152
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +5 -5
- 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 +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.d.ts +10 -10
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.js +14 -14
- package/dist/internal/protocol/spqr/spqr.js.map +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +3 -3
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.js +5 -5
- package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
- package/dist/internal/protocol/username/generate.d.ts +1 -1
- package/dist/internal/protocol/username/generate.js +1 -1
- package/dist/internal/protocol/username/hash.d.ts +1 -1
- package/dist/internal/protocol/username/hash.js +1 -1
- package/dist/internal/protocol/username/link.d.ts +1 -1
- package/dist/internal/protocol/username/link.js +1 -1
- package/dist/internal/protocol/username/proof.d.ts +1 -1
- package/dist/internal/protocol/username/proof.js +1 -1
- package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
- package/dist/internal/protocol/x3dh/x3dh.js +6 -6
- package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +14 -11
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.js +68 -29
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +2 -2
- package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/server-params.js.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -0
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-struct.js +4 -0
- package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
- package/dist/internal/sesame/device-registry.d.ts +18 -13
- package/dist/internal/sesame/device-registry.d.ts.map +1 -1
- package/dist/internal/sesame/device-registry.js +13 -9
- package/dist/internal/sesame/device-registry.js.map +1 -1
- package/dist/internal/sesame/manager.d.ts +1 -1
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +66 -34
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/sesame/types.d.ts.map +1 -1
- package/dist/internal/sesame/types.js +7 -2
- package/dist/internal/sesame/types.js.map +1 -1
- package/dist/internal/session/builder.js +3 -3
- package/dist/internal/session/builder.js.map +1 -1
- package/dist/internal/session/cipher.d.ts +2 -2
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +38 -30
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/internal/session/decryption.d.ts +1 -1
- package/dist/internal/session/decryption.js +10 -10
- package/dist/internal/session/decryption.js.map +1 -1
- package/dist/internal/session/factory.d.ts.map +1 -1
- package/dist/internal/session/factory.js +3 -3
- package/dist/internal/session/factory.js.map +1 -1
- package/dist/internal/session/handshake.d.ts.map +1 -1
- package/dist/internal/session/handshake.js +3 -3
- package/dist/internal/session/handshake.js.map +1 -1
- package/dist/internal/session/keys.d.ts +1 -1
- package/dist/internal/session/ratchet.d.ts.map +1 -1
- package/dist/internal/session/ratchet.js +4 -4
- package/dist/internal/session/ratchet.js.map +1 -1
- package/dist/internal/session/types.d.ts +2 -2
- package/dist/internal/session/types.d.ts.map +1 -1
- package/dist/internal/session/validation.d.ts.map +1 -1
- package/dist/internal/session/validation.js +3 -3
- package/dist/internal/session/validation.js.map +1 -1
- package/dist/keys/generation.d.ts +4 -3
- package/dist/keys/generation.d.ts.map +1 -1
- package/dist/keys/generation.js +2 -2
- package/dist/keys/generation.js.map +1 -1
- package/dist/keys/identity.d.ts +32 -0
- package/dist/keys/identity.d.ts.map +1 -1
- package/dist/keys/identity.js +55 -0
- package/dist/keys/identity.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/types.d.ts +1 -1
- package/dist/keys/types.d.ts.map +1 -1
- package/dist/layers.d.ts +5 -5
- package/dist/layers.d.ts.map +1 -1
- package/dist/layers.js +9 -9
- package/dist/layers.js.map +1 -1
- package/dist/local/store/expo/adapter.d.ts +28 -25
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +125 -113
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/database-key.d.ts +2 -2
- package/dist/local/store/expo/database-key.d.ts.map +1 -1
- package/dist/local/store/expo/database-key.js +5 -5
- package/dist/local/store/expo/database-key.js.map +1 -1
- package/dist/local/store/expo/db.d.ts +13 -10
- package/dist/local/store/expo/db.d.ts.map +1 -1
- package/dist/local/store/expo/db.js +8 -3
- package/dist/local/store/expo/db.js.map +1 -1
- package/dist/local/store/expo/index.d.ts +5 -7
- package/dist/local/store/expo/index.d.ts.map +1 -1
- package/dist/local/store/expo/index.js +3 -3
- package/dist/local/store/expo/index.js.map +1 -1
- package/dist/local/store/expo/key-storage.d.ts +1 -1
- package/dist/local/store/expo/key-storage.d.ts.map +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/index.d.ts +1 -1
- package/dist/local/store/expo/models/index.d.ts.map +1 -1
- package/dist/local/store/expo/models/index.js +2 -2
- package/dist/local/store/expo/models/index.js.map +1 -1
- package/dist/local/store/expo/models/local-identity.d.ts +1 -1
- package/dist/local/store/expo/models/local-identity.js +1 -1
- package/dist/local/store/expo/models/sender-key.d.ts +101 -77
- package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
- package/dist/local/store/expo/models/sender-key.js +154 -124
- package/dist/local/store/expo/models/sender-key.js.map +1 -1
- package/dist/local/store/expo/schema.d.ts +135 -33
- package/dist/local/store/expo/schema.d.ts.map +1 -1
- package/dist/local/store/expo/schema.js +37 -8
- package/dist/local/store/expo/schema.js.map +1 -1
- package/dist/local/store/expo/secure-store-options.d.ts +2 -2
- package/dist/local/store/expo/secure-store-options.d.ts.map +1 -1
- package/dist/local/store/expo/secure-store-options.js +1 -1
- package/dist/local/store/expo/secure-store-options.js.map +1 -1
- package/dist/local/store/index.d.ts +9 -9
- package/dist/local/store/index.d.ts.map +1 -1
- package/dist/local/store/index.js +9 -9
- package/dist/local/store/index.js.map +1 -1
- package/dist/local/store/{mock → memory}/adapter.d.ts +14 -7
- package/dist/local/store/memory/adapter.d.ts.map +1 -0
- package/dist/local/store/{mock → memory}/adapter.js +156 -58
- package/dist/local/store/memory/adapter.js.map +1 -0
- package/dist/local/store/memory/failures.d.ts +34 -0
- package/dist/local/store/memory/failures.d.ts.map +1 -0
- package/dist/local/store/memory/failures.js +75 -0
- package/dist/local/store/memory/failures.js.map +1 -0
- package/dist/local/store/memory/index.d.ts +11 -0
- package/dist/local/store/memory/index.d.ts.map +1 -0
- package/dist/local/store/memory/index.js +7 -0
- package/dist/local/store/memory/index.js.map +1 -0
- package/dist/local/store/node/adapter.d.ts +56 -7
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +458 -11
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/database-key.js +1 -1
- package/dist/local/store/node/database.d.ts +68 -0
- package/dist/local/store/node/database.d.ts.map +1 -1
- package/dist/local/store/node/database.js +203 -20
- package/dist/local/store/node/database.js.map +1 -1
- package/dist/local/store/node/index.d.ts +4 -4
- package/dist/local/store/node/index.d.ts.map +1 -1
- package/dist/local/store/node/index.js +3 -3
- package/dist/local/store/node/index.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +44 -5
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +177 -22
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/index.d.ts +4 -4
- package/dist/local/store/react-native/index.d.ts.map +1 -1
- package/dist/local/store/react-native/index.js +3 -3
- package/dist/local/store/react-native/index.js.map +1 -1
- package/dist/local/store/react-native/storage.d.ts +2 -2
- package/dist/local/store/web/adapter.d.ts +5 -4
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +54 -10
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web/index.d.ts +4 -4
- package/dist/local/store/web/index.d.ts.map +1 -1
- package/dist/local/store/web/index.js +3 -3
- package/dist/local/store/web/index.js.map +1 -1
- package/dist/local/vault/expo-secure-store.d.ts +2 -2
- package/dist/local/vault/expo-secure-store.d.ts.map +1 -1
- package/dist/local/vault/expo-secure-store.js +5 -5
- package/dist/local/vault/expo-secure-store.js.map +1 -1
- package/dist/local/vault/index.d.ts +7 -3
- package/dist/local/vault/index.d.ts.map +1 -1
- package/dist/local/vault/index.js +1 -1
- package/dist/local/vault/index.js.map +1 -1
- package/dist/logger.d.ts +4 -4
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +5 -5
- package/dist/logger.js.map +1 -1
- package/dist/media/index.d.ts +7 -7
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +2 -2
- package/dist/profile/cipher.d.ts +1 -1
- package/dist/profile/cipher.js +1 -1
- package/dist/profile/contact-state.d.ts +1 -1
- package/dist/profile/contact-state.d.ts.map +1 -1
- package/dist/profile/contact-state.js +3 -3
- package/dist/profile/contact-state.js.map +1 -1
- package/dist/profile/crypto.d.ts +1 -1
- package/dist/profile/crypto.js +1 -1
- package/dist/profile/profile-key.d.ts.map +1 -1
- package/dist/profile/profile-key.js +3 -3
- package/dist/profile/profile-key.js.map +1 -1
- package/dist/profile/update-service.d.ts +2 -2
- package/dist/profile/update-service.d.ts.map +1 -1
- package/dist/profile/update-service.js +2 -2
- package/dist/profile/update-service.js.map +1 -1
- package/dist/remote/object-store/convex-r2/server.d.ts +1 -1
- package/dist/remote/object-store/convex-r2/storage.d.ts +2 -2
- package/dist/remote/object-store/convex-r2/storage.d.ts.map +1 -1
- package/dist/remote/object-store/index.d.ts +1 -1
- package/dist/remote/object-store/index.d.ts.map +1 -1
- package/dist/remote/object-store/s3/storage.d.ts +3 -3
- package/dist/remote/object-store/s3/storage.d.ts.map +1 -1
- package/dist/remote/object-store/s3/storage.js +1 -1
- package/dist/remote/object-store/types.d.ts +1 -1
- package/dist/remote/object-store/types.d.ts.map +1 -1
- package/dist/remote/relay/convex/backend.d.ts +405 -0
- package/dist/remote/relay/convex/backend.d.ts.map +1 -0
- package/dist/remote/relay/convex/backend.js +687 -0
- package/dist/remote/relay/convex/backend.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/api.d.ts +58 -0
- package/dist/remote/relay/convex/component/_generated/api.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/api.js +31 -0
- package/dist/remote/relay/convex/component/_generated/api.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/component.d.ts +483 -0
- package/dist/remote/relay/convex/component/_generated/component.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/component.js +11 -0
- package/dist/remote/relay/convex/component/_generated/component.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts +46 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.js +11 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/server.d.ts +129 -0
- package/dist/remote/relay/convex/component/_generated/server.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/server.js +79 -0
- package/dist/remote/relay/convex/component/_generated/server.js.map +1 -0
- package/dist/remote/relay/convex/component/accounts.d.ts +43 -0
- package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/accounts.js +181 -0
- package/dist/remote/relay/convex/component/accounts.js.map +1 -0
- package/dist/remote/relay/convex/component/certificates.d.ts +10 -0
- package/dist/remote/relay/convex/component/certificates.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/certificates.js +117 -0
- package/dist/remote/relay/convex/component/certificates.js.map +1 -0
- package/dist/remote/relay/convex/component/cleanup.d.ts +32 -0
- package/dist/remote/relay/convex/component/cleanup.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/cleanup.js +146 -0
- package/dist/remote/relay/convex/component/cleanup.js.map +1 -0
- package/dist/remote/relay/convex/component/convex.config.d.ts +5 -0
- package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/convex.config.js +33 -0
- package/dist/remote/relay/convex/component/convex.config.js.map +1 -0
- package/dist/remote/relay/convex/component/crons.d.ts +3 -0
- package/dist/remote/relay/convex/component/crons.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/crons.js +10 -0
- package/dist/remote/relay/convex/component/crons.js.map +1 -0
- package/dist/remote/relay/convex/component/devices.d.ts +101 -0
- package/dist/remote/relay/convex/component/devices.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/devices.js +299 -0
- package/dist/remote/relay/convex/component/devices.js.map +1 -0
- package/dist/remote/relay/convex/component/errors.d.ts +22 -0
- package/dist/remote/relay/convex/component/errors.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/errors.js +17 -0
- package/dist/remote/relay/convex/component/errors.js.map +1 -0
- package/dist/remote/relay/convex/component/groups.d.ts +63 -0
- package/dist/remote/relay/convex/component/groups.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/groups.js +341 -0
- package/dist/remote/relay/convex/component/groups.js.map +1 -0
- package/dist/remote/relay/convex/component/keys.d.ts +130 -0
- package/dist/remote/relay/convex/component/keys.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/keys.js +578 -0
- package/dist/remote/relay/convex/component/keys.js.map +1 -0
- package/dist/remote/relay/convex/component/messages.d.ts +119 -0
- package/dist/remote/relay/convex/component/messages.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/messages.js +723 -0
- package/dist/remote/relay/convex/component/messages.js.map +1 -0
- package/dist/remote/relay/convex/component/provisioning.d.ts +92 -0
- package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/provisioning.js +359 -0
- package/dist/remote/relay/convex/component/provisioning.js.map +1 -0
- package/dist/remote/relay/convex/component/runtime.d.ts +18 -0
- package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/runtime.js +142 -0
- package/dist/remote/relay/convex/component/runtime.js.map +1 -0
- package/dist/remote/relay/convex/component/schema.d.ts +358 -0
- package/dist/remote/relay/convex/component/schema.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/schema.js +287 -0
- package/dist/remote/relay/convex/component/schema.js.map +1 -0
- package/dist/remote/relay/convex/component/zkAuth.d.ts +12 -0
- package/dist/remote/relay/convex/component/zkAuth.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/zkAuth.js +71 -0
- package/dist/remote/relay/convex/component/zkAuth.js.map +1 -0
- package/dist/remote/relay/convex/constants.d.ts +3 -0
- package/dist/remote/relay/convex/constants.d.ts.map +1 -0
- package/dist/remote/relay/convex/constants.js +3 -0
- package/dist/remote/relay/convex/constants.js.map +1 -0
- package/dist/remote/relay/convex/group-server.d.ts +29 -24
- package/dist/remote/relay/convex/group-server.d.ts.map +1 -1
- package/dist/remote/relay/convex/group-server.js +62 -28
- package/dist/remote/relay/convex/group-server.js.map +1 -1
- package/dist/remote/relay/convex/index.d.ts +14 -11
- package/dist/remote/relay/convex/index.d.ts.map +1 -1
- package/dist/remote/relay/convex/index.js +9 -7
- package/dist/remote/relay/convex/index.js.map +1 -1
- package/dist/remote/relay/convex/relay.d.ts +67 -80
- package/dist/remote/relay/convex/relay.d.ts.map +1 -1
- package/dist/remote/relay/convex/relay.js +143 -59
- package/dist/remote/relay/convex/relay.js.map +1 -1
- package/dist/remote/relay/convex/types.d.ts +16 -103
- package/dist/remote/relay/convex/types.d.ts.map +1 -1
- package/dist/remote/relay/convex/types.js +8 -13
- package/dist/remote/relay/convex/types.js.map +1 -1
- package/dist/remote/relay/index.d.ts +7 -7
- package/dist/remote/relay/index.d.ts.map +1 -1
- package/dist/remote/relay/index.js +7 -7
- package/dist/remote/relay/index.js.map +1 -1
- package/dist/remote/relay/{mock → memory}/adapter.d.ts +55 -31
- package/dist/remote/relay/memory/adapter.d.ts.map +1 -0
- package/dist/remote/relay/{mock → memory}/adapter.js +276 -135
- package/dist/remote/relay/memory/adapter.js.map +1 -0
- package/dist/remote/relay/memory/failures.d.ts +58 -0
- package/dist/remote/relay/memory/failures.d.ts.map +1 -0
- package/dist/remote/relay/memory/failures.js +123 -0
- package/dist/remote/relay/memory/failures.js.map +1 -0
- package/dist/remote/relay/memory/group-server.d.ts +9 -0
- package/dist/remote/relay/memory/group-server.d.ts.map +1 -0
- package/dist/remote/relay/memory/group-server.js +9 -0
- package/dist/remote/relay/memory/group-server.js.map +1 -0
- package/dist/remote/relay/memory/index.d.ts +11 -0
- package/dist/remote/relay/memory/index.d.ts.map +1 -0
- package/dist/remote/relay/memory/index.js +7 -0
- package/dist/remote/relay/memory/index.js.map +1 -0
- package/dist/remote/relay/types.d.ts +99 -86
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/remote/relay/types.js +2 -3
- package/dist/remote/relay/types.js.map +1 -1
- package/dist/safety/protobuf.d.ts +1 -1
- package/dist/safety/protobuf.d.ts.map +1 -1
- package/dist/types/api.d.ts +42 -17
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +2 -2
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +2 -2
- package/dist/types/errors.js.map +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/protocol-config.d.ts +71 -4
- package/dist/types/protocol-config.d.ts.map +1 -1
- package/dist/types/protocol-config.js +63 -2
- package/dist/types/protocol-config.js.map +1 -1
- package/dist/types/protocol-constants.d.ts +1 -1
- package/dist/types/protocol-constants.js +1 -1
- package/dist/utils/binary-transfer.d.ts +1 -1
- package/dist/utils/errors.d.ts +2 -2
- package/dist/utils/errors.js +2 -2
- package/dist/utils/retry.d.ts +4 -3
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +20 -1
- package/dist/utils/retry.js.map +1 -1
- package/dist/zk/groups.d.ts +1 -1
- package/dist/zk/groups.js +1 -1
- package/docs/ASSURANCE.md +28 -11
- package/docs/CLIENT_COMPOSITION.md +32 -76
- package/docs/DEVIATIONS.md +944 -0
- package/docs/E2EE.md +71 -6
- package/docs/ERROR_HANDLING.md +8 -1
- package/docs/GETTING_STARTED.md +22 -18
- package/docs/INTERFACES.md +22 -22
- package/docs/PACKAGE_SURFACE.md +23 -16
- package/docs/PROTOCOL_POLICY.md +11 -2
- package/docs/RECIPES.md +17 -13
- package/docs/SECURITY.md +8 -0
- package/files/README.md +1 -1
- package/groups/README.md +16 -5
- package/local/store/README.md +14 -12
- package/local/store/expo/README.md +15 -6
- package/local/store/memory/README.md +58 -0
- package/local/store/node/README.md +8 -1
- package/local/store/react-native/README.md +1 -1
- package/local/store/web/README.md +1 -1
- package/local/vault/README.md +3 -3
- package/package.json +33 -13
- package/remote/README.md +19 -19
- package/remote/object-store/README.md +3 -3
- package/remote/object-store/convex-r2/README.md +1 -1
- package/remote/object-store/s3/README.md +1 -1
- package/remote/relay/README.md +7 -7
- package/remote/relay/convex/README.md +10 -4
- package/remote/relay/convex/component/README.md +428 -0
- package/remote/relay/memory/README.md +69 -0
- package/scripts/oe-groups.mjs +162 -0
- package/types/README.md +1 -1
- package/dist/internal/groups-v2/access-control.d.ts +0 -101
- package/dist/internal/groups-v2/access-control.d.ts.map +0 -1
- package/dist/internal/groups-v2/access-control.js +0 -184
- package/dist/internal/groups-v2/access-control.js.map +0 -1
- package/dist/internal/groups-v2/change-actions.d.ts +0 -35
- package/dist/internal/groups-v2/change-actions.d.ts.map +0 -1
- package/dist/internal/groups-v2/change-actions.js +0 -358
- package/dist/internal/groups-v2/change-actions.js.map +0 -1
- package/dist/internal/groups-v2/encrypted-state.d.ts.map +0 -1
- package/dist/internal/groups-v2/encrypted-state.js.map +0 -1
- package/dist/internal/groups-v2/index.d.ts +0 -14
- package/dist/internal/groups-v2/index.d.ts.map +0 -1
- package/dist/internal/groups-v2/index.js +0 -11
- package/dist/internal/groups-v2/index.js.map +0 -1
- package/dist/internal/groups-v2/invite-link.d.ts.map +0 -1
- package/dist/internal/groups-v2/invite-link.js.map +0 -1
- package/dist/internal/groups-v2/manager.d.ts.map +0 -1
- package/dist/internal/groups-v2/manager.js +0 -1093
- package/dist/internal/groups-v2/manager.js.map +0 -1
- package/dist/internal/groups-v2/types.d.ts.map +0 -1
- package/dist/internal/groups-v2/types.js.map +0 -1
- package/dist/local/store/mock/adapter.d.ts.map +0 -1
- package/dist/local/store/mock/adapter.js.map +0 -1
- package/dist/local/store/mock/index.d.ts +0 -10
- package/dist/local/store/mock/index.d.ts.map +0 -1
- package/dist/local/store/mock/index.js +0 -6
- package/dist/local/store/mock/index.js.map +0 -1
- package/dist/remote/relay/mock/adapter.d.ts.map +0 -1
- package/dist/remote/relay/mock/adapter.js.map +0 -1
- package/dist/remote/relay/mock/index.d.ts +0 -10
- package/dist/remote/relay/mock/index.d.ts.map +0 -1
- package/dist/remote/relay/mock/index.js +0 -6
- package/dist/remote/relay/mock/index.js.map +0 -1
- package/docs/api/README.md +0 -471
- package/docs/api/classes/EncryptionError.md +0 -112
- package/docs/api/classes/EndorsementManager.md +0 -307
- package/docs/api/classes/SealedSenderAuthError.md +0 -127
- package/docs/api/classes/ServerDerivedKeyPair.md +0 -68
- package/docs/api/classes/ServerDerivedPublicKey.md +0 -33
- package/docs/api/classes/ServerRootKeyPair.md +0 -94
- package/docs/api/classes/ServerRootPublicKey.md +0 -72
- package/docs/api/classes/SignalBlockingManager.md +0 -106
- package/docs/api/classes/SignalProtocolClient.md +0 -2651
- package/docs/api/classes/VerificationFailure.md +0 -25
- package/docs/api/enumerations/ContentHint.md +0 -63
- package/docs/api/enumerations/EncryptionErrorCode.md +0 -488
- package/docs/api/enumerations/IdentityKeyChange.md +0 -65
- package/docs/api/enumerations/MessageType.md +0 -29
- package/docs/api/enumerations/TrustDirection.md +0 -33
- package/docs/api/enumerations/TypingAction.md +0 -31
- package/docs/api/functions/createDefaultSignalContentAdapter.md +0 -13
- package/docs/api/functions/createDefaultSignalLogger.md +0 -36
- package/docs/api/functions/createGroupId.md +0 -32
- package/docs/api/functions/createSignalProtocolClient.md +0 -36
- package/docs/api/functions/createSignalProtocolClientConfig.md +0 -24
- package/docs/api/functions/extractGroupId.md +0 -32
- package/docs/api/functions/formatVersion.md +0 -25
- package/docs/api/functions/isCompatible.md +0 -31
- package/docs/api/functions/isGroupId.md +0 -37
- package/docs/api/functions/isSealedSenderAuthError.md +0 -25
- package/docs/api/functions/parseVersion.md +0 -29
- package/docs/api/functions/resolveSPQRLimits.md +0 -21
- package/docs/api/functions/resolveSignalLogger.md +0 -42
- package/docs/api/interfaces/AccountIdentityProvisioning.md +0 -43
- package/docs/api/interfaces/AccountIdentityRotation.md +0 -69
- package/docs/api/interfaces/AttachmentTransferOptions.md +0 -49
- package/docs/api/interfaces/BlockedRecipientEntry.md +0 -25
- package/docs/api/interfaces/BlockedRecipientsSyncInput.md +0 -27
- package/docs/api/interfaces/ConfigurationSyncInput.md +0 -19
- package/docs/api/interfaces/CredentialPublicKey.md +0 -25
- package/docs/api/interfaces/DataMessageInput.md +0 -21
- package/docs/api/interfaces/DecryptedEnvelope.md +0 -95
- package/docs/api/interfaces/DecryptedGroup.md +0 -86
- package/docs/api/interfaces/DeviceInfo.md +0 -79
- package/docs/api/interfaces/DeviceRecord.md +0 -87
- package/docs/api/interfaces/DeviceRegistration.md +0 -27
- package/docs/api/interfaces/DoubleRatchetConfig.md +0 -36
- package/docs/api/interfaces/EcOneTimePreKey.md +0 -27
- package/docs/api/interfaces/EcSignedPreKey.md +0 -39
- package/docs/api/interfaces/EcSignedPreKeyUpload.md +0 -50
- package/docs/api/interfaces/EncryptionErrorContext.md +0 -51
- package/docs/api/interfaces/Envelope.md +0 -154
- package/docs/api/interfaces/ForceKeyResetResult.md +0 -37
- package/docs/api/interfaces/GroupAuthorization.md +0 -23
- package/docs/api/interfaces/GroupChangeEntry.md +0 -42
- package/docs/api/interfaces/GroupMemberDevice.md +0 -26
- package/docs/api/interfaces/IEcOneTimePreKeyStore.md +0 -86
- package/docs/api/interfaces/IEcSignedPreKeyStore.md +0 -132
- package/docs/api/interfaces/IGroupServer.md +0 -120
- package/docs/api/interfaces/IGroupStateStore.md +0 -128
- package/docs/api/interfaces/IIdentityKeyStore.md +0 -312
- package/docs/api/interfaces/IKemPreKeyStore.md +0 -144
- package/docs/api/interfaces/IKyberLastResortPreKeyStore.md +0 -111
- package/docs/api/interfaces/ILogger.md +0 -117
- package/docs/api/interfaces/IProtocolStore.md +0 -1033
- package/docs/api/interfaces/ISenderKeyStore.md +0 -417
- package/docs/api/interfaces/ISesameStore.md +0 -249
- package/docs/api/interfaces/ISessionStore.md +0 -178
- package/docs/api/interfaces/ISignalLocalSecretVault.md +0 -71
- package/docs/api/interfaces/ISignalLocalStore.md +0 -2053
- package/docs/api/interfaces/ISignalProtocolClient.md +0 -1183
- package/docs/api/interfaces/ISignalProtocolManager.md +0 -272
- package/docs/api/interfaces/ISignalRelayServer.md +0 -1329
- package/docs/api/interfaces/IdentityKeyPair.md +0 -49
- package/docs/api/interfaces/IncomingEnvelope.md +0 -91
- package/docs/api/interfaces/InspectedSignalContent.md +0 -43
- package/docs/api/interfaces/KDFChain.md +0 -31
- package/docs/api/interfaces/KemLastResortPreKeyUpload.md +0 -50
- package/docs/api/interfaces/KeyPair.md +0 -23
- package/docs/api/interfaces/KyberPreKey.md +0 -42
- package/docs/api/interfaces/MLKEMBraidAgentState.md +0 -191
- package/docs/api/interfaces/MLKEMBraidMessage.md +0 -49
- package/docs/api/interfaces/MediaAttachmentDeleteSyncInput.md +0 -31
- package/docs/api/interfaces/MessageHeader.md +0 -49
- package/docs/api/interfaces/MessageRecord.md +0 -86
- package/docs/api/interfaces/ParsedReceiptContent.md +0 -19
- package/docs/api/interfaces/ParsedTypingContent.md +0 -19
- package/docs/api/interfaces/PreKeyMaintenanceStore.md +0 -87
- package/docs/api/interfaces/PreKeyMessage.md +0 -159
- package/docs/api/interfaces/PreKeyStatusResult.md +0 -21
- package/docs/api/interfaces/PreKeyUpload.md +0 -42
- package/docs/api/interfaces/ProcessEnvelopeOptions.md +0 -72
- package/docs/api/interfaces/ProtocolAddress.md +0 -38
- package/docs/api/interfaces/ProtocolStrategyConfig.md +0 -91
- package/docs/api/interfaces/RatchetMessage.md +0 -96
- package/docs/api/interfaces/ReadSyncEntryInput.md +0 -19
- package/docs/api/interfaces/ReceiverChain.md +0 -43
- package/docs/api/interfaces/RecipientUsernameSyncInput.md +0 -31
- package/docs/api/interfaces/RelayPreKeyBundle.md +0 -254
- package/docs/api/interfaces/RemoteObjectDownload.md +0 -33
- package/docs/api/interfaces/RemoteObjectUpload.md +0 -49
- package/docs/api/interfaces/ResolvedSPQRInfoStrings.md +0 -27
- package/docs/api/interfaces/ResolvedSPQRLimits.md +0 -37
- package/docs/api/interfaces/RetryRequest.md +0 -80
- package/docs/api/interfaces/SCKAState.md +0 -65
- package/docs/api/interfaces/SPQRLimits.md +0 -40
- package/docs/api/interfaces/SPQRState.md +0 -191
- package/docs/api/interfaces/SafetyNumber.md +0 -60
- package/docs/api/interfaces/SafetyNumberConfirmation.md +0 -46
- package/docs/api/interfaces/SealedSenderConfig.md +0 -70
- package/docs/api/interfaces/SendOptions.md +0 -191
- package/docs/api/interfaces/SendResult.md +0 -93
- package/docs/api/interfaces/SenderKeyDistributionMessage.md +0 -43
- package/docs/api/interfaces/SenderKeyState.md +0 -76
- package/docs/api/interfaces/SenderKeysConfig.md +0 -65
- package/docs/api/interfaces/SentSyncTranscriptInput.md +0 -31
- package/docs/api/interfaces/ServiceId.md +0 -19
- package/docs/api/interfaces/SesameMessage.md +0 -84
- package/docs/api/interfaces/SesameStats.md +0 -57
- package/docs/api/interfaces/SessionHealthResult.md +0 -120
- package/docs/api/interfaces/SessionRecord.md +0 -80
- package/docs/api/interfaces/SessionRecordMetadata.md +0 -109
- package/docs/api/interfaces/SessionState.md +0 -368
- package/docs/api/interfaces/SessionTrustCommit.md +0 -58
- package/docs/api/interfaces/SignalBlockingHooks.md +0 -44
- package/docs/api/interfaces/SignalBlockingManagerOptions.md +0 -31
- package/docs/api/interfaces/SignalBlockingMirror.md +0 -30
- package/docs/api/interfaces/SignalBlockingStore.md +0 -83
- package/docs/api/interfaces/SignalContentAdapter.md +0 -325
- package/docs/api/interfaces/SignalProtocolClientAdapterConfig.md +0 -44
- package/docs/api/interfaces/SignalProtocolClientCompositionOptions.md +0 -693
- package/docs/api/interfaces/SignalProtocolClientConfig.md +0 -839
- package/docs/api/interfaces/SignalProtocolClientDeleteLocalAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientHooks.md +0 -506
- package/docs/api/interfaces/SignalProtocolClientIdentityConfig.md +0 -35
- package/docs/api/interfaces/SignalProtocolClientLoadLocalAttachmentInput.md +0 -187
- package/docs/api/interfaces/SignalProtocolClientLoadedLocalAttachment.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMedia.md +0 -83
- package/docs/api/interfaces/SignalProtocolClientMediaCompletedResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaConfig.md +0 -157
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadCompletedResult.md +0 -37
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadNotNeededResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaFailedResult.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMediaOperationOptions.md +0 -53
- package/docs/api/interfaces/SignalProtocolClientMediaPendingResult.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMediaProcessResult.md +0 -43
- package/docs/api/interfaces/SignalProtocolClientMediaSkippedResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaUploadCompletedResult.md +0 -31
- package/docs/api/interfaces/SignalProtocolClientProcessPendingMediaOptions.md +0 -87
- package/docs/api/interfaces/SignalProtocolClientSaveDownloadedAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientSaveUploadedAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientSyncDeleteInput.md +0 -19
- package/docs/api/interfaces/SignalProtocolConfig.md +0 -50
- package/docs/api/interfaces/SignalRemoteObjectStore.md +0 -88
- package/docs/api/interfaces/SkippedSenderMessageKey.md +0 -26
- package/docs/api/interfaces/TaskNotificationAckSyncInput.md +0 -31
- package/docs/api/interfaces/TripleRatchetState.md +0 -64
- package/docs/api/interfaces/UserRecord.md +0 -71
- package/docs/api/interfaces/UsernameStateSyncInput.md +0 -19
- package/docs/api/interfaces/VerificationStateSyncInput.md +0 -31
- package/docs/api/interfaces/VersionNegotiationState.md +0 -84
- package/docs/api/interfaces/ViewOnceOpenSyncInput.md +0 -19
- package/docs/api/namespaces/ProtocolAddress/README.md +0 -33
- package/docs/api/namespaces/ProtocolAddress/functions/create.md +0 -41
- package/docs/api/namespaces/ProtocolAddress/functions/equals.md +0 -39
- package/docs/api/namespaces/ProtocolAddress/functions/fromStorageKey.md +0 -36
- package/docs/api/namespaces/ProtocolAddress/functions/isUser.md +0 -39
- package/docs/api/namespaces/ProtocolAddress/functions/isValid.md +0 -34
- package/docs/api/namespaces/ProtocolAddress/functions/parse.md +0 -41
- package/docs/api/namespaces/ProtocolAddress/functions/toStorageKey.md +0 -38
- package/docs/api/namespaces/ProtocolAddress/functions/toString.md +0 -34
- package/docs/api/namespaces/SessionRecord/README.md +0 -30
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrent.md +0 -40
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrentState.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/create.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/deserialize.md +0 -29
- package/docs/api/namespaces/SessionRecord/functions/findSession.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/getAllSessions.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/getArchivedCount.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/hasCurrentSession.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/hasUsableSenderChain.md +0 -36
- package/docs/api/namespaces/SessionRecord/functions/promoteSession.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/serialize.md +0 -28
- package/docs/api/namespaces/SessionRecord/variables/MAX_ARCHIVED_SESSIONS.md +0 -14
- package/docs/api/namespaces/SessionState/README.md +0 -15
- package/docs/api/namespaces/SessionState/functions/getSessionId.md +0 -32
- package/docs/api/namespaces/blocking/README.md +0 -43
- package/docs/api/namespaces/encoding/README.md +0 -33
- package/docs/api/namespaces/encoding/functions/base64ToUrlSafe.md +0 -28
- package/docs/api/namespaces/encoding/functions/bytesToBase64.md +0 -21
- package/docs/api/namespaces/encoding/functions/bytesToString.md +0 -21
- package/docs/api/namespaces/encoding/functions/bytesToUrlSafeBase64.md +0 -33
- package/docs/api/namespaces/encoding/functions/concatBytes.md +0 -21
- package/docs/api/namespaces/encoding/functions/stringToBytes.md +0 -21
- package/docs/api/namespaces/encoding/functions/urlSafeToBase64.md +0 -27
- package/docs/api/namespaces/keys/README.md +0 -126
- package/docs/api/namespaces/keys/functions/acceptContactIdentityRotation.md +0 -33
- package/docs/api/namespaces/keys/functions/assertIdentityCommitment.md +0 -25
- package/docs/api/namespaces/keys/functions/compositeIdentitiesEqual.md +0 -23
- package/docs/api/namespaces/keys/functions/createCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/createPreKeySignatureContext.md +0 -31
- package/docs/api/namespaces/keys/functions/createUnverifiedContactIdentityRecord.md +0 -23
- package/docs/api/namespaces/keys/functions/decodeCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/deriveIdentityCommitment.md +0 -19
- package/docs/api/namespaces/keys/functions/encodeCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/evaluateContactIdentityCandidate.md +0 -27
- package/docs/api/namespaces/keys/functions/generateEcOneTimePreKeys.md +0 -37
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKey.md +0 -39
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKeyId.md +0 -21
- package/docs/api/namespaces/keys/functions/generateIdentityKeyPair.md +0 -24
- package/docs/api/namespaces/keys/functions/generateKemOneTimePreKeys.md +0 -47
- package/docs/api/namespaces/keys/functions/generateKyberLastResortPreKey.md +0 -37
- package/docs/api/namespaces/keys/functions/generateRegistrationId.md +0 -13
- package/docs/api/namespaces/keys/functions/signMlKem1024PreKey.md +0 -29
- package/docs/api/namespaces/keys/functions/signPreKey.md +0 -31
- package/docs/api/namespaces/keys/functions/validateContactIdentityRecord.md +0 -19
- package/docs/api/namespaces/keys/functions/verifyContactIdentityRecord.md +0 -31
- package/docs/api/namespaces/keys/functions/verifyMlKem1024PreKey.md +0 -33
- package/docs/api/namespaces/keys/functions/verifyPreKeySignature.md +0 -35
- package/docs/api/namespaces/keys/interfaces/CompositeIdentityV1.md +0 -33
- package/docs/api/namespaces/keys/interfaces/ContactIdentityRecord.md +0 -53
- package/docs/api/namespaces/keys/interfaces/KemOneTimePreKey.md +0 -43
- package/docs/api/namespaces/keys/type-aliases/IdentityCandidateStatus.md +0 -9
- package/docs/api/namespaces/keys/type-aliases/IdentityTrustState.md +0 -9
- package/docs/api/namespaces/keys/type-aliases/IdentityType.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_ED25519_TAG.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_LENGTH.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_VERSION.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_X25519_TAG.md +0 -9
- package/docs/api/namespaces/keys/variables/IDENTITY_COMMITMENT_V1_DOMAIN.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_ML_KEM_1024.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_X25519.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_SIGNATURE_V1_DOMAIN.md +0 -9
- package/docs/api/namespaces/media/README.md +0 -105
- package/docs/api/namespaces/media/classes/MediaAttachmentError.md +0 -57
- package/docs/api/namespaces/media/functions/createByteRangeMediaAttachmentTransfer.md +0 -19
- package/docs/api/namespaces/media/functions/createMediaAttachmentDeliveryId.md +0 -29
- package/docs/api/namespaces/media/functions/createMediaAttachmentId.md +0 -19
- package/docs/api/namespaces/media/functions/createMediaAttachmentMessage.md +0 -25
- package/docs/api/namespaces/media/functions/createMediaAttachmentPointer.md +0 -19
- package/docs/api/namespaces/media/functions/createTusMediaAttachmentTransfer.md +0 -19
- package/docs/api/namespaces/media/functions/deleteMediaAttachment.md +0 -23
- package/docs/api/namespaces/media/functions/executeMediaAttachmentJob.md +0 -23
- package/docs/api/namespaces/media/functions/isMediaAttachmentFlagSet.md +0 -19
- package/docs/api/namespaces/media/functions/parseMediaAttachmentMessage.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanup.md +0 -23
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanupJobs.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentDeleteSync.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentDownloadJob.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentOpen.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentProcessing.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentUploadJob.md +0 -19
- package/docs/api/namespaces/media/functions/prepareMediaAttachmentUpload.md +0 -30
- package/docs/api/namespaces/media/functions/resolveMediaAttachment.md +0 -30
- package/docs/api/namespaces/media/functions/serializeMediaAttachmentMessage.md +0 -25
- package/docs/api/namespaces/media/functions/validateMediaAttachmentPolicy.md +0 -23
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentPartialStore.md +0 -68
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentTransferOptions.md +0 -91
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentOptions.md +0 -25
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentResult.md +0 -19
- package/docs/api/namespaces/media/interfaces/ExecuteMediaAttachmentJobOptions.md +0 -157
- package/docs/api/namespaces/media/interfaces/MediaAttachmentBackgroundJob.md +0 -85
- package/docs/api/namespaces/media/interfaces/MediaAttachmentCleanupPlan.md +0 -37
- package/docs/api/namespaces/media/interfaces/MediaAttachmentJobExecutionResult.md +0 -55
- package/docs/api/namespaces/media/interfaces/MediaAttachmentMessage.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentOpenDecision.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPointer.md +0 -133
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPolicy.md +0 -67
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProcessingPlan.md +0 -73
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProgress.md +0 -69
- package/docs/api/namespaces/media/interfaces/MediaAttachmentResumeState.md +0 -37
- package/docs/api/namespaces/media/interfaces/MediaAttachmentRetryOptions.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransfer.md +0 -51
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferCheckpoint.md +0 -69
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferOptions.md +0 -67
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadJobData.md +0 -19
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadResponse.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentCleanupJobsInput.md +0 -61
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDeleteSyncInput.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDownloadJobInput.md +0 -161
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentOpenInput.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentProcessingInput.md +0 -83
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentUploadJobInput.md +0 -147
- package/docs/api/namespaces/media/interfaces/PrepareMediaAttachmentUploadOptions.md +0 -144
- package/docs/api/namespaces/media/interfaces/ResolveMediaAttachmentOptions.md +0 -55
- package/docs/api/namespaces/media/interfaces/ResolvedMediaAttachment.md +0 -109
- package/docs/api/namespaces/media/interfaces/TusMediaAttachmentTransferOptions.md +0 -85
- package/docs/api/namespaces/media/type-aliases/CreateMediaAttachmentPointerInput.md +0 -15
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCheckpointCallback.md +0 -19
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCleanupReason.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentErrorCode.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentFlag.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobExecutionStatus.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobOperation.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobPriority.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSkipReason.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSource.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentKnownIds.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentMessageType.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentProgressCallback.md +0 -19
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_DEFAULTS.md +0 -47
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_PRESETS.md +0 -95
- package/docs/api/namespaces/media/variables/MediaAttachmentCleanupReason.md +0 -27
- package/docs/api/namespaces/media/variables/MediaAttachmentErrorCode.md +0 -75
- package/docs/api/namespaces/media/variables/MediaAttachmentFlag.md +0 -23
- package/docs/api/namespaces/media/variables/MediaAttachmentJobExecutionStatus.md +0 -19
- package/docs/api/namespaces/media/variables/MediaAttachmentJobOperation.md +0 -31
- package/docs/api/namespaces/media/variables/MediaAttachmentJobPriority.md +0 -23
- package/docs/api/namespaces/media/variables/MediaAttachmentJobSource.md +0 -51
- package/docs/api/namespaces/media/variables/MediaAttachmentMessageType.md +0 -15
- package/docs/api/namespaces/media/variables/downloadMediaAttachment.md +0 -30
- package/docs/api/namespaces/safety/README.md +0 -61
- package/docs/api/namespaces/safety/classes/DisplayableFingerprint.md +0 -108
- package/docs/api/namespaces/safety/classes/Fingerprint.md +0 -104
- package/docs/api/namespaces/safety/classes/ScannableFingerprint.md +0 -209
- package/docs/api/namespaces/safety/functions/base64ToBytes.md +0 -21
- package/docs/api/namespaces/safety/functions/clearFingerprintCache.md +0 -15
- package/docs/api/namespaces/safety/functions/compareSafetyNumbers.md +0 -25
- package/docs/api/namespaces/safety/functions/createFingerprintData.md +0 -60
- package/docs/api/namespaces/safety/functions/extractQrData.md +0 -34
- package/docs/api/namespaces/safety/functions/generateCompositeSafetyNumber.md +0 -39
- package/docs/api/namespaces/safety/functions/generateEmojiFingerprint.md +0 -24
- package/docs/api/namespaces/safety/functions/generateSingleKeyReferenceSafetyNumber.md +0 -51
- package/docs/api/namespaces/safety/functions/generateVerifySchemeUrl.md +0 -32
- package/docs/api/namespaces/safety/functions/generateVerifyUrl.md +0 -49
- package/docs/api/namespaces/safety/functions/isValidSafetyNumber.md +0 -21
- package/docs/api/namespaces/safety/functions/isVerifyUrl.md +0 -45
- package/docs/api/namespaces/safety/functions/parseVerifyUrl.md +0 -31
- package/docs/api/namespaces/safety/interfaces/FingerprintData.md +0 -52
- package/docs/api/namespaces/safety/interfaces/SafetyNumber.md +0 -49
- package/docs/api/namespaces/safety/interfaces/VerifyLinkConfig.md +0 -28
- package/docs/api/namespaces/safety/interfaces/VerifyUrlParams.md +0 -49
- package/docs/api/namespaces/safety/type-aliases/CompareResult.md +0 -21
- package/docs/api/namespaces/safety/variables/DEFAULT_VERIFY_LINK_CONFIG.md +0 -12
- package/docs/api/namespaces/safety/variables/FINGERPRINT_ITERATIONS.md +0 -12
- package/docs/api/namespaces/safety/variables/FINGERPRINT_VERSION.md +0 -12
- package/docs/api/namespaces/safety/variables/VERIFY_BASE_URL.md +0 -11
- package/docs/api/namespaces/safety/variables/VERIFY_SCHEME_URL.md +0 -11
- package/docs/api/type-aliases/Base64.md +0 -20
- package/docs/api/type-aliases/BraidPolicy.md +0 -11
- package/docs/api/type-aliases/Bytes.md +0 -20
- package/docs/api/type-aliases/Ciphertext.md +0 -21
- package/docs/api/type-aliases/DeviceType.md +0 -11
- package/docs/api/type-aliases/DownloadedAttachment.md +0 -11
- package/docs/api/type-aliases/GroupId.md +0 -27
- package/docs/api/type-aliases/Hex.md +0 -20
- package/docs/api/type-aliases/HookName.md +0 -11
- package/docs/api/type-aliases/PostQuantumPolicy.md +0 -11
- package/docs/api/type-aliases/PreparedAttachmentUpload.md +0 -14
- package/docs/api/type-aliases/PrivateKey.md +0 -22
- package/docs/api/type-aliases/ProgressCallback.md +0 -45
- package/docs/api/type-aliases/PublicKey.md +0 -22
- package/docs/api/type-aliases/RemoteObjectCompleteUploadRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectDeleteRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectDownloadRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectUploadRequest.md +0 -42
- package/docs/api/type-aliases/SCKAMode.md +0 -11
- package/docs/api/type-aliases/SealedSenderAuth.md +0 -15
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaOperationResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadResult.md +0 -9
- package/docs/api/type-aliases/Signature.md +0 -21
- package/docs/api/type-aliases/Unsubscribe.md +0 -15
- package/docs/api/variables/BraidPolicy.md +0 -21
- package/docs/api/variables/DEFAULT_DEVICE_ID.md +0 -12
- package/docs/api/variables/DOUBLE_RATCHET_SPEC.md +0 -11
- package/docs/api/variables/GROUP_V2_PREFIX.md +0 -11
- package/docs/api/variables/KEY_REFRESH_INTERVAL_MS_DEFAULT.md +0 -11
- package/docs/api/variables/MAX_MESSAGE_KEYS.md +0 -14
- package/docs/api/variables/MAX_PREKEY_AGE_MS_DEFAULT.md +0 -11
- package/docs/api/variables/MAX_RECEIVER_CHAINS.md +0 -14
- package/docs/api/variables/MAX_REGISTRATION_ID.md +0 -16
- package/docs/api/variables/MAX_SKIP.md +0 -11
- package/docs/api/variables/MESSAGE_FORMAT.md +0 -11
- package/docs/api/variables/MIN_REGISTRATION_ID.md +0 -16
- package/docs/api/variables/ML_KEM_BRAID_SPEC.md +0 -11
- package/docs/api/variables/ONE_TIME_PREKEY_BATCH_SIZE.md +0 -21
- package/docs/api/variables/PQXDH_SPEC.md +0 -11
- package/docs/api/variables/PostQuantumPolicy.md +0 -21
- package/docs/api/variables/SENDER_KEY_FORMAT.md +0 -11
- package/docs/api/variables/SENDER_KEY_SPEC.md +0 -11
- package/docs/api/variables/SESAME_SPEC.md +0 -11
- package/docs/api/variables/SESSION_FORMAT.md +0 -11
- package/docs/api/variables/SPQR_LIMITS_DEFAULTS.md +0 -11
- package/docs/api/variables/X3DH_SPEC.md +0 -9
- package/docs/api/variables/defaultSignalLogger.md +0 -32
- package/local/store/mock/README.md +0 -27
- package/remote/relay/mock/README.md +0 -32
- /package/dist/internal/{groups-v2 → groups}/invite-link.d.ts +0 -0
- /package/dist/internal/{groups-v2 → groups}/invite-link.js +0 -0
|
@@ -1,2651 +0,0 @@
|
|
|
1
|
-
[**@open-e2ee/signal-protocol-sdk**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@open-e2ee/signal-protocol-sdk](../README.md) / SignalProtocolClient
|
|
6
|
-
|
|
7
|
-
# Class: SignalProtocolClient
|
|
8
|
-
|
|
9
|
-
Modern Signal Protocol Client
|
|
10
|
-
|
|
11
|
-
Provides a clean, testable, and flexible API for Signal Protocol operations.
|
|
12
|
-
Uses static factory pattern for type-safe async initialization:
|
|
13
|
-
- Guaranteed initialization via create() method
|
|
14
|
-
- Dependency injection support
|
|
15
|
-
- Configuration object pattern
|
|
16
|
-
- Clear error handling
|
|
17
|
-
- Type-safe API
|
|
18
|
-
|
|
19
|
-
This client implements the ISignalProtocolClient interface and wraps
|
|
20
|
-
SignalProtocolManager with additional high-level functionality.
|
|
21
|
-
|
|
22
|
-
## Implements
|
|
23
|
-
|
|
24
|
-
- [`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md)
|
|
25
|
-
|
|
26
|
-
## Properties
|
|
27
|
-
|
|
28
|
-
### deviceId
|
|
29
|
-
|
|
30
|
-
> `readonly` **deviceId**: `number`
|
|
31
|
-
|
|
32
|
-
Device ID for this client instance (1 = primary, 2-5 = linked)
|
|
33
|
-
|
|
34
|
-
#### Implementation of
|
|
35
|
-
|
|
36
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`deviceId`](../interfaces/ISignalProtocolClient.md#deviceid)
|
|
37
|
-
|
|
38
|
-
***
|
|
39
|
-
|
|
40
|
-
### logger
|
|
41
|
-
|
|
42
|
-
> `readonly` **logger**: `Required`\<[`ILogger`](../interfaces/ILogger.md)\>
|
|
43
|
-
|
|
44
|
-
Resolved logger for this client instance.
|
|
45
|
-
|
|
46
|
-
This is the client-scoped logger used throughout the Signal runtime.
|
|
47
|
-
|
|
48
|
-
#### Implementation of
|
|
49
|
-
|
|
50
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`logger`](../interfaces/ISignalProtocolClient.md#logger)
|
|
51
|
-
|
|
52
|
-
***
|
|
53
|
-
|
|
54
|
-
### media
|
|
55
|
-
|
|
56
|
-
> `readonly` **media**: [`SignalProtocolClientMedia`](../interfaces/SignalProtocolClientMedia.md)
|
|
57
|
-
|
|
58
|
-
Durable media job facade backed by the configured Signal local store.
|
|
59
|
-
|
|
60
|
-
Use this for background-safe attachment uploads, downloads, and cleanup
|
|
61
|
-
when the app provides media lifecycle callbacks in `config.media`.
|
|
62
|
-
|
|
63
|
-
## Accessors
|
|
64
|
-
|
|
65
|
-
### isSealedSenderEnabled
|
|
66
|
-
|
|
67
|
-
#### Get Signature
|
|
68
|
-
|
|
69
|
-
> **get** **isSealedSenderEnabled**(): `boolean`
|
|
70
|
-
|
|
71
|
-
Whether sealed sender is enabled and configured.
|
|
72
|
-
|
|
73
|
-
##### Returns
|
|
74
|
-
|
|
75
|
-
`boolean`
|
|
76
|
-
|
|
77
|
-
***
|
|
78
|
-
|
|
79
|
-
### syncStatus
|
|
80
|
-
|
|
81
|
-
#### Get Signature
|
|
82
|
-
|
|
83
|
-
> **get** **syncStatus**(): `"synced"` \| `"failed"` \| `"none"`
|
|
84
|
-
|
|
85
|
-
##### Returns
|
|
86
|
-
|
|
87
|
-
`"synced"` \| `"failed"` \| `"none"`
|
|
88
|
-
|
|
89
|
-
***
|
|
90
|
-
|
|
91
|
-
### userId
|
|
92
|
-
|
|
93
|
-
#### Get Signature
|
|
94
|
-
|
|
95
|
-
> **get** **userId**(): `string`
|
|
96
|
-
|
|
97
|
-
Get user ID for this client instance
|
|
98
|
-
|
|
99
|
-
##### See
|
|
100
|
-
|
|
101
|
-
ISignalProtocolClient.userId
|
|
102
|
-
|
|
103
|
-
##### Returns
|
|
104
|
-
|
|
105
|
-
`string`
|
|
106
|
-
|
|
107
|
-
User ID for this client instance
|
|
108
|
-
|
|
109
|
-
#### Implementation of
|
|
110
|
-
|
|
111
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`userId`](../interfaces/ISignalProtocolClient.md#userid)
|
|
112
|
-
|
|
113
|
-
## Methods
|
|
114
|
-
|
|
115
|
-
### acceptIdentityRotation()
|
|
116
|
-
|
|
117
|
-
> **acceptIdentityRotation**(`userId`, `identity`, `identityType?`): `Promise`\<[`ContactIdentityRecord`](../namespaces/keys/interfaces/ContactIdentityRecord.md)\>
|
|
118
|
-
|
|
119
|
-
Accept an authenticated composite-identity rotation and reset bound sessions.
|
|
120
|
-
|
|
121
|
-
#### Parameters
|
|
122
|
-
|
|
123
|
-
##### userId
|
|
124
|
-
|
|
125
|
-
`string`
|
|
126
|
-
|
|
127
|
-
##### identity
|
|
128
|
-
|
|
129
|
-
[`CompositeIdentityV1`](../namespaces/keys/interfaces/CompositeIdentityV1.md)
|
|
130
|
-
|
|
131
|
-
##### identityType?
|
|
132
|
-
|
|
133
|
-
[`IdentityType`](../namespaces/keys/type-aliases/IdentityType.md) = `'aci'`
|
|
134
|
-
|
|
135
|
-
#### Returns
|
|
136
|
-
|
|
137
|
-
`Promise`\<[`ContactIdentityRecord`](../namespaces/keys/interfaces/ContactIdentityRecord.md)\>
|
|
138
|
-
|
|
139
|
-
***
|
|
140
|
-
|
|
141
|
-
### addGroupMemberV2()
|
|
142
|
-
|
|
143
|
-
> **addGroupMemberV2**(`groupId`, `editorAci`, `newMemberAci`, `newMemberProfileKey`): `Promise`\<`void`\>
|
|
144
|
-
|
|
145
|
-
Add a member to a GroupsV2 group.
|
|
146
|
-
|
|
147
|
-
#### Parameters
|
|
148
|
-
|
|
149
|
-
##### groupId
|
|
150
|
-
|
|
151
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
152
|
-
|
|
153
|
-
##### editorAci
|
|
154
|
-
|
|
155
|
-
`Uint8Array`
|
|
156
|
-
|
|
157
|
-
##### newMemberAci
|
|
158
|
-
|
|
159
|
-
`Uint8Array`
|
|
160
|
-
|
|
161
|
-
##### newMemberProfileKey
|
|
162
|
-
|
|
163
|
-
`Uint8Array`
|
|
164
|
-
|
|
165
|
-
#### Returns
|
|
166
|
-
|
|
167
|
-
`Promise`\<`void`\>
|
|
168
|
-
|
|
169
|
-
***
|
|
170
|
-
|
|
171
|
-
### address()
|
|
172
|
-
|
|
173
|
-
> **address**(): [`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
174
|
-
|
|
175
|
-
Get the ProtocolAddress for this client's device.
|
|
176
|
-
|
|
177
|
-
Useful when an integration needs to reference the local device.
|
|
178
|
-
|
|
179
|
-
#### Returns
|
|
180
|
-
|
|
181
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
182
|
-
|
|
183
|
-
ProtocolAddress for this client (userId:deviceId)
|
|
184
|
-
|
|
185
|
-
#### Example
|
|
186
|
-
|
|
187
|
-
```typescript
|
|
188
|
-
const alice = await SignalProtocolClient.create('alice', { storage: aliceStorage });
|
|
189
|
-
const bob = await SignalProtocolClient.create('bob', { storage: bobStorage });
|
|
190
|
-
|
|
191
|
-
// Use address() to reference the local device
|
|
192
|
-
await alice.encryptMessage(bob.address(), 'Hello');
|
|
193
|
-
await bob.decryptMessage(alice.address(), encrypted);
|
|
194
|
-
|
|
195
|
-
// Access userId if needed
|
|
196
|
-
console.log(alice.address().userId); // 'alice'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
***
|
|
200
|
-
|
|
201
|
-
### archiveSession()
|
|
202
|
-
|
|
203
|
-
> **archiveSession**(`remoteAddress`): `Promise`\<`void`\>
|
|
204
|
-
|
|
205
|
-
Archive a session after a stale-device response.
|
|
206
|
-
|
|
207
|
-
Moves current session to inactive list, preserving it for delayed message decryption.
|
|
208
|
-
Per SESAME §3.2: "previously active session is moved to the head of the inactive sessions list"
|
|
209
|
-
|
|
210
|
-
Use this when handling stale device errors (410) - the old session may still be needed
|
|
211
|
-
to decrypt messages that were in-flight during the session refresh.
|
|
212
|
-
|
|
213
|
-
#### Parameters
|
|
214
|
-
|
|
215
|
-
##### remoteAddress
|
|
216
|
-
|
|
217
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
218
|
-
|
|
219
|
-
Remote device's protocol address
|
|
220
|
-
|
|
221
|
-
#### Returns
|
|
222
|
-
|
|
223
|
-
`Promise`\<`void`\>
|
|
224
|
-
|
|
225
|
-
***
|
|
226
|
-
|
|
227
|
-
### checkPreKeyStatus()
|
|
228
|
-
|
|
229
|
-
> **checkPreKeyStatus**(): `Promise`\<[`PreKeyStatusResult`](../interfaces/PreKeyStatusResult.md)\>
|
|
230
|
-
|
|
231
|
-
Check prekey status and trigger warning if running low
|
|
232
|
-
|
|
233
|
-
Returns the current prekey count and whether replenishment is needed.
|
|
234
|
-
If configured with `onPreKeyLow` callback, it will be called when
|
|
235
|
-
the count drops below the threshold.
|
|
236
|
-
|
|
237
|
-
#### Returns
|
|
238
|
-
|
|
239
|
-
`Promise`\<[`PreKeyStatusResult`](../interfaces/PreKeyStatusResult.md)\>
|
|
240
|
-
|
|
241
|
-
Prekey status with remaining count and replenishment flag
|
|
242
|
-
|
|
243
|
-
#### Example
|
|
244
|
-
|
|
245
|
-
```typescript
|
|
246
|
-
const status = await signal.checkPreKeyStatus();
|
|
247
|
-
if (status.needsReplenishment) {
|
|
248
|
-
// Generate and upload more prekeys
|
|
249
|
-
await backend.replenishPrekeys(userId);
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
***
|
|
254
|
-
|
|
255
|
-
### cleanupExpiredKeys()
|
|
256
|
-
|
|
257
|
-
> **cleanupExpiredKeys**(`remoteAddress`): `Promise`\<`boolean`\>
|
|
258
|
-
|
|
259
|
-
Clean up expired message keys for a session
|
|
260
|
-
|
|
261
|
-
Signal Protocol Section 8.4 recommends deleting message keys older than
|
|
262
|
-
one week to avoid excessive storage. This method explicitly triggers cleanup.
|
|
263
|
-
|
|
264
|
-
Note: Cleanup also happens automatically during encrypt/decrypt operations.
|
|
265
|
-
|
|
266
|
-
#### Parameters
|
|
267
|
-
|
|
268
|
-
##### remoteAddress
|
|
269
|
-
|
|
270
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
271
|
-
|
|
272
|
-
Remote party's protocol address (userId:deviceId)
|
|
273
|
-
|
|
274
|
-
#### Returns
|
|
275
|
-
|
|
276
|
-
`Promise`\<`boolean`\>
|
|
277
|
-
|
|
278
|
-
true if cleanup succeeded, false otherwise
|
|
279
|
-
|
|
280
|
-
***
|
|
281
|
-
|
|
282
|
-
### cleanupExpiredSesameSessions()
|
|
283
|
-
|
|
284
|
-
> **cleanupExpiredSesameSessions**(): `Promise`\<`number`\>
|
|
285
|
-
|
|
286
|
-
Cleanup expired Sesame sessions
|
|
287
|
-
|
|
288
|
-
Removes inactive sessions that are older than the configured TTL.
|
|
289
|
-
Should be called periodically (e.g., daily) to prevent database bloat.
|
|
290
|
-
|
|
291
|
-
#### Returns
|
|
292
|
-
|
|
293
|
-
`Promise`\<`number`\>
|
|
294
|
-
|
|
295
|
-
Number of sessions cleaned up
|
|
296
|
-
|
|
297
|
-
***
|
|
298
|
-
|
|
299
|
-
### clearAllData()
|
|
300
|
-
|
|
301
|
-
> **clearAllData**(): `Promise`\<`void`\>
|
|
302
|
-
|
|
303
|
-
Clear all encryption data
|
|
304
|
-
|
|
305
|
-
WARNING: This permanently deletes all keys and sessions.
|
|
306
|
-
Use only for local development or when resetting the app.
|
|
307
|
-
|
|
308
|
-
#### Returns
|
|
309
|
-
|
|
310
|
-
`Promise`\<`void`\>
|
|
311
|
-
|
|
312
|
-
***
|
|
313
|
-
|
|
314
|
-
### confirmSafetyNumber()
|
|
315
|
-
|
|
316
|
-
> **confirmSafetyNumber**(`confirmation`): `Promise`\<`void`\>
|
|
317
|
-
|
|
318
|
-
Confirm an authenticated comparison of the currently displayed tuple.
|
|
319
|
-
|
|
320
|
-
#### Parameters
|
|
321
|
-
|
|
322
|
-
##### confirmation
|
|
323
|
-
|
|
324
|
-
[`SafetyNumberConfirmation`](../interfaces/SafetyNumberConfirmation.md)
|
|
325
|
-
|
|
326
|
-
#### Returns
|
|
327
|
-
|
|
328
|
-
`Promise`\<`void`\>
|
|
329
|
-
|
|
330
|
-
***
|
|
331
|
-
|
|
332
|
-
### createGroupInviteLinkV2()
|
|
333
|
-
|
|
334
|
-
> **createGroupInviteLinkV2**(`groupId`, `editorAci`): `Promise`\<`string`\>
|
|
335
|
-
|
|
336
|
-
Create an invite link for a GroupsV2 group.
|
|
337
|
-
|
|
338
|
-
#### Parameters
|
|
339
|
-
|
|
340
|
-
##### groupId
|
|
341
|
-
|
|
342
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
343
|
-
|
|
344
|
-
##### editorAci
|
|
345
|
-
|
|
346
|
-
`Uint8Array`
|
|
347
|
-
|
|
348
|
-
#### Returns
|
|
349
|
-
|
|
350
|
-
`Promise`\<`string`\>
|
|
351
|
-
|
|
352
|
-
***
|
|
353
|
-
|
|
354
|
-
### createGroupSenderKey()
|
|
355
|
-
|
|
356
|
-
> **createGroupSenderKey**(`groupId`): `Promise`\<\{ `distributionMessage`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `senderKeyId`: `string`; \}\>
|
|
357
|
-
|
|
358
|
-
Create a new sender key for group messaging
|
|
359
|
-
|
|
360
|
-
Call this when joining a group or when key rotation is needed.
|
|
361
|
-
Distribute the returned message to all group members via pairwise sessions.
|
|
362
|
-
|
|
363
|
-
#### Parameters
|
|
364
|
-
|
|
365
|
-
##### groupId
|
|
366
|
-
|
|
367
|
-
`string`
|
|
368
|
-
|
|
369
|
-
Unique identifier for the group
|
|
370
|
-
|
|
371
|
-
#### Returns
|
|
372
|
-
|
|
373
|
-
`Promise`\<\{ `distributionMessage`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `senderKeyId`: `string`; \}\>
|
|
374
|
-
|
|
375
|
-
Distribution message to share with group members
|
|
376
|
-
|
|
377
|
-
#### Example
|
|
378
|
-
|
|
379
|
-
```typescript
|
|
380
|
-
// Create sender key when joining a group
|
|
381
|
-
const { distributionMessage } = await signal.createGroupSenderKey('group-123');
|
|
382
|
-
|
|
383
|
-
// Distribute to all members via pairwise encryption
|
|
384
|
-
for (const member of groupMembers) {
|
|
385
|
-
const encrypted = await signal.encryptMessage(member.address, JSON.stringify(distributionMessage));
|
|
386
|
-
await sendToMember(member, encrypted);
|
|
387
|
-
}
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
#### Implementation of
|
|
391
|
-
|
|
392
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`createGroupSenderKey`](../interfaces/ISignalProtocolClient.md#creategroupsenderkey)
|
|
393
|
-
|
|
394
|
-
***
|
|
395
|
-
|
|
396
|
-
### createGroupV2()
|
|
397
|
-
|
|
398
|
-
> **createGroupV2**(`creatorAci`, `creatorProfileKey`, `members`, `title`, `options?`): `Promise`\<\{ `groupId`: [`GroupId`](../type-aliases/GroupId.md); `masterKey`: `Uint8Array`; \}\>
|
|
399
|
-
|
|
400
|
-
Create a new GroupsV2 group.
|
|
401
|
-
|
|
402
|
-
#### Parameters
|
|
403
|
-
|
|
404
|
-
##### creatorAci
|
|
405
|
-
|
|
406
|
-
`Uint8Array`
|
|
407
|
-
|
|
408
|
-
##### creatorProfileKey
|
|
409
|
-
|
|
410
|
-
`Uint8Array`
|
|
411
|
-
|
|
412
|
-
##### members
|
|
413
|
-
|
|
414
|
-
`object`[]
|
|
415
|
-
|
|
416
|
-
##### title
|
|
417
|
-
|
|
418
|
-
`string`
|
|
419
|
-
|
|
420
|
-
##### options?
|
|
421
|
-
|
|
422
|
-
###### accessControl?
|
|
423
|
-
|
|
424
|
-
`Partial`\<`AccessControl`\>
|
|
425
|
-
|
|
426
|
-
###### avatarUrl?
|
|
427
|
-
|
|
428
|
-
`string`
|
|
429
|
-
|
|
430
|
-
###### description?
|
|
431
|
-
|
|
432
|
-
`string`
|
|
433
|
-
|
|
434
|
-
###### disappearingMessagesDuration?
|
|
435
|
-
|
|
436
|
-
`number`
|
|
437
|
-
|
|
438
|
-
#### Returns
|
|
439
|
-
|
|
440
|
-
`Promise`\<\{ `groupId`: [`GroupId`](../type-aliases/GroupId.md); `masterKey`: `Uint8Array`; \}\>
|
|
441
|
-
|
|
442
|
-
***
|
|
443
|
-
|
|
444
|
-
### decryptFile()
|
|
445
|
-
|
|
446
|
-
> **decryptFile**(`remoteAddress`, `encryptedBlob`, `encryptedKey`): `Promise`\<`Blob`\>
|
|
447
|
-
|
|
448
|
-
Decrypt file blob
|
|
449
|
-
|
|
450
|
-
#### Parameters
|
|
451
|
-
|
|
452
|
-
##### remoteAddress
|
|
453
|
-
|
|
454
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
455
|
-
|
|
456
|
-
Remote device's protocol address
|
|
457
|
-
|
|
458
|
-
##### encryptedBlob
|
|
459
|
-
|
|
460
|
-
`Blob`
|
|
461
|
-
|
|
462
|
-
Encrypted file data
|
|
463
|
-
|
|
464
|
-
##### encryptedKey
|
|
465
|
-
|
|
466
|
-
[`Ciphertext`](../type-aliases/Ciphertext.md)
|
|
467
|
-
|
|
468
|
-
Encrypted symmetric key
|
|
469
|
-
|
|
470
|
-
#### Returns
|
|
471
|
-
|
|
472
|
-
`Promise`\<`Blob`\>
|
|
473
|
-
|
|
474
|
-
Decrypted file blob with correct MIME type
|
|
475
|
-
|
|
476
|
-
#### Implementation of
|
|
477
|
-
|
|
478
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`decryptFile`](../interfaces/ISignalProtocolClient.md#decryptfile)
|
|
479
|
-
|
|
480
|
-
***
|
|
481
|
-
|
|
482
|
-
### decryptFiles()
|
|
483
|
-
|
|
484
|
-
> **decryptFiles**(`remoteAddress`, `files`): `Promise`\<`Blob`[]\>
|
|
485
|
-
|
|
486
|
-
Decrypt multiple files in batch
|
|
487
|
-
|
|
488
|
-
More efficient than calling decryptFile() multiple times.
|
|
489
|
-
|
|
490
|
-
#### Parameters
|
|
491
|
-
|
|
492
|
-
##### remoteAddress
|
|
493
|
-
|
|
494
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
495
|
-
|
|
496
|
-
Remote device's protocol address
|
|
497
|
-
|
|
498
|
-
##### files
|
|
499
|
-
|
|
500
|
-
`object`[]
|
|
501
|
-
|
|
502
|
-
Array of encrypted file data
|
|
503
|
-
|
|
504
|
-
#### Returns
|
|
505
|
-
|
|
506
|
-
`Promise`\<`Blob`[]\>
|
|
507
|
-
|
|
508
|
-
Array of decrypted file blobs in the same order
|
|
509
|
-
|
|
510
|
-
***
|
|
511
|
-
|
|
512
|
-
### decryptGroupMessage()
|
|
513
|
-
|
|
514
|
-
> **decryptGroupMessage**(`groupId`, `senderId`, `senderDeviceId`, `framedMessage`): `Promise`\<`string`\>
|
|
515
|
-
|
|
516
|
-
Decrypt a group message from a sender
|
|
517
|
-
|
|
518
|
-
Use this to decrypt messages from other group members.
|
|
519
|
-
You must have processed the sender's distribution message first.
|
|
520
|
-
|
|
521
|
-
#### Parameters
|
|
522
|
-
|
|
523
|
-
##### groupId
|
|
524
|
-
|
|
525
|
-
`string`
|
|
526
|
-
|
|
527
|
-
Group identifier
|
|
528
|
-
|
|
529
|
-
##### senderId
|
|
530
|
-
|
|
531
|
-
`string`
|
|
532
|
-
|
|
533
|
-
Sender's user ID
|
|
534
|
-
|
|
535
|
-
##### senderDeviceId
|
|
536
|
-
|
|
537
|
-
`number`
|
|
538
|
-
|
|
539
|
-
Sender's device ID
|
|
540
|
-
|
|
541
|
-
##### framedMessage
|
|
542
|
-
|
|
543
|
-
`Uint8Array`
|
|
544
|
-
|
|
545
|
-
Framed SenderKeyMessage bytes
|
|
546
|
-
|
|
547
|
-
#### Returns
|
|
548
|
-
|
|
549
|
-
`Promise`\<`string`\>
|
|
550
|
-
|
|
551
|
-
Decrypted plaintext
|
|
552
|
-
|
|
553
|
-
#### Example
|
|
554
|
-
|
|
555
|
-
```typescript
|
|
556
|
-
const plaintext = await signal.decryptGroupMessage(
|
|
557
|
-
'group-123',
|
|
558
|
-
senderId,
|
|
559
|
-
senderDeviceId,
|
|
560
|
-
encryptedMessage
|
|
561
|
-
);
|
|
562
|
-
console.log('Message:', plaintext);
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
#### Implementation of
|
|
566
|
-
|
|
567
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`decryptGroupMessage`](../interfaces/ISignalProtocolClient.md#decryptgroupmessage)
|
|
568
|
-
|
|
569
|
-
***
|
|
570
|
-
|
|
571
|
-
### decryptMessage()
|
|
572
|
-
|
|
573
|
-
> **decryptMessage**(`remoteAddress`, `ciphertext`): `Promise`\<`string`\>
|
|
574
|
-
|
|
575
|
-
Decrypt a message from a session
|
|
576
|
-
|
|
577
|
-
Uses the Double Ratchet algorithm to decrypt ciphertext, handling
|
|
578
|
-
out-of-order messages and updating session state.
|
|
579
|
-
|
|
580
|
-
#### Parameters
|
|
581
|
-
|
|
582
|
-
##### remoteAddress
|
|
583
|
-
|
|
584
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
585
|
-
|
|
586
|
-
Remote device's protocol address
|
|
587
|
-
|
|
588
|
-
##### ciphertext
|
|
589
|
-
|
|
590
|
-
[`Ciphertext`](../type-aliases/Ciphertext.md)
|
|
591
|
-
|
|
592
|
-
Message to decrypt
|
|
593
|
-
|
|
594
|
-
#### Returns
|
|
595
|
-
|
|
596
|
-
`Promise`\<`string`\>
|
|
597
|
-
|
|
598
|
-
Decrypted plaintext
|
|
599
|
-
|
|
600
|
-
#### Implementation of
|
|
601
|
-
|
|
602
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`decryptMessage`](../interfaces/ISignalProtocolClient.md#decryptmessage)
|
|
603
|
-
|
|
604
|
-
***
|
|
605
|
-
|
|
606
|
-
### decryptMessages()
|
|
607
|
-
|
|
608
|
-
> **decryptMessages**(`remoteAddress`, `ciphertexts`): `Promise`\<`string`[]\>
|
|
609
|
-
|
|
610
|
-
Decrypt multiple messages in batch
|
|
611
|
-
|
|
612
|
-
More efficient than calling decryptMessage() multiple times.
|
|
613
|
-
Handles out-of-order messages correctly.
|
|
614
|
-
|
|
615
|
-
#### Parameters
|
|
616
|
-
|
|
617
|
-
##### remoteAddress
|
|
618
|
-
|
|
619
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
620
|
-
|
|
621
|
-
Remote device's protocol address
|
|
622
|
-
|
|
623
|
-
##### ciphertexts
|
|
624
|
-
|
|
625
|
-
[`Ciphertext`](../type-aliases/Ciphertext.md)[]
|
|
626
|
-
|
|
627
|
-
Array of messages to decrypt
|
|
628
|
-
|
|
629
|
-
#### Returns
|
|
630
|
-
|
|
631
|
-
`Promise`\<`string`[]\>
|
|
632
|
-
|
|
633
|
-
Array of decrypted plaintexts in the same order
|
|
634
|
-
|
|
635
|
-
***
|
|
636
|
-
|
|
637
|
-
### deleteGroupSenderKey()
|
|
638
|
-
|
|
639
|
-
> **deleteGroupSenderKey**(`groupId`): `Promise`\<`void`\>
|
|
640
|
-
|
|
641
|
-
Delete sender key when leaving a group
|
|
642
|
-
|
|
643
|
-
#### Parameters
|
|
644
|
-
|
|
645
|
-
##### groupId
|
|
646
|
-
|
|
647
|
-
`string`
|
|
648
|
-
|
|
649
|
-
Group identifier
|
|
650
|
-
|
|
651
|
-
#### Returns
|
|
652
|
-
|
|
653
|
-
`Promise`\<`void`\>
|
|
654
|
-
|
|
655
|
-
#### Implementation of
|
|
656
|
-
|
|
657
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`deleteGroupSenderKey`](../interfaces/ISignalProtocolClient.md#deletegroupsenderkey)
|
|
658
|
-
|
|
659
|
-
***
|
|
660
|
-
|
|
661
|
-
### deleteRemoteAttachment()
|
|
662
|
-
|
|
663
|
-
> **deleteRemoteAttachment**(`attachment`, `options?`): `Promise`\<`void`\>
|
|
664
|
-
|
|
665
|
-
Delete the encrypted remote object referenced by an attachment pointer.
|
|
666
|
-
|
|
667
|
-
This only touches remote object storage. App-owned local message rows and
|
|
668
|
-
local media caches must be deleted by the application.
|
|
669
|
-
|
|
670
|
-
#### Parameters
|
|
671
|
-
|
|
672
|
-
##### attachment
|
|
673
|
-
|
|
674
|
-
[`MediaAttachmentPointer`](../namespaces/media/interfaces/MediaAttachmentPointer.md)
|
|
675
|
-
|
|
676
|
-
##### options?
|
|
677
|
-
|
|
678
|
-
`Pick`\<[`AttachmentTransferOptions`](../interfaces/AttachmentTransferOptions.md), `"signal"` \| `"onProgress"`\>
|
|
679
|
-
|
|
680
|
-
#### Returns
|
|
681
|
-
|
|
682
|
-
`Promise`\<`void`\>
|
|
683
|
-
|
|
684
|
-
#### Implementation of
|
|
685
|
-
|
|
686
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`deleteRemoteAttachment`](../interfaces/ISignalProtocolClient.md#deleteremoteattachment)
|
|
687
|
-
|
|
688
|
-
***
|
|
689
|
-
|
|
690
|
-
### deleteSession()
|
|
691
|
-
|
|
692
|
-
> **deleteSession**(`remoteAddress`): `Promise`\<`void`\>
|
|
693
|
-
|
|
694
|
-
Delete a session
|
|
695
|
-
|
|
696
|
-
Use this to reset encryption for a session (e.g., after a security incident).
|
|
697
|
-
You'll need to establish a new session before sending/receiving messages.
|
|
698
|
-
|
|
699
|
-
#### Parameters
|
|
700
|
-
|
|
701
|
-
##### remoteAddress
|
|
702
|
-
|
|
703
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
704
|
-
|
|
705
|
-
Remote device's protocol address
|
|
706
|
-
|
|
707
|
-
#### Returns
|
|
708
|
-
|
|
709
|
-
`Promise`\<`void`\>
|
|
710
|
-
|
|
711
|
-
#### Implementation of
|
|
712
|
-
|
|
713
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`deleteSession`](../interfaces/ISignalProtocolClient.md#deletesession)
|
|
714
|
-
|
|
715
|
-
***
|
|
716
|
-
|
|
717
|
-
### distributeGroupSenderKey()
|
|
718
|
-
|
|
719
|
-
> **distributeGroupSenderKey**(`groupId`, `memberUserIds`): `Promise`\<`void`\>
|
|
720
|
-
|
|
721
|
-
Distribute sender key to all group members.
|
|
722
|
-
|
|
723
|
-
Called after group creation or after key rotation.
|
|
724
|
-
Skips self and sends to all other members via pairwise encryption.
|
|
725
|
-
|
|
726
|
-
#### Parameters
|
|
727
|
-
|
|
728
|
-
##### groupId
|
|
729
|
-
|
|
730
|
-
`string`
|
|
731
|
-
|
|
732
|
-
Group identifier
|
|
733
|
-
|
|
734
|
-
##### memberUserIds
|
|
735
|
-
|
|
736
|
-
`string`[]
|
|
737
|
-
|
|
738
|
-
Array of all member user IDs
|
|
739
|
-
|
|
740
|
-
#### Returns
|
|
741
|
-
|
|
742
|
-
`Promise`\<`void`\>
|
|
743
|
-
|
|
744
|
-
#### Example
|
|
745
|
-
|
|
746
|
-
```typescript
|
|
747
|
-
// After creating a group
|
|
748
|
-
const memberIds = ['alice', 'bob', 'charlie'];
|
|
749
|
-
await signal.distributeGroupSenderKey('group-123', memberIds);
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-
#### Implementation of
|
|
753
|
-
|
|
754
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`distributeGroupSenderKey`](../interfaces/ISignalProtocolClient.md#distributegroupsenderkey)
|
|
755
|
-
|
|
756
|
-
***
|
|
757
|
-
|
|
758
|
-
### distributeSenderKeyToUser()
|
|
759
|
-
|
|
760
|
-
> **distributeSenderKeyToUser**(`groupId`, `recipientUserId`): `Promise`\<`void`\>
|
|
761
|
-
|
|
762
|
-
Distribute sender key to a specific user via pairwise encryption.
|
|
763
|
-
|
|
764
|
-
Distribution messages are transmitted through authenticated, encrypted
|
|
765
|
-
pairwise channels.
|
|
766
|
-
|
|
767
|
-
This method:
|
|
768
|
-
1. Gets or creates sender key for this group
|
|
769
|
-
2. Encrypts the distribution message using pairwise Signal Protocol
|
|
770
|
-
3. Sends via SESAME to all of the recipient's devices
|
|
771
|
-
|
|
772
|
-
#### Parameters
|
|
773
|
-
|
|
774
|
-
##### groupId
|
|
775
|
-
|
|
776
|
-
`string`
|
|
777
|
-
|
|
778
|
-
Group identifier
|
|
779
|
-
|
|
780
|
-
##### recipientUserId
|
|
781
|
-
|
|
782
|
-
`string`
|
|
783
|
-
|
|
784
|
-
Recipient user ID to distribute key to
|
|
785
|
-
|
|
786
|
-
#### Returns
|
|
787
|
-
|
|
788
|
-
`Promise`\<`void`\>
|
|
789
|
-
|
|
790
|
-
#### Example
|
|
791
|
-
|
|
792
|
-
```typescript
|
|
793
|
-
// Distribute key to a specific user
|
|
794
|
-
await signal.distributeSenderKeyToUser('group-123', 'bob');
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
#### Implementation of
|
|
798
|
-
|
|
799
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`distributeSenderKeyToUser`](../interfaces/ISignalProtocolClient.md#distributesenderkeytouser)
|
|
800
|
-
|
|
801
|
-
***
|
|
802
|
-
|
|
803
|
-
### downloadAttachment()
|
|
804
|
-
|
|
805
|
-
> **downloadAttachment**(`attachment`, `options?`): `Promise`\<[`ResolvedMediaAttachment`](../namespaces/media/interfaces/ResolvedMediaAttachment.md)\>
|
|
806
|
-
|
|
807
|
-
Download, verify, and decrypt an uploaded attachment pointer.
|
|
808
|
-
|
|
809
|
-
The client validates pointer metadata, verifies the encrypted blob digest,
|
|
810
|
-
and only returns plaintext after streaming AEAD authentication succeeds.
|
|
811
|
-
|
|
812
|
-
#### Parameters
|
|
813
|
-
|
|
814
|
-
##### attachment
|
|
815
|
-
|
|
816
|
-
[`MediaAttachmentPointer`](../namespaces/media/interfaces/MediaAttachmentPointer.md)
|
|
817
|
-
|
|
818
|
-
##### options?
|
|
819
|
-
|
|
820
|
-
[`AttachmentTransferOptions`](../interfaces/AttachmentTransferOptions.md)
|
|
821
|
-
|
|
822
|
-
#### Returns
|
|
823
|
-
|
|
824
|
-
`Promise`\<[`ResolvedMediaAttachment`](../namespaces/media/interfaces/ResolvedMediaAttachment.md)\>
|
|
825
|
-
|
|
826
|
-
#### Implementation of
|
|
827
|
-
|
|
828
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`downloadAttachment`](../interfaces/ISignalProtocolClient.md#downloadattachment)
|
|
829
|
-
|
|
830
|
-
***
|
|
831
|
-
|
|
832
|
-
### encryptFile()
|
|
833
|
-
|
|
834
|
-
> **encryptFile**(`remoteAddress`, `fileBlob`, `mimeType?`): `Promise`\<\{ `encryptedBlob`: `Blob`; `encryptedKey`: [`Ciphertext`](../type-aliases/Ciphertext.md); `keyId`: `string`; \}\>
|
|
835
|
-
|
|
836
|
-
Encrypt file blob with two-layer encryption
|
|
837
|
-
|
|
838
|
-
Layer 1: Random symmetric key encrypts the file
|
|
839
|
-
Layer 2: Signal Protocol encrypts the symmetric key
|
|
840
|
-
|
|
841
|
-
This allows efficient storage of large files with Signal Protocol key rotation.
|
|
842
|
-
|
|
843
|
-
#### Parameters
|
|
844
|
-
|
|
845
|
-
##### remoteAddress
|
|
846
|
-
|
|
847
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
848
|
-
|
|
849
|
-
Remote device's protocol address
|
|
850
|
-
|
|
851
|
-
##### fileBlob
|
|
852
|
-
|
|
853
|
-
`Blob`
|
|
854
|
-
|
|
855
|
-
File data to encrypt
|
|
856
|
-
|
|
857
|
-
##### mimeType?
|
|
858
|
-
|
|
859
|
-
`string`
|
|
860
|
-
|
|
861
|
-
Optional MIME type (defaults to fileBlob.type)
|
|
862
|
-
|
|
863
|
-
#### Returns
|
|
864
|
-
|
|
865
|
-
`Promise`\<\{ `encryptedBlob`: `Blob`; `encryptedKey`: [`Ciphertext`](../type-aliases/Ciphertext.md); `keyId`: `string`; \}\>
|
|
866
|
-
|
|
867
|
-
Encrypted blob, key ID, and encrypted key
|
|
868
|
-
|
|
869
|
-
#### Implementation of
|
|
870
|
-
|
|
871
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`encryptFile`](../interfaces/ISignalProtocolClient.md#encryptfile)
|
|
872
|
-
|
|
873
|
-
***
|
|
874
|
-
|
|
875
|
-
### encryptFiles()
|
|
876
|
-
|
|
877
|
-
> **encryptFiles**(`remoteAddress`, `files`): `Promise`\<`object`[]\>
|
|
878
|
-
|
|
879
|
-
Encrypt multiple files in batch
|
|
880
|
-
|
|
881
|
-
More efficient than calling encryptFile() multiple times.
|
|
882
|
-
Each file gets its own encryption key for granular access control.
|
|
883
|
-
|
|
884
|
-
#### Parameters
|
|
885
|
-
|
|
886
|
-
##### remoteAddress
|
|
887
|
-
|
|
888
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
889
|
-
|
|
890
|
-
Remote device's protocol address
|
|
891
|
-
|
|
892
|
-
##### files
|
|
893
|
-
|
|
894
|
-
`object`[]
|
|
895
|
-
|
|
896
|
-
Array of file blobs with optional MIME types
|
|
897
|
-
|
|
898
|
-
#### Returns
|
|
899
|
-
|
|
900
|
-
`Promise`\<`object`[]\>
|
|
901
|
-
|
|
902
|
-
Array of encrypted file results in the same order
|
|
903
|
-
|
|
904
|
-
***
|
|
905
|
-
|
|
906
|
-
### encryptGroupMessage()
|
|
907
|
-
|
|
908
|
-
> **encryptGroupMessage**(`groupId`, `plaintext`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
909
|
-
|
|
910
|
-
Encrypt a message for group using sender key (O(1) encryption)
|
|
911
|
-
|
|
912
|
-
After creating your sender key and distributing it to members,
|
|
913
|
-
use this to encrypt messages. All group members can decrypt
|
|
914
|
-
the same ciphertext, making it efficient for large groups.
|
|
915
|
-
|
|
916
|
-
#### Parameters
|
|
917
|
-
|
|
918
|
-
##### groupId
|
|
919
|
-
|
|
920
|
-
`string`
|
|
921
|
-
|
|
922
|
-
Group identifier
|
|
923
|
-
|
|
924
|
-
##### plaintext
|
|
925
|
-
|
|
926
|
-
`string`
|
|
927
|
-
|
|
928
|
-
Message to encrypt
|
|
929
|
-
|
|
930
|
-
#### Returns
|
|
931
|
-
|
|
932
|
-
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
933
|
-
|
|
934
|
-
Framed SenderKeyMessage bytes
|
|
935
|
-
|
|
936
|
-
#### Example
|
|
937
|
-
|
|
938
|
-
```typescript
|
|
939
|
-
// Encrypt once, send to all members
|
|
940
|
-
const encrypted = await signal.encryptGroupMessage('group-123', 'Hello everyone!');
|
|
941
|
-
|
|
942
|
-
// Broadcast same ciphertext to all members
|
|
943
|
-
for (const member of groupMembers) {
|
|
944
|
-
await sendToMember(member, encrypted);
|
|
945
|
-
}
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
#### Implementation of
|
|
949
|
-
|
|
950
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`encryptGroupMessage`](../interfaces/ISignalProtocolClient.md#encryptgroupmessage)
|
|
951
|
-
|
|
952
|
-
***
|
|
953
|
-
|
|
954
|
-
### encryptMessage()
|
|
955
|
-
|
|
956
|
-
> **encryptMessage**(`remoteAddress`, `plaintext`): `Promise`\<[`Ciphertext`](../type-aliases/Ciphertext.md)\>
|
|
957
|
-
|
|
958
|
-
#### Parameters
|
|
959
|
-
|
|
960
|
-
##### remoteAddress
|
|
961
|
-
|
|
962
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
963
|
-
|
|
964
|
-
##### plaintext
|
|
965
|
-
|
|
966
|
-
`string`
|
|
967
|
-
|
|
968
|
-
#### Returns
|
|
969
|
-
|
|
970
|
-
`Promise`\<[`Ciphertext`](../type-aliases/Ciphertext.md)\>
|
|
971
|
-
|
|
972
|
-
#### See
|
|
973
|
-
|
|
974
|
-
MessageOps.encryptMessage
|
|
975
|
-
|
|
976
|
-
#### Implementation of
|
|
977
|
-
|
|
978
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`encryptMessage`](../interfaces/ISignalProtocolClient.md#encryptmessage)
|
|
979
|
-
|
|
980
|
-
***
|
|
981
|
-
|
|
982
|
-
### encryptMessages()
|
|
983
|
-
|
|
984
|
-
> **encryptMessages**(`remoteAddress`, `plaintexts`): `Promise`\<[`Ciphertext`](../type-aliases/Ciphertext.md)[]\>
|
|
985
|
-
|
|
986
|
-
Encrypt multiple messages in batch
|
|
987
|
-
|
|
988
|
-
More efficient than calling encryptMessage() multiple times.
|
|
989
|
-
Operations are performed atomically - if any encryption fails,
|
|
990
|
-
none of the messages are encrypted.
|
|
991
|
-
|
|
992
|
-
#### Parameters
|
|
993
|
-
|
|
994
|
-
##### remoteAddress
|
|
995
|
-
|
|
996
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
997
|
-
|
|
998
|
-
Remote device's protocol address
|
|
999
|
-
|
|
1000
|
-
##### plaintexts
|
|
1001
|
-
|
|
1002
|
-
`string`[]
|
|
1003
|
-
|
|
1004
|
-
Array of messages to encrypt
|
|
1005
|
-
|
|
1006
|
-
#### Returns
|
|
1007
|
-
|
|
1008
|
-
`Promise`\<[`Ciphertext`](../type-aliases/Ciphertext.md)[]\>
|
|
1009
|
-
|
|
1010
|
-
Array of encrypted ciphertexts in the same order
|
|
1011
|
-
|
|
1012
|
-
***
|
|
1013
|
-
|
|
1014
|
-
### establishSession()
|
|
1015
|
-
|
|
1016
|
-
> **establishSession**(`remoteAddress`, `prekeyBundle`, `recipientIdentityType?`): `Promise`\<`void`\>
|
|
1017
|
-
|
|
1018
|
-
Establish a new session with a specific remote device.
|
|
1019
|
-
|
|
1020
|
-
Advanced direct-device API. Normal app code can call `send(recipientUserId, content)`;
|
|
1021
|
-
the client will fetch remote device bundles through the configured relay and
|
|
1022
|
-
use the selected protocol policy. Direct callers must provide the remote
|
|
1023
|
-
device's prekey bundle themselves.
|
|
1024
|
-
|
|
1025
|
-
#### Parameters
|
|
1026
|
-
|
|
1027
|
-
##### remoteAddress
|
|
1028
|
-
|
|
1029
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
1030
|
-
|
|
1031
|
-
Partner's protocol address (userId + deviceId)
|
|
1032
|
-
|
|
1033
|
-
##### prekeyBundle
|
|
1034
|
-
|
|
1035
|
-
[`RelayPreKeyBundle`](../interfaces/RelayPreKeyBundle.md)
|
|
1036
|
-
|
|
1037
|
-
Partner's prekey bundle (fetched from server)
|
|
1038
|
-
|
|
1039
|
-
##### recipientIdentityType?
|
|
1040
|
-
|
|
1041
|
-
[`IdentityType`](../namespaces/keys/type-aliases/IdentityType.md) = `'aci'`
|
|
1042
|
-
|
|
1043
|
-
#### Returns
|
|
1044
|
-
|
|
1045
|
-
`Promise`\<`void`\>
|
|
1046
|
-
|
|
1047
|
-
#### Example
|
|
1048
|
-
|
|
1049
|
-
```typescript
|
|
1050
|
-
import { ProtocolAddress } from '@open-e2ee/signal-protocol-sdk';
|
|
1051
|
-
|
|
1052
|
-
const remoteAddress = ProtocolAddress.create('bob', 1);
|
|
1053
|
-
const bundle = await relay.fetchPreKeyBundle(remoteAddress.userId);
|
|
1054
|
-
await signal.establishSession(remoteAddress, bundle);
|
|
1055
|
-
```
|
|
1056
|
-
|
|
1057
|
-
#### Implementation of
|
|
1058
|
-
|
|
1059
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`establishSession`](../interfaces/ISignalProtocolClient.md#establishsession)
|
|
1060
|
-
|
|
1061
|
-
***
|
|
1062
|
-
|
|
1063
|
-
### fetchSenderCertificate()
|
|
1064
|
-
|
|
1065
|
-
> **fetchSenderCertificate**(): `Promise`\<`string`\>
|
|
1066
|
-
|
|
1067
|
-
Fetch (or return cached) sender certificate for sealed sender.
|
|
1068
|
-
|
|
1069
|
-
Uses the configured certificateProvider or relay.fetchSenderCertificate().
|
|
1070
|
-
Caches the result until expiry (24h certificate, 5min safety margin).
|
|
1071
|
-
|
|
1072
|
-
#### Returns
|
|
1073
|
-
|
|
1074
|
-
`Promise`\<`string`\>
|
|
1075
|
-
|
|
1076
|
-
Base64-encoded serialized SenderCertificate
|
|
1077
|
-
|
|
1078
|
-
#### Throws
|
|
1079
|
-
|
|
1080
|
-
if no certificate provider is available
|
|
1081
|
-
|
|
1082
|
-
***
|
|
1083
|
-
|
|
1084
|
-
### forceCompleteKeyReset()
|
|
1085
|
-
|
|
1086
|
-
> **forceCompleteKeyReset**(): `Promise`\<[`ForceKeyResetResult`](../interfaces/ForceKeyResetResult.md)\>
|
|
1087
|
-
|
|
1088
|
-
Force complete key reset (development/debugging only).
|
|
1089
|
-
|
|
1090
|
-
Delegates to PreKeyOps.forceCompleteKeyReset for implementation.
|
|
1091
|
-
|
|
1092
|
-
#### Returns
|
|
1093
|
-
|
|
1094
|
-
`Promise`\<[`ForceKeyResetResult`](../interfaces/ForceKeyResetResult.md)\>
|
|
1095
|
-
|
|
1096
|
-
***
|
|
1097
|
-
|
|
1098
|
-
### getGroupSenderKeyDistribution()
|
|
1099
|
-
|
|
1100
|
-
> **getGroupSenderKeyDistribution**(`groupId`): `Promise`\<[`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md) \| `null`\>
|
|
1101
|
-
|
|
1102
|
-
Get the current sender key distribution message for a group
|
|
1103
|
-
|
|
1104
|
-
If no sender key exists, returns null. Use createGroupSenderKey() first.
|
|
1105
|
-
|
|
1106
|
-
#### Parameters
|
|
1107
|
-
|
|
1108
|
-
##### groupId
|
|
1109
|
-
|
|
1110
|
-
`string`
|
|
1111
|
-
|
|
1112
|
-
Group identifier
|
|
1113
|
-
|
|
1114
|
-
#### Returns
|
|
1115
|
-
|
|
1116
|
-
`Promise`\<[`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md) \| `null`\>
|
|
1117
|
-
|
|
1118
|
-
Distribution message or null if no key exists
|
|
1119
|
-
|
|
1120
|
-
#### Implementation of
|
|
1121
|
-
|
|
1122
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`getGroupSenderKeyDistribution`](../interfaces/ISignalProtocolClient.md#getgroupsenderkeydistribution)
|
|
1123
|
-
|
|
1124
|
-
***
|
|
1125
|
-
|
|
1126
|
-
### getGroupSenderKeyStats()
|
|
1127
|
-
|
|
1128
|
-
> **getGroupSenderKeyStats**(`groupId`, `senderId`, `senderDeviceId`): `Promise`\<\{ `chainIndex`: `number`; `generation`: `number`; `skippedKeysCount`: `number`; \}\>
|
|
1129
|
-
|
|
1130
|
-
Get statistics for a group sender key.
|
|
1131
|
-
|
|
1132
|
-
Useful for debugging and monitoring group messaging health.
|
|
1133
|
-
|
|
1134
|
-
#### Parameters
|
|
1135
|
-
|
|
1136
|
-
##### groupId
|
|
1137
|
-
|
|
1138
|
-
`string`
|
|
1139
|
-
|
|
1140
|
-
Group identifier
|
|
1141
|
-
|
|
1142
|
-
##### senderId
|
|
1143
|
-
|
|
1144
|
-
`string`
|
|
1145
|
-
|
|
1146
|
-
Sender user identifier
|
|
1147
|
-
|
|
1148
|
-
##### senderDeviceId
|
|
1149
|
-
|
|
1150
|
-
`number`
|
|
1151
|
-
|
|
1152
|
-
Sender device identifier
|
|
1153
|
-
|
|
1154
|
-
#### Returns
|
|
1155
|
-
|
|
1156
|
-
`Promise`\<\{ `chainIndex`: `number`; `generation`: `number`; `skippedKeysCount`: `number`; \}\>
|
|
1157
|
-
|
|
1158
|
-
Stats including chain position, generation, and skipped keys count
|
|
1159
|
-
|
|
1160
|
-
#### Example
|
|
1161
|
-
|
|
1162
|
-
```typescript
|
|
1163
|
-
const stats = await signal.getGroupSenderKeyStats('group-123', 'alice', 1);
|
|
1164
|
-
console.log(`Chain at ${stats.chainIndex}, gen ${stats.generation}`);
|
|
1165
|
-
console.log(`${stats.skippedKeysCount} skipped keys stored`);
|
|
1166
|
-
```
|
|
1167
|
-
|
|
1168
|
-
***
|
|
1169
|
-
|
|
1170
|
-
### getGroupStateV2()
|
|
1171
|
-
|
|
1172
|
-
> **getGroupStateV2**(`groupId`): `Promise`\<[`DecryptedGroup`](../interfaces/DecryptedGroup.md)\>
|
|
1173
|
-
|
|
1174
|
-
Get decrypted group state (from cache or server).
|
|
1175
|
-
|
|
1176
|
-
#### Parameters
|
|
1177
|
-
|
|
1178
|
-
##### groupId
|
|
1179
|
-
|
|
1180
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
1181
|
-
|
|
1182
|
-
#### Returns
|
|
1183
|
-
|
|
1184
|
-
`Promise`\<[`DecryptedGroup`](../interfaces/DecryptedGroup.md)\>
|
|
1185
|
-
|
|
1186
|
-
***
|
|
1187
|
-
|
|
1188
|
-
### getIdentityPublicKey()
|
|
1189
|
-
|
|
1190
|
-
> **getIdentityPublicKey**(): `Promise`\<[`PublicKey`](../type-aliases/PublicKey.md)\>
|
|
1191
|
-
|
|
1192
|
-
Get client's identity public key
|
|
1193
|
-
|
|
1194
|
-
#### Returns
|
|
1195
|
-
|
|
1196
|
-
`Promise`\<[`PublicKey`](../type-aliases/PublicKey.md)\>
|
|
1197
|
-
|
|
1198
|
-
Public key for this device's identity
|
|
1199
|
-
|
|
1200
|
-
***
|
|
1201
|
-
|
|
1202
|
-
### getSesameStats()
|
|
1203
|
-
|
|
1204
|
-
> **getSesameStats**(): `Promise`\<[`SesameStats`](../interfaces/SesameStats.md)\>
|
|
1205
|
-
|
|
1206
|
-
Get Sesame session statistics (for debugging)
|
|
1207
|
-
|
|
1208
|
-
Returns information about users, devices, and sessions.
|
|
1209
|
-
|
|
1210
|
-
#### Returns
|
|
1211
|
-
|
|
1212
|
-
`Promise`\<[`SesameStats`](../interfaces/SesameStats.md)\>
|
|
1213
|
-
|
|
1214
|
-
Session statistics
|
|
1215
|
-
|
|
1216
|
-
***
|
|
1217
|
-
|
|
1218
|
-
### getSessionHealth()
|
|
1219
|
-
|
|
1220
|
-
> **getSessionHealth**(`userId`): `Promise`\<[`SessionHealthResult`](../interfaces/SessionHealthResult.md)\>
|
|
1221
|
-
|
|
1222
|
-
Get health status for encryption sessions with a specific user.
|
|
1223
|
-
|
|
1224
|
-
Delegates to SessionOps.getSessionHealth for implementation.
|
|
1225
|
-
|
|
1226
|
-
#### Parameters
|
|
1227
|
-
|
|
1228
|
-
##### userId
|
|
1229
|
-
|
|
1230
|
-
`string`
|
|
1231
|
-
|
|
1232
|
-
#### Returns
|
|
1233
|
-
|
|
1234
|
-
`Promise`\<[`SessionHealthResult`](../interfaces/SessionHealthResult.md)\>
|
|
1235
|
-
|
|
1236
|
-
#### Implementation of
|
|
1237
|
-
|
|
1238
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`getSessionHealth`](../interfaces/ISignalProtocolClient.md#getsessionhealth)
|
|
1239
|
-
|
|
1240
|
-
***
|
|
1241
|
-
|
|
1242
|
-
### getStats()
|
|
1243
|
-
|
|
1244
|
-
> **getStats**(): `Promise`\<\{ `hasIdentityKey`: `boolean`; `oneTimePreKeysCount`: `number`; `sessionCount`: `number`; \}\>
|
|
1245
|
-
|
|
1246
|
-
Get encryption statistics
|
|
1247
|
-
|
|
1248
|
-
#### Returns
|
|
1249
|
-
|
|
1250
|
-
`Promise`\<\{ `hasIdentityKey`: `boolean`; `oneTimePreKeysCount`: `number`; `sessionCount`: `number`; \}\>
|
|
1251
|
-
|
|
1252
|
-
Statistics about sessions, keys, and usage
|
|
1253
|
-
|
|
1254
|
-
***
|
|
1255
|
-
|
|
1256
|
-
### handleGroupMembershipChange()
|
|
1257
|
-
|
|
1258
|
-
> **handleGroupMembershipChange**(`groupId`, `change`): `Promise`\<\{ `distributionMessage?`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `rotated`: `boolean`; \}\>
|
|
1259
|
-
|
|
1260
|
-
Handle group membership change with appropriate sender key actions.
|
|
1261
|
-
|
|
1262
|
-
This convenience method applies the sender-key lifecycle for membership
|
|
1263
|
-
changes:
|
|
1264
|
-
- Member removed: Rotate sender key (forward secrecy)
|
|
1265
|
-
- Member added: No rotation needed (just distribute current key)
|
|
1266
|
-
- Metadata changed: Rotate recommended
|
|
1267
|
-
|
|
1268
|
-
#### Parameters
|
|
1269
|
-
|
|
1270
|
-
##### groupId
|
|
1271
|
-
|
|
1272
|
-
`string`
|
|
1273
|
-
|
|
1274
|
-
Group identifier
|
|
1275
|
-
|
|
1276
|
-
##### change
|
|
1277
|
-
|
|
1278
|
-
`"member_added"` \| `"member_removed"` \| `"metadata_changed"`
|
|
1279
|
-
|
|
1280
|
-
Type of membership change
|
|
1281
|
-
|
|
1282
|
-
#### Returns
|
|
1283
|
-
|
|
1284
|
-
`Promise`\<\{ `distributionMessage?`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `rotated`: `boolean`; \}\>
|
|
1285
|
-
|
|
1286
|
-
Distribution message if rotation occurred, for sending to members
|
|
1287
|
-
|
|
1288
|
-
#### Example
|
|
1289
|
-
|
|
1290
|
-
```typescript
|
|
1291
|
-
// When a member is removed
|
|
1292
|
-
const result = await signal.handleGroupMembershipChange(
|
|
1293
|
-
'group-123',
|
|
1294
|
-
'member_removed'
|
|
1295
|
-
);
|
|
1296
|
-
|
|
1297
|
-
if (result.rotated) {
|
|
1298
|
-
// Distribute new key to remaining members
|
|
1299
|
-
for (const member of remainingMembers) {
|
|
1300
|
-
const encrypted = await signal.encryptMessage(
|
|
1301
|
-
member.address,
|
|
1302
|
-
JSON.stringify(result.distributionMessage)
|
|
1303
|
-
);
|
|
1304
|
-
await sendToMember(member, encrypted);
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
```
|
|
1308
|
-
|
|
1309
|
-
#### Implementation of
|
|
1310
|
-
|
|
1311
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`handleGroupMembershipChange`](../interfaces/ISignalProtocolClient.md#handlegroupmembershipchange)
|
|
1312
|
-
|
|
1313
|
-
***
|
|
1314
|
-
|
|
1315
|
-
### hasGroupSenderKey()
|
|
1316
|
-
|
|
1317
|
-
> **hasGroupSenderKey**(`groupId`): `Promise`\<`boolean`\>
|
|
1318
|
-
|
|
1319
|
-
Check if we have a sender key for a group
|
|
1320
|
-
|
|
1321
|
-
#### Parameters
|
|
1322
|
-
|
|
1323
|
-
##### groupId
|
|
1324
|
-
|
|
1325
|
-
`string`
|
|
1326
|
-
|
|
1327
|
-
Group identifier
|
|
1328
|
-
|
|
1329
|
-
#### Returns
|
|
1330
|
-
|
|
1331
|
-
`Promise`\<`boolean`\>
|
|
1332
|
-
|
|
1333
|
-
True if sender key exists for this device
|
|
1334
|
-
|
|
1335
|
-
#### Implementation of
|
|
1336
|
-
|
|
1337
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`hasGroupSenderKey`](../interfaces/ISignalProtocolClient.md#hasgroupsenderkey)
|
|
1338
|
-
|
|
1339
|
-
***
|
|
1340
|
-
|
|
1341
|
-
### hasSession()
|
|
1342
|
-
|
|
1343
|
-
> **hasSession**(`remoteAddress`): `Promise`\<`boolean`\>
|
|
1344
|
-
|
|
1345
|
-
Check if a session exists
|
|
1346
|
-
|
|
1347
|
-
#### Parameters
|
|
1348
|
-
|
|
1349
|
-
##### remoteAddress
|
|
1350
|
-
|
|
1351
|
-
[`ProtocolAddress`](../interfaces/ProtocolAddress.md)
|
|
1352
|
-
|
|
1353
|
-
Remote device's protocol address
|
|
1354
|
-
|
|
1355
|
-
#### Returns
|
|
1356
|
-
|
|
1357
|
-
`Promise`\<`boolean`\>
|
|
1358
|
-
|
|
1359
|
-
True if session exists
|
|
1360
|
-
|
|
1361
|
-
#### Implementation of
|
|
1362
|
-
|
|
1363
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`hasSession`](../interfaces/ISignalProtocolClient.md#hassession)
|
|
1364
|
-
|
|
1365
|
-
***
|
|
1366
|
-
|
|
1367
|
-
### isInitialized()
|
|
1368
|
-
|
|
1369
|
-
> **isInitialized**(): `Promise`\<`boolean`\>
|
|
1370
|
-
|
|
1371
|
-
Check if client is initialized
|
|
1372
|
-
|
|
1373
|
-
#### Returns
|
|
1374
|
-
|
|
1375
|
-
`Promise`\<`boolean`\>
|
|
1376
|
-
|
|
1377
|
-
True if identity keys exist and client is ready to use
|
|
1378
|
-
|
|
1379
|
-
***
|
|
1380
|
-
|
|
1381
|
-
### joinGroupViaInviteLinkV2()
|
|
1382
|
-
|
|
1383
|
-
> **joinGroupViaInviteLinkV2**(`url`, `userAci`, `userProfileKey`): `Promise`\<\{ `groupId`: [`GroupId`](../type-aliases/GroupId.md); `status`: `"joined"` \| `"pending_approval"`; \}\>
|
|
1384
|
-
|
|
1385
|
-
Join a GroupsV2 group via invite link.
|
|
1386
|
-
|
|
1387
|
-
#### Parameters
|
|
1388
|
-
|
|
1389
|
-
##### url
|
|
1390
|
-
|
|
1391
|
-
`string`
|
|
1392
|
-
|
|
1393
|
-
##### userAci
|
|
1394
|
-
|
|
1395
|
-
`Uint8Array`
|
|
1396
|
-
|
|
1397
|
-
##### userProfileKey
|
|
1398
|
-
|
|
1399
|
-
`Uint8Array`
|
|
1400
|
-
|
|
1401
|
-
#### Returns
|
|
1402
|
-
|
|
1403
|
-
`Promise`\<\{ `groupId`: [`GroupId`](../type-aliases/GroupId.md); `status`: `"joined"` \| `"pending_approval"`; \}\>
|
|
1404
|
-
|
|
1405
|
-
***
|
|
1406
|
-
|
|
1407
|
-
### leaveGroupV2()
|
|
1408
|
-
|
|
1409
|
-
> **leaveGroupV2**(`groupId`, `userAci`): `Promise`\<`void`\>
|
|
1410
|
-
|
|
1411
|
-
Leave a GroupsV2 group.
|
|
1412
|
-
|
|
1413
|
-
#### Parameters
|
|
1414
|
-
|
|
1415
|
-
##### groupId
|
|
1416
|
-
|
|
1417
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
1418
|
-
|
|
1419
|
-
##### userAci
|
|
1420
|
-
|
|
1421
|
-
`Uint8Array`
|
|
1422
|
-
|
|
1423
|
-
#### Returns
|
|
1424
|
-
|
|
1425
|
-
`Promise`\<`void`\>
|
|
1426
|
-
|
|
1427
|
-
***
|
|
1428
|
-
|
|
1429
|
-
### markAsRead()
|
|
1430
|
-
|
|
1431
|
-
> **markAsRead**(`messageId`): `Promise`\<`void`\>
|
|
1432
|
-
|
|
1433
|
-
Mark a message as read/delivered
|
|
1434
|
-
|
|
1435
|
-
Signals to the server that the message was successfully received
|
|
1436
|
-
and processed. Server may delete the message based on privacy settings.
|
|
1437
|
-
|
|
1438
|
-
#### Parameters
|
|
1439
|
-
|
|
1440
|
-
##### messageId
|
|
1441
|
-
|
|
1442
|
-
`string`
|
|
1443
|
-
|
|
1444
|
-
The message ID from SendResult
|
|
1445
|
-
|
|
1446
|
-
#### Returns
|
|
1447
|
-
|
|
1448
|
-
`Promise`\<`void`\>
|
|
1449
|
-
|
|
1450
|
-
#### Example
|
|
1451
|
-
|
|
1452
|
-
```typescript
|
|
1453
|
-
// After processing received message
|
|
1454
|
-
await signal.markAsRead(envelope.id);
|
|
1455
|
-
```
|
|
1456
|
-
|
|
1457
|
-
***
|
|
1458
|
-
|
|
1459
|
-
### processGroupSenderKeyDistribution()
|
|
1460
|
-
|
|
1461
|
-
> **processGroupSenderKeyDistribution**(`groupId`, `senderId`, `senderDeviceId`, `message`): `Promise`\<`void`\>
|
|
1462
|
-
|
|
1463
|
-
Process a sender key distribution message from another group member
|
|
1464
|
-
|
|
1465
|
-
Call this when receiving a sender key distribution message from a group member.
|
|
1466
|
-
After processing, you can decrypt messages from that member.
|
|
1467
|
-
|
|
1468
|
-
#### Parameters
|
|
1469
|
-
|
|
1470
|
-
##### groupId
|
|
1471
|
-
|
|
1472
|
-
`string`
|
|
1473
|
-
|
|
1474
|
-
Group identifier
|
|
1475
|
-
|
|
1476
|
-
##### senderId
|
|
1477
|
-
|
|
1478
|
-
`string`
|
|
1479
|
-
|
|
1480
|
-
Sender's user ID
|
|
1481
|
-
|
|
1482
|
-
##### senderDeviceId
|
|
1483
|
-
|
|
1484
|
-
`number`
|
|
1485
|
-
|
|
1486
|
-
Sender's device ID
|
|
1487
|
-
|
|
1488
|
-
##### message
|
|
1489
|
-
|
|
1490
|
-
[`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md)
|
|
1491
|
-
|
|
1492
|
-
Distribution message containing the sender key
|
|
1493
|
-
|
|
1494
|
-
#### Returns
|
|
1495
|
-
|
|
1496
|
-
`Promise`\<`void`\>
|
|
1497
|
-
|
|
1498
|
-
#### Example
|
|
1499
|
-
|
|
1500
|
-
```typescript
|
|
1501
|
-
// Receive and process distribution message
|
|
1502
|
-
const distributionMessage = JSON.parse(decryptedContent);
|
|
1503
|
-
await signal.processGroupSenderKeyDistribution(
|
|
1504
|
-
'group-123',
|
|
1505
|
-
senderId,
|
|
1506
|
-
senderDeviceId,
|
|
1507
|
-
distributionMessage
|
|
1508
|
-
);
|
|
1509
|
-
```
|
|
1510
|
-
|
|
1511
|
-
#### Implementation of
|
|
1512
|
-
|
|
1513
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`processGroupSenderKeyDistribution`](../interfaces/ISignalProtocolClient.md#processgroupsenderkeydistribution)
|
|
1514
|
-
|
|
1515
|
-
***
|
|
1516
|
-
|
|
1517
|
-
### processIncomingEnvelope()
|
|
1518
|
-
|
|
1519
|
-
> **processIncomingEnvelope**(`envelope`, `options?`): `Promise`\<`string`\>
|
|
1520
|
-
|
|
1521
|
-
Process an incoming encrypted message envelope.
|
|
1522
|
-
|
|
1523
|
-
Unified entry point for both foreground (relay) and background (HTTP) message processing.
|
|
1524
|
-
Handles decryption and automatically sends SESAME retry requests on retryable failures.
|
|
1525
|
-
|
|
1526
|
-
This method:
|
|
1527
|
-
1. Decodes base64 ciphertext from the envelope
|
|
1528
|
-
2. Decrypts message using Double Ratchet
|
|
1529
|
-
3. On retryable error: sends retry request via relay or options callback
|
|
1530
|
-
4. Re-throws error for caller to handle
|
|
1531
|
-
|
|
1532
|
-
#### Parameters
|
|
1533
|
-
|
|
1534
|
-
##### envelope
|
|
1535
|
-
|
|
1536
|
-
[`IncomingEnvelope`](../interfaces/IncomingEnvelope.md)
|
|
1537
|
-
|
|
1538
|
-
The encrypted message envelope
|
|
1539
|
-
|
|
1540
|
-
##### options?
|
|
1541
|
-
|
|
1542
|
-
[`ProcessEnvelopeOptions`](../interfaces/ProcessEnvelopeOptions.md)
|
|
1543
|
-
|
|
1544
|
-
Transport callbacks for background (no relay) scenarios
|
|
1545
|
-
|
|
1546
|
-
#### Returns
|
|
1547
|
-
|
|
1548
|
-
`Promise`\<`string`\>
|
|
1549
|
-
|
|
1550
|
-
Decrypted plaintext
|
|
1551
|
-
|
|
1552
|
-
#### Throws
|
|
1553
|
-
|
|
1554
|
-
EncryptionError after sending retry request if decryption fails
|
|
1555
|
-
|
|
1556
|
-
#### Implementation of
|
|
1557
|
-
|
|
1558
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`processIncomingEnvelope`](../interfaces/ISignalProtocolClient.md#processincomingenvelope)
|
|
1559
|
-
|
|
1560
|
-
***
|
|
1561
|
-
|
|
1562
|
-
### processIncomingEnvelopes()
|
|
1563
|
-
|
|
1564
|
-
> **processIncomingEnvelopes**(`envelopes`, `options?`): `Promise`\<(\{ `envelope`: [`IncomingEnvelope`](../interfaces/IncomingEnvelope.md); `plaintext`: `string`; \} \| \{ `envelope`: [`IncomingEnvelope`](../interfaces/IncomingEnvelope.md); `error`: `Error`; \})[]\>
|
|
1565
|
-
|
|
1566
|
-
Process multiple incoming encrypted message envelopes.
|
|
1567
|
-
|
|
1568
|
-
This is the preferred method for batch message processing. It handles:
|
|
1569
|
-
1. Sorting PreKeyMessages before ciphertexts (SESAME session convergence)
|
|
1570
|
-
2. Processing each envelope in order
|
|
1571
|
-
3. Collecting results/errors for caller to handle
|
|
1572
|
-
|
|
1573
|
-
The sorting ensures PreKeyMessages (which establish sessions) are processed
|
|
1574
|
-
before ciphertexts that depend on those sessions. This is required for
|
|
1575
|
-
SESAME Section 3.4 session convergence when archived sessions are promoted.
|
|
1576
|
-
|
|
1577
|
-
#### Parameters
|
|
1578
|
-
|
|
1579
|
-
##### envelopes
|
|
1580
|
-
|
|
1581
|
-
[`IncomingEnvelope`](../interfaces/IncomingEnvelope.md)[]
|
|
1582
|
-
|
|
1583
|
-
Array of encrypted message envelopes
|
|
1584
|
-
|
|
1585
|
-
##### options?
|
|
1586
|
-
|
|
1587
|
-
[`ProcessEnvelopeOptions`](../interfaces/ProcessEnvelopeOptions.md)
|
|
1588
|
-
|
|
1589
|
-
Transport callbacks for background scenarios
|
|
1590
|
-
|
|
1591
|
-
#### Returns
|
|
1592
|
-
|
|
1593
|
-
`Promise`\<(\{ `envelope`: [`IncomingEnvelope`](../interfaces/IncomingEnvelope.md); `plaintext`: `string`; \} \| \{ `envelope`: [`IncomingEnvelope`](../interfaces/IncomingEnvelope.md); `error`: `Error`; \})[]\>
|
|
1594
|
-
|
|
1595
|
-
Array of results, each either success (plaintext) or failure (error)
|
|
1596
|
-
|
|
1597
|
-
#### Example
|
|
1598
|
-
|
|
1599
|
-
```typescript
|
|
1600
|
-
const results = await signal.processIncomingEnvelopes(pendingMessages);
|
|
1601
|
-
for (const result of results) {
|
|
1602
|
-
if ('plaintext' in result) {
|
|
1603
|
-
handleDecryptedMessage(result.envelope, result.plaintext);
|
|
1604
|
-
} else {
|
|
1605
|
-
handleDecryptionError(result.envelope, result.error);
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
```
|
|
1609
|
-
|
|
1610
|
-
#### See
|
|
1611
|
-
|
|
1612
|
-
https://signal.org/docs/specifications/sesame/ Section 3.4
|
|
1613
|
-
|
|
1614
|
-
***
|
|
1615
|
-
|
|
1616
|
-
### receive()
|
|
1617
|
-
|
|
1618
|
-
> **receive**(`message`): `Promise`\<`string`\>
|
|
1619
|
-
|
|
1620
|
-
Receive and decrypt message from another device (multi-device support)
|
|
1621
|
-
|
|
1622
|
-
Implements session convergence per SESAME spec.
|
|
1623
|
-
|
|
1624
|
-
#### Parameters
|
|
1625
|
-
|
|
1626
|
-
##### message
|
|
1627
|
-
|
|
1628
|
-
[`SesameMessage`](../interfaces/SesameMessage.md)
|
|
1629
|
-
|
|
1630
|
-
The encrypted Sesame message envelope
|
|
1631
|
-
|
|
1632
|
-
#### Returns
|
|
1633
|
-
|
|
1634
|
-
`Promise`\<`string`\>
|
|
1635
|
-
|
|
1636
|
-
Decrypted plaintext
|
|
1637
|
-
|
|
1638
|
-
***
|
|
1639
|
-
|
|
1640
|
-
### registerHook()
|
|
1641
|
-
|
|
1642
|
-
> **registerHook**\<`K`\>(`name`, `callback`): `void`
|
|
1643
|
-
|
|
1644
|
-
Register a hook callback after construction
|
|
1645
|
-
|
|
1646
|
-
Enables dependency injection patterns where hooks are registered
|
|
1647
|
-
after SignalProtocolClient is created. This is used by ServicesProvider
|
|
1648
|
-
to wire up ContentManager's decryption hook.
|
|
1649
|
-
|
|
1650
|
-
#### Type Parameters
|
|
1651
|
-
|
|
1652
|
-
##### K
|
|
1653
|
-
|
|
1654
|
-
`K` *extends* keyof [`SignalProtocolClientHooks`](../interfaces/SignalProtocolClientHooks.md)
|
|
1655
|
-
|
|
1656
|
-
#### Parameters
|
|
1657
|
-
|
|
1658
|
-
##### name
|
|
1659
|
-
|
|
1660
|
-
`K`
|
|
1661
|
-
|
|
1662
|
-
The hook name to register
|
|
1663
|
-
|
|
1664
|
-
##### callback
|
|
1665
|
-
|
|
1666
|
-
`NonNullable`\<[`SignalProtocolClientHooks`](../interfaces/SignalProtocolClientHooks.md)\[`K`\]\>
|
|
1667
|
-
|
|
1668
|
-
The callback function to invoke
|
|
1669
|
-
|
|
1670
|
-
#### Returns
|
|
1671
|
-
|
|
1672
|
-
`void`
|
|
1673
|
-
|
|
1674
|
-
#### Example
|
|
1675
|
-
|
|
1676
|
-
```typescript
|
|
1677
|
-
// In ServicesProvider: wire up ContentManager after creation
|
|
1678
|
-
const signal = await SignalProtocolClient.create(userId, { storage, relay });
|
|
1679
|
-
const content = new ContentManager({ db, signal });
|
|
1680
|
-
|
|
1681
|
-
signal.registerHook('onMessageDecrypted', content.getDecryptionHook());
|
|
1682
|
-
signal.startRelaySubscription(); // Now safe to start
|
|
1683
|
-
```
|
|
1684
|
-
|
|
1685
|
-
#### See
|
|
1686
|
-
|
|
1687
|
-
ISignalProtocolClient.registerHook
|
|
1688
|
-
|
|
1689
|
-
#### Implementation of
|
|
1690
|
-
|
|
1691
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`registerHook`](../interfaces/ISignalProtocolClient.md#registerhook)
|
|
1692
|
-
|
|
1693
|
-
***
|
|
1694
|
-
|
|
1695
|
-
### removeGroupMemberV2()
|
|
1696
|
-
|
|
1697
|
-
> **removeGroupMemberV2**(`groupId`, `editorAci`, `targetAci`): `Promise`\<`void`\>
|
|
1698
|
-
|
|
1699
|
-
Remove a member from a GroupsV2 group. Triggers sender key rotation.
|
|
1700
|
-
|
|
1701
|
-
#### Parameters
|
|
1702
|
-
|
|
1703
|
-
##### groupId
|
|
1704
|
-
|
|
1705
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
1706
|
-
|
|
1707
|
-
##### editorAci
|
|
1708
|
-
|
|
1709
|
-
`Uint8Array`
|
|
1710
|
-
|
|
1711
|
-
##### targetAci
|
|
1712
|
-
|
|
1713
|
-
`Uint8Array`
|
|
1714
|
-
|
|
1715
|
-
#### Returns
|
|
1716
|
-
|
|
1717
|
-
`Promise`\<`void`\>
|
|
1718
|
-
|
|
1719
|
-
***
|
|
1720
|
-
|
|
1721
|
-
### rotateAccountIdentity()
|
|
1722
|
-
|
|
1723
|
-
> **rotateAccountIdentity**(`expectedCurrentCommitment`, `identityType?`): `Promise`\<`void`\>
|
|
1724
|
-
|
|
1725
|
-
Explicitly rotate this account's relay identity using a caller-authenticated
|
|
1726
|
-
compare-and-swap commitment, then publish fresh prekeys for that namespace.
|
|
1727
|
-
Normal sync and linked-device provisioning never call this operation.
|
|
1728
|
-
|
|
1729
|
-
#### Parameters
|
|
1730
|
-
|
|
1731
|
-
##### expectedCurrentCommitment
|
|
1732
|
-
|
|
1733
|
-
`Uint8Array`
|
|
1734
|
-
|
|
1735
|
-
##### identityType?
|
|
1736
|
-
|
|
1737
|
-
[`IdentityType`](../namespaces/keys/type-aliases/IdentityType.md) = `'aci'`
|
|
1738
|
-
|
|
1739
|
-
#### Returns
|
|
1740
|
-
|
|
1741
|
-
`Promise`\<`void`\>
|
|
1742
|
-
|
|
1743
|
-
#### Implementation of
|
|
1744
|
-
|
|
1745
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`rotateAccountIdentity`](../interfaces/ISignalProtocolClient.md#rotateaccountidentity)
|
|
1746
|
-
|
|
1747
|
-
***
|
|
1748
|
-
|
|
1749
|
-
### rotateEcSignedPreKey()
|
|
1750
|
-
|
|
1751
|
-
> **rotateEcSignedPreKey**(): `Promise`\<`boolean`\>
|
|
1752
|
-
|
|
1753
|
-
Rotate EC signed prekey
|
|
1754
|
-
|
|
1755
|
-
Should be called weekly to maintain forward secrecy.
|
|
1756
|
-
Generates a new EC signed prekey and uploads it to the relay if configured.
|
|
1757
|
-
|
|
1758
|
-
#### Returns
|
|
1759
|
-
|
|
1760
|
-
`Promise`\<`boolean`\>
|
|
1761
|
-
|
|
1762
|
-
True if rotation was performed, false if not needed yet
|
|
1763
|
-
|
|
1764
|
-
#### Implementation of
|
|
1765
|
-
|
|
1766
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`rotateEcSignedPreKey`](../interfaces/ISignalProtocolClient.md#rotateecsignedprekey)
|
|
1767
|
-
|
|
1768
|
-
***
|
|
1769
|
-
|
|
1770
|
-
### rotateGroupSenderKey()
|
|
1771
|
-
|
|
1772
|
-
> **rotateGroupSenderKey**(`groupId`): `Promise`\<\{ `distributionMessage`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `senderKeyId`: `string`; \}\>
|
|
1773
|
-
|
|
1774
|
-
Rotate sender key for a group (forward secrecy on membership changes).
|
|
1775
|
-
|
|
1776
|
-
## When to Call
|
|
1777
|
-
|
|
1778
|
-
Per Signal Protocol specification, rotate sender keys on **membership changes**:
|
|
1779
|
-
|
|
1780
|
-
| Event | Action |
|
|
1781
|
-
|-------|--------|
|
|
1782
|
-
| Member REMOVED | **ALL members** must rotate (forward secrecy) |
|
|
1783
|
-
| Member ADDED | Distribute current key to new member (no rotation needed) |
|
|
1784
|
-
| Group metadata changed | Rotate recommended |
|
|
1785
|
-
|
|
1786
|
-
**Important**: Signal does NOT use periodic or message-count-based rotation.
|
|
1787
|
-
Only rotate when membership changes to maintain forward secrecy.
|
|
1788
|
-
|
|
1789
|
-
## Why Rotate on Member Removal?
|
|
1790
|
-
|
|
1791
|
-
When a member is removed, they still have the old sender key and could decrypt
|
|
1792
|
-
future messages if the key isn't rotated. ALL remaining members must generate
|
|
1793
|
-
new sender keys to prevent the removed member from reading future messages.
|
|
1794
|
-
|
|
1795
|
-
#### Parameters
|
|
1796
|
-
|
|
1797
|
-
##### groupId
|
|
1798
|
-
|
|
1799
|
-
`string`
|
|
1800
|
-
|
|
1801
|
-
Group identifier
|
|
1802
|
-
|
|
1803
|
-
#### Returns
|
|
1804
|
-
|
|
1805
|
-
`Promise`\<\{ `distributionMessage`: [`SenderKeyDistributionMessage`](../interfaces/SenderKeyDistributionMessage.md); `senderKeyId`: `string`; \}\>
|
|
1806
|
-
|
|
1807
|
-
New distribution message to share with remaining members
|
|
1808
|
-
|
|
1809
|
-
#### Example
|
|
1810
|
-
|
|
1811
|
-
```typescript
|
|
1812
|
-
// When removing a member from a group
|
|
1813
|
-
async function onMemberRemoved(groupId: string, remainingMembers: Member[]) {
|
|
1814
|
-
// Rotate our sender key (forward secrecy)
|
|
1815
|
-
const { distributionMessage } = await signal.rotateGroupSenderKey(groupId);
|
|
1816
|
-
|
|
1817
|
-
// Distribute new key to remaining members via pairwise encryption
|
|
1818
|
-
for (const member of remainingMembers) {
|
|
1819
|
-
const encrypted = await signal.encryptMessage(
|
|
1820
|
-
member.address,
|
|
1821
|
-
JSON.stringify(distributionMessage)
|
|
1822
|
-
);
|
|
1823
|
-
await sendToMember(member, encrypted);
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
// When adding a member - no rotation needed, just distribute current key
|
|
1828
|
-
async function onMemberAdded(groupId: string, newMember: Member) {
|
|
1829
|
-
const { distributionMessage } = await signal.createGroupSenderKey(groupId);
|
|
1830
|
-
// Or get existing: signal.getGroupSenderKeyDistribution(groupId)
|
|
1831
|
-
const encrypted = await signal.encryptMessage(
|
|
1832
|
-
newMember.address,
|
|
1833
|
-
JSON.stringify(distributionMessage)
|
|
1834
|
-
);
|
|
1835
|
-
await sendToMember(newMember, encrypted);
|
|
1836
|
-
}
|
|
1837
|
-
```
|
|
1838
|
-
|
|
1839
|
-
#### See
|
|
1840
|
-
|
|
1841
|
-
handleGroupMembershipChange - Helper method for common membership patterns
|
|
1842
|
-
|
|
1843
|
-
#### Implementation of
|
|
1844
|
-
|
|
1845
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`rotateGroupSenderKey`](../interfaces/ISignalProtocolClient.md#rotategroupsenderkey)
|
|
1846
|
-
|
|
1847
|
-
***
|
|
1848
|
-
|
|
1849
|
-
### rotateKyberPreKey()
|
|
1850
|
-
|
|
1851
|
-
> **rotateKyberPreKey**(): `Promise`\<`boolean`\>
|
|
1852
|
-
|
|
1853
|
-
Rotate the post-quantum KEM last-resort prekey.
|
|
1854
|
-
|
|
1855
|
-
Should be called weekly alongside signed prekey rotation.
|
|
1856
|
-
Generates fresh ML-KEM/Kyber-compatible key material and uploads it to the
|
|
1857
|
-
relay if configured.
|
|
1858
|
-
|
|
1859
|
-
#### Returns
|
|
1860
|
-
|
|
1861
|
-
`Promise`\<`boolean`\>
|
|
1862
|
-
|
|
1863
|
-
True if rotation was performed, false if not needed yet
|
|
1864
|
-
|
|
1865
|
-
#### Implementation of
|
|
1866
|
-
|
|
1867
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`rotateKyberPreKey`](../interfaces/ISignalProtocolClient.md#rotatekyberprekey)
|
|
1868
|
-
|
|
1869
|
-
***
|
|
1870
|
-
|
|
1871
|
-
### runPeriodicCleanup()
|
|
1872
|
-
|
|
1873
|
-
> **runPeriodicCleanup**(): `number`
|
|
1874
|
-
|
|
1875
|
-
Run periodic cleanup of internal tracking state.
|
|
1876
|
-
|
|
1877
|
-
Safe to call frequently - internally throttled to avoid overhead.
|
|
1878
|
-
Recommended call sites:
|
|
1879
|
-
- App foreground transition
|
|
1880
|
-
- After successful message batch processing
|
|
1881
|
-
- Periodically during long sessions
|
|
1882
|
-
|
|
1883
|
-
Cleans up:
|
|
1884
|
-
- Expired retry dedup entries (recentRetryRequests)
|
|
1885
|
-
|
|
1886
|
-
#### Returns
|
|
1887
|
-
|
|
1888
|
-
`number`
|
|
1889
|
-
|
|
1890
|
-
Number of entries cleaned up
|
|
1891
|
-
|
|
1892
|
-
#### Implementation of
|
|
1893
|
-
|
|
1894
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`runPeriodicCleanup`](../interfaces/ISignalProtocolClient.md#runperiodiccleanup)
|
|
1895
|
-
|
|
1896
|
-
***
|
|
1897
|
-
|
|
1898
|
-
### send()
|
|
1899
|
-
|
|
1900
|
-
> **send**(`recipientId`, `content`, `options?`): `Promise`\<[`SendResult`](../interfaces/SendResult.md)\>
|
|
1901
|
-
|
|
1902
|
-
Send encrypted content to a user or group
|
|
1903
|
-
|
|
1904
|
-
This is the ONE way to send content. Handles:
|
|
1905
|
-
- DataMessageInput: Structured proto content (serialized to protobuf)
|
|
1906
|
-
- String content: Text or structured data (encoded to UTF-8 bytes)
|
|
1907
|
-
- Uint8Array: Pre-serialized binary content (passed through)
|
|
1908
|
-
- User recipients: Encrypts for all user's devices via SESAME
|
|
1909
|
-
- Group recipients: Uses Sender Keys for O(1) encryption
|
|
1910
|
-
|
|
1911
|
-
All inputs are normalized to Uint8Array before reaching the cipher layer.
|
|
1912
|
-
|
|
1913
|
-
#### Parameters
|
|
1914
|
-
|
|
1915
|
-
##### recipientId
|
|
1916
|
-
|
|
1917
|
-
`string`
|
|
1918
|
-
|
|
1919
|
-
User ID or group ID (groups use Signal V2 prefix)
|
|
1920
|
-
|
|
1921
|
-
##### content
|
|
1922
|
-
|
|
1923
|
-
`string` \| `Uint8Array`\<`ArrayBufferLike`\> \| [`DataMessageInput`](../interfaces/DataMessageInput.md)
|
|
1924
|
-
|
|
1925
|
-
DataMessageInput, string, or Uint8Array to encrypt and send
|
|
1926
|
-
|
|
1927
|
-
##### options?
|
|
1928
|
-
|
|
1929
|
-
[`SendOptions`](../interfaces/SendOptions.md)
|
|
1930
|
-
|
|
1931
|
-
Optional send options (isBinary for blob encryption, etc.)
|
|
1932
|
-
|
|
1933
|
-
#### Returns
|
|
1934
|
-
|
|
1935
|
-
`Promise`\<[`SendResult`](../interfaces/SendResult.md)\>
|
|
1936
|
-
|
|
1937
|
-
SendResult with messageId, timestamp, and device count
|
|
1938
|
-
|
|
1939
|
-
#### Example
|
|
1940
|
-
|
|
1941
|
-
```typescript
|
|
1942
|
-
import { createGroupId } from '@open-e2ee/signal-protocol-sdk';
|
|
1943
|
-
|
|
1944
|
-
// Send text message
|
|
1945
|
-
await signal.send('bob', 'Hello!');
|
|
1946
|
-
|
|
1947
|
-
// Send structured data
|
|
1948
|
-
await signal.send('bob', { body: 'Hello!', timestamp: Date.now() });
|
|
1949
|
-
|
|
1950
|
-
// Send binary attachment (two-layer encryption)
|
|
1951
|
-
await signal.send('bob', photoBytes, { isBinary: true, mimeType: 'image/jpeg' });
|
|
1952
|
-
|
|
1953
|
-
// Send to group (use createGroupId helper)
|
|
1954
|
-
await signal.send(createGroupId('abc123'), 'Hello everyone!');
|
|
1955
|
-
```
|
|
1956
|
-
|
|
1957
|
-
#### Implementation of
|
|
1958
|
-
|
|
1959
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`send`](../interfaces/ISignalProtocolClient.md#send)
|
|
1960
|
-
|
|
1961
|
-
***
|
|
1962
|
-
|
|
1963
|
-
### sendReadReceipt()
|
|
1964
|
-
|
|
1965
|
-
> **sendReadReceipt**(`recipientUserId`, `timestamps`): `Promise`\<`void`\>
|
|
1966
|
-
|
|
1967
|
-
Send read receipt to original message sender (all devices)
|
|
1968
|
-
|
|
1969
|
-
Called when the user views messages in a conversation.
|
|
1970
|
-
Similar to delivery receipts but indicates message was actually read.
|
|
1971
|
-
|
|
1972
|
-
Respects SDK privacy settings: if read receipts are disabled,
|
|
1973
|
-
this method returns early without sending.
|
|
1974
|
-
|
|
1975
|
-
#### Parameters
|
|
1976
|
-
|
|
1977
|
-
##### recipientUserId
|
|
1978
|
-
|
|
1979
|
-
`string`
|
|
1980
|
-
|
|
1981
|
-
Original sender's user ID
|
|
1982
|
-
|
|
1983
|
-
##### timestamps
|
|
1984
|
-
|
|
1985
|
-
`number`[]
|
|
1986
|
-
|
|
1987
|
-
Server timestamps of messages that were read
|
|
1988
|
-
|
|
1989
|
-
#### Returns
|
|
1990
|
-
|
|
1991
|
-
`Promise`\<`void`\>
|
|
1992
|
-
|
|
1993
|
-
#### Implementation of
|
|
1994
|
-
|
|
1995
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`sendReadReceipt`](../interfaces/ISignalProtocolClient.md#sendreadreceipt)
|
|
1996
|
-
|
|
1997
|
-
***
|
|
1998
|
-
|
|
1999
|
-
### sendTypingIndicator()
|
|
2000
|
-
|
|
2001
|
-
> **sendTypingIndicator**(`recipientUserId`, `recipientDeviceId`, `conversationId`, `action`, `groupId?`): `Promise`\<`void`\>
|
|
2002
|
-
|
|
2003
|
-
Send typing indicator to conversation recipient
|
|
2004
|
-
|
|
2005
|
-
Delegates to MessageOps.sendTypingIndicator for implementation.
|
|
2006
|
-
|
|
2007
|
-
#### Parameters
|
|
2008
|
-
|
|
2009
|
-
##### recipientUserId
|
|
2010
|
-
|
|
2011
|
-
`string`
|
|
2012
|
-
|
|
2013
|
-
##### recipientDeviceId
|
|
2014
|
-
|
|
2015
|
-
`number`
|
|
2016
|
-
|
|
2017
|
-
##### conversationId
|
|
2018
|
-
|
|
2019
|
-
`string`
|
|
2020
|
-
|
|
2021
|
-
##### action
|
|
2022
|
-
|
|
2023
|
-
[`TypingAction`](../enumerations/TypingAction.md)
|
|
2024
|
-
|
|
2025
|
-
##### groupId?
|
|
2026
|
-
|
|
2027
|
-
`string`
|
|
2028
|
-
|
|
2029
|
-
#### Returns
|
|
2030
|
-
|
|
2031
|
-
`Promise`\<`void`\>
|
|
2032
|
-
|
|
2033
|
-
#### Implementation of
|
|
2034
|
-
|
|
2035
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`sendTypingIndicator`](../interfaces/ISignalProtocolClient.md#sendtypingindicator)
|
|
2036
|
-
|
|
2037
|
-
***
|
|
2038
|
-
|
|
2039
|
-
### sendViewedReceipt()
|
|
2040
|
-
|
|
2041
|
-
> **sendViewedReceipt**(`recipientUserId`, `timestamps`): `Promise`\<`void`\>
|
|
2042
|
-
|
|
2043
|
-
Send viewed receipt to original message sender (all devices).
|
|
2044
|
-
|
|
2045
|
-
Uses the same privacy gate as read receipts.
|
|
2046
|
-
|
|
2047
|
-
#### Parameters
|
|
2048
|
-
|
|
2049
|
-
##### recipientUserId
|
|
2050
|
-
|
|
2051
|
-
`string`
|
|
2052
|
-
|
|
2053
|
-
##### timestamps
|
|
2054
|
-
|
|
2055
|
-
`number`[]
|
|
2056
|
-
|
|
2057
|
-
#### Returns
|
|
2058
|
-
|
|
2059
|
-
`Promise`\<`void`\>
|
|
2060
|
-
|
|
2061
|
-
#### Implementation of
|
|
2062
|
-
|
|
2063
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`sendViewedReceipt`](../interfaces/ISignalProtocolClient.md#sendviewedreceipt)
|
|
2064
|
-
|
|
2065
|
-
***
|
|
2066
|
-
|
|
2067
|
-
### startRelaySubscription()
|
|
2068
|
-
|
|
2069
|
-
> **startRelaySubscription**(): `void`
|
|
2070
|
-
|
|
2071
|
-
Start relay subscription for automatic message decryption
|
|
2072
|
-
|
|
2073
|
-
When configured with both `relay` and `onMessageDecrypted` hook, SignalProtocolClient will:
|
|
2074
|
-
1. Subscribe to incoming envelopes from the relay
|
|
2075
|
-
2. Decrypt messages appropriately (pairwise vs group/sender key)
|
|
2076
|
-
3. Call onMessageDecrypted hook with DecryptedEnvelope (for ContentManager storage)
|
|
2077
|
-
4. Mark messages as delivered on the relay
|
|
2078
|
-
|
|
2079
|
-
This enables ContentManager to store decrypted content in an encrypted SQLite
|
|
2080
|
-
database without any knowledge of cryptography.
|
|
2081
|
-
|
|
2082
|
-
Can be called manually after registering hooks via registerHook().
|
|
2083
|
-
Called automatically by create() when relay + hook configured.
|
|
2084
|
-
|
|
2085
|
-
#### Returns
|
|
2086
|
-
|
|
2087
|
-
`void`
|
|
2088
|
-
|
|
2089
|
-
#### See
|
|
2090
|
-
|
|
2091
|
-
ISignalProtocolClient.startRelaySubscription
|
|
2092
|
-
|
|
2093
|
-
#### Implementation of
|
|
2094
|
-
|
|
2095
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`startRelaySubscription`](../interfaces/ISignalProtocolClient.md#startrelaysubscription)
|
|
2096
|
-
|
|
2097
|
-
***
|
|
2098
|
-
|
|
2099
|
-
### startRetryRequestSubscription()
|
|
2100
|
-
|
|
2101
|
-
> **startRetryRequestSubscription**(): `void`
|
|
2102
|
-
|
|
2103
|
-
Start listening for retry requests from recipients (SESAME spec §6.2)
|
|
2104
|
-
|
|
2105
|
-
When a recipient cannot decrypt a message, they send a retry request.
|
|
2106
|
-
This method subscribes to incoming retry requests and processes them
|
|
2107
|
-
by resending the original message with a new session.
|
|
2108
|
-
|
|
2109
|
-
Automatically started if relay.subscribeRetryRequests is available.
|
|
2110
|
-
Can be called manually if you need to restart the subscription.
|
|
2111
|
-
|
|
2112
|
-
#### Returns
|
|
2113
|
-
|
|
2114
|
-
`void`
|
|
2115
|
-
|
|
2116
|
-
***
|
|
2117
|
-
|
|
2118
|
-
### stop()
|
|
2119
|
-
|
|
2120
|
-
> **stop**(): `Promise`\<`void`\>
|
|
2121
|
-
|
|
2122
|
-
Stop the Signal Protocol client and clean up resources
|
|
2123
|
-
|
|
2124
|
-
Call this when the user logs out or the app is being destroyed.
|
|
2125
|
-
Unsubscribes from relay server and cleans up any pending operations.
|
|
2126
|
-
|
|
2127
|
-
#### Returns
|
|
2128
|
-
|
|
2129
|
-
`Promise`\<`void`\>
|
|
2130
|
-
|
|
2131
|
-
#### Example
|
|
2132
|
-
|
|
2133
|
-
```typescript
|
|
2134
|
-
// On logout
|
|
2135
|
-
await signal.stop();
|
|
2136
|
-
```
|
|
2137
|
-
|
|
2138
|
-
#### Implementation of
|
|
2139
|
-
|
|
2140
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`stop`](../interfaces/ISignalProtocolClient.md#stop)
|
|
2141
|
-
|
|
2142
|
-
***
|
|
2143
|
-
|
|
2144
|
-
### stopRelaySubscription()
|
|
2145
|
-
|
|
2146
|
-
> **stopRelaySubscription**(): `void`
|
|
2147
|
-
|
|
2148
|
-
Stop the relay subscription
|
|
2149
|
-
|
|
2150
|
-
Pauses message processing via the relay subscription without destroying
|
|
2151
|
-
SignalProtocolClient state. The subscription can be restarted with startRelaySubscription().
|
|
2152
|
-
|
|
2153
|
-
Use this when the app backgrounds to let the background task handle messages.
|
|
2154
|
-
Resume when the app foregrounds for real-time message delivery.
|
|
2155
|
-
|
|
2156
|
-
#### Returns
|
|
2157
|
-
|
|
2158
|
-
`void`
|
|
2159
|
-
|
|
2160
|
-
#### See
|
|
2161
|
-
|
|
2162
|
-
ISignalProtocolClient.stopRelaySubscription
|
|
2163
|
-
|
|
2164
|
-
#### Implementation of
|
|
2165
|
-
|
|
2166
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`stopRelaySubscription`](../interfaces/ISignalProtocolClient.md#stoprelaysubscription)
|
|
2167
|
-
|
|
2168
|
-
***
|
|
2169
|
-
|
|
2170
|
-
### syncBlockedRecipientsToLinkedDevices()
|
|
2171
|
-
|
|
2172
|
-
> **syncBlockedRecipientsToLinkedDevices**(`blocked`): `Promise`\<`void`\>
|
|
2173
|
-
|
|
2174
|
-
Sync the current blocked-recipient snapshot to the account's other linked devices.
|
|
2175
|
-
|
|
2176
|
-
The payload is a full snapshot, not a block/unblock delta.
|
|
2177
|
-
|
|
2178
|
-
#### Parameters
|
|
2179
|
-
|
|
2180
|
-
##### blocked
|
|
2181
|
-
|
|
2182
|
-
[`BlockedRecipientsSyncInput`](../interfaces/BlockedRecipientsSyncInput.md)
|
|
2183
|
-
|
|
2184
|
-
#### Returns
|
|
2185
|
-
|
|
2186
|
-
`Promise`\<`void`\>
|
|
2187
|
-
|
|
2188
|
-
#### Implementation of
|
|
2189
|
-
|
|
2190
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncBlockedRecipientsToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncblockedrecipientstolinkeddevices)
|
|
2191
|
-
|
|
2192
|
-
***
|
|
2193
|
-
|
|
2194
|
-
### syncConfigurationToLinkedDevices()
|
|
2195
|
-
|
|
2196
|
-
> **syncConfigurationToLinkedDevices**(`configuration`): `Promise`\<`void`\>
|
|
2197
|
-
|
|
2198
|
-
Sync local account-level communication/privacy configuration to our other linked devices.
|
|
2199
|
-
|
|
2200
|
-
#### Parameters
|
|
2201
|
-
|
|
2202
|
-
##### configuration
|
|
2203
|
-
|
|
2204
|
-
[`ConfigurationSyncInput`](../interfaces/ConfigurationSyncInput.md)
|
|
2205
|
-
|
|
2206
|
-
#### Returns
|
|
2207
|
-
|
|
2208
|
-
`Promise`\<`void`\>
|
|
2209
|
-
|
|
2210
|
-
#### Implementation of
|
|
2211
|
-
|
|
2212
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncConfigurationToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncconfigurationtolinkeddevices)
|
|
2213
|
-
|
|
2214
|
-
***
|
|
2215
|
-
|
|
2216
|
-
### syncGroupV2()
|
|
2217
|
-
|
|
2218
|
-
> **syncGroupV2**(`groupId`): `Promise`\<[`DecryptedGroup`](../interfaces/DecryptedGroup.md)\>
|
|
2219
|
-
|
|
2220
|
-
Sync group state from server.
|
|
2221
|
-
|
|
2222
|
-
#### Parameters
|
|
2223
|
-
|
|
2224
|
-
##### groupId
|
|
2225
|
-
|
|
2226
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
2227
|
-
|
|
2228
|
-
#### Returns
|
|
2229
|
-
|
|
2230
|
-
`Promise`\<[`DecryptedGroup`](../interfaces/DecryptedGroup.md)\>
|
|
2231
|
-
|
|
2232
|
-
***
|
|
2233
|
-
|
|
2234
|
-
### syncMediaAttachmentDeleteToLinkedDevices()
|
|
2235
|
-
|
|
2236
|
-
> **syncMediaAttachmentDeleteToLinkedDevices**(`entry`): `Promise`\<`void`\>
|
|
2237
|
-
|
|
2238
|
-
Sync a local media attachment delete event to our other linked devices.
|
|
2239
|
-
|
|
2240
|
-
#### Parameters
|
|
2241
|
-
|
|
2242
|
-
##### entry
|
|
2243
|
-
|
|
2244
|
-
[`MediaAttachmentDeleteSyncInput`](../interfaces/MediaAttachmentDeleteSyncInput.md)
|
|
2245
|
-
|
|
2246
|
-
#### Returns
|
|
2247
|
-
|
|
2248
|
-
`Promise`\<`void`\>
|
|
2249
|
-
|
|
2250
|
-
#### Implementation of
|
|
2251
|
-
|
|
2252
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncMediaAttachmentDeleteToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncmediaattachmentdeletetolinkeddevices)
|
|
2253
|
-
|
|
2254
|
-
***
|
|
2255
|
-
|
|
2256
|
-
### syncReadToLinkedDevices()
|
|
2257
|
-
|
|
2258
|
-
> **syncReadToLinkedDevices**(`entries`): `Promise`\<`void`\>
|
|
2259
|
-
|
|
2260
|
-
Sync local read state to our other linked devices.
|
|
2261
|
-
|
|
2262
|
-
Unlike read receipts, this is account-local multi-device state and should
|
|
2263
|
-
happen regardless of the user's remote read-receipt privacy preference.
|
|
2264
|
-
|
|
2265
|
-
#### Parameters
|
|
2266
|
-
|
|
2267
|
-
##### entries
|
|
2268
|
-
|
|
2269
|
-
[`ReadSyncEntryInput`](../interfaces/ReadSyncEntryInput.md)[]
|
|
2270
|
-
|
|
2271
|
-
#### Returns
|
|
2272
|
-
|
|
2273
|
-
`Promise`\<`void`\>
|
|
2274
|
-
|
|
2275
|
-
#### Implementation of
|
|
2276
|
-
|
|
2277
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncReadToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncreadtolinkeddevices)
|
|
2278
|
-
|
|
2279
|
-
***
|
|
2280
|
-
|
|
2281
|
-
### syncRecipientUsernameToLinkedDevices()
|
|
2282
|
-
|
|
2283
|
-
> **syncRecipientUsernameToLinkedDevices**(`recipientUsername`): `Promise`\<`void`\>
|
|
2284
|
-
|
|
2285
|
-
Sync learned recipient username metadata to the account's other linked devices.
|
|
2286
|
-
|
|
2287
|
-
Remote usernames are transient metadata, but once one local device learns
|
|
2288
|
-
them they should converge across the account's linked devices.
|
|
2289
|
-
|
|
2290
|
-
#### Parameters
|
|
2291
|
-
|
|
2292
|
-
##### recipientUsername
|
|
2293
|
-
|
|
2294
|
-
[`RecipientUsernameSyncInput`](../interfaces/RecipientUsernameSyncInput.md)
|
|
2295
|
-
|
|
2296
|
-
#### Returns
|
|
2297
|
-
|
|
2298
|
-
`Promise`\<`void`\>
|
|
2299
|
-
|
|
2300
|
-
#### Implementation of
|
|
2301
|
-
|
|
2302
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncRecipientUsernameToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncrecipientusernametolinkeddevices)
|
|
2303
|
-
|
|
2304
|
-
***
|
|
2305
|
-
|
|
2306
|
-
### syncTaskNotificationAckToLinkedDevices()
|
|
2307
|
-
|
|
2308
|
-
> **syncTaskNotificationAckToLinkedDevices**(`input`): `Promise`\<`void`\>
|
|
2309
|
-
|
|
2310
|
-
Sync task-notification acknowledgment state to our other linked devices.
|
|
2311
|
-
|
|
2312
|
-
This is account-local notification state: if one device dismisses or acts
|
|
2313
|
-
on a task reminder, the user's other devices should cancel their copies.
|
|
2314
|
-
|
|
2315
|
-
#### Parameters
|
|
2316
|
-
|
|
2317
|
-
##### input
|
|
2318
|
-
|
|
2319
|
-
`Omit`\<[`TaskNotificationAckSyncInput`](../interfaces/TaskNotificationAckSyncInput.md), `"acknowledgedOnDevice"`\>
|
|
2320
|
-
|
|
2321
|
-
#### Returns
|
|
2322
|
-
|
|
2323
|
-
`Promise`\<`void`\>
|
|
2324
|
-
|
|
2325
|
-
#### Implementation of
|
|
2326
|
-
|
|
2327
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncTaskNotificationAckToLinkedDevices`](../interfaces/ISignalProtocolClient.md#synctasknotificationacktolinkeddevices)
|
|
2328
|
-
|
|
2329
|
-
***
|
|
2330
|
-
|
|
2331
|
-
### syncToServer()
|
|
2332
|
-
|
|
2333
|
-
> **syncToServer**(`onProgress?`): `Promise`\<`void`\>
|
|
2334
|
-
|
|
2335
|
-
Sync the public prekey bundle to the configured relay.
|
|
2336
|
-
|
|
2337
|
-
Called automatically by create() when a relay is configured.
|
|
2338
|
-
Can also be called manually to retry after a failed initial sync.
|
|
2339
|
-
|
|
2340
|
-
Delegates to PreKeyOps.syncToServer for implementation.
|
|
2341
|
-
|
|
2342
|
-
#### Parameters
|
|
2343
|
-
|
|
2344
|
-
##### onProgress?
|
|
2345
|
-
|
|
2346
|
-
[`ProgressCallback`](../type-aliases/ProgressCallback.md)
|
|
2347
|
-
|
|
2348
|
-
#### Returns
|
|
2349
|
-
|
|
2350
|
-
`Promise`\<`void`\>
|
|
2351
|
-
|
|
2352
|
-
***
|
|
2353
|
-
|
|
2354
|
-
### syncUsernameStateToLinkedDevices()
|
|
2355
|
-
|
|
2356
|
-
> **syncUsernameStateToLinkedDevices**(`usernameState`): `Promise`\<`void`\>
|
|
2357
|
-
|
|
2358
|
-
Sync local username and username-link state to the account's other linked devices.
|
|
2359
|
-
|
|
2360
|
-
Linked devices converge on the same username-link handle and entropy
|
|
2361
|
-
without rotating it.
|
|
2362
|
-
|
|
2363
|
-
#### Parameters
|
|
2364
|
-
|
|
2365
|
-
##### usernameState
|
|
2366
|
-
|
|
2367
|
-
[`UsernameStateSyncInput`](../interfaces/UsernameStateSyncInput.md)
|
|
2368
|
-
|
|
2369
|
-
#### Returns
|
|
2370
|
-
|
|
2371
|
-
`Promise`\<`void`\>
|
|
2372
|
-
|
|
2373
|
-
#### Implementation of
|
|
2374
|
-
|
|
2375
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncUsernameStateToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncusernamestatetolinkeddevices)
|
|
2376
|
-
|
|
2377
|
-
***
|
|
2378
|
-
|
|
2379
|
-
### syncVerificationStateToLinkedDevices()
|
|
2380
|
-
|
|
2381
|
-
> **syncVerificationStateToLinkedDevices**(`verificationState`): `Promise`\<`void`\>
|
|
2382
|
-
|
|
2383
|
-
Sync local safety-number verification state to our other linked devices.
|
|
2384
|
-
|
|
2385
|
-
Only explicit `verified` and cleared-to-`default` states are synced;
|
|
2386
|
-
key-conflict/untrusted state remains local and derived from identity-key
|
|
2387
|
-
changes.
|
|
2388
|
-
|
|
2389
|
-
#### Parameters
|
|
2390
|
-
|
|
2391
|
-
##### verificationState
|
|
2392
|
-
|
|
2393
|
-
[`VerificationStateSyncInput`](../interfaces/VerificationStateSyncInput.md)
|
|
2394
|
-
|
|
2395
|
-
#### Returns
|
|
2396
|
-
|
|
2397
|
-
`Promise`\<`void`\>
|
|
2398
|
-
|
|
2399
|
-
#### Implementation of
|
|
2400
|
-
|
|
2401
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncVerificationStateToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncverificationstatetolinkeddevices)
|
|
2402
|
-
|
|
2403
|
-
***
|
|
2404
|
-
|
|
2405
|
-
### syncViewOnceOpenToLinkedDevices()
|
|
2406
|
-
|
|
2407
|
-
> **syncViewOnceOpenToLinkedDevices**(`entry`): `Promise`\<`void`\>
|
|
2408
|
-
|
|
2409
|
-
Sync a local view-once open event to our other linked devices.
|
|
2410
|
-
|
|
2411
|
-
#### Parameters
|
|
2412
|
-
|
|
2413
|
-
##### entry
|
|
2414
|
-
|
|
2415
|
-
[`ViewOnceOpenSyncInput`](../interfaces/ViewOnceOpenSyncInput.md)
|
|
2416
|
-
|
|
2417
|
-
#### Returns
|
|
2418
|
-
|
|
2419
|
-
`Promise`\<`void`\>
|
|
2420
|
-
|
|
2421
|
-
#### Implementation of
|
|
2422
|
-
|
|
2423
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`syncViewOnceOpenToLinkedDevices`](../interfaces/ISignalProtocolClient.md#syncviewonceopentolinkeddevices)
|
|
2424
|
-
|
|
2425
|
-
***
|
|
2426
|
-
|
|
2427
|
-
### updateGroupAccessControlV2()
|
|
2428
|
-
|
|
2429
|
-
> **updateGroupAccessControlV2**(`groupId`, `editorAci`, `updates`): `Promise`\<`void`\>
|
|
2430
|
-
|
|
2431
|
-
Update GroupsV2 group access control.
|
|
2432
|
-
|
|
2433
|
-
#### Parameters
|
|
2434
|
-
|
|
2435
|
-
##### groupId
|
|
2436
|
-
|
|
2437
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
2438
|
-
|
|
2439
|
-
##### editorAci
|
|
2440
|
-
|
|
2441
|
-
`Uint8Array`
|
|
2442
|
-
|
|
2443
|
-
##### updates
|
|
2444
|
-
|
|
2445
|
-
`Partial`\<`AccessControl`\>
|
|
2446
|
-
|
|
2447
|
-
#### Returns
|
|
2448
|
-
|
|
2449
|
-
`Promise`\<`void`\>
|
|
2450
|
-
|
|
2451
|
-
***
|
|
2452
|
-
|
|
2453
|
-
### updateGroupDescriptionV2()
|
|
2454
|
-
|
|
2455
|
-
> **updateGroupDescriptionV2**(`groupId`, `editorAci`, `description`): `Promise`\<`void`\>
|
|
2456
|
-
|
|
2457
|
-
Update GroupsV2 group description.
|
|
2458
|
-
|
|
2459
|
-
#### Parameters
|
|
2460
|
-
|
|
2461
|
-
##### groupId
|
|
2462
|
-
|
|
2463
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
2464
|
-
|
|
2465
|
-
##### editorAci
|
|
2466
|
-
|
|
2467
|
-
`Uint8Array`
|
|
2468
|
-
|
|
2469
|
-
##### description
|
|
2470
|
-
|
|
2471
|
-
`string`
|
|
2472
|
-
|
|
2473
|
-
#### Returns
|
|
2474
|
-
|
|
2475
|
-
`Promise`\<`void`\>
|
|
2476
|
-
|
|
2477
|
-
***
|
|
2478
|
-
|
|
2479
|
-
### updateGroupTitleV2()
|
|
2480
|
-
|
|
2481
|
-
> **updateGroupTitleV2**(`groupId`, `editorAci`, `title`): `Promise`\<`void`\>
|
|
2482
|
-
|
|
2483
|
-
Update GroupsV2 group title.
|
|
2484
|
-
|
|
2485
|
-
#### Parameters
|
|
2486
|
-
|
|
2487
|
-
##### groupId
|
|
2488
|
-
|
|
2489
|
-
[`GroupId`](../type-aliases/GroupId.md)
|
|
2490
|
-
|
|
2491
|
-
##### editorAci
|
|
2492
|
-
|
|
2493
|
-
`Uint8Array`
|
|
2494
|
-
|
|
2495
|
-
##### title
|
|
2496
|
-
|
|
2497
|
-
`string`
|
|
2498
|
-
|
|
2499
|
-
#### Returns
|
|
2500
|
-
|
|
2501
|
-
`Promise`\<`void`\>
|
|
2502
|
-
|
|
2503
|
-
***
|
|
2504
|
-
|
|
2505
|
-
### uploadAttachment()
|
|
2506
|
-
|
|
2507
|
-
> **uploadAttachment**(`data`, `options`): `Promise`\<[`MediaAttachmentPointer`](../namespaces/media/interfaces/MediaAttachmentPointer.md)\>
|
|
2508
|
-
|
|
2509
|
-
Encrypt and upload an attachment without sending a standalone message.
|
|
2510
|
-
|
|
2511
|
-
Used by higher-level content types that want to carry attachment metadata
|
|
2512
|
-
atomically inside another message payload.
|
|
2513
|
-
|
|
2514
|
-
#### Parameters
|
|
2515
|
-
|
|
2516
|
-
##### data
|
|
2517
|
-
|
|
2518
|
-
`Uint8Array`
|
|
2519
|
-
|
|
2520
|
-
##### options
|
|
2521
|
-
|
|
2522
|
-
[`SendOptions`](../interfaces/SendOptions.md) & `object`
|
|
2523
|
-
|
|
2524
|
-
#### Returns
|
|
2525
|
-
|
|
2526
|
-
`Promise`\<[`MediaAttachmentPointer`](../namespaces/media/interfaces/MediaAttachmentPointer.md)\>
|
|
2527
|
-
|
|
2528
|
-
#### Implementation of
|
|
2529
|
-
|
|
2530
|
-
[`ISignalProtocolClient`](../interfaces/ISignalProtocolClient.md).[`uploadAttachment`](../interfaces/ISignalProtocolClient.md#uploadattachment)
|
|
2531
|
-
|
|
2532
|
-
***
|
|
2533
|
-
|
|
2534
|
-
### verify()
|
|
2535
|
-
|
|
2536
|
-
> **verify**(`userId`, `identityType?`): `Promise`\<[`SafetyNumber`](../interfaces/SafetyNumber.md)\>
|
|
2537
|
-
|
|
2538
|
-
Generate safety number for verifying identity with another user
|
|
2539
|
-
|
|
2540
|
-
Safety numbers allow users to verify they're communicating with the
|
|
2541
|
-
intended person and detect man-in-the-middle attacks.
|
|
2542
|
-
|
|
2543
|
-
#### Parameters
|
|
2544
|
-
|
|
2545
|
-
##### userId
|
|
2546
|
-
|
|
2547
|
-
`string`
|
|
2548
|
-
|
|
2549
|
-
The user ID to generate safety number for
|
|
2550
|
-
|
|
2551
|
-
##### identityType?
|
|
2552
|
-
|
|
2553
|
-
[`IdentityType`](../namespaces/keys/type-aliases/IdentityType.md) = `'aci'`
|
|
2554
|
-
|
|
2555
|
-
#### Returns
|
|
2556
|
-
|
|
2557
|
-
`Promise`\<[`SafetyNumber`](../interfaces/SafetyNumber.md)\>
|
|
2558
|
-
|
|
2559
|
-
SafetyNumber with numeric code and fingerprint for QR
|
|
2560
|
-
|
|
2561
|
-
#### Example
|
|
2562
|
-
|
|
2563
|
-
```typescript
|
|
2564
|
-
const safetyNum = await signal.verify('bob');
|
|
2565
|
-
|
|
2566
|
-
// Show numeric code for phone/voice verification
|
|
2567
|
-
console.log(`Safety Number: ${safetyNum.numeric}`);
|
|
2568
|
-
|
|
2569
|
-
// Generate QR code from fingerprint
|
|
2570
|
-
const qrCode = generateQR(safetyNum.fingerprint);
|
|
2571
|
-
```
|
|
2572
|
-
|
|
2573
|
-
***
|
|
2574
|
-
|
|
2575
|
-
### create()
|
|
2576
|
-
|
|
2577
|
-
> `static` **create**(`userId`, `config`): `Promise`\<`SignalProtocolClient`\>
|
|
2578
|
-
|
|
2579
|
-
Create and initialize a new SignalProtocolClient instance.
|
|
2580
|
-
|
|
2581
|
-
This low-level factory ensures the client is fully initialized before it is
|
|
2582
|
-
returned. Most app code should prefer `createSignalProtocolClient()` so identity,
|
|
2583
|
-
adapters, and protocol policy are grouped in one object.
|
|
2584
|
-
|
|
2585
|
-
If `relay` is provided in config, the client automatically uploads the
|
|
2586
|
-
public prekey bundle needed for end-to-end encrypted messaging.
|
|
2587
|
-
|
|
2588
|
-
#### Parameters
|
|
2589
|
-
|
|
2590
|
-
##### userId
|
|
2591
|
-
|
|
2592
|
-
`string`
|
|
2593
|
-
|
|
2594
|
-
User identifier for this device/client
|
|
2595
|
-
|
|
2596
|
-
##### config
|
|
2597
|
-
|
|
2598
|
-
[`SignalProtocolClientConfig`](../interfaces/SignalProtocolClientConfig.md)
|
|
2599
|
-
|
|
2600
|
-
Optional configuration for the client
|
|
2601
|
-
|
|
2602
|
-
#### Returns
|
|
2603
|
-
|
|
2604
|
-
`Promise`\<`SignalProtocolClient`\>
|
|
2605
|
-
|
|
2606
|
-
Fully initialized SignalProtocolClient instance
|
|
2607
|
-
|
|
2608
|
-
#### Example
|
|
2609
|
-
|
|
2610
|
-
```typescript
|
|
2611
|
-
import { SignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
2612
|
-
import { convexRelay } from '@open-e2ee/signal-protocol-sdk/remote/relay/convex';
|
|
2613
|
-
|
|
2614
|
-
// Local-only primary device.
|
|
2615
|
-
const signal = await SignalProtocolClient.create('user-123', {
|
|
2616
|
-
storage,
|
|
2617
|
-
});
|
|
2618
|
-
|
|
2619
|
-
// Linked device; storage must already contain provisioned identity material.
|
|
2620
|
-
const signal = await SignalProtocolClient.create('user-123', {
|
|
2621
|
-
deviceId: 2,
|
|
2622
|
-
storage: provisionedLinkedDeviceStorage
|
|
2623
|
-
});
|
|
2624
|
-
|
|
2625
|
-
// With relay sync.
|
|
2626
|
-
const relay = convexRelay({ convex, api: signalApi, currentUserId: userId });
|
|
2627
|
-
const signal = await SignalProtocolClient.create('user-123', {
|
|
2628
|
-
storage,
|
|
2629
|
-
relay,
|
|
2630
|
-
onProgress: ({ stage, percent, message }) => {
|
|
2631
|
-
console.log(`${stage}: ${percent}% - ${message}`);
|
|
2632
|
-
}
|
|
2633
|
-
});
|
|
2634
|
-
|
|
2635
|
-
// With full configuration
|
|
2636
|
-
const signal = await SignalProtocolClient.create('user-123', {
|
|
2637
|
-
deviceId: 1,
|
|
2638
|
-
storage,
|
|
2639
|
-
relay,
|
|
2640
|
-
protocol: { postQuantum: 'required', braid: 'required' },
|
|
2641
|
-
onProgress,
|
|
2642
|
-
enableDebugLogging: true,
|
|
2643
|
-
ratchetConfig: { maxSkip: 2000 }
|
|
2644
|
-
});
|
|
2645
|
-
|
|
2646
|
-
// For local development with in-memory adapters
|
|
2647
|
-
const signal = await SignalProtocolClient.create('local-user', {
|
|
2648
|
-
protocolManager: mockManager,
|
|
2649
|
-
storage: mockStorage
|
|
2650
|
-
});
|
|
2651
|
-
```
|