@open-e2ee/signal-protocol-sdk 0.1.0-alpha.1
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 +195 -0
- package/ARCHITECTURE.md +206 -0
- package/CHANGELOG.md +13 -0
- package/LICENSE +661 -0
- package/NOTICE +27 -0
- package/README.md +152 -0
- package/SECURITY.md +125 -0
- package/THIRD_PARTY_NOTICES.md +31 -0
- package/TROUBLESHOOTING.md +203 -0
- package/blocking/README.md +42 -0
- package/client/README.md +169 -0
- package/device/README.md +166 -0
- package/dist/blocking/index.d.ts +4 -0
- package/dist/blocking/index.d.ts.map +1 -0
- package/dist/blocking/index.js +2 -0
- package/dist/blocking/index.js.map +1 -0
- package/dist/blocking/manager.d.ts +27 -0
- package/dist/blocking/manager.d.ts.map +1 -0
- package/dist/blocking/manager.js +61 -0
- package/dist/blocking/manager.js.map +1 -0
- package/dist/blocking/types.d.ts +43 -0
- package/dist/blocking/types.d.ts.map +1 -0
- package/dist/blocking/types.js +9 -0
- package/dist/blocking/types.js.map +1 -0
- package/dist/client/client.d.ts +1281 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +2296 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/compose.d.ts +105 -0
- package/dist/client/compose.d.ts.map +1 -0
- package/dist/client/compose.js +41 -0
- package/dist/client/compose.js.map +1 -0
- package/dist/client/config.d.ts +707 -0
- package/dist/client/config.d.ts.map +1 -0
- package/dist/client/config.js +19 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/constants.d.ts +48 -0
- package/dist/client/constants.d.ts.map +1 -0
- package/dist/client/constants.js +40 -0
- package/dist/client/constants.js.map +1 -0
- package/dist/client/content-adapter.d.ts +106 -0
- package/dist/client/content-adapter.d.ts.map +1 -0
- package/dist/client/content-adapter.js +423 -0
- package/dist/client/content-adapter.js.map +1 -0
- package/dist/client/dual-store.d.ts +70 -0
- package/dist/client/dual-store.d.ts.map +1 -0
- package/dist/client/dual-store.js +123 -0
- package/dist/client/dual-store.js.map +1 -0
- package/dist/client/endorsement-manager.d.ts +143 -0
- package/dist/client/endorsement-manager.d.ts.map +1 -0
- package/dist/client/endorsement-manager.js +259 -0
- package/dist/client/endorsement-manager.js.map +1 -0
- package/dist/client/event-hooks.d.ts +330 -0
- package/dist/client/event-hooks.d.ts.map +1 -0
- package/dist/client/event-hooks.js +59 -0
- package/dist/client/event-hooks.js.map +1 -0
- package/dist/client/files.d.ts +73 -0
- package/dist/client/files.d.ts.map +1 -0
- package/dist/client/files.js +192 -0
- package/dist/client/files.js.map +1 -0
- package/dist/client/groups.d.ts +204 -0
- package/dist/client/groups.d.ts.map +1 -0
- package/dist/client/groups.js +340 -0
- package/dist/client/groups.js.map +1 -0
- package/dist/client/headless.d.ts +99 -0
- package/dist/client/headless.d.ts.map +1 -0
- package/dist/client/headless.js +163 -0
- package/dist/client/headless.js.map +1 -0
- package/dist/client/index.d.ts +33 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +7 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/key-rotation-core.d.ts +167 -0
- package/dist/client/key-rotation-core.d.ts.map +1 -0
- package/dist/client/key-rotation-core.js +459 -0
- package/dist/client/key-rotation-core.js.map +1 -0
- package/dist/client/key-rotation.d.ts +45 -0
- package/dist/client/key-rotation.d.ts.map +1 -0
- package/dist/client/key-rotation.js +174 -0
- package/dist/client/key-rotation.js.map +1 -0
- package/dist/client/media.d.ts +173 -0
- package/dist/client/media.d.ts.map +1 -0
- package/dist/client/media.js +476 -0
- package/dist/client/media.js.map +1 -0
- package/dist/client/messages.d.ts +131 -0
- package/dist/client/messages.d.ts.map +1 -0
- package/dist/client/messages.js +546 -0
- package/dist/client/messages.js.map +1 -0
- package/dist/client/multi-device.d.ts +73 -0
- package/dist/client/multi-device.d.ts.map +1 -0
- package/dist/client/multi-device.js +104 -0
- package/dist/client/multi-device.js.map +1 -0
- package/dist/client/prekeys.d.ts +133 -0
- package/dist/client/prekeys.d.ts.map +1 -0
- package/dist/client/prekeys.js +608 -0
- package/dist/client/prekeys.js.map +1 -0
- package/dist/client/relay-subscription.d.ts +83 -0
- package/dist/client/relay-subscription.d.ts.map +1 -0
- package/dist/client/relay-subscription.js +353 -0
- package/dist/client/relay-subscription.js.map +1 -0
- package/dist/client/retry-utils.d.ts +42 -0
- package/dist/client/retry-utils.d.ts.map +1 -0
- package/dist/client/retry-utils.js +107 -0
- package/dist/client/retry-utils.js.map +1 -0
- package/dist/client/retry.d.ts +121 -0
- package/dist/client/retry.d.ts.map +1 -0
- package/dist/client/retry.js +499 -0
- package/dist/client/retry.js.map +1 -0
- package/dist/client/sealed-sender-ops.d.ts +61 -0
- package/dist/client/sealed-sender-ops.d.ts.map +1 -0
- package/dist/client/sealed-sender-ops.js +173 -0
- package/dist/client/sealed-sender-ops.js.map +1 -0
- package/dist/client/sessions.d.ts +108 -0
- package/dist/client/sessions.d.ts.map +1 -0
- package/dist/client/sessions.js +367 -0
- package/dist/client/sessions.js.map +1 -0
- package/dist/client/signal-service-cipher.d.ts +331 -0
- package/dist/client/signal-service-cipher.d.ts.map +1 -0
- package/dist/client/signal-service-cipher.js +1506 -0
- package/dist/client/signal-service-cipher.js.map +1 -0
- package/dist/client/state.d.ts +147 -0
- package/dist/client/state.d.ts.map +1 -0
- package/dist/client/state.js +226 -0
- package/dist/client/state.js.map +1 -0
- package/dist/client/types.d.ts +423 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +42 -0
- package/dist/client/types.js.map +1 -0
- package/dist/device/connection.d.ts +46 -0
- package/dist/device/connection.d.ts.map +1 -0
- package/dist/device/connection.js +239 -0
- package/dist/device/connection.js.map +1 -0
- package/dist/device/constants.d.ts +69 -0
- package/dist/device/constants.d.ts.map +1 -0
- package/dist/device/constants.js +64 -0
- package/dist/device/constants.js.map +1 -0
- package/dist/device/device-id.d.ts +45 -0
- package/dist/device/device-id.d.ts.map +1 -0
- package/dist/device/device-id.js +87 -0
- package/dist/device/device-id.js.map +1 -0
- package/dist/device/device-name-crypto.d.ts +39 -0
- package/dist/device/device-name-crypto.d.ts.map +1 -0
- package/dist/device/device-name-crypto.js +165 -0
- package/dist/device/device-name-crypto.js.map +1 -0
- package/dist/device/index.d.ts +31 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/index.js +35 -0
- package/dist/device/index.js.map +1 -0
- package/dist/device/lifecycle/index.d.ts +25 -0
- package/dist/device/lifecycle/index.d.ts.map +1 -0
- package/dist/device/lifecycle/index.js +3 -0
- package/dist/device/lifecycle/index.js.map +1 -0
- package/dist/device/lifecycle/manager.d.ts +273 -0
- package/dist/device/lifecycle/manager.d.ts.map +1 -0
- package/dist/device/lifecycle/manager.js +1229 -0
- package/dist/device/lifecycle/manager.js.map +1 -0
- package/dist/device/lifecycle/types.d.ts +372 -0
- package/dist/device/lifecycle/types.d.ts.map +1 -0
- package/dist/device/lifecycle/types.js +10 -0
- package/dist/device/lifecycle/types.js.map +1 -0
- package/dist/device/lifecycle/utils.d.ts +37 -0
- package/dist/device/lifecycle/utils.d.ts.map +1 -0
- package/dist/device/lifecycle/utils.js +79 -0
- package/dist/device/lifecycle/utils.js.map +1 -0
- package/dist/device/provisioning.d.ts +249 -0
- package/dist/device/provisioning.d.ts.map +1 -0
- package/dist/device/provisioning.js +439 -0
- package/dist/device/provisioning.js.map +1 -0
- package/dist/device/transfer.d.ts +231 -0
- package/dist/device/transfer.d.ts.map +1 -0
- package/dist/device/transfer.js +628 -0
- package/dist/device/transfer.js.map +1 -0
- package/dist/device/types.d.ts +275 -0
- package/dist/device/types.d.ts.map +1 -0
- package/dist/device/types.js +42 -0
- package/dist/device/types.js.map +1 -0
- package/dist/encoding/base64.d.ts +14 -0
- package/dist/encoding/base64.d.ts.map +1 -0
- package/dist/encoding/base64.js +2 -0
- package/dist/encoding/base64.js.map +1 -0
- package/dist/encoding/hex.d.ts +14 -0
- package/dist/encoding/hex.d.ts.map +1 -0
- package/dist/encoding/hex.js +2 -0
- package/dist/encoding/hex.js.map +1 -0
- package/dist/encoding/index.d.ts +17 -0
- package/dist/encoding/index.d.ts.map +1 -0
- package/dist/encoding/index.js +3 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/files/index.d.ts +16 -0
- package/dist/files/index.d.ts.map +1 -0
- package/dist/files/index.js +15 -0
- package/dist/files/index.js.map +1 -0
- package/dist/groups/index.d.ts +12 -0
- package/dist/groups/index.d.ts.map +1 -0
- package/dist/groups/index.js +9 -0
- package/dist/groups/index.js.map +1 -0
- package/dist/hooks/index.d.ts +20 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-connection-presence.d.ts +68 -0
- package/dist/hooks/use-connection-presence.d.ts.map +1 -0
- package/dist/hooks/use-connection-presence.js +300 -0
- package/dist/hooks/use-connection-presence.js.map +1 -0
- package/dist/hooks/use-group-membership.d.ts +66 -0
- package/dist/hooks/use-group-membership.d.ts.map +1 -0
- package/dist/hooks/use-group-membership.js +156 -0
- package/dist/hooks/use-group-membership.js.map +1 -0
- package/dist/hooks/use-key-rotation.d.ts +119 -0
- package/dist/hooks/use-key-rotation.d.ts.map +1 -0
- package/dist/hooks/use-key-rotation.js +198 -0
- package/dist/hooks/use-key-rotation.js.map +1 -0
- package/dist/hooks/use-session-health.d.ts +51 -0
- package/dist/hooks/use-session-health.d.ts.map +1 -0
- package/dist/hooks/use-session-health.js +59 -0
- package/dist/hooks/use-session-health.js.map +1 -0
- package/dist/hooks/use-single-flight.d.ts +29 -0
- package/dist/hooks/use-single-flight.d.ts.map +1 -0
- package/dist/hooks/use-single-flight.js +59 -0
- package/dist/hooks/use-single-flight.js.map +1 -0
- package/dist/index.d.ts +203 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +169 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/crypto/ec/ed25519.d.ts +78 -0
- package/dist/internal/crypto/ec/ed25519.d.ts.map +1 -0
- package/dist/internal/crypto/ec/ed25519.js +108 -0
- package/dist/internal/crypto/ec/ed25519.js.map +1 -0
- package/dist/internal/crypto/ec/index.d.ts +5 -0
- package/dist/internal/crypto/ec/index.d.ts.map +1 -0
- package/dist/internal/crypto/ec/index.js +4 -0
- package/dist/internal/crypto/ec/index.js.map +1 -0
- package/dist/internal/crypto/ec/x25519-validation.d.ts +70 -0
- package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -0
- package/dist/internal/crypto/ec/x25519-validation.js +137 -0
- package/dist/internal/crypto/ec/x25519-validation.js.map +1 -0
- package/dist/internal/crypto/ec/x25519.d.ts +91 -0
- package/dist/internal/crypto/ec/x25519.d.ts.map +1 -0
- package/dist/internal/crypto/ec/x25519.js +124 -0
- package/dist/internal/crypto/ec/x25519.js.map +1 -0
- package/dist/internal/crypto/hash/index.d.ts +4 -0
- package/dist/internal/crypto/hash/index.d.ts.map +1 -0
- package/dist/internal/crypto/hash/index.js +3 -0
- package/dist/internal/crypto/hash/index.js.map +1 -0
- package/dist/internal/crypto/hash/sha256.d.ts +24 -0
- package/dist/internal/crypto/hash/sha256.d.ts.map +1 -0
- package/dist/internal/crypto/hash/sha256.js +23 -0
- package/dist/internal/crypto/hash/sha256.js.map +1 -0
- package/dist/internal/crypto/hash/sha512.d.ts +16 -0
- package/dist/internal/crypto/hash/sha512.d.ts.map +1 -0
- package/dist/internal/crypto/hash/sha512.js +27 -0
- package/dist/internal/crypto/hash/sha512.js.map +1 -0
- package/dist/internal/crypto/index.d.ts +60 -0
- package/dist/internal/crypto/index.d.ts.map +1 -0
- package/dist/internal/crypto/index.js +107 -0
- package/dist/internal/crypto/index.js.map +1 -0
- package/dist/internal/crypto/kdf/hkdf.d.ts +300 -0
- package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -0
- package/dist/internal/crypto/kdf/hkdf.js +452 -0
- package/dist/internal/crypto/kdf/hkdf.js.map +1 -0
- package/dist/internal/crypto/kdf/index.d.ts +4 -0
- package/dist/internal/crypto/kdf/index.d.ts.map +1 -0
- package/dist/internal/crypto/kdf/index.js +3 -0
- package/dist/internal/crypto/kdf/index.js.map +1 -0
- package/dist/internal/crypto/kdf/pbkdf2.d.ts +42 -0
- package/dist/internal/crypto/kdf/pbkdf2.d.ts.map +1 -0
- package/dist/internal/crypto/kdf/pbkdf2.js +44 -0
- package/dist/internal/crypto/kdf/pbkdf2.js.map +1 -0
- package/dist/internal/crypto/key-prefix.d.ts +82 -0
- package/dist/internal/crypto/key-prefix.d.ts.map +1 -0
- package/dist/internal/crypto/key-prefix.js +116 -0
- package/dist/internal/crypto/key-prefix.js.map +1 -0
- package/dist/internal/crypto/pq/index.d.ts +3 -0
- package/dist/internal/crypto/pq/index.d.ts.map +1 -0
- package/dist/internal/crypto/pq/index.js +2 -0
- package/dist/internal/crypto/pq/index.js.map +1 -0
- package/dist/internal/crypto/pq/kyber.d.ts +232 -0
- package/dist/internal/crypto/pq/kyber.d.ts.map +1 -0
- package/dist/internal/crypto/pq/kyber.js +317 -0
- package/dist/internal/crypto/pq/kyber.js.map +1 -0
- package/dist/internal/crypto/random.d.ts +22 -0
- package/dist/internal/crypto/random.d.ts.map +1 -0
- package/dist/internal/crypto/random.js +45 -0
- package/dist/internal/crypto/random.js.map +1 -0
- package/dist/internal/crypto/symmetric/aes-ctr.d.ts +73 -0
- package/dist/internal/crypto/symmetric/aes-ctr.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/aes-ctr.js +98 -0
- package/dist/internal/crypto/symmetric/aes-ctr.js.map +1 -0
- package/dist/internal/crypto/symmetric/aes-gcm-siv.d.ts +77 -0
- package/dist/internal/crypto/symmetric/aes-gcm-siv.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/aes-gcm-siv.js +111 -0
- package/dist/internal/crypto/symmetric/aes-gcm-siv.js.map +1 -0
- package/dist/internal/crypto/symmetric/aes.d.ts +211 -0
- package/dist/internal/crypto/symmetric/aes.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/aes.js +386 -0
- package/dist/internal/crypto/symmetric/aes.js.map +1 -0
- package/dist/internal/crypto/symmetric/hmac.d.ts +32 -0
- package/dist/internal/crypto/symmetric/hmac.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/hmac.js +20 -0
- package/dist/internal/crypto/symmetric/hmac.js.map +1 -0
- package/dist/internal/crypto/symmetric/index.d.ts +9 -0
- package/dist/internal/crypto/symmetric/index.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/index.js +8 -0
- package/dist/internal/crypto/symmetric/index.js.map +1 -0
- package/dist/internal/crypto/symmetric/mac.d.ts +154 -0
- package/dist/internal/crypto/symmetric/mac.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/mac.js +292 -0
- package/dist/internal/crypto/symmetric/mac.js.map +1 -0
- package/dist/internal/crypto/symmetric/padding.d.ts +55 -0
- package/dist/internal/crypto/symmetric/padding.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/padding.js +90 -0
- package/dist/internal/crypto/symmetric/padding.js.map +1 -0
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts +89 -0
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts.map +1 -0
- package/dist/internal/crypto/symmetric/streaming-aead.js +253 -0
- package/dist/internal/crypto/symmetric/streaming-aead.js.map +1 -0
- package/dist/internal/crypto/utils.d.ts +119 -0
- package/dist/internal/crypto/utils.d.ts.map +1 -0
- package/dist/internal/crypto/utils.js +366 -0
- package/dist/internal/crypto/utils.js.map +1 -0
- package/dist/internal/crypto/validation.d.ts +45 -0
- package/dist/internal/crypto/validation.d.ts.map +1 -0
- package/dist/internal/crypto/validation.js +37 -0
- package/dist/internal/crypto/validation.js.map +1 -0
- package/dist/internal/encoding/index.d.ts +2 -0
- package/dist/internal/encoding/index.d.ts.map +1 -0
- package/dist/internal/encoding/index.js +2 -0
- package/dist/internal/encoding/index.js.map +1 -0
- package/dist/internal/encoding/proto/envelope.d.ts +120 -0
- package/dist/internal/encoding/proto/envelope.d.ts.map +1 -0
- package/dist/internal/encoding/proto/envelope.js +160 -0
- package/dist/internal/encoding/proto/envelope.js.map +1 -0
- package/dist/internal/encoding/proto/index.d.ts +25 -0
- package/dist/internal/encoding/proto/index.d.ts.map +1 -0
- package/dist/internal/encoding/proto/index.js +30 -0
- package/dist/internal/encoding/proto/index.js.map +1 -0
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +118 -0
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -0
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +383 -0
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -0
- package/dist/internal/encoding/proto/primitives.d.ts +98 -0
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -0
- package/dist/internal/encoding/proto/primitives.js +179 -0
- package/dist/internal/encoding/proto/primitives.js.map +1 -0
- package/dist/internal/encoding/proto/sender-key-message.d.ts +147 -0
- package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -0
- package/dist/internal/encoding/proto/sender-key-message.js +220 -0
- package/dist/internal/encoding/proto/sender-key-message.js.map +1 -0
- package/dist/internal/encoding/proto/signal-message.d.ts +174 -0
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -0
- package/dist/internal/encoding/proto/signal-message.js +372 -0
- package/dist/internal/encoding/proto/signal-message.js.map +1 -0
- package/dist/internal/groups/group-id.d.ts +74 -0
- package/dist/internal/groups/group-id.d.ts.map +1 -0
- package/dist/internal/groups/group-id.js +63 -0
- package/dist/internal/groups/group-id.js.map +1 -0
- package/dist/internal/groups/index.d.ts +15 -0
- package/dist/internal/groups/index.d.ts.map +1 -0
- package/dist/internal/groups/index.js +2 -0
- package/dist/internal/groups/index.js.map +1 -0
- package/dist/internal/groups-v2/access-control.d.ts +101 -0
- package/dist/internal/groups-v2/access-control.d.ts.map +1 -0
- package/dist/internal/groups-v2/access-control.js +184 -0
- package/dist/internal/groups-v2/access-control.js.map +1 -0
- package/dist/internal/groups-v2/change-actions.d.ts +35 -0
- package/dist/internal/groups-v2/change-actions.d.ts.map +1 -0
- package/dist/internal/groups-v2/change-actions.js +358 -0
- package/dist/internal/groups-v2/change-actions.js.map +1 -0
- package/dist/internal/groups-v2/encrypted-state.d.ts +121 -0
- package/dist/internal/groups-v2/encrypted-state.d.ts.map +1 -0
- package/dist/internal/groups-v2/encrypted-state.js +455 -0
- package/dist/internal/groups-v2/encrypted-state.js.map +1 -0
- package/dist/internal/groups-v2/index.d.ts +14 -0
- package/dist/internal/groups-v2/index.d.ts.map +1 -0
- package/dist/internal/groups-v2/index.js +11 -0
- package/dist/internal/groups-v2/index.js.map +1 -0
- package/dist/internal/groups-v2/invite-link.d.ts +55 -0
- package/dist/internal/groups-v2/invite-link.d.ts.map +1 -0
- package/dist/internal/groups-v2/invite-link.js +111 -0
- package/dist/internal/groups-v2/invite-link.js.map +1 -0
- package/dist/internal/groups-v2/manager.d.ts +351 -0
- package/dist/internal/groups-v2/manager.d.ts.map +1 -0
- package/dist/internal/groups-v2/manager.js +1093 -0
- package/dist/internal/groups-v2/manager.js.map +1 -0
- package/dist/internal/groups-v2/types.d.ts +371 -0
- package/dist/internal/groups-v2/types.d.ts.map +1 -0
- package/dist/internal/groups-v2/types.js +61 -0
- package/dist/internal/groups-v2/types.js.map +1 -0
- package/dist/internal/manager/index.d.ts +16 -0
- package/dist/internal/manager/index.d.ts.map +1 -0
- package/dist/internal/manager/index.js +2 -0
- package/dist/internal/manager/index.js.map +1 -0
- package/dist/internal/manager/manager.d.ts +378 -0
- package/dist/internal/manager/manager.d.ts.map +1 -0
- package/dist/internal/manager/manager.js +1079 -0
- package/dist/internal/manager/manager.js.map +1 -0
- package/dist/internal/protocol/double-ratchet/chains.d.ts +135 -0
- package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -0
- package/dist/internal/protocol/double-ratchet/chains.js +417 -0
- package/dist/internal/protocol/double-ratchet/chains.js.map +1 -0
- package/dist/internal/protocol/double-ratchet/index.d.ts +20 -0
- package/dist/internal/protocol/double-ratchet/index.d.ts.map +1 -0
- package/dist/internal/protocol/double-ratchet/index.js +21 -0
- package/dist/internal/protocol/double-ratchet/index.js.map +1 -0
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts +231 -0
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -0
- package/dist/internal/protocol/double-ratchet/ratchet.js +198 -0
- package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -0
- package/dist/internal/protocol/index.d.ts +24 -0
- package/dist/internal/protocol/index.d.ts.map +1 -0
- package/dist/internal/protocol/index.js +9 -0
- package/dist/internal/protocol/index.js.map +1 -0
- package/dist/internal/protocol/pqxdh/index.d.ts +19 -0
- package/dist/internal/protocol/pqxdh/index.d.ts.map +1 -0
- package/dist/internal/protocol/pqxdh/index.js +16 -0
- package/dist/internal/protocol/pqxdh/index.js.map +1 -0
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts +141 -0
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -0
- package/dist/internal/protocol/pqxdh/pqxdh.js +399 -0
- package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/certificate.d.ts +94 -0
- package/dist/internal/protocol/sealed-sender/certificate.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/certificate.js +254 -0
- package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts +46 -0
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +184 -0
- package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/decryption.d.ts +59 -0
- package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/decryption.js +268 -0
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +48 -0
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/delivery-token.js +71 -0
- package/dist/internal/protocol/sealed-sender/delivery-token.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts +56 -0
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +169 -0
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +66 -0
- package/dist/internal/protocol/sealed-sender/encryption.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/encryption.js +174 -0
- package/dist/internal/protocol/sealed-sender/encryption.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/index.d.ts +23 -0
- package/dist/internal/protocol/sealed-sender/index.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/index.js +61 -0
- package/dist/internal/protocol/sealed-sender/index.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +129 -0
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/proto/index.js +267 -0
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/types.d.ts +461 -0
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/types.js +99 -0
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/v2-binary.d.ts +124 -0
- package/dist/internal/protocol/sealed-sender/v2-binary.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/v2-binary.js +295 -0
- package/dist/internal/protocol/sealed-sender/v2-binary.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/v2-helpers.d.ts +107 -0
- package/dist/internal/protocol/sealed-sender/v2-helpers.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/v2-helpers.js +185 -0
- package/dist/internal/protocol/sealed-sender/v2-helpers.js.map +1 -0
- package/dist/internal/protocol/sender-keys/index.d.ts +11 -0
- package/dist/internal/protocol/sender-keys/index.d.ts.map +1 -0
- package/dist/internal/protocol/sender-keys/index.js +2 -0
- package/dist/internal/protocol/sender-keys/index.js.map +1 -0
- package/dist/internal/protocol/sender-keys/manager.d.ts +298 -0
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -0
- package/dist/internal/protocol/sender-keys/manager.js +839 -0
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -0
- package/dist/internal/protocol/spqr/braid-serialize.d.ts +128 -0
- package/dist/internal/protocol/spqr/braid-serialize.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/braid-serialize.js +373 -0
- package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -0
- package/dist/internal/protocol/spqr/braid.d.ts +164 -0
- package/dist/internal/protocol/spqr/braid.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/braid.js +305 -0
- package/dist/internal/protocol/spqr/braid.js.map +1 -0
- package/dist/internal/protocol/spqr/index.d.ts +161 -0
- package/dist/internal/protocol/spqr/index.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/index.js +115 -0
- package/dist/internal/protocol/spqr/index.js.map +1 -0
- package/dist/internal/protocol/spqr/message.d.ts +237 -0
- package/dist/internal/protocol/spqr/message.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/message.js +298 -0
- package/dist/internal/protocol/spqr/message.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/authenticator.d.ts +174 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/authenticator.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/authenticator.js +248 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/authenticator.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts +29 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js +43 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/errors.d.ts +170 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/errors.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/errors.js +249 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/errors.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts +84 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +138 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/index.d.ts +45 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/index.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/index.js +94 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/index.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts +52 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js +121 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts +12 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js +15 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts +136 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +796 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +454 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +790 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.d.ts +108 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js +125 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/index.d.ts +12 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/index.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/index.js +5 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/index.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/tables-16.d.ts +28 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/tables-16.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/tables-16.js +13953 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/tables-16.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.d.ts +40 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js +52 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.d.ts +151 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js +297 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts +97 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js +201 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +249 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +731 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts +127 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +894 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +387 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/types.js +121 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -0
- package/dist/internal/protocol/spqr/serialize.d.ts +149 -0
- package/dist/internal/protocol/spqr/serialize.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/serialize.js +370 -0
- package/dist/internal/protocol/spqr/serialize.js.map +1 -0
- package/dist/internal/protocol/spqr/spqr.d.ts +486 -0
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/spqr.js +1031 -0
- package/dist/internal/protocol/spqr/spqr.js.map +1 -0
- package/dist/internal/protocol/spqr/validate.d.ts +35 -0
- package/dist/internal/protocol/spqr/validate.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/validate.js +62 -0
- package/dist/internal/protocol/spqr/validate.js.map +1 -0
- package/dist/internal/protocol/triple-ratchet/index.d.ts +21 -0
- package/dist/internal/protocol/triple-ratchet/index.d.ts.map +1 -0
- package/dist/internal/protocol/triple-ratchet/index.js +19 -0
- package/dist/internal/protocol/triple-ratchet/index.js.map +1 -0
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +233 -0
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -0
- package/dist/internal/protocol/triple-ratchet/ratchet.js +254 -0
- package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -0
- package/dist/internal/protocol/username/generate.d.ts +9 -0
- package/dist/internal/protocol/username/generate.d.ts.map +1 -0
- package/dist/internal/protocol/username/generate.js +16 -0
- package/dist/internal/protocol/username/generate.js.map +1 -0
- package/dist/internal/protocol/username/hash.d.ts +74 -0
- package/dist/internal/protocol/username/hash.d.ts.map +1 -0
- package/dist/internal/protocol/username/hash.js +228 -0
- package/dist/internal/protocol/username/hash.js.map +1 -0
- package/dist/internal/protocol/username/link.d.ts +50 -0
- package/dist/internal/protocol/username/link.d.ts.map +1 -0
- package/dist/internal/protocol/username/link.js +187 -0
- package/dist/internal/protocol/username/link.js.map +1 -0
- package/dist/internal/protocol/username/proof.d.ts +34 -0
- package/dist/internal/protocol/username/proof.d.ts.map +1 -0
- package/dist/internal/protocol/username/proof.js +83 -0
- package/dist/internal/protocol/username/proof.js.map +1 -0
- package/dist/internal/protocol/version.d.ts +184 -0
- package/dist/internal/protocol/version.d.ts.map +1 -0
- package/dist/internal/protocol/version.js +163 -0
- package/dist/internal/protocol/version.js.map +1 -0
- package/dist/internal/protocol/x3dh/index.d.ts +15 -0
- package/dist/internal/protocol/x3dh/index.d.ts.map +1 -0
- package/dist/internal/protocol/x3dh/index.js +13 -0
- package/dist/internal/protocol/x3dh/index.js.map +1 -0
- package/dist/internal/protocol/x3dh/x3dh.d.ts +131 -0
- package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -0
- package/dist/internal/protocol/x3dh/x3dh.js +261 -0
- package/dist/internal/protocol/x3dh/x3dh.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/attributes.d.ts +157 -0
- package/dist/internal/protocol/zk/credentials/attributes.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/attributes.js +177 -0
- package/dist/internal/protocol/zk/credentials/attributes.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/credentials.d.ts +129 -0
- package/dist/internal/protocol/zk/credentials/credentials.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/credentials.js +204 -0
- package/dist/internal/protocol/zk/credentials/credentials.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts +235 -0
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/endorsements.js +520 -0
- package/dist/internal/protocol/zk/credentials/endorsements.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/index.d.ts +14 -0
- package/dist/internal/protocol/zk/credentials/index.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/index.js +6 -0
- package/dist/internal/protocol/zk/credentials/index.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/issuance.d.ts +135 -0
- package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/issuance.js +338 -0
- package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -0
- package/dist/internal/protocol/zk/credentials/presentation.d.ts +160 -0
- package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -0
- package/dist/internal/protocol/zk/credentials/presentation.js +447 -0
- package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -0
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +191 -0
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/auth-credential.js +377 -0
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -0
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +73 -0
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +140 -0
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js.map +1 -0
- package/dist/internal/protocol/zk/groups/group-params.d.ts +93 -0
- package/dist/internal/protocol/zk/groups/group-params.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/group-params.js +184 -0
- package/dist/internal/protocol/zk/groups/group-params.js.map +1 -0
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +245 -0
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js +404 -0
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -0
- package/dist/internal/protocol/zk/groups/index.d.ts +19 -0
- package/dist/internal/protocol/zk/groups/index.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/index.js +12 -0
- package/dist/internal/protocol/zk/groups/index.js.map +1 -0
- package/dist/internal/protocol/zk/groups/lizard.d.ts +51 -0
- package/dist/internal/protocol/zk/groups/lizard.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/lizard.js +478 -0
- package/dist/internal/protocol/zk/groups/lizard.js.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts +35 -0
- package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js +99 -0
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +195 -0
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-credential.js +370 -0
- package/dist/internal/protocol/zk/groups/profile-key-credential.js.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts +45 -0
- package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js +125 -0
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts +33 -0
- package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-struct.js +62 -0
- package/dist/internal/protocol/zk/groups/profile-key-struct.js.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-version.d.ts +17 -0
- package/dist/internal/protocol/zk/groups/profile-key-version.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/profile-key-version.js +33 -0
- package/dist/internal/protocol/zk/groups/profile-key-version.js.map +1 -0
- package/dist/internal/protocol/zk/groups/server-params.d.ts +114 -0
- package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/server-params.js +146 -0
- package/dist/internal/protocol/zk/groups/server-params.js.map +1 -0
- package/dist/internal/protocol/zk/groups/uid-encryption.d.ts +41 -0
- package/dist/internal/protocol/zk/groups/uid-encryption.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/uid-encryption.js +113 -0
- package/dist/internal/protocol/zk/groups/uid-encryption.js.map +1 -0
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts +48 -0
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts.map +1 -0
- package/dist/internal/protocol/zk/groups/uid-struct.js +77 -0
- package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/args.d.ts +33 -0
- package/dist/internal/protocol/zk/proofs/args.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/args.js +43 -0
- package/dist/internal/protocol/zk/proofs/args.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/index.d.ts +13 -0
- package/dist/internal/protocol/zk/proofs/index.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/index.js +7 -0
- package/dist/internal/protocol/zk/proofs/index.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/proof.d.ts +30 -0
- package/dist/internal/protocol/zk/proofs/proof.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/proof.js +48 -0
- package/dist/internal/protocol/zk/proofs/proof.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts +34 -0
- package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/sho-sha256.js +138 -0
- package/dist/internal/protocol/zk/proofs/sho-sha256.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/sho.d.ts +120 -0
- package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/sho.js +221 -0
- package/dist/internal/protocol/zk/proofs/sho.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/sign.d.ts +29 -0
- package/dist/internal/protocol/zk/proofs/sign.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/sign.js +34 -0
- package/dist/internal/protocol/zk/proofs/sign.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/statement.d.ts +103 -0
- package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/statement.js +282 -0
- package/dist/internal/protocol/zk/proofs/statement.js.map +1 -0
- package/dist/internal/sesame/device-registry.d.ts +208 -0
- package/dist/internal/sesame/device-registry.d.ts.map +1 -0
- package/dist/internal/sesame/device-registry.js +431 -0
- package/dist/internal/sesame/device-registry.js.map +1 -0
- package/dist/internal/sesame/index.d.ts +31 -0
- package/dist/internal/sesame/index.d.ts.map +1 -0
- package/dist/internal/sesame/index.js +40 -0
- package/dist/internal/sesame/index.js.map +1 -0
- package/dist/internal/sesame/manager.d.ts +351 -0
- package/dist/internal/sesame/manager.d.ts.map +1 -0
- package/dist/internal/sesame/manager.js +1760 -0
- package/dist/internal/sesame/manager.js.map +1 -0
- package/dist/internal/sesame/types.d.ts +840 -0
- package/dist/internal/sesame/types.d.ts.map +1 -0
- package/dist/internal/sesame/types.js +290 -0
- package/dist/internal/sesame/types.js.map +1 -0
- package/dist/internal/sesame/validation.d.ts +72 -0
- package/dist/internal/sesame/validation.d.ts.map +1 -0
- package/dist/internal/sesame/validation.js +136 -0
- package/dist/internal/sesame/validation.js.map +1 -0
- package/dist/internal/session/builder.d.ts +94 -0
- package/dist/internal/session/builder.d.ts.map +1 -0
- package/dist/internal/session/builder.js +266 -0
- package/dist/internal/session/builder.js.map +1 -0
- package/dist/internal/session/cipher.d.ts +256 -0
- package/dist/internal/session/cipher.d.ts.map +1 -0
- package/dist/internal/session/cipher.js +1222 -0
- package/dist/internal/session/cipher.js.map +1 -0
- package/dist/internal/session/decryption.d.ts +37 -0
- package/dist/internal/session/decryption.d.ts.map +1 -0
- package/dist/internal/session/decryption.js +256 -0
- package/dist/internal/session/decryption.js.map +1 -0
- package/dist/internal/session/factory.d.ts +161 -0
- package/dist/internal/session/factory.d.ts.map +1 -0
- package/dist/internal/session/factory.js +211 -0
- package/dist/internal/session/factory.js.map +1 -0
- package/dist/internal/session/handshake.d.ts +72 -0
- package/dist/internal/session/handshake.d.ts.map +1 -0
- package/dist/internal/session/handshake.js +343 -0
- package/dist/internal/session/handshake.js.map +1 -0
- package/dist/internal/session/identity-binding.d.ts +5 -0
- package/dist/internal/session/identity-binding.d.ts.map +1 -0
- package/dist/internal/session/identity-binding.js +15 -0
- package/dist/internal/session/identity-binding.js.map +1 -0
- package/dist/internal/session/index.d.ts +73 -0
- package/dist/internal/session/index.d.ts.map +1 -0
- package/dist/internal/session/index.js +75 -0
- package/dist/internal/session/index.js.map +1 -0
- package/dist/internal/session/keys.d.ts +220 -0
- package/dist/internal/session/keys.d.ts.map +1 -0
- package/dist/internal/session/keys.js +78 -0
- package/dist/internal/session/keys.js.map +1 -0
- package/dist/internal/session/ratchet.d.ts +97 -0
- package/dist/internal/session/ratchet.d.ts.map +1 -0
- package/dist/internal/session/ratchet.js +187 -0
- package/dist/internal/session/ratchet.js.map +1 -0
- package/dist/internal/session/session-resolver.d.ts +138 -0
- package/dist/internal/session/session-resolver.d.ts.map +1 -0
- package/dist/internal/session/session-resolver.js +190 -0
- package/dist/internal/session/session-resolver.js.map +1 -0
- package/dist/internal/session/state.d.ts +278 -0
- package/dist/internal/session/state.d.ts.map +1 -0
- package/dist/internal/session/state.js +167 -0
- package/dist/internal/session/state.js.map +1 -0
- package/dist/internal/session/types.d.ts +192 -0
- package/dist/internal/session/types.d.ts.map +1 -0
- package/dist/internal/session/types.js +16 -0
- package/dist/internal/session/types.js.map +1 -0
- package/dist/internal/session/validation.d.ts +145 -0
- package/dist/internal/session/validation.d.ts.map +1 -0
- package/dist/internal/session/validation.js +340 -0
- package/dist/internal/session/validation.js.map +1 -0
- package/dist/keys/branded.d.ts +85 -0
- package/dist/keys/branded.d.ts.map +1 -0
- package/dist/keys/branded.js +26 -0
- package/dist/keys/branded.js.map +1 -0
- package/dist/keys/generation.d.ts +101 -0
- package/dist/keys/generation.d.ts.map +1 -0
- package/dist/keys/generation.js +181 -0
- package/dist/keys/generation.js.map +1 -0
- package/dist/keys/identity.d.ts +27 -0
- package/dist/keys/identity.d.ts.map +1 -0
- package/dist/keys/identity.js +200 -0
- package/dist/keys/identity.js.map +1 -0
- package/dist/keys/index.d.ts +24 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +22 -0
- package/dist/keys/index.js.map +1 -0
- package/dist/keys/prekey-signature.d.ts +13 -0
- package/dist/keys/prekey-signature.d.ts.map +1 -0
- package/dist/keys/prekey-signature.js +46 -0
- package/dist/keys/prekey-signature.js.map +1 -0
- package/dist/keys/types.d.ts +255 -0
- package/dist/keys/types.d.ts.map +1 -0
- package/dist/keys/types.js +11 -0
- package/dist/keys/types.js.map +1 -0
- package/dist/layers.d.ts +228 -0
- package/dist/layers.d.ts.map +1 -0
- package/dist/layers.js +328 -0
- package/dist/layers.js.map +1 -0
- package/dist/local/store/expo/adapter.d.ts +243 -0
- package/dist/local/store/expo/adapter.d.ts.map +1 -0
- package/dist/local/store/expo/adapter.js +619 -0
- package/dist/local/store/expo/adapter.js.map +1 -0
- package/dist/local/store/expo/database-key.d.ts +142 -0
- package/dist/local/store/expo/database-key.d.ts.map +1 -0
- package/dist/local/store/expo/database-key.js +312 -0
- package/dist/local/store/expo/database-key.js.map +1 -0
- package/dist/local/store/expo/db.d.ts +92 -0
- package/dist/local/store/expo/db.d.ts.map +1 -0
- package/dist/local/store/expo/db.js +142 -0
- package/dist/local/store/expo/db.js.map +1 -0
- package/dist/local/store/expo/index.d.ts +22 -0
- package/dist/local/store/expo/index.d.ts.map +1 -0
- package/dist/local/store/expo/index.js +10 -0
- package/dist/local/store/expo/index.js.map +1 -0
- package/dist/local/store/expo/key-storage.d.ts +422 -0
- package/dist/local/store/expo/key-storage.d.ts.map +1 -0
- package/dist/local/store/expo/key-storage.js +1292 -0
- package/dist/local/store/expo/key-storage.js.map +1 -0
- package/dist/local/store/expo/maintenance.d.ts +4 -0
- package/dist/local/store/expo/maintenance.d.ts.map +1 -0
- package/dist/local/store/expo/maintenance.js +36 -0
- package/dist/local/store/expo/maintenance.js.map +1 -0
- package/dist/local/store/expo/models/ec-one-time-prekey.d.ts +155 -0
- package/dist/local/store/expo/models/ec-one-time-prekey.d.ts.map +1 -0
- package/dist/local/store/expo/models/ec-one-time-prekey.js +309 -0
- package/dist/local/store/expo/models/ec-one-time-prekey.js.map +1 -0
- package/dist/local/store/expo/models/ec-signed-prekey.d.ts +189 -0
- package/dist/local/store/expo/models/ec-signed-prekey.d.ts.map +1 -0
- package/dist/local/store/expo/models/ec-signed-prekey.js +359 -0
- package/dist/local/store/expo/models/ec-signed-prekey.js.map +1 -0
- package/dist/local/store/expo/models/identity-key-id.d.ts +9 -0
- package/dist/local/store/expo/models/identity-key-id.d.ts.map +1 -0
- package/dist/local/store/expo/models/identity-key-id.js +10 -0
- package/dist/local/store/expo/models/identity-key-id.js.map +1 -0
- package/dist/local/store/expo/models/index.d.ts +20 -0
- package/dist/local/store/expo/models/index.d.ts.map +1 -0
- package/dist/local/store/expo/models/index.js +80 -0
- package/dist/local/store/expo/models/index.js.map +1 -0
- package/dist/local/store/expo/models/kyber-one-time-prekey.d.ts +183 -0
- package/dist/local/store/expo/models/kyber-one-time-prekey.d.ts.map +1 -0
- package/dist/local/store/expo/models/kyber-one-time-prekey.js +353 -0
- package/dist/local/store/expo/models/kyber-one-time-prekey.js.map +1 -0
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts +37 -0
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts.map +1 -0
- package/dist/local/store/expo/models/kyber-prekey-used.js +59 -0
- package/dist/local/store/expo/models/kyber-prekey-used.js.map +1 -0
- package/dist/local/store/expo/models/kyber-prekey.d.ts +172 -0
- package/dist/local/store/expo/models/kyber-prekey.d.ts.map +1 -0
- package/dist/local/store/expo/models/kyber-prekey.js +314 -0
- package/dist/local/store/expo/models/kyber-prekey.js.map +1 -0
- package/dist/local/store/expo/models/local-identity.d.ts +52 -0
- package/dist/local/store/expo/models/local-identity.d.ts.map +1 -0
- package/dist/local/store/expo/models/local-identity.js +166 -0
- package/dist/local/store/expo/models/local-identity.js.map +1 -0
- package/dist/local/store/expo/models/message-record.d.ts +198 -0
- package/dist/local/store/expo/models/message-record.d.ts.map +1 -0
- package/dist/local/store/expo/models/message-record.js +298 -0
- package/dist/local/store/expo/models/message-record.js.map +1 -0
- package/dist/local/store/expo/models/recipient-identity.d.ts +21 -0
- package/dist/local/store/expo/models/recipient-identity.d.ts.map +1 -0
- package/dist/local/store/expo/models/recipient-identity.js +66 -0
- package/dist/local/store/expo/models/recipient-identity.js.map +1 -0
- package/dist/local/store/expo/models/replaced-prekey-utils.d.ts +33 -0
- package/dist/local/store/expo/models/replaced-prekey-utils.d.ts.map +1 -0
- package/dist/local/store/expo/models/replaced-prekey-utils.js +54 -0
- package/dist/local/store/expo/models/replaced-prekey-utils.js.map +1 -0
- package/dist/local/store/expo/models/sender-key.d.ts +210 -0
- package/dist/local/store/expo/models/sender-key.d.ts.map +1 -0
- package/dist/local/store/expo/models/sender-key.js +379 -0
- package/dist/local/store/expo/models/sender-key.js.map +1 -0
- package/dist/local/store/expo/models/session.d.ts +175 -0
- package/dist/local/store/expo/models/session.d.ts.map +1 -0
- package/dist/local/store/expo/models/session.js +496 -0
- package/dist/local/store/expo/models/session.js.map +1 -0
- package/dist/local/store/expo/schema.d.ts +1734 -0
- package/dist/local/store/expo/schema.d.ts.map +1 -0
- package/dist/local/store/expo/schema.js +155 -0
- package/dist/local/store/expo/schema.js.map +1 -0
- package/dist/local/store/expo/secure-store-options.d.ts +10 -0
- package/dist/local/store/expo/secure-store-options.d.ts.map +1 -0
- package/dist/local/store/expo/secure-store-options.js +5 -0
- package/dist/local/store/expo/secure-store-options.js.map +1 -0
- package/dist/local/store/index.d.ts +41 -0
- package/dist/local/store/index.d.ts.map +1 -0
- package/dist/local/store/index.js +34 -0
- package/dist/local/store/index.js.map +1 -0
- package/dist/local/store/mock/adapter.d.ts +185 -0
- package/dist/local/store/mock/adapter.d.ts.map +1 -0
- package/dist/local/store/mock/adapter.js +875 -0
- package/dist/local/store/mock/adapter.js.map +1 -0
- package/dist/local/store/mock/index.d.ts +10 -0
- package/dist/local/store/mock/index.d.ts.map +1 -0
- package/dist/local/store/mock/index.js +6 -0
- package/dist/local/store/mock/index.js.map +1 -0
- package/dist/local/store/node/adapter.d.ts +85 -0
- package/dist/local/store/node/adapter.d.ts.map +1 -0
- package/dist/local/store/node/adapter.js +274 -0
- package/dist/local/store/node/adapter.js.map +1 -0
- package/dist/local/store/node/database-encryption.d.ts +109 -0
- package/dist/local/store/node/database-encryption.d.ts.map +1 -0
- package/dist/local/store/node/database-encryption.js +202 -0
- package/dist/local/store/node/database-encryption.js.map +1 -0
- package/dist/local/store/node/database-key.d.ts +124 -0
- package/dist/local/store/node/database-key.d.ts.map +1 -0
- package/dist/local/store/node/database-key.js +264 -0
- package/dist/local/store/node/database-key.js.map +1 -0
- package/dist/local/store/node/database.d.ts +156 -0
- package/dist/local/store/node/database.d.ts.map +1 -0
- package/dist/local/store/node/database.js +630 -0
- package/dist/local/store/node/database.js.map +1 -0
- package/dist/local/store/node/index.d.ts +11 -0
- package/dist/local/store/node/index.d.ts.map +1 -0
- package/dist/local/store/node/index.js +8 -0
- package/dist/local/store/node/index.js.map +1 -0
- package/dist/local/store/react-native/adapter.d.ts +240 -0
- package/dist/local/store/react-native/adapter.d.ts.map +1 -0
- package/dist/local/store/react-native/adapter.js +1108 -0
- package/dist/local/store/react-native/adapter.js.map +1 -0
- package/dist/local/store/react-native/index.d.ts +19 -0
- package/dist/local/store/react-native/index.d.ts.map +1 -0
- package/dist/local/store/react-native/index.js +6 -0
- package/dist/local/store/react-native/index.js.map +1 -0
- package/dist/local/store/react-native/storage.d.ts +39 -0
- package/dist/local/store/react-native/storage.d.ts.map +1 -0
- package/dist/local/store/react-native/storage.js +2 -0
- package/dist/local/store/react-native/storage.js.map +1 -0
- package/dist/local/store/session-codec.d.ts +5 -0
- package/dist/local/store/session-codec.d.ts.map +1 -0
- package/dist/local/store/session-codec.js +42 -0
- package/dist/local/store/session-codec.js.map +1 -0
- package/dist/local/store/web/adapter.d.ts +190 -0
- package/dist/local/store/web/adapter.d.ts.map +1 -0
- package/dist/local/store/web/adapter.js +1188 -0
- package/dist/local/store/web/adapter.js.map +1 -0
- package/dist/local/store/web/index.d.ts +11 -0
- package/dist/local/store/web/index.d.ts.map +1 -0
- package/dist/local/store/web/index.js +8 -0
- package/dist/local/store/web/index.js.map +1 -0
- package/dist/local/vault/expo-secure-store.d.ts +10 -0
- package/dist/local/vault/expo-secure-store.d.ts.map +1 -0
- package/dist/local/vault/expo-secure-store.js +23 -0
- package/dist/local/vault/expo-secure-store.js.map +1 -0
- package/dist/local/vault/index.d.ts +7 -0
- package/dist/local/vault/index.d.ts.map +1 -0
- package/dist/local/vault/index.js +2 -0
- package/dist/local/vault/index.js.map +1 -0
- package/dist/logger.d.ts +18 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +71 -0
- package/dist/logger.js.map +1 -0
- package/dist/media/index.d.ts +524 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +2053 -0
- package/dist/media/index.js.map +1 -0
- package/dist/profile/cipher.d.ts +125 -0
- package/dist/profile/cipher.d.ts.map +1 -0
- package/dist/profile/cipher.js +197 -0
- package/dist/profile/cipher.js.map +1 -0
- package/dist/profile/contact-state.d.ts +33 -0
- package/dist/profile/contact-state.d.ts.map +1 -0
- package/dist/profile/contact-state.js +77 -0
- package/dist/profile/contact-state.js.map +1 -0
- package/dist/profile/crypto.d.ts +65 -0
- package/dist/profile/crypto.d.ts.map +1 -0
- package/dist/profile/crypto.js +93 -0
- package/dist/profile/crypto.js.map +1 -0
- package/dist/profile/index.d.ts +26 -0
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/profile/index.js +30 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/profile/profile-key.d.ts +102 -0
- package/dist/profile/profile-key.d.ts.map +1 -0
- package/dist/profile/profile-key.js +229 -0
- package/dist/profile/profile-key.js.map +1 -0
- package/dist/profile/storage.d.ts +61 -0
- package/dist/profile/storage.d.ts.map +1 -0
- package/dist/profile/storage.js +145 -0
- package/dist/profile/storage.js.map +1 -0
- package/dist/profile/update-service.d.ts +53 -0
- package/dist/profile/update-service.d.ts.map +1 -0
- package/dist/profile/update-service.js +67 -0
- package/dist/profile/update-service.js.map +1 -0
- package/dist/remote/object-store/convex-r2/index.d.ts +11 -0
- package/dist/remote/object-store/convex-r2/index.d.ts.map +1 -0
- package/dist/remote/object-store/convex-r2/index.js +13 -0
- package/dist/remote/object-store/convex-r2/index.js.map +1 -0
- package/dist/remote/object-store/convex-r2/server/index.d.ts +2 -0
- package/dist/remote/object-store/convex-r2/server/index.d.ts.map +1 -0
- package/dist/remote/object-store/convex-r2/server/index.js +2 -0
- package/dist/remote/object-store/convex-r2/server/index.js.map +1 -0
- package/dist/remote/object-store/convex-r2/server.d.ts +126 -0
- package/dist/remote/object-store/convex-r2/server.d.ts.map +1 -0
- package/dist/remote/object-store/convex-r2/server.js +232 -0
- package/dist/remote/object-store/convex-r2/server.js.map +1 -0
- package/dist/remote/object-store/convex-r2/storage.d.ts +47 -0
- package/dist/remote/object-store/convex-r2/storage.d.ts.map +1 -0
- package/dist/remote/object-store/convex-r2/storage.js +55 -0
- package/dist/remote/object-store/convex-r2/storage.js.map +1 -0
- package/dist/remote/object-store/index.d.ts +8 -0
- package/dist/remote/object-store/index.d.ts.map +1 -0
- package/dist/remote/object-store/index.js +2 -0
- package/dist/remote/object-store/index.js.map +1 -0
- package/dist/remote/object-store/s3/index.d.ts +8 -0
- package/dist/remote/object-store/s3/index.d.ts.map +1 -0
- package/dist/remote/object-store/s3/index.js +10 -0
- package/dist/remote/object-store/s3/index.js.map +1 -0
- package/dist/remote/object-store/s3/storage.d.ts +44 -0
- package/dist/remote/object-store/s3/storage.d.ts.map +1 -0
- package/dist/remote/object-store/s3/storage.js +41 -0
- package/dist/remote/object-store/s3/storage.js.map +1 -0
- package/dist/remote/object-store/types.d.ts +80 -0
- package/dist/remote/object-store/types.d.ts.map +1 -0
- package/dist/remote/object-store/types.js +2 -0
- package/dist/remote/object-store/types.js.map +1 -0
- package/dist/remote/object-store/validation.d.ts +6 -0
- package/dist/remote/object-store/validation.d.ts.map +1 -0
- package/dist/remote/object-store/validation.js +93 -0
- package/dist/remote/object-store/validation.js.map +1 -0
- package/dist/remote/relay/convex/group-server.d.ts +118 -0
- package/dist/remote/relay/convex/group-server.d.ts.map +1 -0
- package/dist/remote/relay/convex/group-server.js +150 -0
- package/dist/remote/relay/convex/group-server.js.map +1 -0
- package/dist/remote/relay/convex/index.d.ts +39 -0
- package/dist/remote/relay/convex/index.d.ts.map +1 -0
- package/dist/remote/relay/convex/index.js +36 -0
- package/dist/remote/relay/convex/index.js.map +1 -0
- package/dist/remote/relay/convex/relay.d.ts +339 -0
- package/dist/remote/relay/convex/relay.d.ts.map +1 -0
- package/dist/remote/relay/convex/relay.js +1086 -0
- package/dist/remote/relay/convex/relay.js.map +1 -0
- package/dist/remote/relay/convex/types.d.ts +111 -0
- package/dist/remote/relay/convex/types.d.ts.map +1 -0
- package/dist/remote/relay/convex/types.js +19 -0
- package/dist/remote/relay/convex/types.js.map +1 -0
- package/dist/remote/relay/index.d.ts +34 -0
- package/dist/remote/relay/index.d.ts.map +1 -0
- package/dist/remote/relay/index.js +28 -0
- package/dist/remote/relay/index.js.map +1 -0
- package/dist/remote/relay/mock/adapter.d.ts +237 -0
- package/dist/remote/relay/mock/adapter.d.ts.map +1 -0
- package/dist/remote/relay/mock/adapter.js +939 -0
- package/dist/remote/relay/mock/adapter.js.map +1 -0
- package/dist/remote/relay/mock/index.d.ts +10 -0
- package/dist/remote/relay/mock/index.d.ts.map +1 -0
- package/dist/remote/relay/mock/index.js +6 -0
- package/dist/remote/relay/mock/index.js.map +1 -0
- package/dist/remote/relay/types.d.ts +756 -0
- package/dist/remote/relay/types.d.ts.map +1 -0
- package/dist/remote/relay/types.js +11 -0
- package/dist/remote/relay/types.js.map +1 -0
- package/dist/safety/core.d.ts +108 -0
- package/dist/safety/core.d.ts.map +1 -0
- package/dist/safety/core.js +299 -0
- package/dist/safety/core.js.map +1 -0
- package/dist/safety/fingerprint.d.ts +277 -0
- package/dist/safety/fingerprint.d.ts.map +1 -0
- package/dist/safety/fingerprint.js +339 -0
- package/dist/safety/fingerprint.js.map +1 -0
- package/dist/safety/index.d.ts +141 -0
- package/dist/safety/index.d.ts.map +1 -0
- package/dist/safety/index.js +230 -0
- package/dist/safety/index.js.map +1 -0
- package/dist/safety/protobuf.d.ts +34 -0
- package/dist/safety/protobuf.d.ts.map +1 -0
- package/dist/safety/protobuf.js +142 -0
- package/dist/safety/protobuf.js.map +1 -0
- package/dist/safety/url.d.ts +133 -0
- package/dist/safety/url.d.ts.map +1 -0
- package/dist/safety/url.js +242 -0
- package/dist/safety/url.js.map +1 -0
- package/dist/sealed-sender/index.d.ts +7 -0
- package/dist/sealed-sender/index.d.ts.map +1 -0
- package/dist/sealed-sender/index.js +6 -0
- package/dist/sealed-sender/index.js.map +1 -0
- package/dist/server-clock.d.ts +10 -0
- package/dist/server-clock.d.ts.map +1 -0
- package/dist/server-clock.js +27 -0
- package/dist/server-clock.js.map +1 -0
- package/dist/types/address.d.ts +171 -0
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/address.js +241 -0
- package/dist/types/address.js.map +1 -0
- package/dist/types/api.d.ts +1222 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +5 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/errors.d.ts +772 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +937 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +33 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/messages.d.ts +257 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/messages.js +96 -0
- package/dist/types/messages.js.map +1 -0
- package/dist/types/protocol-config.d.ts +337 -0
- package/dist/types/protocol-config.d.ts.map +1 -0
- package/dist/types/protocol-config.js +178 -0
- package/dist/types/protocol-config.js.map +1 -0
- package/dist/types/protocol-constants.d.ts +122 -0
- package/dist/types/protocol-constants.d.ts.map +1 -0
- package/dist/types/protocol-constants.js +115 -0
- package/dist/types/protocol-constants.js.map +1 -0
- package/dist/types/session.d.ts +721 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +340 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/trust.d.ts +168 -0
- package/dist/types/trust.d.ts.map +1 -0
- package/dist/types/trust.js +84 -0
- package/dist/types/trust.js.map +1 -0
- package/dist/types/utils.d.ts +93 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +89 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/username/index.d.ts +12 -0
- package/dist/username/index.d.ts.map +1 -0
- package/dist/username/index.js +11 -0
- package/dist/username/index.js.map +1 -0
- package/dist/username/link.d.ts +52 -0
- package/dist/username/link.d.ts.map +1 -0
- package/dist/username/link.js +87 -0
- package/dist/username/link.js.map +1 -0
- package/dist/utils/binary-transfer.d.ts +18 -0
- package/dist/utils/binary-transfer.d.ts.map +1 -0
- package/dist/utils/binary-transfer.js +27 -0
- package/dist/utils/binary-transfer.js.map +1 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +15 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/retry.d.ts +59 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +136 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/versions.d.ts +62 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +78 -0
- package/dist/versions.js.map +1 -0
- package/dist/zk/credentials.d.ts +10 -0
- package/dist/zk/credentials.d.ts.map +1 -0
- package/dist/zk/credentials.js +9 -0
- package/dist/zk/credentials.js.map +1 -0
- package/dist/zk/groups.d.ts +12 -0
- package/dist/zk/groups.d.ts.map +1 -0
- package/dist/zk/groups.js +11 -0
- package/dist/zk/groups.js.map +1 -0
- package/docs/ASSURANCE.md +102 -0
- package/docs/CLIENT_COMPOSITION.md +189 -0
- package/docs/DOCUMENTATION_STANDARDS.md +107 -0
- package/docs/E2EE.md +35 -0
- package/docs/ERROR_HANDLING.md +396 -0
- package/docs/GETTING_STARTED.md +714 -0
- package/docs/INTERFACES.md +187 -0
- package/docs/PACKAGE_SURFACE.md +235 -0
- package/docs/PROTOCOL_POLICY.md +109 -0
- package/docs/RECIPES.md +389 -0
- package/docs/SECURITY.md +199 -0
- package/docs/api/README.md +471 -0
- package/docs/api/classes/EncryptionError.md +112 -0
- package/docs/api/classes/EndorsementManager.md +307 -0
- package/docs/api/classes/SealedSenderAuthError.md +127 -0
- package/docs/api/classes/ServerDerivedKeyPair.md +68 -0
- package/docs/api/classes/ServerDerivedPublicKey.md +33 -0
- package/docs/api/classes/ServerRootKeyPair.md +94 -0
- package/docs/api/classes/ServerRootPublicKey.md +72 -0
- package/docs/api/classes/SignalBlockingManager.md +106 -0
- package/docs/api/classes/SignalProtocolClient.md +2651 -0
- package/docs/api/classes/VerificationFailure.md +25 -0
- package/docs/api/enumerations/ContentHint.md +63 -0
- package/docs/api/enumerations/EncryptionErrorCode.md +488 -0
- package/docs/api/enumerations/IdentityKeyChange.md +65 -0
- package/docs/api/enumerations/MessageType.md +29 -0
- package/docs/api/enumerations/TrustDirection.md +33 -0
- package/docs/api/enumerations/TypingAction.md +31 -0
- package/docs/api/functions/createDefaultSignalContentAdapter.md +13 -0
- package/docs/api/functions/createDefaultSignalLogger.md +36 -0
- package/docs/api/functions/createGroupId.md +32 -0
- package/docs/api/functions/createSignalProtocolClient.md +36 -0
- package/docs/api/functions/createSignalProtocolClientConfig.md +24 -0
- package/docs/api/functions/extractGroupId.md +32 -0
- package/docs/api/functions/formatVersion.md +25 -0
- package/docs/api/functions/isCompatible.md +31 -0
- package/docs/api/functions/isGroupId.md +37 -0
- package/docs/api/functions/isSealedSenderAuthError.md +25 -0
- package/docs/api/functions/parseVersion.md +29 -0
- package/docs/api/functions/resolveSPQRLimits.md +21 -0
- package/docs/api/functions/resolveSignalLogger.md +42 -0
- package/docs/api/interfaces/AccountIdentityProvisioning.md +43 -0
- package/docs/api/interfaces/AccountIdentityRotation.md +69 -0
- package/docs/api/interfaces/AttachmentTransferOptions.md +49 -0
- package/docs/api/interfaces/BlockedRecipientEntry.md +25 -0
- package/docs/api/interfaces/BlockedRecipientsSyncInput.md +27 -0
- package/docs/api/interfaces/ConfigurationSyncInput.md +19 -0
- package/docs/api/interfaces/CredentialPublicKey.md +25 -0
- package/docs/api/interfaces/DataMessageInput.md +21 -0
- package/docs/api/interfaces/DecryptedEnvelope.md +95 -0
- package/docs/api/interfaces/DecryptedGroup.md +86 -0
- package/docs/api/interfaces/DeviceInfo.md +79 -0
- package/docs/api/interfaces/DeviceRecord.md +87 -0
- package/docs/api/interfaces/DeviceRegistration.md +27 -0
- package/docs/api/interfaces/DoubleRatchetConfig.md +36 -0
- package/docs/api/interfaces/EcOneTimePreKey.md +27 -0
- package/docs/api/interfaces/EcSignedPreKey.md +39 -0
- package/docs/api/interfaces/EcSignedPreKeyUpload.md +50 -0
- package/docs/api/interfaces/EncryptionErrorContext.md +51 -0
- package/docs/api/interfaces/Envelope.md +154 -0
- package/docs/api/interfaces/ForceKeyResetResult.md +37 -0
- package/docs/api/interfaces/GroupAuthorization.md +23 -0
- package/docs/api/interfaces/GroupChangeEntry.md +42 -0
- package/docs/api/interfaces/GroupMemberDevice.md +26 -0
- package/docs/api/interfaces/IEcOneTimePreKeyStore.md +86 -0
- package/docs/api/interfaces/IEcSignedPreKeyStore.md +132 -0
- package/docs/api/interfaces/IGroupServer.md +120 -0
- package/docs/api/interfaces/IGroupStateStore.md +128 -0
- package/docs/api/interfaces/IIdentityKeyStore.md +312 -0
- package/docs/api/interfaces/IKemPreKeyStore.md +144 -0
- package/docs/api/interfaces/IKyberLastResortPreKeyStore.md +111 -0
- package/docs/api/interfaces/ILogger.md +117 -0
- package/docs/api/interfaces/IProtocolStore.md +1033 -0
- package/docs/api/interfaces/ISenderKeyStore.md +417 -0
- package/docs/api/interfaces/ISesameStore.md +249 -0
- package/docs/api/interfaces/ISessionStore.md +178 -0
- package/docs/api/interfaces/ISignalLocalSecretVault.md +71 -0
- package/docs/api/interfaces/ISignalLocalStore.md +2053 -0
- package/docs/api/interfaces/ISignalProtocolClient.md +1183 -0
- package/docs/api/interfaces/ISignalProtocolManager.md +272 -0
- package/docs/api/interfaces/ISignalRelayServer.md +1329 -0
- package/docs/api/interfaces/IdentityKeyPair.md +49 -0
- package/docs/api/interfaces/IncomingEnvelope.md +91 -0
- package/docs/api/interfaces/InspectedSignalContent.md +43 -0
- package/docs/api/interfaces/KDFChain.md +31 -0
- package/docs/api/interfaces/KemLastResortPreKeyUpload.md +50 -0
- package/docs/api/interfaces/KeyPair.md +23 -0
- package/docs/api/interfaces/KyberPreKey.md +42 -0
- package/docs/api/interfaces/MLKEMBraidAgentState.md +191 -0
- package/docs/api/interfaces/MLKEMBraidMessage.md +49 -0
- package/docs/api/interfaces/MediaAttachmentDeleteSyncInput.md +31 -0
- package/docs/api/interfaces/MessageHeader.md +49 -0
- package/docs/api/interfaces/MessageRecord.md +86 -0
- package/docs/api/interfaces/ParsedReceiptContent.md +19 -0
- package/docs/api/interfaces/ParsedTypingContent.md +19 -0
- package/docs/api/interfaces/PreKeyMaintenanceStore.md +87 -0
- package/docs/api/interfaces/PreKeyMessage.md +159 -0
- package/docs/api/interfaces/PreKeyStatusResult.md +21 -0
- package/docs/api/interfaces/PreKeyUpload.md +42 -0
- package/docs/api/interfaces/ProcessEnvelopeOptions.md +72 -0
- package/docs/api/interfaces/ProtocolAddress.md +38 -0
- package/docs/api/interfaces/ProtocolStrategyConfig.md +91 -0
- package/docs/api/interfaces/RatchetMessage.md +96 -0
- package/docs/api/interfaces/ReadSyncEntryInput.md +19 -0
- package/docs/api/interfaces/ReceiverChain.md +43 -0
- package/docs/api/interfaces/RecipientUsernameSyncInput.md +31 -0
- package/docs/api/interfaces/RelayPreKeyBundle.md +254 -0
- package/docs/api/interfaces/RemoteObjectDownload.md +33 -0
- package/docs/api/interfaces/RemoteObjectUpload.md +49 -0
- package/docs/api/interfaces/ResolvedSPQRInfoStrings.md +27 -0
- package/docs/api/interfaces/ResolvedSPQRLimits.md +37 -0
- package/docs/api/interfaces/RetryRequest.md +80 -0
- package/docs/api/interfaces/SCKAState.md +65 -0
- package/docs/api/interfaces/SPQRLimits.md +40 -0
- package/docs/api/interfaces/SPQRState.md +191 -0
- package/docs/api/interfaces/SafetyNumber.md +60 -0
- package/docs/api/interfaces/SafetyNumberConfirmation.md +46 -0
- package/docs/api/interfaces/SealedSenderConfig.md +70 -0
- package/docs/api/interfaces/SendOptions.md +191 -0
- package/docs/api/interfaces/SendResult.md +93 -0
- package/docs/api/interfaces/SenderKeyDistributionMessage.md +43 -0
- package/docs/api/interfaces/SenderKeyState.md +76 -0
- package/docs/api/interfaces/SenderKeysConfig.md +65 -0
- package/docs/api/interfaces/SentSyncTranscriptInput.md +31 -0
- package/docs/api/interfaces/ServiceId.md +19 -0
- package/docs/api/interfaces/SesameMessage.md +84 -0
- package/docs/api/interfaces/SesameStats.md +57 -0
- package/docs/api/interfaces/SessionHealthResult.md +120 -0
- package/docs/api/interfaces/SessionRecord.md +80 -0
- package/docs/api/interfaces/SessionRecordMetadata.md +109 -0
- package/docs/api/interfaces/SessionState.md +368 -0
- package/docs/api/interfaces/SessionTrustCommit.md +58 -0
- package/docs/api/interfaces/SignalBlockingHooks.md +44 -0
- package/docs/api/interfaces/SignalBlockingManagerOptions.md +31 -0
- package/docs/api/interfaces/SignalBlockingMirror.md +30 -0
- package/docs/api/interfaces/SignalBlockingStore.md +83 -0
- package/docs/api/interfaces/SignalContentAdapter.md +325 -0
- package/docs/api/interfaces/SignalProtocolClientAdapterConfig.md +44 -0
- package/docs/api/interfaces/SignalProtocolClientCompositionOptions.md +693 -0
- package/docs/api/interfaces/SignalProtocolClientConfig.md +839 -0
- package/docs/api/interfaces/SignalProtocolClientDeleteLocalAttachmentInput.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientHooks.md +506 -0
- package/docs/api/interfaces/SignalProtocolClientIdentityConfig.md +35 -0
- package/docs/api/interfaces/SignalProtocolClientLoadLocalAttachmentInput.md +187 -0
- package/docs/api/interfaces/SignalProtocolClientLoadedLocalAttachment.md +19 -0
- package/docs/api/interfaces/SignalProtocolClientMedia.md +83 -0
- package/docs/api/interfaces/SignalProtocolClientMediaCompletedResult.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientMediaConfig.md +157 -0
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadCompletedResult.md +37 -0
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadNotNeededResult.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientMediaFailedResult.md +19 -0
- package/docs/api/interfaces/SignalProtocolClientMediaOperationOptions.md +53 -0
- package/docs/api/interfaces/SignalProtocolClientMediaPendingResult.md +19 -0
- package/docs/api/interfaces/SignalProtocolClientMediaProcessResult.md +43 -0
- package/docs/api/interfaces/SignalProtocolClientMediaSkippedResult.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientMediaUploadCompletedResult.md +31 -0
- package/docs/api/interfaces/SignalProtocolClientProcessPendingMediaOptions.md +87 -0
- package/docs/api/interfaces/SignalProtocolClientSaveDownloadedAttachmentInput.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientSaveUploadedAttachmentInput.md +25 -0
- package/docs/api/interfaces/SignalProtocolClientSyncDeleteInput.md +19 -0
- package/docs/api/interfaces/SignalProtocolConfig.md +50 -0
- package/docs/api/interfaces/SignalRemoteObjectStore.md +88 -0
- package/docs/api/interfaces/SkippedSenderMessageKey.md +26 -0
- package/docs/api/interfaces/TaskNotificationAckSyncInput.md +31 -0
- package/docs/api/interfaces/TripleRatchetState.md +64 -0
- package/docs/api/interfaces/UserRecord.md +71 -0
- package/docs/api/interfaces/UsernameStateSyncInput.md +19 -0
- package/docs/api/interfaces/VerificationStateSyncInput.md +31 -0
- package/docs/api/interfaces/VersionNegotiationState.md +84 -0
- package/docs/api/interfaces/ViewOnceOpenSyncInput.md +19 -0
- package/docs/api/namespaces/ProtocolAddress/README.md +33 -0
- package/docs/api/namespaces/ProtocolAddress/functions/create.md +41 -0
- package/docs/api/namespaces/ProtocolAddress/functions/equals.md +39 -0
- package/docs/api/namespaces/ProtocolAddress/functions/fromStorageKey.md +36 -0
- package/docs/api/namespaces/ProtocolAddress/functions/isUser.md +39 -0
- package/docs/api/namespaces/ProtocolAddress/functions/isValid.md +34 -0
- package/docs/api/namespaces/ProtocolAddress/functions/parse.md +41 -0
- package/docs/api/namespaces/ProtocolAddress/functions/toStorageKey.md +38 -0
- package/docs/api/namespaces/ProtocolAddress/functions/toString.md +34 -0
- package/docs/api/namespaces/SessionRecord/README.md +30 -0
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrent.md +40 -0
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrentState.md +34 -0
- package/docs/api/namespaces/SessionRecord/functions/create.md +25 -0
- package/docs/api/namespaces/SessionRecord/functions/deserialize.md +29 -0
- package/docs/api/namespaces/SessionRecord/functions/findSession.md +34 -0
- package/docs/api/namespaces/SessionRecord/functions/getAllSessions.md +25 -0
- package/docs/api/namespaces/SessionRecord/functions/getArchivedCount.md +25 -0
- package/docs/api/namespaces/SessionRecord/functions/hasCurrentSession.md +25 -0
- package/docs/api/namespaces/SessionRecord/functions/hasUsableSenderChain.md +36 -0
- package/docs/api/namespaces/SessionRecord/functions/promoteSession.md +34 -0
- package/docs/api/namespaces/SessionRecord/functions/serialize.md +28 -0
- package/docs/api/namespaces/SessionRecord/variables/MAX_ARCHIVED_SESSIONS.md +14 -0
- package/docs/api/namespaces/SessionState/README.md +15 -0
- package/docs/api/namespaces/SessionState/functions/getSessionId.md +32 -0
- package/docs/api/namespaces/blocking/README.md +43 -0
- package/docs/api/namespaces/encoding/README.md +33 -0
- package/docs/api/namespaces/encoding/functions/base64ToUrlSafe.md +28 -0
- package/docs/api/namespaces/encoding/functions/bytesToBase64.md +21 -0
- package/docs/api/namespaces/encoding/functions/bytesToString.md +21 -0
- package/docs/api/namespaces/encoding/functions/bytesToUrlSafeBase64.md +33 -0
- package/docs/api/namespaces/encoding/functions/concatBytes.md +21 -0
- package/docs/api/namespaces/encoding/functions/stringToBytes.md +21 -0
- package/docs/api/namespaces/encoding/functions/urlSafeToBase64.md +27 -0
- package/docs/api/namespaces/keys/README.md +126 -0
- package/docs/api/namespaces/keys/functions/acceptContactIdentityRotation.md +33 -0
- package/docs/api/namespaces/keys/functions/assertIdentityCommitment.md +25 -0
- package/docs/api/namespaces/keys/functions/compositeIdentitiesEqual.md +23 -0
- package/docs/api/namespaces/keys/functions/createCompositeIdentityV1.md +19 -0
- package/docs/api/namespaces/keys/functions/createPreKeySignatureContext.md +31 -0
- package/docs/api/namespaces/keys/functions/createUnverifiedContactIdentityRecord.md +23 -0
- package/docs/api/namespaces/keys/functions/decodeCompositeIdentityV1.md +19 -0
- package/docs/api/namespaces/keys/functions/deriveIdentityCommitment.md +19 -0
- package/docs/api/namespaces/keys/functions/encodeCompositeIdentityV1.md +19 -0
- package/docs/api/namespaces/keys/functions/evaluateContactIdentityCandidate.md +27 -0
- package/docs/api/namespaces/keys/functions/generateEcOneTimePreKeys.md +37 -0
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKey.md +39 -0
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKeyId.md +21 -0
- package/docs/api/namespaces/keys/functions/generateIdentityKeyPair.md +24 -0
- package/docs/api/namespaces/keys/functions/generateKemOneTimePreKeys.md +47 -0
- package/docs/api/namespaces/keys/functions/generateKyberLastResortPreKey.md +37 -0
- package/docs/api/namespaces/keys/functions/generateRegistrationId.md +13 -0
- package/docs/api/namespaces/keys/functions/signMlKem1024PreKey.md +29 -0
- package/docs/api/namespaces/keys/functions/signPreKey.md +31 -0
- package/docs/api/namespaces/keys/functions/validateContactIdentityRecord.md +19 -0
- package/docs/api/namespaces/keys/functions/verifyContactIdentityRecord.md +31 -0
- package/docs/api/namespaces/keys/functions/verifyMlKem1024PreKey.md +33 -0
- package/docs/api/namespaces/keys/functions/verifyPreKeySignature.md +35 -0
- package/docs/api/namespaces/keys/interfaces/CompositeIdentityV1.md +33 -0
- package/docs/api/namespaces/keys/interfaces/ContactIdentityRecord.md +53 -0
- package/docs/api/namespaces/keys/interfaces/KemOneTimePreKey.md +43 -0
- package/docs/api/namespaces/keys/type-aliases/IdentityCandidateStatus.md +9 -0
- package/docs/api/namespaces/keys/type-aliases/IdentityTrustState.md +9 -0
- package/docs/api/namespaces/keys/type-aliases/IdentityType.md +9 -0
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_ED25519_TAG.md +9 -0
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_LENGTH.md +9 -0
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_VERSION.md +9 -0
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_X25519_TAG.md +9 -0
- package/docs/api/namespaces/keys/variables/IDENTITY_COMMITMENT_V1_DOMAIN.md +9 -0
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_ML_KEM_1024.md +9 -0
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_X25519.md +9 -0
- package/docs/api/namespaces/keys/variables/PREKEY_SIGNATURE_V1_DOMAIN.md +9 -0
- package/docs/api/namespaces/media/README.md +105 -0
- package/docs/api/namespaces/media/classes/MediaAttachmentError.md +57 -0
- package/docs/api/namespaces/media/functions/createByteRangeMediaAttachmentTransfer.md +19 -0
- package/docs/api/namespaces/media/functions/createMediaAttachmentDeliveryId.md +29 -0
- package/docs/api/namespaces/media/functions/createMediaAttachmentId.md +19 -0
- package/docs/api/namespaces/media/functions/createMediaAttachmentMessage.md +25 -0
- package/docs/api/namespaces/media/functions/createMediaAttachmentPointer.md +19 -0
- package/docs/api/namespaces/media/functions/createTusMediaAttachmentTransfer.md +19 -0
- package/docs/api/namespaces/media/functions/deleteMediaAttachment.md +23 -0
- package/docs/api/namespaces/media/functions/executeMediaAttachmentJob.md +23 -0
- package/docs/api/namespaces/media/functions/isMediaAttachmentFlagSet.md +19 -0
- package/docs/api/namespaces/media/functions/parseMediaAttachmentMessage.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanup.md +23 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanupJobs.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentDeleteSync.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentDownloadJob.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentOpen.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentProcessing.md +19 -0
- package/docs/api/namespaces/media/functions/planMediaAttachmentUploadJob.md +19 -0
- package/docs/api/namespaces/media/functions/prepareMediaAttachmentUpload.md +30 -0
- package/docs/api/namespaces/media/functions/resolveMediaAttachment.md +30 -0
- package/docs/api/namespaces/media/functions/serializeMediaAttachmentMessage.md +25 -0
- package/docs/api/namespaces/media/functions/validateMediaAttachmentPolicy.md +23 -0
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentPartialStore.md +68 -0
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentTransferOptions.md +91 -0
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentOptions.md +25 -0
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentResult.md +19 -0
- package/docs/api/namespaces/media/interfaces/ExecuteMediaAttachmentJobOptions.md +157 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentBackgroundJob.md +85 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentCleanupPlan.md +37 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentJobExecutionResult.md +55 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentMessage.md +31 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentOpenDecision.md +31 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPointer.md +133 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPolicy.md +67 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProcessingPlan.md +73 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProgress.md +69 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentResumeState.md +37 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentRetryOptions.md +31 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransfer.md +51 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferCheckpoint.md +69 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferOptions.md +67 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadJobData.md +19 -0
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadResponse.md +25 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentCleanupJobsInput.md +61 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDeleteSyncInput.md +25 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDownloadJobInput.md +161 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentOpenInput.md +25 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentProcessingInput.md +83 -0
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentUploadJobInput.md +147 -0
- package/docs/api/namespaces/media/interfaces/PrepareMediaAttachmentUploadOptions.md +144 -0
- package/docs/api/namespaces/media/interfaces/ResolveMediaAttachmentOptions.md +55 -0
- package/docs/api/namespaces/media/interfaces/ResolvedMediaAttachment.md +109 -0
- package/docs/api/namespaces/media/interfaces/TusMediaAttachmentTransferOptions.md +85 -0
- package/docs/api/namespaces/media/type-aliases/CreateMediaAttachmentPointerInput.md +15 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCheckpointCallback.md +19 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCleanupReason.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentErrorCode.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentFlag.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobExecutionStatus.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobOperation.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobPriority.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSkipReason.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSource.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentKnownIds.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentMessageType.md +9 -0
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentProgressCallback.md +19 -0
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_DEFAULTS.md +47 -0
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_PRESETS.md +95 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentCleanupReason.md +27 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentErrorCode.md +75 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentFlag.md +23 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentJobExecutionStatus.md +19 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentJobOperation.md +31 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentJobPriority.md +23 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentJobSource.md +51 -0
- package/docs/api/namespaces/media/variables/MediaAttachmentMessageType.md +15 -0
- package/docs/api/namespaces/media/variables/downloadMediaAttachment.md +30 -0
- package/docs/api/namespaces/safety/README.md +61 -0
- package/docs/api/namespaces/safety/classes/DisplayableFingerprint.md +108 -0
- package/docs/api/namespaces/safety/classes/Fingerprint.md +104 -0
- package/docs/api/namespaces/safety/classes/ScannableFingerprint.md +209 -0
- package/docs/api/namespaces/safety/functions/base64ToBytes.md +21 -0
- package/docs/api/namespaces/safety/functions/clearFingerprintCache.md +15 -0
- package/docs/api/namespaces/safety/functions/compareSafetyNumbers.md +25 -0
- package/docs/api/namespaces/safety/functions/createFingerprintData.md +60 -0
- package/docs/api/namespaces/safety/functions/extractQrData.md +34 -0
- package/docs/api/namespaces/safety/functions/generateCompositeSafetyNumber.md +39 -0
- package/docs/api/namespaces/safety/functions/generateEmojiFingerprint.md +24 -0
- package/docs/api/namespaces/safety/functions/generateSingleKeyReferenceSafetyNumber.md +51 -0
- package/docs/api/namespaces/safety/functions/generateVerifySchemeUrl.md +32 -0
- package/docs/api/namespaces/safety/functions/generateVerifyUrl.md +49 -0
- package/docs/api/namespaces/safety/functions/isValidSafetyNumber.md +21 -0
- package/docs/api/namespaces/safety/functions/isVerifyUrl.md +45 -0
- package/docs/api/namespaces/safety/functions/parseVerifyUrl.md +31 -0
- package/docs/api/namespaces/safety/interfaces/FingerprintData.md +52 -0
- package/docs/api/namespaces/safety/interfaces/SafetyNumber.md +49 -0
- package/docs/api/namespaces/safety/interfaces/VerifyLinkConfig.md +28 -0
- package/docs/api/namespaces/safety/interfaces/VerifyUrlParams.md +49 -0
- package/docs/api/namespaces/safety/type-aliases/CompareResult.md +21 -0
- package/docs/api/namespaces/safety/variables/DEFAULT_VERIFY_LINK_CONFIG.md +12 -0
- package/docs/api/namespaces/safety/variables/FINGERPRINT_ITERATIONS.md +12 -0
- package/docs/api/namespaces/safety/variables/FINGERPRINT_VERSION.md +12 -0
- package/docs/api/namespaces/safety/variables/VERIFY_BASE_URL.md +11 -0
- package/docs/api/namespaces/safety/variables/VERIFY_SCHEME_URL.md +11 -0
- package/docs/api/type-aliases/Base64.md +20 -0
- package/docs/api/type-aliases/BraidPolicy.md +11 -0
- package/docs/api/type-aliases/Bytes.md +20 -0
- package/docs/api/type-aliases/Ciphertext.md +21 -0
- package/docs/api/type-aliases/DeviceType.md +11 -0
- package/docs/api/type-aliases/DownloadedAttachment.md +11 -0
- package/docs/api/type-aliases/GroupId.md +27 -0
- package/docs/api/type-aliases/Hex.md +20 -0
- package/docs/api/type-aliases/HookName.md +11 -0
- package/docs/api/type-aliases/PostQuantumPolicy.md +11 -0
- package/docs/api/type-aliases/PreparedAttachmentUpload.md +14 -0
- package/docs/api/type-aliases/PrivateKey.md +22 -0
- package/docs/api/type-aliases/ProgressCallback.md +45 -0
- package/docs/api/type-aliases/PublicKey.md +22 -0
- package/docs/api/type-aliases/RemoteObjectCompleteUploadRequest.md +19 -0
- package/docs/api/type-aliases/RemoteObjectDeleteRequest.md +19 -0
- package/docs/api/type-aliases/RemoteObjectDownloadRequest.md +19 -0
- package/docs/api/type-aliases/RemoteObjectUploadRequest.md +42 -0
- package/docs/api/type-aliases/SCKAMode.md +11 -0
- package/docs/api/type-aliases/SealedSenderAuth.md +15 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupInput.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupResult.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadInput.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadResult.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaOperationResult.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadInput.md +9 -0
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadResult.md +9 -0
- package/docs/api/type-aliases/Signature.md +21 -0
- package/docs/api/type-aliases/Unsubscribe.md +15 -0
- package/docs/api/variables/BraidPolicy.md +21 -0
- package/docs/api/variables/DEFAULT_DEVICE_ID.md +12 -0
- package/docs/api/variables/DOUBLE_RATCHET_SPEC.md +11 -0
- package/docs/api/variables/GROUP_V2_PREFIX.md +11 -0
- package/docs/api/variables/KEY_REFRESH_INTERVAL_MS_DEFAULT.md +11 -0
- package/docs/api/variables/MAX_MESSAGE_KEYS.md +14 -0
- package/docs/api/variables/MAX_PREKEY_AGE_MS_DEFAULT.md +11 -0
- package/docs/api/variables/MAX_RECEIVER_CHAINS.md +14 -0
- package/docs/api/variables/MAX_REGISTRATION_ID.md +16 -0
- package/docs/api/variables/MAX_SKIP.md +11 -0
- package/docs/api/variables/MESSAGE_FORMAT.md +11 -0
- package/docs/api/variables/MIN_REGISTRATION_ID.md +16 -0
- package/docs/api/variables/ML_KEM_BRAID_SPEC.md +11 -0
- package/docs/api/variables/ONE_TIME_PREKEY_BATCH_SIZE.md +21 -0
- package/docs/api/variables/PQXDH_SPEC.md +11 -0
- package/docs/api/variables/PostQuantumPolicy.md +21 -0
- package/docs/api/variables/SENDER_KEY_FORMAT.md +11 -0
- package/docs/api/variables/SENDER_KEY_SPEC.md +11 -0
- package/docs/api/variables/SESAME_SPEC.md +11 -0
- package/docs/api/variables/SESSION_FORMAT.md +11 -0
- package/docs/api/variables/SPQR_LIMITS_DEFAULTS.md +11 -0
- package/docs/api/variables/X3DH_SPEC.md +9 -0
- package/docs/api/variables/defaultSignalLogger.md +32 -0
- package/encoding/README.md +32 -0
- package/files/README.md +37 -0
- package/groups/README.md +42 -0
- package/hooks/README.md +40 -0
- package/keys/README.md +121 -0
- package/local/store/README.md +120 -0
- package/local/store/expo/README.md +73 -0
- package/local/store/mock/README.md +27 -0
- package/local/store/node/README.md +35 -0
- package/local/store/react-native/README.md +39 -0
- package/local/store/web/README.md +65 -0
- package/local/vault/README.md +32 -0
- package/media/README.md +73 -0
- package/package.json +436 -0
- package/profile/README.md +44 -0
- package/remote/README.md +219 -0
- package/remote/object-store/README.md +45 -0
- package/remote/object-store/convex-r2/README.md +85 -0
- package/remote/object-store/s3/README.md +35 -0
- package/remote/relay/README.md +38 -0
- package/remote/relay/convex/README.md +54 -0
- package/remote/relay/mock/README.md +32 -0
- package/safety/README.md +42 -0
- package/sealed-sender/README.md +32 -0
- package/types/README.md +36 -0
- package/username/README.md +37 -0
- package/utils/README.md +37 -0
- package/zk/README.md +36 -0
|
@@ -0,0 +1,1281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SignalProtocolClient - initialized client class for encrypted messaging.
|
|
3
|
+
*
|
|
4
|
+
* @layer 1 - API
|
|
5
|
+
* @boundary ISignalProtocolClient
|
|
6
|
+
*
|
|
7
|
+
* Application code should usually create clients with `createSignalProtocolClient()`.
|
|
8
|
+
* Use `SignalProtocolClient.create()` directly when lower-level integration code already
|
|
9
|
+
* owns the flattened config shape.
|
|
10
|
+
*
|
|
11
|
+
* @example Basic usage
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { createSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
14
|
+
* import { mockStore } from '@open-e2ee/signal-protocol-sdk/local/store/mock';
|
|
15
|
+
* import { mockRelay } from '@open-e2ee/signal-protocol-sdk/remote/relay/mock';
|
|
16
|
+
*
|
|
17
|
+
* const relay = mockRelay();
|
|
18
|
+
* const signal = await createSignalProtocolClient({
|
|
19
|
+
* identity: { userId: 'alice' },
|
|
20
|
+
* adapters: { storage: mockStore(), relay },
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await signal.syncToServer();
|
|
24
|
+
* await signal.send('bob', 'Hello!');
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example With product security policy
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const signal = await createSignalProtocolClient({
|
|
30
|
+
* identity: { userId },
|
|
31
|
+
* adapters: { storage, relay },
|
|
32
|
+
* protocol: { postQuantum: 'required', braid: 'required' },
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example Low-level factory
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { SignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
39
|
+
*
|
|
40
|
+
* const signal = await SignalProtocolClient.create(userId, {
|
|
41
|
+
* storage,
|
|
42
|
+
* relay,
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
import type { Ciphertext, IdentityType, PreKeyBundle, PublicKey } from '../keys/index.js';
|
|
47
|
+
import type { ISignalProtocolClient } from '../types/index.js';
|
|
48
|
+
import { ProtocolAddress } from '../types/address.js';
|
|
49
|
+
import { type ProgressCallback, type SignalProtocolClientConfig } from './config.js';
|
|
50
|
+
import type { SesameMessage, SesameStats } from '../internal/sesame/types.js';
|
|
51
|
+
import { type ILogger } from '../logger.js';
|
|
52
|
+
import { type SenderKeyDistributionMessage } from '../internal/protocol/sender-keys/index.js';
|
|
53
|
+
import { type BlockedRecipientsSyncInput, type MediaAttachmentDeleteSyncInput, type ReadSyncEntryInput, type RecipientUsernameSyncInput, type ViewOnceOpenSyncInput } from './content-adapter.js';
|
|
54
|
+
import type { DataMessageInput } from './types.js';
|
|
55
|
+
import type { AttachmentTransferOptions, SendOptions, SendResult, SafetyNumber, IncomingEnvelope, ProcessEnvelopeOptions } from './types.js';
|
|
56
|
+
import { TypingAction } from './types.js';
|
|
57
|
+
import * as PreKeyOps from './prekeys.js';
|
|
58
|
+
import { type MediaAttachmentPointer } from '../media/index.js';
|
|
59
|
+
import { type SignalProtocolClientMedia } from './media.js';
|
|
60
|
+
import type { DecryptedGroup, AccessControl } from '../internal/groups-v2/index.js';
|
|
61
|
+
import type { GroupId } from '../internal/groups/group-id.js';
|
|
62
|
+
export {};
|
|
63
|
+
export { IMPLICIT_ENVELOPE_TYPES } from './constants.js';
|
|
64
|
+
/**
|
|
65
|
+
* Modern Signal Protocol Client
|
|
66
|
+
*
|
|
67
|
+
* Provides a clean, testable, and flexible API for Signal Protocol operations.
|
|
68
|
+
* Uses static factory pattern for type-safe async initialization:
|
|
69
|
+
* - Guaranteed initialization via create() method
|
|
70
|
+
* - Dependency injection support
|
|
71
|
+
* - Configuration object pattern
|
|
72
|
+
* - Clear error handling
|
|
73
|
+
* - Type-safe API
|
|
74
|
+
*
|
|
75
|
+
* This client implements the ISignalProtocolClient interface and wraps
|
|
76
|
+
* SignalProtocolManager with additional high-level functionality.
|
|
77
|
+
*
|
|
78
|
+
* @category Primary API
|
|
79
|
+
*/
|
|
80
|
+
export declare class SignalProtocolClient implements ISignalProtocolClient {
|
|
81
|
+
private readonly manager;
|
|
82
|
+
private readonly _storage;
|
|
83
|
+
private readonly relay?;
|
|
84
|
+
private readonly remoteObjectStore?;
|
|
85
|
+
private readonly config;
|
|
86
|
+
private readonly _userId;
|
|
87
|
+
readonly logger: Required<ILogger>;
|
|
88
|
+
private hooks;
|
|
89
|
+
private readonly contentAdapter;
|
|
90
|
+
readonly deviceId: number;
|
|
91
|
+
/**
|
|
92
|
+
* Get user ID for this client instance
|
|
93
|
+
* @see ISignalProtocolClient.userId
|
|
94
|
+
*/
|
|
95
|
+
get userId(): string;
|
|
96
|
+
private readonly sesameManager;
|
|
97
|
+
private readonly _address;
|
|
98
|
+
private readonly senderKeyManager;
|
|
99
|
+
private groupsV2Manager?;
|
|
100
|
+
private readonly cipher;
|
|
101
|
+
/**
|
|
102
|
+
* Durable media job facade backed by the configured Signal local store.
|
|
103
|
+
*
|
|
104
|
+
* Use this for background-safe attachment uploads, downloads, and cleanup
|
|
105
|
+
* when the app provides media lifecycle callbacks in `config.media`.
|
|
106
|
+
*/
|
|
107
|
+
readonly media: SignalProtocolClientMedia;
|
|
108
|
+
/**
|
|
109
|
+
* Indicates the result of initial server sync during create().
|
|
110
|
+
* 'synced' = successful, 'failed' = sync threw (offline mode), 'none' = no relay configured.
|
|
111
|
+
*/
|
|
112
|
+
private _syncStatus;
|
|
113
|
+
get syncStatus(): 'synced' | 'failed' | 'none';
|
|
114
|
+
private relayUnsubscribe?;
|
|
115
|
+
private retryUnsubscribe?;
|
|
116
|
+
/**
|
|
117
|
+
* Cached sender certificate for sealed sender.
|
|
118
|
+
* Lazily fetched and refreshed when expired (24h validity, 5min margin).
|
|
119
|
+
*/
|
|
120
|
+
private cachedSenderCertificate;
|
|
121
|
+
private cachedCertificateExpiry;
|
|
122
|
+
/**
|
|
123
|
+
* Centralized state management for retry/rotation tracking
|
|
124
|
+
* @see SignalProtocolClientState for state details
|
|
125
|
+
*/
|
|
126
|
+
private readonly state;
|
|
127
|
+
/**
|
|
128
|
+
* Get retry rate limiting state for retry operations
|
|
129
|
+
*/
|
|
130
|
+
private get rateLimitState();
|
|
131
|
+
/**
|
|
132
|
+
* Private constructor - use SignalProtocolClient.create() to instantiate
|
|
133
|
+
*
|
|
134
|
+
* @param userId - User identifier
|
|
135
|
+
* @param deviceId - Device identifier (1 = primary, 2-5 = linked devices)
|
|
136
|
+
* @param config - Configuration for the client
|
|
137
|
+
*/
|
|
138
|
+
private constructor();
|
|
139
|
+
/**
|
|
140
|
+
* Get client context for operation modules
|
|
141
|
+
*/
|
|
142
|
+
private get ctx();
|
|
143
|
+
/**
|
|
144
|
+
* Whether sealed sender is enabled and configured.
|
|
145
|
+
*/
|
|
146
|
+
get isSealedSenderEnabled(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Fetch (or return cached) sender certificate for sealed sender.
|
|
149
|
+
*
|
|
150
|
+
* Uses the configured certificateProvider or relay.fetchSenderCertificate().
|
|
151
|
+
* Caches the result until expiry (24h certificate, 5min safety margin).
|
|
152
|
+
*
|
|
153
|
+
* @returns Base64-encoded serialized SenderCertificate
|
|
154
|
+
* @throws if no certificate provider is available
|
|
155
|
+
*/
|
|
156
|
+
fetchSenderCertificate(): Promise<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Get GroupsV2Manager, throwing if not configured.
|
|
159
|
+
*/
|
|
160
|
+
private get groupsV2();
|
|
161
|
+
/**
|
|
162
|
+
* Get retry configuration for retry operations
|
|
163
|
+
*/
|
|
164
|
+
private get retryConfig();
|
|
165
|
+
/**
|
|
166
|
+
* Get retry dedup state for retry operations
|
|
167
|
+
*/
|
|
168
|
+
private get retryDedupState();
|
|
169
|
+
/**
|
|
170
|
+
* Get retry callbacks for retry operations
|
|
171
|
+
*/
|
|
172
|
+
private get retryCallbacks();
|
|
173
|
+
/**
|
|
174
|
+
* Get relay subscription state (passed to relay-subscription module)
|
|
175
|
+
*/
|
|
176
|
+
private get relaySubscriptionState();
|
|
177
|
+
/**
|
|
178
|
+
* Get relay subscription callbacks (delegate back to SignalProtocolClient methods)
|
|
179
|
+
*/
|
|
180
|
+
private get relaySubscriptionCallbacks();
|
|
181
|
+
/**
|
|
182
|
+
* Get relay subscription config
|
|
183
|
+
*/
|
|
184
|
+
private get relaySubscriptionConfig();
|
|
185
|
+
/**
|
|
186
|
+
* Create and initialize a new SignalProtocolClient instance.
|
|
187
|
+
*
|
|
188
|
+
* This low-level factory ensures the client is fully initialized before it is
|
|
189
|
+
* returned. Most app code should prefer `createSignalProtocolClient()` so identity,
|
|
190
|
+
* adapters, and protocol policy are grouped in one object.
|
|
191
|
+
*
|
|
192
|
+
* If `relay` is provided in config, the client automatically uploads the
|
|
193
|
+
* public prekey bundle needed for end-to-end encrypted messaging.
|
|
194
|
+
*
|
|
195
|
+
* @param userId - User identifier for this device/client
|
|
196
|
+
* @param config - Optional configuration for the client
|
|
197
|
+
* @returns Fully initialized SignalProtocolClient instance
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* import { SignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
202
|
+
* import { convexRelay } from '@open-e2ee/signal-protocol-sdk/remote/relay/convex';
|
|
203
|
+
*
|
|
204
|
+
* // Local-only primary device.
|
|
205
|
+
* const signal = await SignalProtocolClient.create('user-123', {
|
|
206
|
+
* storage,
|
|
207
|
+
* });
|
|
208
|
+
*
|
|
209
|
+
* // Linked device; storage must already contain provisioned identity material.
|
|
210
|
+
* const signal = await SignalProtocolClient.create('user-123', {
|
|
211
|
+
* deviceId: 2,
|
|
212
|
+
* storage: provisionedLinkedDeviceStorage
|
|
213
|
+
* });
|
|
214
|
+
*
|
|
215
|
+
* // With relay sync.
|
|
216
|
+
* const relay = convexRelay({ convex, api: signalApi, currentUserId: userId });
|
|
217
|
+
* const signal = await SignalProtocolClient.create('user-123', {
|
|
218
|
+
* storage,
|
|
219
|
+
* relay,
|
|
220
|
+
* onProgress: ({ stage, percent, message }) => {
|
|
221
|
+
* console.log(`${stage}: ${percent}% - ${message}`);
|
|
222
|
+
* }
|
|
223
|
+
* });
|
|
224
|
+
*
|
|
225
|
+
* // With full configuration
|
|
226
|
+
* const signal = await SignalProtocolClient.create('user-123', {
|
|
227
|
+
* deviceId: 1,
|
|
228
|
+
* storage,
|
|
229
|
+
* relay,
|
|
230
|
+
* protocol: { postQuantum: 'required', braid: 'required' },
|
|
231
|
+
* onProgress,
|
|
232
|
+
* enableDebugLogging: true,
|
|
233
|
+
* ratchetConfig: { maxSkip: 2000 }
|
|
234
|
+
* });
|
|
235
|
+
*
|
|
236
|
+
* // For local development with in-memory adapters
|
|
237
|
+
* const signal = await SignalProtocolClient.create('local-user', {
|
|
238
|
+
* protocolManager: mockManager,
|
|
239
|
+
* storage: mockStorage
|
|
240
|
+
* });
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
static create(userId: string, config: SignalProtocolClientConfig): Promise<SignalProtocolClient>;
|
|
244
|
+
/**
|
|
245
|
+
* Initialize the Signal Protocol on this device (private - called by create())
|
|
246
|
+
*
|
|
247
|
+
* Generates identity keys if they don't exist and prepares the client for use.
|
|
248
|
+
*/
|
|
249
|
+
private initialize;
|
|
250
|
+
/**
|
|
251
|
+
* Sync the public prekey bundle to the configured relay.
|
|
252
|
+
*
|
|
253
|
+
* Called automatically by create() when a relay is configured.
|
|
254
|
+
* Can also be called manually to retry after a failed initial sync.
|
|
255
|
+
*
|
|
256
|
+
* Delegates to PreKeyOps.syncToServer for implementation.
|
|
257
|
+
*/
|
|
258
|
+
syncToServer(onProgress?: ProgressCallback): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Explicitly rotate this account's relay identity using a caller-authenticated
|
|
261
|
+
* compare-and-swap commitment, then publish fresh prekeys for that namespace.
|
|
262
|
+
* Normal sync and linked-device provisioning never call this operation.
|
|
263
|
+
*/
|
|
264
|
+
rotateAccountIdentity(expectedCurrentCommitment: Uint8Array, identityType?: IdentityType): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Force prekey rotation: generate new keys with fresh IDs and upload.
|
|
267
|
+
*
|
|
268
|
+
* Called automatically on stale prekey detection and as recovery for
|
|
269
|
+
* PQXDH §4.13 identifier collisions.
|
|
270
|
+
*
|
|
271
|
+
* Delegates to PreKeyOps.regeneratePreKeysWithFreshIds for implementation.
|
|
272
|
+
*/
|
|
273
|
+
/**
|
|
274
|
+
* Hydrate state from persistent storage.
|
|
275
|
+
*/
|
|
276
|
+
private hydratePersistedState;
|
|
277
|
+
private regeneratePreKeysWithFreshIds;
|
|
278
|
+
/**
|
|
279
|
+
* Verify server has correct keys after upload.
|
|
280
|
+
*
|
|
281
|
+
* Delegates to PreKeyOps.verifyServerKeys for implementation.
|
|
282
|
+
*/
|
|
283
|
+
private verifyServerKeys;
|
|
284
|
+
/**
|
|
285
|
+
* Force complete key reset (development/debugging only).
|
|
286
|
+
*
|
|
287
|
+
* Delegates to PreKeyOps.forceCompleteKeyReset for implementation.
|
|
288
|
+
*/
|
|
289
|
+
forceCompleteKeyReset(): Promise<PreKeyOps.ForceKeyResetResult>;
|
|
290
|
+
/**
|
|
291
|
+
* Check if client is initialized
|
|
292
|
+
*
|
|
293
|
+
* @returns True if identity keys exist and client is ready to use
|
|
294
|
+
*/
|
|
295
|
+
isInitialized(): Promise<boolean>;
|
|
296
|
+
/**
|
|
297
|
+
* Get client's identity public key
|
|
298
|
+
*
|
|
299
|
+
* @returns Public key for this device's identity
|
|
300
|
+
*/
|
|
301
|
+
getIdentityPublicKey(): Promise<PublicKey>;
|
|
302
|
+
/**
|
|
303
|
+
* Get the ProtocolAddress for this client's device.
|
|
304
|
+
*
|
|
305
|
+
* Useful when an integration needs to reference the local device.
|
|
306
|
+
*
|
|
307
|
+
* @returns ProtocolAddress for this client (userId:deviceId)
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* const alice = await SignalProtocolClient.create('alice', { storage: aliceStorage });
|
|
312
|
+
* const bob = await SignalProtocolClient.create('bob', { storage: bobStorage });
|
|
313
|
+
*
|
|
314
|
+
* // Use address() to reference the local device
|
|
315
|
+
* await alice.encryptMessage(bob.address(), 'Hello');
|
|
316
|
+
* await bob.decryptMessage(alice.address(), encrypted);
|
|
317
|
+
*
|
|
318
|
+
* // Access userId if needed
|
|
319
|
+
* console.log(alice.address().userId); // 'alice'
|
|
320
|
+
* ```
|
|
321
|
+
*/
|
|
322
|
+
address(): ProtocolAddress;
|
|
323
|
+
/**
|
|
324
|
+
* Establish a new session with a specific remote device.
|
|
325
|
+
*
|
|
326
|
+
* Advanced direct-device API. Normal app code can call `send(recipientUserId, content)`;
|
|
327
|
+
* the client will fetch remote device bundles through the configured relay and
|
|
328
|
+
* use the selected protocol policy. Direct callers must provide the remote
|
|
329
|
+
* device's prekey bundle themselves.
|
|
330
|
+
*
|
|
331
|
+
* @param remoteAddress - Partner's protocol address (userId + deviceId)
|
|
332
|
+
* @param prekeyBundle - Partner's prekey bundle (fetched from server)
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```typescript
|
|
336
|
+
* import { ProtocolAddress } from '@open-e2ee/signal-protocol-sdk';
|
|
337
|
+
*
|
|
338
|
+
* const remoteAddress = ProtocolAddress.create('bob', 1);
|
|
339
|
+
* const bundle = await relay.fetchPreKeyBundle(remoteAddress.userId);
|
|
340
|
+
* await signal.establishSession(remoteAddress, bundle);
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
establishSession(remoteAddress: ProtocolAddress, prekeyBundle: PreKeyBundle, recipientIdentityType?: IdentityType): Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Check if a session exists
|
|
346
|
+
*
|
|
347
|
+
* @param remoteAddress - Remote device's protocol address
|
|
348
|
+
* @returns True if session exists
|
|
349
|
+
*/
|
|
350
|
+
hasSession(remoteAddress: ProtocolAddress): Promise<boolean>;
|
|
351
|
+
/**
|
|
352
|
+
* Delete a session
|
|
353
|
+
*
|
|
354
|
+
* Use this to reset encryption for a session (e.g., after a security incident).
|
|
355
|
+
* You'll need to establish a new session before sending/receiving messages.
|
|
356
|
+
*
|
|
357
|
+
* @param remoteAddress - Remote device's protocol address
|
|
358
|
+
*/
|
|
359
|
+
deleteSession(remoteAddress: ProtocolAddress): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Archive a session after a stale-device response.
|
|
362
|
+
*
|
|
363
|
+
* Moves current session to inactive list, preserving it for delayed message decryption.
|
|
364
|
+
* Per SESAME §3.2: "previously active session is moved to the head of the inactive sessions list"
|
|
365
|
+
*
|
|
366
|
+
* Use this when handling stale device errors (410) - the old session may still be needed
|
|
367
|
+
* to decrypt messages that were in-flight during the session refresh.
|
|
368
|
+
*
|
|
369
|
+
* @param remoteAddress - Remote device's protocol address
|
|
370
|
+
*/
|
|
371
|
+
archiveSession(remoteAddress: ProtocolAddress): Promise<void>;
|
|
372
|
+
/**
|
|
373
|
+
* Mark a message as delivered, silently ignoring errors.
|
|
374
|
+
*
|
|
375
|
+
* Used when discarding undecryptable messages (IMPLICIT content, stale prekeys)
|
|
376
|
+
* to prevent them from reappearing in the queue.
|
|
377
|
+
*
|
|
378
|
+
* @param envelopeId - The envelope ID to mark as delivered
|
|
379
|
+
* @param options - Decryption options containing optional markDelivered callback
|
|
380
|
+
*/
|
|
381
|
+
private markMessageDeliveredSilently;
|
|
382
|
+
/** @see MessageOps.encryptMessage */
|
|
383
|
+
encryptMessage(remoteAddress: ProtocolAddress, plaintext: string): Promise<Ciphertext>;
|
|
384
|
+
/**
|
|
385
|
+
* Decrypt a message from a session
|
|
386
|
+
*
|
|
387
|
+
* Uses the Double Ratchet algorithm to decrypt ciphertext, handling
|
|
388
|
+
* out-of-order messages and updating session state.
|
|
389
|
+
*
|
|
390
|
+
* @param remoteAddress - Remote device's protocol address
|
|
391
|
+
* @param ciphertext - Message to decrypt
|
|
392
|
+
* @returns Decrypted plaintext
|
|
393
|
+
*/
|
|
394
|
+
decryptMessage(remoteAddress: ProtocolAddress, ciphertext: Ciphertext): Promise<string>;
|
|
395
|
+
/**
|
|
396
|
+
* Encrypt multiple messages in batch
|
|
397
|
+
*
|
|
398
|
+
* More efficient than calling encryptMessage() multiple times.
|
|
399
|
+
* Operations are performed atomically - if any encryption fails,
|
|
400
|
+
* none of the messages are encrypted.
|
|
401
|
+
*
|
|
402
|
+
* @param remoteAddress - Remote device's protocol address
|
|
403
|
+
* @param plaintexts - Array of messages to encrypt
|
|
404
|
+
* @returns Array of encrypted ciphertexts in the same order
|
|
405
|
+
*/
|
|
406
|
+
encryptMessages(remoteAddress: ProtocolAddress, plaintexts: string[]): Promise<Ciphertext[]>;
|
|
407
|
+
/**
|
|
408
|
+
* Decrypt multiple messages in batch
|
|
409
|
+
*
|
|
410
|
+
* More efficient than calling decryptMessage() multiple times.
|
|
411
|
+
* Handles out-of-order messages correctly.
|
|
412
|
+
*
|
|
413
|
+
* @param remoteAddress - Remote device's protocol address
|
|
414
|
+
* @param ciphertexts - Array of messages to decrypt
|
|
415
|
+
* @returns Array of decrypted plaintexts in the same order
|
|
416
|
+
*/
|
|
417
|
+
decryptMessages(remoteAddress: ProtocolAddress, ciphertexts: Ciphertext[]): Promise<string[]>;
|
|
418
|
+
/**
|
|
419
|
+
* Process an incoming encrypted message envelope.
|
|
420
|
+
*
|
|
421
|
+
* Unified entry point for both foreground (relay) and background (HTTP) message processing.
|
|
422
|
+
* Handles decryption and automatically sends SESAME retry requests on retryable failures.
|
|
423
|
+
*
|
|
424
|
+
* This method:
|
|
425
|
+
* 1. Decodes base64 ciphertext from the envelope
|
|
426
|
+
* 2. Decrypts message using Double Ratchet
|
|
427
|
+
* 3. On retryable error: sends retry request via relay or options callback
|
|
428
|
+
* 4. Re-throws error for caller to handle
|
|
429
|
+
*
|
|
430
|
+
* @param envelope - The encrypted message envelope
|
|
431
|
+
* @param options - Transport callbacks for background (no relay) scenarios
|
|
432
|
+
* @returns Decrypted plaintext
|
|
433
|
+
* @throws EncryptionError after sending retry request if decryption fails
|
|
434
|
+
*/
|
|
435
|
+
processIncomingEnvelope(envelope: IncomingEnvelope, options?: ProcessEnvelopeOptions): Promise<string>;
|
|
436
|
+
/**
|
|
437
|
+
* Process multiple incoming encrypted message envelopes.
|
|
438
|
+
*
|
|
439
|
+
* This is the preferred method for batch message processing. It handles:
|
|
440
|
+
* 1. Sorting PreKeyMessages before ciphertexts (SESAME session convergence)
|
|
441
|
+
* 2. Processing each envelope in order
|
|
442
|
+
* 3. Collecting results/errors for caller to handle
|
|
443
|
+
*
|
|
444
|
+
* The sorting ensures PreKeyMessages (which establish sessions) are processed
|
|
445
|
+
* before ciphertexts that depend on those sessions. This is required for
|
|
446
|
+
* SESAME Section 3.4 session convergence when archived sessions are promoted.
|
|
447
|
+
*
|
|
448
|
+
* @param envelopes - Array of encrypted message envelopes
|
|
449
|
+
* @param options - Transport callbacks for background scenarios
|
|
450
|
+
* @returns Array of results, each either success (plaintext) or failure (error)
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```typescript
|
|
454
|
+
* const results = await signal.processIncomingEnvelopes(pendingMessages);
|
|
455
|
+
* for (const result of results) {
|
|
456
|
+
* if ('plaintext' in result) {
|
|
457
|
+
* handleDecryptedMessage(result.envelope, result.plaintext);
|
|
458
|
+
* } else {
|
|
459
|
+
* handleDecryptionError(result.envelope, result.error);
|
|
460
|
+
* }
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* @see https://signal.org/docs/specifications/sesame/ Section 3.4
|
|
465
|
+
*/
|
|
466
|
+
processIncomingEnvelopes(envelopes: IncomingEnvelope[], options?: ProcessEnvelopeOptions): Promise<Array<{
|
|
467
|
+
envelope: IncomingEnvelope;
|
|
468
|
+
plaintext: string;
|
|
469
|
+
} | {
|
|
470
|
+
envelope: IncomingEnvelope;
|
|
471
|
+
error: Error;
|
|
472
|
+
}>>;
|
|
473
|
+
/**
|
|
474
|
+
* Internal: Send SESAME retry request for failed decryption.
|
|
475
|
+
*
|
|
476
|
+
* Uses relay if available, otherwise falls back to options callback.
|
|
477
|
+
* Called automatically by processIncomingEnvelope on retryable errors.
|
|
478
|
+
*
|
|
479
|
+
* @param envelope - The failed message envelope
|
|
480
|
+
* @param error - The decryption error
|
|
481
|
+
* @param options - Optional transport callbacks (for background without relay)
|
|
482
|
+
*/
|
|
483
|
+
private sendRetryRequestInternal;
|
|
484
|
+
/**
|
|
485
|
+
* Encrypt file blob with two-layer encryption
|
|
486
|
+
*
|
|
487
|
+
* Layer 1: Random symmetric key encrypts the file
|
|
488
|
+
* Layer 2: Signal Protocol encrypts the symmetric key
|
|
489
|
+
*
|
|
490
|
+
* This allows efficient storage of large files with Signal Protocol key rotation.
|
|
491
|
+
*
|
|
492
|
+
* @param remoteAddress - Remote device's protocol address
|
|
493
|
+
* @param fileBlob - File data to encrypt
|
|
494
|
+
* @param mimeType - Optional MIME type (defaults to fileBlob.type)
|
|
495
|
+
* @returns Encrypted blob, key ID, and encrypted key
|
|
496
|
+
*/
|
|
497
|
+
encryptFile(remoteAddress: ProtocolAddress, fileBlob: Blob, mimeType?: string): Promise<{
|
|
498
|
+
encryptedBlob: Blob;
|
|
499
|
+
keyId: string;
|
|
500
|
+
encryptedKey: Ciphertext;
|
|
501
|
+
}>;
|
|
502
|
+
/**
|
|
503
|
+
* Decrypt file blob
|
|
504
|
+
*
|
|
505
|
+
* @param remoteAddress - Remote device's protocol address
|
|
506
|
+
* @param encryptedBlob - Encrypted file data
|
|
507
|
+
* @param encryptedKey - Encrypted symmetric key
|
|
508
|
+
* @returns Decrypted file blob with correct MIME type
|
|
509
|
+
*/
|
|
510
|
+
decryptFile(remoteAddress: ProtocolAddress, encryptedBlob: Blob, encryptedKey: Ciphertext): Promise<Blob>;
|
|
511
|
+
/**
|
|
512
|
+
* Encrypt multiple files in batch
|
|
513
|
+
*
|
|
514
|
+
* More efficient than calling encryptFile() multiple times.
|
|
515
|
+
* Each file gets its own encryption key for granular access control.
|
|
516
|
+
*
|
|
517
|
+
* @param remoteAddress - Remote device's protocol address
|
|
518
|
+
* @param files - Array of file blobs with optional MIME types
|
|
519
|
+
* @returns Array of encrypted file results in the same order
|
|
520
|
+
*/
|
|
521
|
+
encryptFiles(remoteAddress: ProtocolAddress, files: Array<{
|
|
522
|
+
blob: Blob;
|
|
523
|
+
mimeType?: string;
|
|
524
|
+
}>): Promise<Array<{
|
|
525
|
+
encryptedBlob: Blob;
|
|
526
|
+
keyId: string;
|
|
527
|
+
encryptedKey: Ciphertext;
|
|
528
|
+
}>>;
|
|
529
|
+
/**
|
|
530
|
+
* Decrypt multiple files in batch
|
|
531
|
+
*
|
|
532
|
+
* More efficient than calling decryptFile() multiple times.
|
|
533
|
+
*
|
|
534
|
+
* @param remoteAddress - Remote device's protocol address
|
|
535
|
+
* @param files - Array of encrypted file data
|
|
536
|
+
* @returns Array of decrypted file blobs in the same order
|
|
537
|
+
*/
|
|
538
|
+
decryptFiles(remoteAddress: ProtocolAddress, files: Array<{
|
|
539
|
+
encryptedBlob: Blob;
|
|
540
|
+
encryptedKey: Ciphertext;
|
|
541
|
+
}>): Promise<Blob[]>;
|
|
542
|
+
/**
|
|
543
|
+
* Send encrypted content to a user or group
|
|
544
|
+
*
|
|
545
|
+
* This is the ONE way to send content. Handles:
|
|
546
|
+
* - DataMessageInput: Structured proto content (serialized to protobuf)
|
|
547
|
+
* - String content: Text or structured data (encoded to UTF-8 bytes)
|
|
548
|
+
* - Uint8Array: Pre-serialized binary content (passed through)
|
|
549
|
+
* - User recipients: Encrypts for all user's devices via SESAME
|
|
550
|
+
* - Group recipients: Uses Sender Keys for O(1) encryption
|
|
551
|
+
*
|
|
552
|
+
* All inputs are normalized to Uint8Array before reaching the cipher layer.
|
|
553
|
+
*
|
|
554
|
+
* @param recipientId - User ID or group ID (groups use Signal V2 prefix)
|
|
555
|
+
* @param content - DataMessageInput, string, or Uint8Array to encrypt and send
|
|
556
|
+
* @param options - Optional send options (isBinary for blob encryption, etc.)
|
|
557
|
+
* @returns SendResult with messageId, timestamp, and device count
|
|
558
|
+
*
|
|
559
|
+
* @example
|
|
560
|
+
* ```typescript
|
|
561
|
+
* import { createGroupId } from '@open-e2ee/signal-protocol-sdk';
|
|
562
|
+
*
|
|
563
|
+
* // Send text message
|
|
564
|
+
* await signal.send('bob', 'Hello!');
|
|
565
|
+
*
|
|
566
|
+
* // Send structured data
|
|
567
|
+
* await signal.send('bob', { body: 'Hello!', timestamp: Date.now() });
|
|
568
|
+
*
|
|
569
|
+
* // Send binary attachment (two-layer encryption)
|
|
570
|
+
* await signal.send('bob', photoBytes, { isBinary: true, mimeType: 'image/jpeg' });
|
|
571
|
+
*
|
|
572
|
+
* // Send to group (use createGroupId helper)
|
|
573
|
+
* await signal.send(createGroupId('abc123'), 'Hello everyone!');
|
|
574
|
+
* ```
|
|
575
|
+
*/
|
|
576
|
+
send(recipientId: string, content: DataMessageInput | string | Uint8Array, options?: SendOptions): Promise<SendResult>;
|
|
577
|
+
uploadAttachment(data: Uint8Array, options: SendOptions & {
|
|
578
|
+
mimeType: string;
|
|
579
|
+
}): Promise<import('./types.js').PreparedAttachmentUpload>;
|
|
580
|
+
downloadAttachment(attachment: MediaAttachmentPointer, options?: AttachmentTransferOptions): Promise<import('./types.js').DownloadedAttachment>;
|
|
581
|
+
deleteRemoteAttachment(attachment: MediaAttachmentPointer, options?: Pick<AttachmentTransferOptions, 'signal' | 'onProgress'>): Promise<void>;
|
|
582
|
+
/**
|
|
583
|
+
* Generate safety number for verifying identity with another user
|
|
584
|
+
*
|
|
585
|
+
* Safety numbers allow users to verify they're communicating with the
|
|
586
|
+
* intended person and detect man-in-the-middle attacks.
|
|
587
|
+
*
|
|
588
|
+
* @param userId - The user ID to generate safety number for
|
|
589
|
+
* @returns SafetyNumber with numeric code and fingerprint for QR
|
|
590
|
+
*
|
|
591
|
+
* @example
|
|
592
|
+
* ```typescript
|
|
593
|
+
* const safetyNum = await signal.verify('bob');
|
|
594
|
+
*
|
|
595
|
+
* // Show numeric code for phone/voice verification
|
|
596
|
+
* console.log(`Safety Number: ${safetyNum.numeric}`);
|
|
597
|
+
*
|
|
598
|
+
* // Generate QR code from fingerprint
|
|
599
|
+
* const qrCode = generateQR(safetyNum.fingerprint);
|
|
600
|
+
* ```
|
|
601
|
+
*/
|
|
602
|
+
verify(userId: string, identityType?: import('../keys/index.js').IdentityType): Promise<SafetyNumber>;
|
|
603
|
+
/** Confirm an authenticated comparison of the currently displayed tuple. */
|
|
604
|
+
confirmSafetyNumber(confirmation: import('./types.js').SafetyNumberConfirmation): Promise<void>;
|
|
605
|
+
/** Accept an authenticated composite-identity rotation and reset bound sessions. */
|
|
606
|
+
acceptIdentityRotation(userId: string, identity: import('../keys/index.js').CompositeIdentityV1, identityType?: import('../keys/index.js').IdentityType): Promise<import('../keys/index.js').ContactIdentityRecord>;
|
|
607
|
+
/**
|
|
608
|
+
* Mark a message as read/delivered
|
|
609
|
+
*
|
|
610
|
+
* Signals to the server that the message was successfully received
|
|
611
|
+
* and processed. Server may delete the message based on privacy settings.
|
|
612
|
+
*
|
|
613
|
+
* @param messageId - The message ID from SendResult
|
|
614
|
+
*
|
|
615
|
+
* @example
|
|
616
|
+
* ```typescript
|
|
617
|
+
* // After processing received message
|
|
618
|
+
* await signal.markAsRead(envelope.id);
|
|
619
|
+
* ```
|
|
620
|
+
*/
|
|
621
|
+
markAsRead(messageId: string): Promise<void>;
|
|
622
|
+
/**
|
|
623
|
+
* Register a hook callback after construction
|
|
624
|
+
*
|
|
625
|
+
* Enables dependency injection patterns where hooks are registered
|
|
626
|
+
* after SignalProtocolClient is created. This is used by ServicesProvider
|
|
627
|
+
* to wire up ContentManager's decryption hook.
|
|
628
|
+
*
|
|
629
|
+
* @param name - The hook name to register
|
|
630
|
+
* @param callback - The callback function to invoke
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* ```typescript
|
|
634
|
+
* // In ServicesProvider: wire up ContentManager after creation
|
|
635
|
+
* const signal = await SignalProtocolClient.create(userId, { storage, relay });
|
|
636
|
+
* const content = new ContentManager({ db, signal });
|
|
637
|
+
*
|
|
638
|
+
* signal.registerHook('onMessageDecrypted', content.getDecryptionHook());
|
|
639
|
+
* signal.startRelaySubscription(); // Now safe to start
|
|
640
|
+
* ```
|
|
641
|
+
*
|
|
642
|
+
* @see ISignalProtocolClient.registerHook
|
|
643
|
+
*/
|
|
644
|
+
registerHook<K extends keyof import('./event-hooks.js').SignalProtocolClientHooks>(name: K, callback: NonNullable<import('./event-hooks.js').SignalProtocolClientHooks[K]>): void;
|
|
645
|
+
/**
|
|
646
|
+
* Start relay subscription for automatic message decryption
|
|
647
|
+
*
|
|
648
|
+
* When configured with both `relay` and `onMessageDecrypted` hook, SignalProtocolClient will:
|
|
649
|
+
* 1. Subscribe to incoming envelopes from the relay
|
|
650
|
+
* 2. Decrypt messages appropriately (pairwise vs group/sender key)
|
|
651
|
+
* 3. Call onMessageDecrypted hook with DecryptedEnvelope (for ContentManager storage)
|
|
652
|
+
* 4. Mark messages as delivered on the relay
|
|
653
|
+
*
|
|
654
|
+
* This enables ContentManager to store decrypted content in an encrypted SQLite
|
|
655
|
+
* database without any knowledge of cryptography.
|
|
656
|
+
*
|
|
657
|
+
* Can be called manually after registering hooks via registerHook().
|
|
658
|
+
* Called automatically by create() when relay + hook configured.
|
|
659
|
+
*
|
|
660
|
+
* @see ISignalProtocolClient.startRelaySubscription
|
|
661
|
+
*/
|
|
662
|
+
startRelaySubscription(): void;
|
|
663
|
+
/**
|
|
664
|
+
* Stop the relay subscription
|
|
665
|
+
*
|
|
666
|
+
* Pauses message processing via the relay subscription without destroying
|
|
667
|
+
* SignalProtocolClient state. The subscription can be restarted with startRelaySubscription().
|
|
668
|
+
*
|
|
669
|
+
* Use this when the app backgrounds to let the background task handle messages.
|
|
670
|
+
* Resume when the app foregrounds for real-time message delivery.
|
|
671
|
+
*
|
|
672
|
+
* @see ISignalProtocolClient.stopRelaySubscription
|
|
673
|
+
*/
|
|
674
|
+
stopRelaySubscription(): void;
|
|
675
|
+
/**
|
|
676
|
+
* Start listening for retry requests from recipients (SESAME spec §6.2)
|
|
677
|
+
*
|
|
678
|
+
* When a recipient cannot decrypt a message, they send a retry request.
|
|
679
|
+
* This method subscribes to incoming retry requests and processes them
|
|
680
|
+
* by resending the original message with a new session.
|
|
681
|
+
*
|
|
682
|
+
* Automatically started if relay.subscribeRetryRequests is available.
|
|
683
|
+
* Can be called manually if you need to restart the subscription.
|
|
684
|
+
*/
|
|
685
|
+
startRetryRequestSubscription(): void;
|
|
686
|
+
/**
|
|
687
|
+
* Handle a retry request and resend the original message
|
|
688
|
+
*
|
|
689
|
+
* Per SESAME spec §4.1 (Resending Process):
|
|
690
|
+
* 1. Look up MessageRecord by sequence number
|
|
691
|
+
* 2. Validate retry limits and message TTL
|
|
692
|
+
* 3. Check session state:
|
|
693
|
+
* - If NO active session OR active session IS orphaned (matches MessageRecord.sessionStateId):
|
|
694
|
+
* → Fetch prekey bundle and create new session
|
|
695
|
+
* - If DIFFERENT active session exists:
|
|
696
|
+
* → Use it directly (no prekey fetch, prevents rate limit issues)
|
|
697
|
+
* 4. Re-encrypt and send the original message
|
|
698
|
+
*
|
|
699
|
+
* This prevents infinite retry loops where each retry creates a new session
|
|
700
|
+
* with different header keys.
|
|
701
|
+
*
|
|
702
|
+
* @param retryRequest - The retry request from the recipient
|
|
703
|
+
*/
|
|
704
|
+
private handleRetryRequestAndResend;
|
|
705
|
+
/**
|
|
706
|
+
* Send delivery receipt to original sender (all devices)
|
|
707
|
+
*
|
|
708
|
+
* Per Signal Protocol, after successfully decrypting a message, the recipient
|
|
709
|
+
* sends a delivery receipt back to the sender. The receipt identifies messages
|
|
710
|
+
* by their timestamps (not sequence numbers).
|
|
711
|
+
*
|
|
712
|
+
* Multi-device: fans out to all known devices for the sender.
|
|
713
|
+
*
|
|
714
|
+
* @param recipientUserId - The sender's user ID (we're receipting TO them)
|
|
715
|
+
* @param timestamps - Array of message timestamps that have been delivered
|
|
716
|
+
*
|
|
717
|
+
*/
|
|
718
|
+
private sendDeliveryReceipt;
|
|
719
|
+
/**
|
|
720
|
+
* Send read receipt to original message sender (all devices)
|
|
721
|
+
*
|
|
722
|
+
* Called when the user views messages in a conversation.
|
|
723
|
+
* Similar to delivery receipts but indicates message was actually read.
|
|
724
|
+
*
|
|
725
|
+
* Respects SDK privacy settings: if read receipts are disabled,
|
|
726
|
+
* this method returns early without sending.
|
|
727
|
+
*
|
|
728
|
+
* @param recipientUserId - Original sender's user ID
|
|
729
|
+
* @param timestamps - Server timestamps of messages that were read
|
|
730
|
+
*/
|
|
731
|
+
sendReadReceipt(recipientUserId: string, timestamps: number[]): Promise<void>;
|
|
732
|
+
/**
|
|
733
|
+
* Send viewed receipt to original message sender (all devices).
|
|
734
|
+
*
|
|
735
|
+
* Uses the same privacy gate as read receipts.
|
|
736
|
+
*/
|
|
737
|
+
sendViewedReceipt(recipientUserId: string, timestamps: number[]): Promise<void>;
|
|
738
|
+
/**
|
|
739
|
+
* Sync local read state to our other linked devices.
|
|
740
|
+
*
|
|
741
|
+
* Unlike read receipts, this is account-local multi-device state and should
|
|
742
|
+
* happen regardless of the user's remote read-receipt privacy preference.
|
|
743
|
+
*/
|
|
744
|
+
syncReadToLinkedDevices(entries: ReadSyncEntryInput[]): Promise<void>;
|
|
745
|
+
/**
|
|
746
|
+
* Sync a local view-once open event to our other linked devices.
|
|
747
|
+
*/
|
|
748
|
+
syncViewOnceOpenToLinkedDevices(entry: ViewOnceOpenSyncInput): Promise<void>;
|
|
749
|
+
/**
|
|
750
|
+
* Sync a local media attachment delete event to our other linked devices.
|
|
751
|
+
*/
|
|
752
|
+
syncMediaAttachmentDeleteToLinkedDevices(entry: MediaAttachmentDeleteSyncInput): Promise<void>;
|
|
753
|
+
/**
|
|
754
|
+
* Sync local account-level communication/privacy configuration to our other linked devices.
|
|
755
|
+
*/
|
|
756
|
+
syncConfigurationToLinkedDevices(configuration: import('./content-adapter.js').ConfigurationSyncInput): Promise<void>;
|
|
757
|
+
/**
|
|
758
|
+
* Sync local username and username-link state to the account's other linked devices.
|
|
759
|
+
*
|
|
760
|
+
* Linked devices converge on the same username-link handle and entropy
|
|
761
|
+
* without rotating it.
|
|
762
|
+
*/
|
|
763
|
+
syncUsernameStateToLinkedDevices(usernameState: import('./content-adapter.js').UsernameStateSyncInput): Promise<void>;
|
|
764
|
+
/**
|
|
765
|
+
* Sync learned recipient username metadata to the account's other linked devices.
|
|
766
|
+
*
|
|
767
|
+
* Remote usernames are transient metadata, but once one local device learns
|
|
768
|
+
* them they should converge across the account's linked devices.
|
|
769
|
+
*/
|
|
770
|
+
syncRecipientUsernameToLinkedDevices(recipientUsername: RecipientUsernameSyncInput): Promise<void>;
|
|
771
|
+
/**
|
|
772
|
+
* Sync local safety-number verification state to our other linked devices.
|
|
773
|
+
*
|
|
774
|
+
* Only explicit `verified` and cleared-to-`default` states are synced;
|
|
775
|
+
* key-conflict/untrusted state remains local and derived from identity-key
|
|
776
|
+
* changes.
|
|
777
|
+
*/
|
|
778
|
+
syncVerificationStateToLinkedDevices(verificationState: import('./content-adapter.js').VerificationStateSyncInput): Promise<void>;
|
|
779
|
+
/**
|
|
780
|
+
* Sync task-notification acknowledgment state to our other linked devices.
|
|
781
|
+
*
|
|
782
|
+
* This is account-local notification state: if one device dismisses or acts
|
|
783
|
+
* on a task reminder, the user's other devices should cancel their copies.
|
|
784
|
+
*/
|
|
785
|
+
syncTaskNotificationAckToLinkedDevices(input: Omit<import('./content-adapter.js').TaskNotificationAckSyncInput, 'acknowledgedOnDevice'>): Promise<void>;
|
|
786
|
+
/**
|
|
787
|
+
* Sync the current blocked-recipient snapshot to the account's other linked devices.
|
|
788
|
+
*
|
|
789
|
+
* The payload is a full snapshot, not a block/unblock delta.
|
|
790
|
+
*/
|
|
791
|
+
syncBlockedRecipientsToLinkedDevices(blocked: BlockedRecipientsSyncInput): Promise<void>;
|
|
792
|
+
/**
|
|
793
|
+
* Send typing indicator to conversation recipient
|
|
794
|
+
*
|
|
795
|
+
* Delegates to MessageOps.sendTypingIndicator for implementation.
|
|
796
|
+
*/
|
|
797
|
+
sendTypingIndicator(recipientUserId: string, recipientDeviceId: number, conversationId: string, action: TypingAction, groupId?: string): Promise<void>;
|
|
798
|
+
/**
|
|
799
|
+
* Internal method to send receipt (delivery or read)
|
|
800
|
+
*
|
|
801
|
+
* Delegates to MessageOps.sendReceipt for implementation.
|
|
802
|
+
*/
|
|
803
|
+
private sendReceipt;
|
|
804
|
+
/**
|
|
805
|
+
* Handle incoming delivery/read receipt and clean up MessageRecords
|
|
806
|
+
*
|
|
807
|
+
* Delegates to MessageOps.handleDeliveryReceipt for implementation.
|
|
808
|
+
*/
|
|
809
|
+
private handleDeliveryReceipt;
|
|
810
|
+
/**
|
|
811
|
+
* Handle incoming typing indicator
|
|
812
|
+
*
|
|
813
|
+
* Delegates to MessageOps.handleTypingIndicator for implementation.
|
|
814
|
+
*/
|
|
815
|
+
private handleTypingIndicator;
|
|
816
|
+
/**
|
|
817
|
+
* Stop the Signal Protocol client and clean up resources
|
|
818
|
+
*
|
|
819
|
+
* Call this when the user logs out or the app is being destroyed.
|
|
820
|
+
* Unsubscribes from relay server and cleans up any pending operations.
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* ```typescript
|
|
824
|
+
* // On logout
|
|
825
|
+
* await signal.stop();
|
|
826
|
+
* ```
|
|
827
|
+
*/
|
|
828
|
+
stop(): Promise<void>;
|
|
829
|
+
/**
|
|
830
|
+
* Receive and decrypt message from another device (multi-device support)
|
|
831
|
+
*
|
|
832
|
+
* Implements session convergence per SESAME spec.
|
|
833
|
+
*
|
|
834
|
+
* @param message - The encrypted Sesame message envelope
|
|
835
|
+
* @returns Decrypted plaintext
|
|
836
|
+
*/
|
|
837
|
+
receive(message: SesameMessage): Promise<string>;
|
|
838
|
+
/**
|
|
839
|
+
* Get Sesame session statistics (for debugging)
|
|
840
|
+
*
|
|
841
|
+
* Returns information about users, devices, and sessions.
|
|
842
|
+
*
|
|
843
|
+
* @returns Session statistics
|
|
844
|
+
*/
|
|
845
|
+
getSesameStats(): Promise<SesameStats>;
|
|
846
|
+
/**
|
|
847
|
+
* Cleanup expired Sesame sessions
|
|
848
|
+
*
|
|
849
|
+
* Removes inactive sessions that are older than the configured TTL.
|
|
850
|
+
* Should be called periodically (e.g., daily) to prevent database bloat.
|
|
851
|
+
*
|
|
852
|
+
* @returns Number of sessions cleaned up
|
|
853
|
+
*/
|
|
854
|
+
cleanupExpiredSesameSessions(): Promise<number>;
|
|
855
|
+
/**
|
|
856
|
+
* Run periodic cleanup of internal tracking state.
|
|
857
|
+
*
|
|
858
|
+
* Safe to call frequently - internally throttled to avoid overhead.
|
|
859
|
+
* Recommended call sites:
|
|
860
|
+
* - App foreground transition
|
|
861
|
+
* - After successful message batch processing
|
|
862
|
+
* - Periodically during long sessions
|
|
863
|
+
*
|
|
864
|
+
* Cleans up:
|
|
865
|
+
* - Expired retry dedup entries (recentRetryRequests)
|
|
866
|
+
*
|
|
867
|
+
* @returns Number of entries cleaned up
|
|
868
|
+
*/
|
|
869
|
+
runPeriodicCleanup(): number;
|
|
870
|
+
/**
|
|
871
|
+
* Rotate EC signed prekey
|
|
872
|
+
*
|
|
873
|
+
* Should be called weekly to maintain forward secrecy.
|
|
874
|
+
* Generates a new EC signed prekey and uploads it to the relay if configured.
|
|
875
|
+
*
|
|
876
|
+
* @returns True if rotation was performed, false if not needed yet
|
|
877
|
+
*/
|
|
878
|
+
rotateEcSignedPreKey(): Promise<boolean>;
|
|
879
|
+
/**
|
|
880
|
+
* Rotate the post-quantum KEM last-resort prekey.
|
|
881
|
+
*
|
|
882
|
+
* Should be called weekly alongside signed prekey rotation.
|
|
883
|
+
* Generates fresh ML-KEM/Kyber-compatible key material and uploads it to the
|
|
884
|
+
* relay if configured.
|
|
885
|
+
*
|
|
886
|
+
* @returns True if rotation was performed, false if not needed yet
|
|
887
|
+
*/
|
|
888
|
+
rotateKyberPreKey(): Promise<boolean>;
|
|
889
|
+
/**
|
|
890
|
+
* Create a new sender key for group messaging
|
|
891
|
+
*
|
|
892
|
+
* Call this when joining a group or when key rotation is needed.
|
|
893
|
+
* Distribute the returned message to all group members via pairwise sessions.
|
|
894
|
+
*
|
|
895
|
+
* @param groupId - Unique identifier for the group
|
|
896
|
+
* @returns Distribution message to share with group members
|
|
897
|
+
*
|
|
898
|
+
* @example
|
|
899
|
+
* ```typescript
|
|
900
|
+
* // Create sender key when joining a group
|
|
901
|
+
* const { distributionMessage } = await signal.createGroupSenderKey('group-123');
|
|
902
|
+
*
|
|
903
|
+
* // Distribute to all members via pairwise encryption
|
|
904
|
+
* for (const member of groupMembers) {
|
|
905
|
+
* const encrypted = await signal.encryptMessage(member.address, JSON.stringify(distributionMessage));
|
|
906
|
+
* await sendToMember(member, encrypted);
|
|
907
|
+
* }
|
|
908
|
+
* ```
|
|
909
|
+
*/
|
|
910
|
+
createGroupSenderKey(groupId: string): Promise<{
|
|
911
|
+
senderKeyId: string;
|
|
912
|
+
distributionMessage: SenderKeyDistributionMessage;
|
|
913
|
+
}>;
|
|
914
|
+
/**
|
|
915
|
+
* Process a sender key distribution message from another group member
|
|
916
|
+
*
|
|
917
|
+
* Call this when receiving a sender key distribution message from a group member.
|
|
918
|
+
* After processing, you can decrypt messages from that member.
|
|
919
|
+
*
|
|
920
|
+
* @param groupId - Group identifier
|
|
921
|
+
* @param senderId - Sender's user ID
|
|
922
|
+
* @param senderDeviceId - Sender's device ID
|
|
923
|
+
* @param message - Distribution message containing the sender key
|
|
924
|
+
*
|
|
925
|
+
* @example
|
|
926
|
+
* ```typescript
|
|
927
|
+
* // Receive and process distribution message
|
|
928
|
+
* const distributionMessage = JSON.parse(decryptedContent);
|
|
929
|
+
* await signal.processGroupSenderKeyDistribution(
|
|
930
|
+
* 'group-123',
|
|
931
|
+
* senderId,
|
|
932
|
+
* senderDeviceId,
|
|
933
|
+
* distributionMessage
|
|
934
|
+
* );
|
|
935
|
+
* ```
|
|
936
|
+
*/
|
|
937
|
+
processGroupSenderKeyDistribution(groupId: string, senderId: string, senderDeviceId: number, message: SenderKeyDistributionMessage): Promise<void>;
|
|
938
|
+
/**
|
|
939
|
+
* Encrypt a message for group using sender key (O(1) encryption)
|
|
940
|
+
*
|
|
941
|
+
* After creating your sender key and distributing it to members,
|
|
942
|
+
* use this to encrypt messages. All group members can decrypt
|
|
943
|
+
* the same ciphertext, making it efficient for large groups.
|
|
944
|
+
*
|
|
945
|
+
* @param groupId - Group identifier
|
|
946
|
+
* @param plaintext - Message to encrypt
|
|
947
|
+
* @returns Framed SenderKeyMessage bytes
|
|
948
|
+
*
|
|
949
|
+
* @example
|
|
950
|
+
* ```typescript
|
|
951
|
+
* // Encrypt once, send to all members
|
|
952
|
+
* const encrypted = await signal.encryptGroupMessage('group-123', 'Hello everyone!');
|
|
953
|
+
*
|
|
954
|
+
* // Broadcast same ciphertext to all members
|
|
955
|
+
* for (const member of groupMembers) {
|
|
956
|
+
* await sendToMember(member, encrypted);
|
|
957
|
+
* }
|
|
958
|
+
* ```
|
|
959
|
+
*/
|
|
960
|
+
encryptGroupMessage(groupId: string, plaintext: string): Promise<Uint8Array>;
|
|
961
|
+
/**
|
|
962
|
+
* Decrypt a group message from a sender
|
|
963
|
+
*
|
|
964
|
+
* Use this to decrypt messages from other group members.
|
|
965
|
+
* You must have processed the sender's distribution message first.
|
|
966
|
+
*
|
|
967
|
+
* @param groupId - Group identifier
|
|
968
|
+
* @param senderId - Sender's user ID
|
|
969
|
+
* @param senderDeviceId - Sender's device ID
|
|
970
|
+
* @param framedMessage - Framed SenderKeyMessage bytes
|
|
971
|
+
* @returns Decrypted plaintext
|
|
972
|
+
*
|
|
973
|
+
* @example
|
|
974
|
+
* ```typescript
|
|
975
|
+
* const plaintext = await signal.decryptGroupMessage(
|
|
976
|
+
* 'group-123',
|
|
977
|
+
* senderId,
|
|
978
|
+
* senderDeviceId,
|
|
979
|
+
* encryptedMessage
|
|
980
|
+
* );
|
|
981
|
+
* console.log('Message:', plaintext);
|
|
982
|
+
* ```
|
|
983
|
+
*/
|
|
984
|
+
decryptGroupMessage(groupId: string, senderId: string, senderDeviceId: number, framedMessage: Uint8Array): Promise<string>;
|
|
985
|
+
/**
|
|
986
|
+
* Rotate sender key for a group (forward secrecy on membership changes).
|
|
987
|
+
*
|
|
988
|
+
* ## When to Call
|
|
989
|
+
*
|
|
990
|
+
* Per Signal Protocol specification, rotate sender keys on **membership changes**:
|
|
991
|
+
*
|
|
992
|
+
* | Event | Action |
|
|
993
|
+
* |-------|--------|
|
|
994
|
+
* | Member REMOVED | **ALL members** must rotate (forward secrecy) |
|
|
995
|
+
* | Member ADDED | Distribute current key to new member (no rotation needed) |
|
|
996
|
+
* | Group metadata changed | Rotate recommended |
|
|
997
|
+
*
|
|
998
|
+
* **Important**: Signal does NOT use periodic or message-count-based rotation.
|
|
999
|
+
* Only rotate when membership changes to maintain forward secrecy.
|
|
1000
|
+
*
|
|
1001
|
+
* ## Why Rotate on Member Removal?
|
|
1002
|
+
*
|
|
1003
|
+
* When a member is removed, they still have the old sender key and could decrypt
|
|
1004
|
+
* future messages if the key isn't rotated. ALL remaining members must generate
|
|
1005
|
+
* new sender keys to prevent the removed member from reading future messages.
|
|
1006
|
+
*
|
|
1007
|
+
* @param groupId - Group identifier
|
|
1008
|
+
* @returns New distribution message to share with remaining members
|
|
1009
|
+
*
|
|
1010
|
+
* @example
|
|
1011
|
+
* ```typescript
|
|
1012
|
+
* // When removing a member from a group
|
|
1013
|
+
* async function onMemberRemoved(groupId: string, remainingMembers: Member[]) {
|
|
1014
|
+
* // Rotate our sender key (forward secrecy)
|
|
1015
|
+
* const { distributionMessage } = await signal.rotateGroupSenderKey(groupId);
|
|
1016
|
+
*
|
|
1017
|
+
* // Distribute new key to remaining members via pairwise encryption
|
|
1018
|
+
* for (const member of remainingMembers) {
|
|
1019
|
+
* const encrypted = await signal.encryptMessage(
|
|
1020
|
+
* member.address,
|
|
1021
|
+
* JSON.stringify(distributionMessage)
|
|
1022
|
+
* );
|
|
1023
|
+
* await sendToMember(member, encrypted);
|
|
1024
|
+
* }
|
|
1025
|
+
* }
|
|
1026
|
+
*
|
|
1027
|
+
* // When adding a member - no rotation needed, just distribute current key
|
|
1028
|
+
* async function onMemberAdded(groupId: string, newMember: Member) {
|
|
1029
|
+
* const { distributionMessage } = await signal.createGroupSenderKey(groupId);
|
|
1030
|
+
* // Or get existing: signal.getGroupSenderKeyDistribution(groupId)
|
|
1031
|
+
* const encrypted = await signal.encryptMessage(
|
|
1032
|
+
* newMember.address,
|
|
1033
|
+
* JSON.stringify(distributionMessage)
|
|
1034
|
+
* );
|
|
1035
|
+
* await sendToMember(newMember, encrypted);
|
|
1036
|
+
* }
|
|
1037
|
+
* ```
|
|
1038
|
+
*
|
|
1039
|
+
* @see handleGroupMembershipChange - Helper method for common membership patterns
|
|
1040
|
+
*/
|
|
1041
|
+
rotateGroupSenderKey(groupId: string): Promise<{
|
|
1042
|
+
senderKeyId: string;
|
|
1043
|
+
distributionMessage: SenderKeyDistributionMessage;
|
|
1044
|
+
}>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Delete sender key when leaving a group
|
|
1047
|
+
*
|
|
1048
|
+
* @param groupId - Group identifier
|
|
1049
|
+
*/
|
|
1050
|
+
deleteGroupSenderKey(groupId: string): Promise<void>;
|
|
1051
|
+
/**
|
|
1052
|
+
* Check if we have a sender key for a group
|
|
1053
|
+
*
|
|
1054
|
+
* @param groupId - Group identifier
|
|
1055
|
+
* @returns True if sender key exists for this device
|
|
1056
|
+
*/
|
|
1057
|
+
hasGroupSenderKey(groupId: string): Promise<boolean>;
|
|
1058
|
+
/**
|
|
1059
|
+
* Get the current sender key distribution message for a group
|
|
1060
|
+
*
|
|
1061
|
+
* If no sender key exists, returns null. Use createGroupSenderKey() first.
|
|
1062
|
+
*
|
|
1063
|
+
* @param groupId - Group identifier
|
|
1064
|
+
* @returns Distribution message or null if no key exists
|
|
1065
|
+
*/
|
|
1066
|
+
getGroupSenderKeyDistribution(groupId: string): Promise<SenderKeyDistributionMessage | null>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Distribute sender key to a specific user via pairwise encryption.
|
|
1069
|
+
*
|
|
1070
|
+
* Distribution messages are transmitted through authenticated, encrypted
|
|
1071
|
+
* pairwise channels.
|
|
1072
|
+
*
|
|
1073
|
+
* This method:
|
|
1074
|
+
* 1. Gets or creates sender key for this group
|
|
1075
|
+
* 2. Encrypts the distribution message using pairwise Signal Protocol
|
|
1076
|
+
* 3. Sends via SESAME to all of the recipient's devices
|
|
1077
|
+
*
|
|
1078
|
+
* @param groupId - Group identifier
|
|
1079
|
+
* @param recipientUserId - Recipient user ID to distribute key to
|
|
1080
|
+
*
|
|
1081
|
+
* @example
|
|
1082
|
+
* ```typescript
|
|
1083
|
+
* // Distribute key to a specific user
|
|
1084
|
+
* await signal.distributeSenderKeyToUser('group-123', 'bob');
|
|
1085
|
+
* ```
|
|
1086
|
+
*/
|
|
1087
|
+
distributeSenderKeyToUser(groupId: string, recipientUserId: string): Promise<void>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Distribute sender key to all group members.
|
|
1090
|
+
*
|
|
1091
|
+
* Called after group creation or after key rotation.
|
|
1092
|
+
* Skips self and sends to all other members via pairwise encryption.
|
|
1093
|
+
*
|
|
1094
|
+
* @param groupId - Group identifier
|
|
1095
|
+
* @param memberUserIds - Array of all member user IDs
|
|
1096
|
+
*
|
|
1097
|
+
* @example
|
|
1098
|
+
* ```typescript
|
|
1099
|
+
* // After creating a group
|
|
1100
|
+
* const memberIds = ['alice', 'bob', 'charlie'];
|
|
1101
|
+
* await signal.distributeGroupSenderKey('group-123', memberIds);
|
|
1102
|
+
* ```
|
|
1103
|
+
*/
|
|
1104
|
+
distributeGroupSenderKey(groupId: string, memberUserIds: string[]): Promise<void>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Clean up expired message keys for a session
|
|
1107
|
+
*
|
|
1108
|
+
* Signal Protocol Section 8.4 recommends deleting message keys older than
|
|
1109
|
+
* one week to avoid excessive storage. This method explicitly triggers cleanup.
|
|
1110
|
+
*
|
|
1111
|
+
* Note: Cleanup also happens automatically during encrypt/decrypt operations.
|
|
1112
|
+
*
|
|
1113
|
+
* @param remoteAddress - Remote party's protocol address (userId:deviceId)
|
|
1114
|
+
* @returns true if cleanup succeeded, false otherwise
|
|
1115
|
+
*/
|
|
1116
|
+
cleanupExpiredKeys(remoteAddress: ProtocolAddress): Promise<boolean>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Get encryption statistics
|
|
1119
|
+
*
|
|
1120
|
+
* @returns Statistics about sessions, keys, and usage
|
|
1121
|
+
*/
|
|
1122
|
+
getStats(): Promise<{
|
|
1123
|
+
hasIdentityKey: boolean;
|
|
1124
|
+
sessionCount: number;
|
|
1125
|
+
oneTimePreKeysCount: number;
|
|
1126
|
+
}>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Get health status for encryption sessions with a specific user.
|
|
1129
|
+
*
|
|
1130
|
+
* Delegates to SessionOps.getSessionHealth for implementation.
|
|
1131
|
+
*/
|
|
1132
|
+
getSessionHealth(userId: string): Promise<import('./types.js').SessionHealthResult>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Check prekey status and trigger warning if running low
|
|
1135
|
+
*
|
|
1136
|
+
* Returns the current prekey count and whether replenishment is needed.
|
|
1137
|
+
* If configured with `onPreKeyLow` callback, it will be called when
|
|
1138
|
+
* the count drops below the threshold.
|
|
1139
|
+
*
|
|
1140
|
+
* @returns Prekey status with remaining count and replenishment flag
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* ```typescript
|
|
1144
|
+
* const status = await signal.checkPreKeyStatus();
|
|
1145
|
+
* if (status.needsReplenishment) {
|
|
1146
|
+
* // Generate and upload more prekeys
|
|
1147
|
+
* await backend.replenishPrekeys(userId);
|
|
1148
|
+
* }
|
|
1149
|
+
* ```
|
|
1150
|
+
*/
|
|
1151
|
+
checkPreKeyStatus(): Promise<PreKeyOps.PreKeyStatusResult>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Clear all encryption data
|
|
1154
|
+
*
|
|
1155
|
+
* WARNING: This permanently deletes all keys and sessions.
|
|
1156
|
+
* Use only for local development or when resetting the app.
|
|
1157
|
+
*/
|
|
1158
|
+
clearAllData(): Promise<void>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Get statistics for a group sender key.
|
|
1161
|
+
*
|
|
1162
|
+
* Useful for debugging and monitoring group messaging health.
|
|
1163
|
+
*
|
|
1164
|
+
* @param groupId - Group identifier
|
|
1165
|
+
* @param senderId - Sender user identifier
|
|
1166
|
+
* @param senderDeviceId - Sender device identifier
|
|
1167
|
+
* @returns Stats including chain position, generation, and skipped keys count
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```typescript
|
|
1171
|
+
* const stats = await signal.getGroupSenderKeyStats('group-123', 'alice', 1);
|
|
1172
|
+
* console.log(`Chain at ${stats.chainIndex}, gen ${stats.generation}`);
|
|
1173
|
+
* console.log(`${stats.skippedKeysCount} skipped keys stored`);
|
|
1174
|
+
* ```
|
|
1175
|
+
*/
|
|
1176
|
+
getGroupSenderKeyStats(groupId: string, senderId: string, senderDeviceId: number): Promise<{
|
|
1177
|
+
chainIndex: number;
|
|
1178
|
+
generation: number;
|
|
1179
|
+
skippedKeysCount: number;
|
|
1180
|
+
}>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Handle group membership change with appropriate sender key actions.
|
|
1183
|
+
*
|
|
1184
|
+
* This convenience method applies the sender-key lifecycle for membership
|
|
1185
|
+
* changes:
|
|
1186
|
+
* - Member removed: Rotate sender key (forward secrecy)
|
|
1187
|
+
* - Member added: No rotation needed (just distribute current key)
|
|
1188
|
+
* - Metadata changed: Rotate recommended
|
|
1189
|
+
*
|
|
1190
|
+
* @param groupId - Group identifier
|
|
1191
|
+
* @param change - Type of membership change
|
|
1192
|
+
* @returns Distribution message if rotation occurred, for sending to members
|
|
1193
|
+
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* ```typescript
|
|
1196
|
+
* // When a member is removed
|
|
1197
|
+
* const result = await signal.handleGroupMembershipChange(
|
|
1198
|
+
* 'group-123',
|
|
1199
|
+
* 'member_removed'
|
|
1200
|
+
* );
|
|
1201
|
+
*
|
|
1202
|
+
* if (result.rotated) {
|
|
1203
|
+
* // Distribute new key to remaining members
|
|
1204
|
+
* for (const member of remainingMembers) {
|
|
1205
|
+
* const encrypted = await signal.encryptMessage(
|
|
1206
|
+
* member.address,
|
|
1207
|
+
* JSON.stringify(result.distributionMessage)
|
|
1208
|
+
* );
|
|
1209
|
+
* await sendToMember(member, encrypted);
|
|
1210
|
+
* }
|
|
1211
|
+
* }
|
|
1212
|
+
* ```
|
|
1213
|
+
*/
|
|
1214
|
+
handleGroupMembershipChange(groupId: string, change: 'member_added' | 'member_removed' | 'metadata_changed'): Promise<{
|
|
1215
|
+
rotated: boolean;
|
|
1216
|
+
distributionMessage?: SenderKeyDistributionMessage;
|
|
1217
|
+
}>;
|
|
1218
|
+
/**
|
|
1219
|
+
* Create a new GroupsV2 group.
|
|
1220
|
+
*/
|
|
1221
|
+
createGroupV2(creatorAci: Uint8Array, creatorProfileKey: Uint8Array, members: Array<{
|
|
1222
|
+
aciBytes: Uint8Array;
|
|
1223
|
+
profileKey: Uint8Array;
|
|
1224
|
+
}>, title: string, options?: {
|
|
1225
|
+
description?: string;
|
|
1226
|
+
accessControl?: Partial<AccessControl>;
|
|
1227
|
+
avatarUrl?: string;
|
|
1228
|
+
disappearingMessagesDuration?: number;
|
|
1229
|
+
}): Promise<{
|
|
1230
|
+
groupId: GroupId;
|
|
1231
|
+
masterKey: Uint8Array;
|
|
1232
|
+
}>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Get decrypted group state (from cache or server).
|
|
1235
|
+
*/
|
|
1236
|
+
getGroupStateV2(groupId: GroupId): Promise<DecryptedGroup>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Sync group state from server.
|
|
1239
|
+
*/
|
|
1240
|
+
syncGroupV2(groupId: GroupId): Promise<DecryptedGroup>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Add a member to a GroupsV2 group.
|
|
1243
|
+
*/
|
|
1244
|
+
addGroupMemberV2(groupId: GroupId, editorAci: Uint8Array, newMemberAci: Uint8Array, newMemberProfileKey: Uint8Array): Promise<void>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Remove a member from a GroupsV2 group. Triggers sender key rotation.
|
|
1247
|
+
*/
|
|
1248
|
+
removeGroupMemberV2(groupId: GroupId, editorAci: Uint8Array, targetAci: Uint8Array): Promise<void>;
|
|
1249
|
+
/**
|
|
1250
|
+
* Leave a GroupsV2 group.
|
|
1251
|
+
*/
|
|
1252
|
+
leaveGroupV2(groupId: GroupId, userAci: Uint8Array): Promise<void>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Update GroupsV2 group title.
|
|
1255
|
+
*/
|
|
1256
|
+
updateGroupTitleV2(groupId: GroupId, editorAci: Uint8Array, title: string): Promise<void>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Update GroupsV2 group description.
|
|
1259
|
+
*/
|
|
1260
|
+
updateGroupDescriptionV2(groupId: GroupId, editorAci: Uint8Array, description: string): Promise<void>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Update GroupsV2 group access control.
|
|
1263
|
+
*/
|
|
1264
|
+
updateGroupAccessControlV2(groupId: GroupId, editorAci: Uint8Array, updates: Partial<AccessControl>): Promise<void>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Create an invite link for a GroupsV2 group.
|
|
1267
|
+
*/
|
|
1268
|
+
createGroupInviteLinkV2(groupId: GroupId, editorAci: Uint8Array): Promise<string>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Join a GroupsV2 group via invite link.
|
|
1271
|
+
*/
|
|
1272
|
+
joinGroupViaInviteLinkV2(url: string, userAci: Uint8Array, userProfileKey: Uint8Array): Promise<{
|
|
1273
|
+
groupId: GroupId;
|
|
1274
|
+
status: 'joined' | 'pending_approval';
|
|
1275
|
+
}>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Sanitize config for logging (remove sensitive data)
|
|
1278
|
+
*/
|
|
1279
|
+
private sanitizeConfig;
|
|
1280
|
+
}
|
|
1281
|
+
//# sourceMappingURL=client.d.ts.map
|