@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,937 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error type definitions for Signal Protocol
|
|
3
|
+
*
|
|
4
|
+
* Implements a tiered error system aligned with the layered architecture:
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* Layer Error Class Use Case
|
|
8
|
+
* ──────────────────────────────────────────────────────
|
|
9
|
+
* Layer 1 CryptoError Low-level crypto failures
|
|
10
|
+
* Layer 5 SessionError Session operations
|
|
11
|
+
* Layer 6 ProtocolError Protocol-level errors
|
|
12
|
+
* Client ClientError User-facing errors
|
|
13
|
+
* Base EncryptionError Generic encryption errors
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Error Hierarchy:
|
|
17
|
+
* ```
|
|
18
|
+
* Error
|
|
19
|
+
* └── EncryptionError (base for all Signal errors)
|
|
20
|
+
* ├── CryptoError (Layer 1)
|
|
21
|
+
* ├── SessionError (Layer 5)
|
|
22
|
+
* ├── ProtocolError (Layer 6)
|
|
23
|
+
* ├── ClientError (User-facing)
|
|
24
|
+
* └── Specialized errors (UntrustedIdentityError, etc.)
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Base encryption error class.
|
|
30
|
+
*
|
|
31
|
+
* Enhanced with context support for better error handling and debugging.
|
|
32
|
+
* Provides error patterns.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* throw new EncryptionError(
|
|
37
|
+
* 'Session not found',
|
|
38
|
+
* EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
39
|
+
* { address, operation: 'encryptMessage' }
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export class EncryptionError extends Error {
|
|
44
|
+
code;
|
|
45
|
+
context;
|
|
46
|
+
constructor(message, code, context) {
|
|
47
|
+
super(message);
|
|
48
|
+
this.code = code;
|
|
49
|
+
this.context = context;
|
|
50
|
+
this.name = 'EncryptionError';
|
|
51
|
+
// Maintain Error's stack trace for debugging
|
|
52
|
+
if (Error.captureStackTrace) {
|
|
53
|
+
Error.captureStackTrace(this, EncryptionError);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Get the protocol address from context if available */
|
|
57
|
+
get address() {
|
|
58
|
+
return this.context?.address;
|
|
59
|
+
}
|
|
60
|
+
/** Get the operation from context if available */
|
|
61
|
+
get operation() {
|
|
62
|
+
return this.context?.operation;
|
|
63
|
+
}
|
|
64
|
+
/** Get the underlying error from context if available */
|
|
65
|
+
get originalError() {
|
|
66
|
+
return this.context?.originalError;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Stable encryption error codes for programmatic handling.
|
|
71
|
+
*
|
|
72
|
+
* Organized by category for better error handling and user messaging.
|
|
73
|
+
* Provides extensive error code set.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
export var EncryptionErrorCode;
|
|
77
|
+
(function (EncryptionErrorCode) {
|
|
78
|
+
// ===== Session Errors =====
|
|
79
|
+
/** Session not found for the given address */
|
|
80
|
+
EncryptionErrorCode["SESSION_NOT_FOUND"] = "SESSION_NOT_FOUND";
|
|
81
|
+
/** Session data is corrupted or invalid */
|
|
82
|
+
EncryptionErrorCode["SESSION_CORRUPTED"] = "SESSION_CORRUPTED";
|
|
83
|
+
/**
|
|
84
|
+
* Multiple active sessions detected (race condition).
|
|
85
|
+
*
|
|
86
|
+
* Occurs when both parties try to establish sessions simultaneously.
|
|
87
|
+
* Requires session archiving and convergence.
|
|
88
|
+
*/
|
|
89
|
+
EncryptionErrorCode["SESSION_CONFLICT"] = "SESSION_CONFLICT";
|
|
90
|
+
/**
|
|
91
|
+
* Recipient has not registered encryption keys.
|
|
92
|
+
*
|
|
93
|
+
* The target user has no prekey bundle available on the server.
|
|
94
|
+
* They may not have completed encryption setup.
|
|
95
|
+
*/
|
|
96
|
+
EncryptionErrorCode["RECIPIENT_NOT_REGISTERED"] = "RECIPIENT_NOT_REGISTERED";
|
|
97
|
+
/**
|
|
98
|
+
* Rate limited - too many prekey bundle fetches.
|
|
99
|
+
*
|
|
100
|
+
* Server enforces rate limits to prevent prekey drainage attacks.
|
|
101
|
+
*/
|
|
102
|
+
EncryptionErrorCode["PREKEY_FETCH_RATE_LIMITED"] = "PREKEY_FETCH_RATE_LIMITED";
|
|
103
|
+
/**
|
|
104
|
+
* Session establishment failed after retries.
|
|
105
|
+
*
|
|
106
|
+
* Could not establish a session with the recipient after
|
|
107
|
+
* multiple attempts. May indicate network issues.
|
|
108
|
+
*/
|
|
109
|
+
EncryptionErrorCode["SESSION_ESTABLISHMENT_FAILED"] = "SESSION_ESTABLISHMENT_FAILED";
|
|
110
|
+
// ===== Message Errors =====
|
|
111
|
+
/** Message ciphertext is invalid or malformed */
|
|
112
|
+
EncryptionErrorCode["INVALID_CIPHERTEXT"] = "INVALID_CIPHERTEXT";
|
|
113
|
+
/** Message decryption failed */
|
|
114
|
+
EncryptionErrorCode["DECRYPTION_FAILED"] = "DECRYPTION_FAILED";
|
|
115
|
+
/** Message encryption failed */
|
|
116
|
+
EncryptionErrorCode["ENCRYPTION_FAILED"] = "ENCRYPTION_FAILED";
|
|
117
|
+
/**
|
|
118
|
+
* Duplicate message detected (replay attack).
|
|
119
|
+
*
|
|
120
|
+
* Message number has already been processed.
|
|
121
|
+
*/
|
|
122
|
+
EncryptionErrorCode["MESSAGE_DUPLICATE"] = "MESSAGE_DUPLICATE";
|
|
123
|
+
/**
|
|
124
|
+
* Message arrived too old to decrypt.
|
|
125
|
+
*
|
|
126
|
+
* Message keys have been deleted due to age or count limits.
|
|
127
|
+
*/
|
|
128
|
+
EncryptionErrorCode["MESSAGE_TOO_OLD"] = "MESSAGE_TOO_OLD";
|
|
129
|
+
/**
|
|
130
|
+
* Too many messages skipped (DoS protection).
|
|
131
|
+
*
|
|
132
|
+
* Prevents attackers from forcing storage of excessive message keys.
|
|
133
|
+
* Signal Protocol Section 8.4 recommends limiting skipped messages.
|
|
134
|
+
*/
|
|
135
|
+
EncryptionErrorCode["TOO_MANY_SKIPPED_MESSAGES"] = "TOO_MANY_SKIPPED_MESSAGES";
|
|
136
|
+
/**
|
|
137
|
+
* Replay attack detected: envelope.timestamp doesn't match dataMessage.timestamp.
|
|
138
|
+
*
|
|
139
|
+
* After decryption, the envelope timestamp must match the timestamp inside the encrypted
|
|
140
|
+
* content. A mismatch indicates an attacker may have re-sent old encrypted content
|
|
141
|
+
* with manipulated envelope metadata.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
EncryptionErrorCode["REPLAY_DETECTED"] = "REPLAY_DETECTED";
|
|
145
|
+
/**
|
|
146
|
+
* Invalid message version or protocol mismatch.
|
|
147
|
+
*
|
|
148
|
+
* Message was encrypted with an incompatible protocol version.
|
|
149
|
+
*/
|
|
150
|
+
EncryptionErrorCode["INVALID_MESSAGE_VERSION"] = "INVALID_MESSAGE_VERSION";
|
|
151
|
+
/**
|
|
152
|
+
* Sender key has expired based on time-based rotation policy.
|
|
153
|
+
*
|
|
154
|
+
* The default policy rotates sender keys every two weeks.
|
|
155
|
+
* The caller should auto-rotate the sender key and redistribute to group members.
|
|
156
|
+
*/
|
|
157
|
+
EncryptionErrorCode["SENDER_KEY_EXPIRED"] = "SENDER_KEY_EXPIRED";
|
|
158
|
+
// ===== Identity & Trust Errors =====
|
|
159
|
+
/**
|
|
160
|
+
* Identity key is not trusted.
|
|
161
|
+
*
|
|
162
|
+
* User has not verified the identity or it has changed without confirmation.
|
|
163
|
+
*/
|
|
164
|
+
EncryptionErrorCode["UNTRUSTED_IDENTITY"] = "UNTRUSTED_IDENTITY";
|
|
165
|
+
/**
|
|
166
|
+
* Identity key changed (possible MITM attack).
|
|
167
|
+
*
|
|
168
|
+
* Remote party's identity key differs from previously saved value.
|
|
169
|
+
* Could be legitimate (reinstall) or an attack.
|
|
170
|
+
*/
|
|
171
|
+
EncryptionErrorCode["IDENTITY_KEY_CHANGED"] = "IDENTITY_KEY_CHANGED";
|
|
172
|
+
/**
|
|
173
|
+
* Sender identity mismatch.
|
|
174
|
+
*
|
|
175
|
+
* The sender address in the message doesn't match the expected address.
|
|
176
|
+
* This indicates a session hijacking attempt where an attacker tries to
|
|
177
|
+
* inject their messages under a different identity.
|
|
178
|
+
*/
|
|
179
|
+
EncryptionErrorCode["IDENTITY_MISMATCH"] = "IDENTITY_MISMATCH";
|
|
180
|
+
/** Signature verification failed */
|
|
181
|
+
EncryptionErrorCode["SIGNATURE_VERIFICATION_FAILED"] = "SIGNATURE_VERIFICATION_FAILED";
|
|
182
|
+
// ===== PreKey & Session Establishment Errors =====
|
|
183
|
+
/** PreKey bundle is invalid or malformed */
|
|
184
|
+
EncryptionErrorCode["INVALID_PREKEY_BUNDLE"] = "INVALID_PREKEY_BUNDLE";
|
|
185
|
+
/** PreKey not found */
|
|
186
|
+
EncryptionErrorCode["PREKEY_NOT_FOUND"] = "PREKEY_NOT_FOUND";
|
|
187
|
+
/**
|
|
188
|
+
* PreKey rotation required before sending.
|
|
189
|
+
*
|
|
190
|
+
* Signed prekeys or Kyber prekeys have exceeded the maximum allowed age
|
|
191
|
+
* (14 days by default). Message sending is blocked until rotation succeeds
|
|
192
|
+
* to maintain forward-secrecy guarantees.
|
|
193
|
+
*
|
|
194
|
+
* @see https://signal.org/docs/specifications/pqxdh/#publishing-keys
|
|
195
|
+
*/
|
|
196
|
+
EncryptionErrorCode["PREKEY_ROTATION_REQUIRED"] = "PREKEY_ROTATION_REQUIRED";
|
|
197
|
+
/**
|
|
198
|
+
* Invalid registration ID.
|
|
199
|
+
*
|
|
200
|
+
* Registration ID is 0 or doesn't match expected format.
|
|
201
|
+
*/
|
|
202
|
+
EncryptionErrorCode["INVALID_REGISTRATION_ID"] = "INVALID_REGISTRATION_ID";
|
|
203
|
+
/**
|
|
204
|
+
* Registration ID changed (session reset detected).
|
|
205
|
+
*
|
|
206
|
+
* Remote party's registration ID changed, indicating app reinstall.
|
|
207
|
+
* Old sessions should be archived.
|
|
208
|
+
*/
|
|
209
|
+
EncryptionErrorCode["REGISTRATION_ID_CHANGED"] = "REGISTRATION_ID_CHANGED";
|
|
210
|
+
// ===== Ratchet Errors =====
|
|
211
|
+
/**
|
|
212
|
+
* DH ratchet error.
|
|
213
|
+
*
|
|
214
|
+
* Diffie-Hellman key exchange failed or produced invalid output.
|
|
215
|
+
*/
|
|
216
|
+
EncryptionErrorCode["RATCHET_ERROR"] = "RATCHET_ERROR";
|
|
217
|
+
/**
|
|
218
|
+
* Message counter overflow.
|
|
219
|
+
*
|
|
220
|
+
* Counter has reached MAX_SAFE_INTEGER - session must be rotated.
|
|
221
|
+
* This is a safety check to prevent cryptographic issues from counter wrap-around.
|
|
222
|
+
*/
|
|
223
|
+
EncryptionErrorCode["COUNTER_OVERFLOW"] = "COUNTER_OVERFLOW";
|
|
224
|
+
/**
|
|
225
|
+
* Invalid DH public key.
|
|
226
|
+
*
|
|
227
|
+
* DH public key is malformed or fails validation.
|
|
228
|
+
*/
|
|
229
|
+
EncryptionErrorCode["INVALID_DH_KEY"] = "INVALID_DH_KEY";
|
|
230
|
+
// ===== Storage Errors =====
|
|
231
|
+
/** Key storage operation failed */
|
|
232
|
+
EncryptionErrorCode["KEY_STORAGE_ERROR"] = "KEY_STORAGE_ERROR";
|
|
233
|
+
/** Database operation failed */
|
|
234
|
+
EncryptionErrorCode["DATABASE_ERROR"] = "DATABASE_ERROR";
|
|
235
|
+
/**
|
|
236
|
+
* Database is locked or unavailable.
|
|
237
|
+
*
|
|
238
|
+
* Encrypted database cannot be accessed (wrong password, corruption, etc.)
|
|
239
|
+
*/
|
|
240
|
+
EncryptionErrorCode["DATABASE_LOCKED"] = "DATABASE_LOCKED";
|
|
241
|
+
// ===== Initialization Errors =====
|
|
242
|
+
/** Signal Protocol initialization failed */
|
|
243
|
+
EncryptionErrorCode["INITIALIZATION_FAILED"] = "INITIALIZATION_FAILED";
|
|
244
|
+
/** Identity key pair generation or loading failed */
|
|
245
|
+
EncryptionErrorCode["IDENTITY_KEY_ERROR"] = "IDENTITY_KEY_ERROR";
|
|
246
|
+
// ===== Protocol Strategy Errors =====
|
|
247
|
+
/**
|
|
248
|
+
* PQXDH (post-quantum key exchange) is required but partner lacks Kyber keys.
|
|
249
|
+
*
|
|
250
|
+
* Thrown when partner doesn't support the required PQXDH handshake.
|
|
251
|
+
* Application can catch this to notify user or queue message for retry.
|
|
252
|
+
*/
|
|
253
|
+
EncryptionErrorCode["PQXDH_REQUIRED"] = "PQXDH_REQUIRED";
|
|
254
|
+
/**
|
|
255
|
+
* PQXDH key exchange failed during handshake.
|
|
256
|
+
*
|
|
257
|
+
* The post-quantum key exchange encountered an error. The session is aborted
|
|
258
|
+
* rather than downgraded to classical X3DH.
|
|
259
|
+
*/
|
|
260
|
+
EncryptionErrorCode["PQXDH_FAILED"] = "PQXDH_FAILED";
|
|
261
|
+
/**
|
|
262
|
+
* Triple Ratchet is required but PQXDH was not used.
|
|
263
|
+
*
|
|
264
|
+
* Triple Ratchet requires post-quantum material from PQXDH.
|
|
265
|
+
* Cannot enable Triple Ratchet with classical X3DH handshake.
|
|
266
|
+
*/
|
|
267
|
+
EncryptionErrorCode["TRIPLE_RATCHET_REQUIRED"] = "TRIPLE_RATCHET_REQUIRED";
|
|
268
|
+
// ===== SPQR (Sparse Post-Quantum Ratchet) Errors =====
|
|
269
|
+
/**
|
|
270
|
+
* SPQR epoch is out of valid range.
|
|
271
|
+
*
|
|
272
|
+
* Either requesting a future epoch (not yet established) or
|
|
273
|
+
* an epoch too old (chains already cleaned up).
|
|
274
|
+
*/
|
|
275
|
+
EncryptionErrorCode["SPQR_EPOCH_OUT_OF_RANGE"] = "SPQR_EPOCH_OUT_OF_RANGE";
|
|
276
|
+
/**
|
|
277
|
+
* Message number jump too large (DoS protection).
|
|
278
|
+
*
|
|
279
|
+
* Prevents attackers from forcing storage of excessive skipped keys.
|
|
280
|
+
* `SPQR`'s the profile uses `max_jump` of 25,000.
|
|
281
|
+
*/
|
|
282
|
+
EncryptionErrorCode["SPQR_MESSAGE_JUMP_TOO_LARGE"] = "SPQR_MESSAGE_JUMP_TOO_LARGE";
|
|
283
|
+
/**
|
|
284
|
+
* Attempted to use a message key that was already consumed.
|
|
285
|
+
*
|
|
286
|
+
* Indicates replay attack or duplicate message.
|
|
287
|
+
*
|
|
288
|
+
* Reserved: Reserved for future use when replay detection is implemented.
|
|
289
|
+
*/
|
|
290
|
+
EncryptionErrorCode["SPQR_KEY_ALREADY_USED"] = "SPQR_KEY_ALREADY_USED";
|
|
291
|
+
/**
|
|
292
|
+
* SPQR message counter overflow.
|
|
293
|
+
*
|
|
294
|
+
* Counter has reached maximum value - epoch must be rotated.
|
|
295
|
+
*/
|
|
296
|
+
EncryptionErrorCode["SPQR_COUNTER_OVERFLOW"] = "SPQR_COUNTER_OVERFLOW";
|
|
297
|
+
/**
|
|
298
|
+
* Invalid Kyber ciphertext in SPQR context.
|
|
299
|
+
*
|
|
300
|
+
* Ciphertext has wrong size or format for ML-KEM-1024.
|
|
301
|
+
*/
|
|
302
|
+
EncryptionErrorCode["SPQR_INVALID_CIPHERTEXT"] = "SPQR_INVALID_CIPHERTEXT";
|
|
303
|
+
/**
|
|
304
|
+
* SPQR epoch regression detected.
|
|
305
|
+
*
|
|
306
|
+
* Received message claims an epoch earlier than current - possible replay.
|
|
307
|
+
*
|
|
308
|
+
* Reserved: Reserved for future use. Currently epoch regression is handled
|
|
309
|
+
* via SPQR_EPOCH_OUT_OF_RANGE with oldestEpoch context.
|
|
310
|
+
*/
|
|
311
|
+
EncryptionErrorCode["SPQR_EPOCH_REGRESSION"] = "SPQR_EPOCH_REGRESSION";
|
|
312
|
+
/**
|
|
313
|
+
* SPQR version negotiation failed.
|
|
314
|
+
*
|
|
315
|
+
* Peer's maximum supported version is below our minimum required version.
|
|
316
|
+
* For example, peer only supports V0 but we require V1.
|
|
317
|
+
*/
|
|
318
|
+
EncryptionErrorCode["SPQR_VERSION_MISMATCH"] = "SPQR_VERSION_MISMATCH";
|
|
319
|
+
// ===== Cryptographic Errors =====
|
|
320
|
+
/** Post-quantum (Kyber) operation failed */
|
|
321
|
+
EncryptionErrorCode["KYBER_ERROR"] = "KYBER_ERROR";
|
|
322
|
+
/** Key derivation function failed */
|
|
323
|
+
EncryptionErrorCode["KDF_ERROR"] = "KDF_ERROR";
|
|
324
|
+
/** HMAC verification failed (message tampering detected) */
|
|
325
|
+
EncryptionErrorCode["HMAC_VERIFICATION_FAILED"] = "HMAC_VERIFICATION_FAILED";
|
|
326
|
+
// ===== Sealed Sender Errors =====
|
|
327
|
+
/**
|
|
328
|
+
* Sealed sender authentication failed.
|
|
329
|
+
*
|
|
330
|
+
* The unidentified access key was rejected by the server. This may trigger
|
|
331
|
+
* fallback to identified sender delivery.
|
|
332
|
+
*/
|
|
333
|
+
EncryptionErrorCode["SEALED_SENDER_AUTH_FAILED"] = "SEALED_SENDER_AUTH_FAILED";
|
|
334
|
+
// ===== Generic Errors =====
|
|
335
|
+
/** Invalid operation or state */
|
|
336
|
+
EncryptionErrorCode["INVALID_STATE"] = "INVALID_STATE";
|
|
337
|
+
/** Unknown or unexpected error */
|
|
338
|
+
EncryptionErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
|
339
|
+
})(EncryptionErrorCode || (EncryptionErrorCode = {}));
|
|
340
|
+
// ===== Specialized Error Classes =====
|
|
341
|
+
/**
|
|
342
|
+
* Error thrown when an identity key is not trusted.
|
|
343
|
+
*
|
|
344
|
+
* This is a security-critical error that requires user intervention.
|
|
345
|
+
* The user must verify the safety number before continuing communication.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```typescript
|
|
349
|
+
* throw new UntrustedIdentityError(address, identityKey);
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
export class UntrustedIdentityError extends EncryptionError {
|
|
353
|
+
untrustedAddress;
|
|
354
|
+
identity;
|
|
355
|
+
constructor(address, identity) {
|
|
356
|
+
super(`Untrusted identity for ${address.userId}.${address.deviceId}`, EncryptionErrorCode.UNTRUSTED_IDENTITY, { address, identity });
|
|
357
|
+
this.name = 'UntrustedIdentityError';
|
|
358
|
+
this.untrustedAddress = address;
|
|
359
|
+
this.identity = identity;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Error thrown when an identity key has changed.
|
|
364
|
+
*
|
|
365
|
+
* This could indicate:
|
|
366
|
+
* - Legitimate: Device reinstall, new device, backup restoration
|
|
367
|
+
* - Attack: Man-in-the-middle attack
|
|
368
|
+
*
|
|
369
|
+
* Requires prominent user warning and safety number verification.
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```typescript
|
|
373
|
+
* throw new IdentityKeyChangedError(address, oldKey, newKey);
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
export class IdentityKeyChangedError extends EncryptionError {
|
|
377
|
+
changedAddress;
|
|
378
|
+
oldIdentityKey;
|
|
379
|
+
newIdentityKey;
|
|
380
|
+
constructor(address, oldIdentityKey, newIdentityKey) {
|
|
381
|
+
super(`Identity key changed for ${address.userId}.${address.deviceId}`, EncryptionErrorCode.IDENTITY_KEY_CHANGED, { address, identityKey: newIdentityKey });
|
|
382
|
+
this.name = 'IdentityKeyChangedError';
|
|
383
|
+
this.changedAddress = address;
|
|
384
|
+
this.oldIdentityKey = oldIdentityKey;
|
|
385
|
+
this.newIdentityKey = newIdentityKey;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Error thrown when multiple active sessions are detected (race condition).
|
|
390
|
+
*
|
|
391
|
+
* Occurs when both parties try to establish sessions simultaneously.
|
|
392
|
+
* Requires session archiving and convergence using Sesame algorithm.
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* ```typescript
|
|
396
|
+
* throw new SessionConflictError(address);
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
export class SessionConflictError extends EncryptionError {
|
|
400
|
+
conflictAddress;
|
|
401
|
+
constructor(address) {
|
|
402
|
+
super(`Session conflict detected for ${address.userId}.${address.deviceId}`, EncryptionErrorCode.SESSION_CONFLICT, { address });
|
|
403
|
+
this.name = 'SessionConflictError';
|
|
404
|
+
this.conflictAddress = address;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Error thrown when a duplicate message is detected (replay attack).
|
|
409
|
+
*
|
|
410
|
+
* This is a security-critical error indicating:
|
|
411
|
+
* - Network replay (attacker re-sent a captured message)
|
|
412
|
+
* - Client bug (accidentally decrypting same message twice)
|
|
413
|
+
* - Storage corruption (message key index was corrupted)
|
|
414
|
+
*
|
|
415
|
+
* Metadata should support diagnostics without exposing secret material.
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```typescript
|
|
419
|
+
* throw new DuplicatedMessageError(address, { counter: 5, epoch: 0 });
|
|
420
|
+
* ```
|
|
421
|
+
*/
|
|
422
|
+
export class DuplicatedMessageError extends EncryptionError {
|
|
423
|
+
duplicatedAddress;
|
|
424
|
+
/** Message counter that was duplicated (if known) - matches Signal proto field name */
|
|
425
|
+
counter;
|
|
426
|
+
/** Epoch (for Triple Ratchet) where duplicate was detected */
|
|
427
|
+
epoch;
|
|
428
|
+
/** Fingerprint of the duplicate ciphertext (truncated for logging) */
|
|
429
|
+
fingerprintPreview;
|
|
430
|
+
constructor(address, metadata) {
|
|
431
|
+
super(`Duplicate message detected for ${address.userId}.${address.deviceId}${metadata?.counter !== undefined ? ` (msg #${metadata.counter})` : ''}`, EncryptionErrorCode.MESSAGE_DUPLICATE, {
|
|
432
|
+
address,
|
|
433
|
+
counter: metadata?.counter,
|
|
434
|
+
epoch: metadata?.epoch,
|
|
435
|
+
});
|
|
436
|
+
this.name = 'DuplicatedMessageError';
|
|
437
|
+
this.duplicatedAddress = address;
|
|
438
|
+
this.counter = metadata?.counter;
|
|
439
|
+
this.epoch = metadata?.epoch;
|
|
440
|
+
this.fingerprintPreview = metadata?.fingerprintPreview;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Type guard to check if an error is a DuplicatedMessageError.
|
|
445
|
+
*
|
|
446
|
+
* @param error - Error to check
|
|
447
|
+
* @returns true if error is DuplicatedMessageError
|
|
448
|
+
*/
|
|
449
|
+
export function isDuplicatedMessageError(error) {
|
|
450
|
+
return error instanceof DuplicatedMessageError;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Error thrown when registration ID has changed (session reset).
|
|
454
|
+
*
|
|
455
|
+
* Indicates the remote party has reinstalled their app.
|
|
456
|
+
* Old sessions should be archived and new session established.
|
|
457
|
+
*
|
|
458
|
+
* @example
|
|
459
|
+
* ```typescript
|
|
460
|
+
* throw new RegistrationIdChangedError(address, oldId, newId);
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
export class RegistrationIdChangedError extends EncryptionError {
|
|
464
|
+
resetAddress;
|
|
465
|
+
oldRegistrationId;
|
|
466
|
+
newRegistrationId;
|
|
467
|
+
constructor(address, oldRegistrationId, newRegistrationId) {
|
|
468
|
+
super(`Registration ID changed for ${address.userId}.${address.deviceId} ` +
|
|
469
|
+
`(${oldRegistrationId} → ${newRegistrationId})`, EncryptionErrorCode.REGISTRATION_ID_CHANGED, { address });
|
|
470
|
+
this.name = 'RegistrationIdChangedError';
|
|
471
|
+
this.resetAddress = address;
|
|
472
|
+
this.oldRegistrationId = oldRegistrationId;
|
|
473
|
+
this.newRegistrationId = newRegistrationId;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Error thrown when sealed sender (anonymous delivery) authentication fails.
|
|
478
|
+
*
|
|
479
|
+
* The unidentified access key was rejected by the server, either because:
|
|
480
|
+
* - The access key doesn't match the recipient's stored key
|
|
481
|
+
* - The recipient's account was not found
|
|
482
|
+
* - The recipient disabled unrestricted unidentified access
|
|
483
|
+
*
|
|
484
|
+
* This error triggers automatic fallback to identified sender delivery.
|
|
485
|
+
*
|
|
486
|
+
* @example
|
|
487
|
+
* ```typescript
|
|
488
|
+
* try {
|
|
489
|
+
* await relay.sendUnidentified(envelope, accessKey);
|
|
490
|
+
* } catch (error) {
|
|
491
|
+
* if (isSealedSenderAuthError(error)) {
|
|
492
|
+
* // Fall back to identified delivery
|
|
493
|
+
* await relay.send(envelope);
|
|
494
|
+
* }
|
|
495
|
+
* }
|
|
496
|
+
* ```
|
|
497
|
+
*/
|
|
498
|
+
export class SealedSenderAuthError extends EncryptionError {
|
|
499
|
+
constructor(cause) {
|
|
500
|
+
super('Sealed sender authentication failed', EncryptionErrorCode.SEALED_SENDER_AUTH_FAILED, {
|
|
501
|
+
operation: 'sendUnidentified',
|
|
502
|
+
originalError: cause,
|
|
503
|
+
});
|
|
504
|
+
this.name = 'SealedSenderAuthError';
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Type guard to check if an error is a SealedSenderAuthError.
|
|
509
|
+
*
|
|
510
|
+
* @param error - Error to check
|
|
511
|
+
* @returns true if error is SealedSenderAuthError
|
|
512
|
+
*/
|
|
513
|
+
export function isSealedSenderAuthError(error) {
|
|
514
|
+
return error instanceof SealedSenderAuthError;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Error thrown when PQXDH is required but partner lacks Kyber keys.
|
|
518
|
+
*
|
|
519
|
+
* This is a recoverable error - applications can:
|
|
520
|
+
* - Notify user that partner needs to update their app
|
|
521
|
+
* - Queue the message for retry when partner uploads Kyber prekeys
|
|
522
|
+
* - Fall back to classical encryption with user consent
|
|
523
|
+
*
|
|
524
|
+
* Recovery metadata:
|
|
525
|
+
* - `retryable`: Whether the operation can be retried
|
|
526
|
+
* - `suggestedRetryDelay`: Recommended delay before retry (ms)
|
|
527
|
+
* - `fallbackType`: Category of fallback for analytics
|
|
528
|
+
*
|
|
529
|
+
* @example Handling in application
|
|
530
|
+
* ```typescript
|
|
531
|
+
* try {
|
|
532
|
+
* await signal.encryptMessage(sessionId, message);
|
|
533
|
+
* } catch (error) {
|
|
534
|
+
* if (isPQXDHRequiredError(error)) {
|
|
535
|
+
* if (error.retryable) {
|
|
536
|
+
* // Schedule retry with suggested delay
|
|
537
|
+
* setTimeout(() => retryEncryption(), error.suggestedRetryDelay ?? 5000);
|
|
538
|
+
* } else if (error.fallbackType === 'missing_keys') {
|
|
539
|
+
* // Partner doesn't support post-quantum yet
|
|
540
|
+
* showDialog({
|
|
541
|
+
* title: 'Enhanced Security Unavailable',
|
|
542
|
+
* message: `${error.remoteAddress} needs to update their app.`,
|
|
543
|
+
* actions: [
|
|
544
|
+
* { label: 'Queue Message', action: () => queueForRetry(message) },
|
|
545
|
+
* { label: 'Send Anyway', action: () => sendWithClassical(message) }
|
|
546
|
+
* ]
|
|
547
|
+
* });
|
|
548
|
+
* }
|
|
549
|
+
* }
|
|
550
|
+
* }
|
|
551
|
+
* ```
|
|
552
|
+
*/
|
|
553
|
+
export class PQXDHRequiredError extends EncryptionError {
|
|
554
|
+
remoteAddress;
|
|
555
|
+
reason;
|
|
556
|
+
/** Whether the operation can be retried */
|
|
557
|
+
retryable;
|
|
558
|
+
/** Suggested delay before retry in milliseconds */
|
|
559
|
+
suggestedRetryDelay;
|
|
560
|
+
/** Category of fallback for analytics and handling */
|
|
561
|
+
fallbackType;
|
|
562
|
+
constructor(remoteAddress, reason, options) {
|
|
563
|
+
const opts = options ?? {};
|
|
564
|
+
const message = reason === 'no_kyber_prekey'
|
|
565
|
+
? `Partner ${remoteAddress} does not have Kyber prekeys - post-quantum encryption unavailable`
|
|
566
|
+
: `PQXDH key exchange failed with ${remoteAddress} - post-quantum encryption unavailable`;
|
|
567
|
+
super(message, reason === 'no_kyber_prekey'
|
|
568
|
+
? EncryptionErrorCode.PQXDH_REQUIRED
|
|
569
|
+
: EncryptionErrorCode.PQXDH_FAILED, { operation: 'keyAgreement', originalError: opts.originalError });
|
|
570
|
+
this.name = 'PQXDHRequiredError';
|
|
571
|
+
this.remoteAddress = remoteAddress;
|
|
572
|
+
this.reason = reason;
|
|
573
|
+
// Set recovery metadata with sensible defaults
|
|
574
|
+
this.fallbackType =
|
|
575
|
+
opts.fallbackType ?? (reason === 'no_kyber_prekey' ? 'missing_keys' : 'crypto_failure');
|
|
576
|
+
this.retryable = opts.retryable ?? reason === 'no_kyber_prekey'; // Missing keys can be retried after partner updates
|
|
577
|
+
this.suggestedRetryDelay = opts.suggestedRetryDelay ?? (this.retryable ? 30000 : undefined); // 30s default for retryable
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Type guard to check if an error is a PQXDHRequiredError.
|
|
582
|
+
*
|
|
583
|
+
* @param error - Error to check
|
|
584
|
+
* @returns true if error is PQXDHRequiredError
|
|
585
|
+
*/
|
|
586
|
+
export function isPQXDHRequiredError(error) {
|
|
587
|
+
return error instanceof PQXDHRequiredError;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Type guard to check if an error is an UntrustedIdentityError.
|
|
591
|
+
*
|
|
592
|
+
* @param error - Error to check
|
|
593
|
+
* @returns true if error is UntrustedIdentityError
|
|
594
|
+
*/
|
|
595
|
+
export function isUntrustedIdentityError(error) {
|
|
596
|
+
return error instanceof UntrustedIdentityError;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Type guard to check if an error is an IdentityKeyChangedError.
|
|
600
|
+
*
|
|
601
|
+
* @param error - Error to check
|
|
602
|
+
* @returns true if error is IdentityKeyChangedError
|
|
603
|
+
*/
|
|
604
|
+
export function isIdentityKeyChangedError(error) {
|
|
605
|
+
return error instanceof IdentityKeyChangedError;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Type guard to check if an error is a SessionConflictError.
|
|
609
|
+
*
|
|
610
|
+
* @param error - Error to check
|
|
611
|
+
* @returns true if error is SessionConflictError
|
|
612
|
+
*/
|
|
613
|
+
export function isSessionConflictError(error) {
|
|
614
|
+
return error instanceof SessionConflictError;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Type guard to check if an error is a RegistrationIdChangedError.
|
|
618
|
+
*
|
|
619
|
+
* @param error - Error to check
|
|
620
|
+
* @returns true if error is RegistrationIdChangedError
|
|
621
|
+
*/
|
|
622
|
+
export function isRegistrationIdChangedError(error) {
|
|
623
|
+
return error instanceof RegistrationIdChangedError;
|
|
624
|
+
}
|
|
625
|
+
// ============================================================================
|
|
626
|
+
// Tiered Error Classes (Layer-Aligned)
|
|
627
|
+
// ============================================================================
|
|
628
|
+
/**
|
|
629
|
+
* Error codes for cryptographic layer (Layer 1) errors.
|
|
630
|
+
*
|
|
631
|
+
* These errors occur in low-level cryptographic operations.
|
|
632
|
+
*/
|
|
633
|
+
export var CryptoErrorCode;
|
|
634
|
+
(function (CryptoErrorCode) {
|
|
635
|
+
/** Random number generation failed */
|
|
636
|
+
CryptoErrorCode["RNG_FAILURE"] = "CRYPTO_RNG_FAILURE";
|
|
637
|
+
/** ECDH key agreement failed */
|
|
638
|
+
CryptoErrorCode["ECDH_FAILURE"] = "CRYPTO_ECDH_FAILURE";
|
|
639
|
+
/** Kyber (ML-KEM) operation failed */
|
|
640
|
+
CryptoErrorCode["KYBER_FAILURE"] = "CRYPTO_KYBER_FAILURE";
|
|
641
|
+
/** Key derivation function failed */
|
|
642
|
+
CryptoErrorCode["KDF_FAILURE"] = "CRYPTO_KDF_FAILURE";
|
|
643
|
+
/** AES encryption/decryption failed */
|
|
644
|
+
CryptoErrorCode["AES_FAILURE"] = "CRYPTO_AES_FAILURE";
|
|
645
|
+
/** HMAC computation or verification failed */
|
|
646
|
+
CryptoErrorCode["HMAC_FAILURE"] = "CRYPTO_HMAC_FAILURE";
|
|
647
|
+
/** Digital signature failed */
|
|
648
|
+
CryptoErrorCode["SIGNATURE_FAILURE"] = "CRYPTO_SIGNATURE_FAILURE";
|
|
649
|
+
/** Hash computation failed */
|
|
650
|
+
CryptoErrorCode["HASH_FAILURE"] = "CRYPTO_HASH_FAILURE";
|
|
651
|
+
/** Invalid key format or length */
|
|
652
|
+
CryptoErrorCode["INVALID_KEY"] = "CRYPTO_INVALID_KEY";
|
|
653
|
+
/** Invalid ciphertext format */
|
|
654
|
+
CryptoErrorCode["INVALID_CIPHERTEXT"] = "CRYPTO_INVALID_CIPHERTEXT";
|
|
655
|
+
})(CryptoErrorCode || (CryptoErrorCode = {}));
|
|
656
|
+
/**
|
|
657
|
+
* Cryptographic layer error (Layer 1).
|
|
658
|
+
*
|
|
659
|
+
* Thrown when low-level cryptographic operations fail.
|
|
660
|
+
* These errors are typically unrecoverable and indicate
|
|
661
|
+
* fundamental issues with crypto primitives.
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* ```typescript
|
|
665
|
+
* throw new CryptoError(
|
|
666
|
+
* 'ECDH key agreement produced invalid output',
|
|
667
|
+
* CryptoErrorCode.ECDH_FAILURE,
|
|
668
|
+
* { operation: 'computeSharedSecret' }
|
|
669
|
+
* );
|
|
670
|
+
* ```
|
|
671
|
+
*/
|
|
672
|
+
export class CryptoError extends EncryptionError {
|
|
673
|
+
cryptoCode;
|
|
674
|
+
constructor(message, code, context) {
|
|
675
|
+
// Map to base EncryptionErrorCode for compatibility
|
|
676
|
+
const baseCode = mapCryptoToEncryptionCode(code);
|
|
677
|
+
super(message, baseCode, context);
|
|
678
|
+
this.name = 'CryptoError';
|
|
679
|
+
this.cryptoCode = code;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Error codes for session layer (Layer 5) errors.
|
|
684
|
+
*
|
|
685
|
+
* These errors occur during session operations.
|
|
686
|
+
*/
|
|
687
|
+
export var SessionErrorCode;
|
|
688
|
+
(function (SessionErrorCode) {
|
|
689
|
+
/** Session not found */
|
|
690
|
+
SessionErrorCode["NOT_FOUND"] = "SESSION_NOT_FOUND";
|
|
691
|
+
/** Session is corrupted or invalid */
|
|
692
|
+
SessionErrorCode["CORRUPTED"] = "SESSION_CORRUPTED";
|
|
693
|
+
/** Session has expired */
|
|
694
|
+
SessionErrorCode["EXPIRED"] = "SESSION_EXPIRED";
|
|
695
|
+
/** Session conflict (race condition) */
|
|
696
|
+
SessionErrorCode["CONFLICT"] = "SESSION_CONFLICT";
|
|
697
|
+
/** Invalid session state for operation */
|
|
698
|
+
SessionErrorCode["INVALID_STATE"] = "SESSION_INVALID_STATE";
|
|
699
|
+
/** Session ratchet step failed */
|
|
700
|
+
SessionErrorCode["RATCHET_FAILED"] = "SESSION_RATCHET_FAILED";
|
|
701
|
+
/** Too many skipped messages */
|
|
702
|
+
SessionErrorCode["TOO_MANY_SKIPPED"] = "SESSION_TOO_MANY_SKIPPED";
|
|
703
|
+
/** Message key not found (message too old) */
|
|
704
|
+
SessionErrorCode["MESSAGE_KEY_NOT_FOUND"] = "SESSION_MESSAGE_KEY_NOT_FOUND";
|
|
705
|
+
/** Session establishment failed */
|
|
706
|
+
SessionErrorCode["ESTABLISHMENT_FAILED"] = "SESSION_ESTABLISHMENT_FAILED";
|
|
707
|
+
})(SessionErrorCode || (SessionErrorCode = {}));
|
|
708
|
+
/**
|
|
709
|
+
* Session layer error (Layer 5).
|
|
710
|
+
*
|
|
711
|
+
* Thrown when session operations fail. Includes session ID
|
|
712
|
+
* for debugging and potentially recovery.
|
|
713
|
+
*
|
|
714
|
+
* @example
|
|
715
|
+
* ```typescript
|
|
716
|
+
* throw new SessionError(
|
|
717
|
+
* 'Session not found for decryption',
|
|
718
|
+
* SessionErrorCode.NOT_FOUND,
|
|
719
|
+
* 'session-123',
|
|
720
|
+
* { operation: 'decrypt' }
|
|
721
|
+
* );
|
|
722
|
+
* ```
|
|
723
|
+
*/
|
|
724
|
+
export class SessionError extends EncryptionError {
|
|
725
|
+
sessionCode;
|
|
726
|
+
sessionId;
|
|
727
|
+
constructor(message, code, sessionId, context) {
|
|
728
|
+
// Map to base EncryptionErrorCode for compatibility
|
|
729
|
+
const baseCode = mapSessionToEncryptionCode(code);
|
|
730
|
+
super(message, baseCode, context);
|
|
731
|
+
this.name = 'SessionError';
|
|
732
|
+
this.sessionCode = code;
|
|
733
|
+
this.sessionId = sessionId;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Error codes for protocol layer (Layer 6) errors.
|
|
738
|
+
*
|
|
739
|
+
* These errors occur at the protocol level (Sesame, message routing).
|
|
740
|
+
*/
|
|
741
|
+
export var ProtocolErrorCode;
|
|
742
|
+
(function (ProtocolErrorCode) {
|
|
743
|
+
/** Invalid message format */
|
|
744
|
+
ProtocolErrorCode["INVALID_MESSAGE"] = "PROTOCOL_INVALID_MESSAGE";
|
|
745
|
+
/** Invalid prekey bundle */
|
|
746
|
+
ProtocolErrorCode["INVALID_BUNDLE"] = "PROTOCOL_INVALID_BUNDLE";
|
|
747
|
+
/** Protocol version mismatch */
|
|
748
|
+
ProtocolErrorCode["VERSION_MISMATCH"] = "PROTOCOL_VERSION_MISMATCH";
|
|
749
|
+
/** Device not found in device list */
|
|
750
|
+
ProtocolErrorCode["DEVICE_NOT_FOUND"] = "PROTOCOL_DEVICE_NOT_FOUND";
|
|
751
|
+
/** Stale device list */
|
|
752
|
+
ProtocolErrorCode["STALE_DEVICE_LIST"] = "PROTOCOL_STALE_DEVICE_LIST";
|
|
753
|
+
/** Retry request required */
|
|
754
|
+
ProtocolErrorCode["RETRY_REQUIRED"] = "PROTOCOL_RETRY_REQUIRED";
|
|
755
|
+
/** Sender key distribution failed */
|
|
756
|
+
ProtocolErrorCode["SENDER_KEY_FAILED"] = "PROTOCOL_SENDER_KEY_FAILED";
|
|
757
|
+
})(ProtocolErrorCode || (ProtocolErrorCode = {}));
|
|
758
|
+
/**
|
|
759
|
+
* Protocol layer error (Layer 6).
|
|
760
|
+
*
|
|
761
|
+
* Thrown for protocol-level issues like message format errors,
|
|
762
|
+
* version mismatches, or multi-device coordination failures.
|
|
763
|
+
*
|
|
764
|
+
* @example
|
|
765
|
+
* ```typescript
|
|
766
|
+
* throw new ProtocolError(
|
|
767
|
+
* 'Device list is stale, retry required',
|
|
768
|
+
* ProtocolErrorCode.STALE_DEVICE_LIST,
|
|
769
|
+
* { operation: 'sendGroupMessage', context: { groupId } }
|
|
770
|
+
* );
|
|
771
|
+
* ```
|
|
772
|
+
*/
|
|
773
|
+
export class ProtocolError extends EncryptionError {
|
|
774
|
+
protocolCode;
|
|
775
|
+
protocolContext;
|
|
776
|
+
constructor(message, code, context) {
|
|
777
|
+
// Map to base EncryptionErrorCode for compatibility
|
|
778
|
+
const baseCode = mapProtocolToEncryptionCode(code);
|
|
779
|
+
super(message, baseCode, context);
|
|
780
|
+
this.name = 'ProtocolError';
|
|
781
|
+
this.protocolCode = code;
|
|
782
|
+
this.protocolContext = context?.protocolContext;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Error codes for client-facing errors.
|
|
787
|
+
*
|
|
788
|
+
* These errors should be displayed to users (with appropriate messaging).
|
|
789
|
+
*/
|
|
790
|
+
export var ClientErrorCode;
|
|
791
|
+
(function (ClientErrorCode) {
|
|
792
|
+
/** Network error during key exchange */
|
|
793
|
+
ClientErrorCode["NETWORK_ERROR"] = "CLIENT_NETWORK_ERROR";
|
|
794
|
+
/** User identity verification required */
|
|
795
|
+
ClientErrorCode["VERIFICATION_REQUIRED"] = "CLIENT_VERIFICATION_REQUIRED";
|
|
796
|
+
/** Recipient not found */
|
|
797
|
+
ClientErrorCode["RECIPIENT_NOT_FOUND"] = "CLIENT_RECIPIENT_NOT_FOUND";
|
|
798
|
+
/** Message delivery failed */
|
|
799
|
+
ClientErrorCode["DELIVERY_FAILED"] = "CLIENT_DELIVERY_FAILED";
|
|
800
|
+
/** Encryption unavailable (keys not initialized) */
|
|
801
|
+
ClientErrorCode["ENCRYPTION_UNAVAILABLE"] = "CLIENT_ENCRYPTION_UNAVAILABLE";
|
|
802
|
+
/** Session needs reset */
|
|
803
|
+
ClientErrorCode["SESSION_RESET_NEEDED"] = "CLIENT_SESSION_RESET_NEEDED";
|
|
804
|
+
})(ClientErrorCode || (ClientErrorCode = {}));
|
|
805
|
+
/**
|
|
806
|
+
* Client-facing error.
|
|
807
|
+
*
|
|
808
|
+
* These errors are intended to be shown to users with
|
|
809
|
+
* appropriate messaging. Includes optional user-facing
|
|
810
|
+
* message that can be displayed directly in UI.
|
|
811
|
+
*
|
|
812
|
+
* @example
|
|
813
|
+
* ```typescript
|
|
814
|
+
* throw new ClientError(
|
|
815
|
+
* 'Failed to send encrypted message',
|
|
816
|
+
* ClientErrorCode.DELIVERY_FAILED,
|
|
817
|
+
* 'Message could not be delivered. Please try again.',
|
|
818
|
+
* { operation: 'sendMessage' }
|
|
819
|
+
* );
|
|
820
|
+
* ```
|
|
821
|
+
*/
|
|
822
|
+
export class ClientError extends EncryptionError {
|
|
823
|
+
clientCode;
|
|
824
|
+
userFacingMessage;
|
|
825
|
+
constructor(message, code, userFacingMessage, context) {
|
|
826
|
+
// Map to base EncryptionErrorCode for compatibility
|
|
827
|
+
const baseCode = mapClientToEncryptionCode(code);
|
|
828
|
+
super(message, baseCode, context);
|
|
829
|
+
this.name = 'ClientError';
|
|
830
|
+
this.clientCode = code;
|
|
831
|
+
this.userFacingMessage = userFacingMessage;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
// ============================================================================
|
|
835
|
+
// Error Code Mapping (Record-based with compile-time exhaustiveness)
|
|
836
|
+
// ============================================================================
|
|
837
|
+
/**
|
|
838
|
+
* Map CryptoErrorCode to EncryptionErrorCode.
|
|
839
|
+
*
|
|
840
|
+
* Using Record type ensures compile-time exhaustiveness - TypeScript will
|
|
841
|
+
* error if we add a new CryptoErrorCode without adding a mapping.
|
|
842
|
+
*/
|
|
843
|
+
const cryptoToEncryptionCodeMap = {
|
|
844
|
+
[CryptoErrorCode.RNG_FAILURE]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
845
|
+
[CryptoErrorCode.ECDH_FAILURE]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
846
|
+
[CryptoErrorCode.KYBER_FAILURE]: EncryptionErrorCode.KYBER_ERROR,
|
|
847
|
+
[CryptoErrorCode.KDF_FAILURE]: EncryptionErrorCode.KDF_ERROR,
|
|
848
|
+
[CryptoErrorCode.AES_FAILURE]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
849
|
+
[CryptoErrorCode.HMAC_FAILURE]: EncryptionErrorCode.HMAC_VERIFICATION_FAILED,
|
|
850
|
+
[CryptoErrorCode.SIGNATURE_FAILURE]: EncryptionErrorCode.SIGNATURE_VERIFICATION_FAILED,
|
|
851
|
+
[CryptoErrorCode.HASH_FAILURE]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
852
|
+
[CryptoErrorCode.INVALID_KEY]: EncryptionErrorCode.INVALID_DH_KEY,
|
|
853
|
+
[CryptoErrorCode.INVALID_CIPHERTEXT]: EncryptionErrorCode.INVALID_CIPHERTEXT,
|
|
854
|
+
};
|
|
855
|
+
function mapCryptoToEncryptionCode(code) {
|
|
856
|
+
return cryptoToEncryptionCodeMap[code];
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Map SessionErrorCode to EncryptionErrorCode.
|
|
860
|
+
*/
|
|
861
|
+
const sessionToEncryptionCodeMap = {
|
|
862
|
+
[SessionErrorCode.NOT_FOUND]: EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
863
|
+
[SessionErrorCode.CORRUPTED]: EncryptionErrorCode.SESSION_CORRUPTED,
|
|
864
|
+
[SessionErrorCode.EXPIRED]: EncryptionErrorCode.SESSION_NOT_FOUND, // Treat expired as not found
|
|
865
|
+
[SessionErrorCode.CONFLICT]: EncryptionErrorCode.SESSION_CONFLICT,
|
|
866
|
+
[SessionErrorCode.INVALID_STATE]: EncryptionErrorCode.INVALID_STATE,
|
|
867
|
+
[SessionErrorCode.RATCHET_FAILED]: EncryptionErrorCode.RATCHET_ERROR,
|
|
868
|
+
[SessionErrorCode.TOO_MANY_SKIPPED]: EncryptionErrorCode.TOO_MANY_SKIPPED_MESSAGES,
|
|
869
|
+
[SessionErrorCode.MESSAGE_KEY_NOT_FOUND]: EncryptionErrorCode.MESSAGE_TOO_OLD,
|
|
870
|
+
[SessionErrorCode.ESTABLISHMENT_FAILED]: EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
871
|
+
};
|
|
872
|
+
function mapSessionToEncryptionCode(code) {
|
|
873
|
+
return sessionToEncryptionCodeMap[code];
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Map ProtocolErrorCode to EncryptionErrorCode.
|
|
877
|
+
*/
|
|
878
|
+
const protocolToEncryptionCodeMap = {
|
|
879
|
+
[ProtocolErrorCode.INVALID_MESSAGE]: EncryptionErrorCode.INVALID_CIPHERTEXT,
|
|
880
|
+
[ProtocolErrorCode.INVALID_BUNDLE]: EncryptionErrorCode.INVALID_PREKEY_BUNDLE,
|
|
881
|
+
[ProtocolErrorCode.VERSION_MISMATCH]: EncryptionErrorCode.INVALID_MESSAGE_VERSION,
|
|
882
|
+
[ProtocolErrorCode.DEVICE_NOT_FOUND]: EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
883
|
+
[ProtocolErrorCode.STALE_DEVICE_LIST]: EncryptionErrorCode.INVALID_STATE,
|
|
884
|
+
[ProtocolErrorCode.RETRY_REQUIRED]: EncryptionErrorCode.INVALID_STATE,
|
|
885
|
+
[ProtocolErrorCode.SENDER_KEY_FAILED]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
886
|
+
};
|
|
887
|
+
function mapProtocolToEncryptionCode(code) {
|
|
888
|
+
return protocolToEncryptionCodeMap[code];
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Map ClientErrorCode to EncryptionErrorCode.
|
|
892
|
+
*/
|
|
893
|
+
const clientToEncryptionCodeMap = {
|
|
894
|
+
[ClientErrorCode.NETWORK_ERROR]: EncryptionErrorCode.UNKNOWN_ERROR,
|
|
895
|
+
[ClientErrorCode.VERIFICATION_REQUIRED]: EncryptionErrorCode.UNTRUSTED_IDENTITY,
|
|
896
|
+
[ClientErrorCode.RECIPIENT_NOT_FOUND]: EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
897
|
+
[ClientErrorCode.DELIVERY_FAILED]: EncryptionErrorCode.ENCRYPTION_FAILED,
|
|
898
|
+
[ClientErrorCode.ENCRYPTION_UNAVAILABLE]: EncryptionErrorCode.INITIALIZATION_FAILED,
|
|
899
|
+
[ClientErrorCode.SESSION_RESET_NEEDED]: EncryptionErrorCode.SESSION_NOT_FOUND,
|
|
900
|
+
};
|
|
901
|
+
function mapClientToEncryptionCode(code) {
|
|
902
|
+
return clientToEncryptionCodeMap[code];
|
|
903
|
+
}
|
|
904
|
+
// ============================================================================
|
|
905
|
+
// Type Guards for Tiered Errors
|
|
906
|
+
// ============================================================================
|
|
907
|
+
/**
|
|
908
|
+
* Type guard to check if an error is a CryptoError.
|
|
909
|
+
*/
|
|
910
|
+
export function isCryptoError(error) {
|
|
911
|
+
return error instanceof CryptoError;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Type guard to check if an error is a SessionError.
|
|
915
|
+
*/
|
|
916
|
+
export function isSessionError(error) {
|
|
917
|
+
return error instanceof SessionError;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Type guard to check if an error is a ProtocolError.
|
|
921
|
+
*/
|
|
922
|
+
export function isProtocolError(error) {
|
|
923
|
+
return error instanceof ProtocolError;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Type guard to check if an error is a ClientError.
|
|
927
|
+
*/
|
|
928
|
+
export function isClientError(error) {
|
|
929
|
+
return error instanceof ClientError;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Type guard to check if an error is any Signal Protocol error.
|
|
933
|
+
*/
|
|
934
|
+
export function isEncryptionError(error) {
|
|
935
|
+
return error instanceof EncryptionError;
|
|
936
|
+
}
|
|
937
|
+
//# sourceMappingURL=errors.js.map
|