@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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group parameters — GroupMasterKey, GroupSecretParams, GroupPublicParams
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* The GroupMasterKey is the root secret for a group. From it, all group
|
|
6
|
+
* secrets are derived deterministically via SHO:
|
|
7
|
+
* - groupId: 32-byte group identifier
|
|
8
|
+
* - blobKey: 32-byte AES-256-GCM-SIV key for blob encryption
|
|
9
|
+
* - uidEncKeyPair: ElGamal keypair for UID encryption
|
|
10
|
+
* - profileKeyEncKeyPair: ElGamal keypair for profile key encryption
|
|
11
|
+
*
|
|
12
|
+
* @see https://eprint.iacr.org/2019/1416.pdf — Signal Private Group System
|
|
13
|
+
*/
|
|
14
|
+
import type { PublicKey } from '../credentials/attributes.js';
|
|
15
|
+
import { type UidEncKeyPair, type UidEncCiphertext } from './uid-encryption.js';
|
|
16
|
+
import { type ProfileKeyEncKeyPair, type ProfileKeyEncCiphertext } from './profile-key-encryption.js';
|
|
17
|
+
import type { ServiceId } from './uid-struct.js';
|
|
18
|
+
export {};
|
|
19
|
+
export declare const GROUP_MASTER_KEY_LEN = 32;
|
|
20
|
+
export declare const GROUP_IDENTIFIER_LEN = 32;
|
|
21
|
+
export declare const AES_KEY_LEN = 32;
|
|
22
|
+
export declare const AESGCM_NONCE_LEN = 12;
|
|
23
|
+
export declare const AESGCM_TAG_LEN = 16;
|
|
24
|
+
export declare const UUID_CIPHERTEXT_LEN = 65;
|
|
25
|
+
export declare const PROFILE_KEY_CIPHERTEXT_LEN = 65;
|
|
26
|
+
export declare const RANDOMNESS_LEN = 32;
|
|
27
|
+
export declare const SECONDS_PER_DAY = 86400;
|
|
28
|
+
export type GroupMasterKey = Uint8Array;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new GroupMasterKey from raw bytes.
|
|
31
|
+
*/
|
|
32
|
+
export declare function groupMasterKey(bytes: Uint8Array): GroupMasterKey;
|
|
33
|
+
export interface GroupSecretParams {
|
|
34
|
+
readonly masterKey: GroupMasterKey;
|
|
35
|
+
readonly groupId: Uint8Array;
|
|
36
|
+
readonly blobKey: Uint8Array;
|
|
37
|
+
readonly uidEncKeyPair: UidEncKeyPair;
|
|
38
|
+
readonly profileKeyEncKeyPair: ProfileKeyEncKeyPair;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Derive all group secrets from a GroupMasterKey.
|
|
42
|
+
*/
|
|
43
|
+
export declare function deriveGroupSecretParams(masterKey: GroupMasterKey): GroupSecretParams;
|
|
44
|
+
/**
|
|
45
|
+
* Generate random GroupSecretParams from 32 bytes of randomness.
|
|
46
|
+
*/
|
|
47
|
+
export declare function generateGroupSecretParams(randomness: Uint8Array): GroupSecretParams;
|
|
48
|
+
export interface GroupPublicParams {
|
|
49
|
+
readonly groupId: Uint8Array;
|
|
50
|
+
readonly uidEncPublicKey: PublicKey;
|
|
51
|
+
readonly profileKeyEncPublicKey: PublicKey;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Extract public parameters from secret parameters.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getGroupPublicParams(secretParams: GroupSecretParams): GroupPublicParams;
|
|
57
|
+
/**
|
|
58
|
+
* Encrypt a ServiceId using the group's UID encryption key.
|
|
59
|
+
*/
|
|
60
|
+
export declare function encryptServiceId(params: GroupSecretParams, serviceId: ServiceId): UidEncCiphertext;
|
|
61
|
+
/**
|
|
62
|
+
* Decrypt a UID ciphertext back to a ServiceId.
|
|
63
|
+
*/
|
|
64
|
+
export declare function decryptServiceId(params: GroupSecretParams, ciphertext: UidEncCiphertext): ServiceId;
|
|
65
|
+
/**
|
|
66
|
+
* Encrypt a profile key using the group's profile key encryption key.
|
|
67
|
+
*/
|
|
68
|
+
export declare function encryptProfileKey(params: GroupSecretParams, profileKeyBytes: Uint8Array, uidBytes: Uint8Array): ProfileKeyEncCiphertext;
|
|
69
|
+
/**
|
|
70
|
+
* Decrypt a profile key ciphertext back to the 32-byte profile key.
|
|
71
|
+
*/
|
|
72
|
+
export declare function decryptProfileKey(params: GroupSecretParams, ciphertext: ProfileKeyEncCiphertext, uidBytes: Uint8Array): Uint8Array;
|
|
73
|
+
/**
|
|
74
|
+
* Encrypt a blob using AES-256-GCM-SIV with a nonce derived from randomness.
|
|
75
|
+
*
|
|
76
|
+
* Output format: ciphertext || tag || nonce(12) || reserved(1)
|
|
77
|
+
*/
|
|
78
|
+
export declare function encryptBlob(params: GroupSecretParams, randomness: Uint8Array, plaintext: Uint8Array): Uint8Array;
|
|
79
|
+
/**
|
|
80
|
+
* Encrypt a blob with padding.
|
|
81
|
+
*
|
|
82
|
+
* Plaintext format: BE_u32(padding_len) || plaintext || zeros(padding_len)
|
|
83
|
+
*/
|
|
84
|
+
export declare function encryptBlobWithPadding(params: GroupSecretParams, randomness: Uint8Array, plaintext: Uint8Array, paddingLen: number): Uint8Array;
|
|
85
|
+
/**
|
|
86
|
+
* Decrypt a blob encrypted with encryptBlob.
|
|
87
|
+
*/
|
|
88
|
+
export declare function decryptBlob(params: GroupSecretParams, ciphertext: Uint8Array): Uint8Array;
|
|
89
|
+
/**
|
|
90
|
+
* Decrypt a blob encrypted with encryptBlobWithPadding.
|
|
91
|
+
*/
|
|
92
|
+
export declare function decryptBlobWithPadding(params: GroupSecretParams, ciphertext: Uint8Array): Uint8Array;
|
|
93
|
+
//# sourceMappingURL=group-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-params.d.ts","sourceRoot":"","sources":["../../../../../internal/protocol/zk/groups/group-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,CAAC;AAOV,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAMrC,MAAM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U,GACnB,UAAU,CAEZ;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,UAAU,GACpB,UAAU,CAoBZ;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,MAAM,GACjB,UAAU,CAQZ;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,GAAG,UAAU,CAkBzF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,GACrB,UAAU,CAeZ"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group parameters — GroupMasterKey, GroupSecretParams, GroupPublicParams
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* The GroupMasterKey is the root secret for a group. From it, all group
|
|
6
|
+
* secrets are derived deterministically via SHO:
|
|
7
|
+
* - groupId: 32-byte group identifier
|
|
8
|
+
* - blobKey: 32-byte AES-256-GCM-SIV key for blob encryption
|
|
9
|
+
* - uidEncKeyPair: ElGamal keypair for UID encryption
|
|
10
|
+
* - profileKeyEncKeyPair: ElGamal keypair for profile key encryption
|
|
11
|
+
*
|
|
12
|
+
* @see https://eprint.iacr.org/2019/1416.pdf — Signal Private Group System
|
|
13
|
+
*/
|
|
14
|
+
import { gcmsiv } from '@noble/ciphers/aes.js';
|
|
15
|
+
import { ShoHmacSha256 } from '../proofs/sho.js';
|
|
16
|
+
import { deriveUidEncKeyPair, encryptServiceId as uidEncryptServiceId, decryptServiceId as uidDecryptServiceId, } from './uid-encryption.js';
|
|
17
|
+
import { deriveProfileKeyEncKeyPair, encryptProfileKey as pkEncryptProfileKey, decryptProfileKey as pkDecryptProfileKey, } from './profile-key-encryption.js';
|
|
18
|
+
const enc = new TextEncoder();
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Constants
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
export const GROUP_MASTER_KEY_LEN = 32;
|
|
23
|
+
export const GROUP_IDENTIFIER_LEN = 32;
|
|
24
|
+
export const AES_KEY_LEN = 32;
|
|
25
|
+
export const AESGCM_NONCE_LEN = 12;
|
|
26
|
+
export const AESGCM_TAG_LEN = 16;
|
|
27
|
+
export const UUID_CIPHERTEXT_LEN = 65;
|
|
28
|
+
export const PROFILE_KEY_CIPHERTEXT_LEN = 65;
|
|
29
|
+
export const RANDOMNESS_LEN = 32;
|
|
30
|
+
export const SECONDS_PER_DAY = 86400;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new GroupMasterKey from raw bytes.
|
|
33
|
+
*/
|
|
34
|
+
export function groupMasterKey(bytes) {
|
|
35
|
+
if (bytes.length !== GROUP_MASTER_KEY_LEN) {
|
|
36
|
+
throw new Error(`GroupMasterKey must be ${GROUP_MASTER_KEY_LEN} bytes, got ${bytes.length}`);
|
|
37
|
+
}
|
|
38
|
+
return new Uint8Array(bytes);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Derive all group secrets from a GroupMasterKey.
|
|
42
|
+
*/
|
|
43
|
+
export function deriveGroupSecretParams(masterKey) {
|
|
44
|
+
const sho = new ShoHmacSha256(enc.encode('Signal_ZKGroup_20200424_GroupMasterKey_GroupSecretParams_DeriveFromMasterKey'));
|
|
45
|
+
sho.absorbAndRatchet(masterKey);
|
|
46
|
+
// Squeeze group ID and blob key (32 bytes each)
|
|
47
|
+
const groupId = sho.squeezeAndRatchet(GROUP_IDENTIFIER_LEN);
|
|
48
|
+
const blobKey = sho.squeezeAndRatchet(AES_KEY_LEN);
|
|
49
|
+
// Derive encryption keypairs from the continuing SHO state
|
|
50
|
+
const uidEncKeyPair = deriveUidEncKeyPair(sho);
|
|
51
|
+
const profileKeyEncKeyPair = deriveProfileKeyEncKeyPair(sho);
|
|
52
|
+
return {
|
|
53
|
+
masterKey: new Uint8Array(masterKey),
|
|
54
|
+
groupId,
|
|
55
|
+
blobKey,
|
|
56
|
+
uidEncKeyPair,
|
|
57
|
+
profileKeyEncKeyPair,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Generate random GroupSecretParams from 32 bytes of randomness.
|
|
62
|
+
*/
|
|
63
|
+
export function generateGroupSecretParams(randomness) {
|
|
64
|
+
if (randomness.length !== RANDOMNESS_LEN) {
|
|
65
|
+
throw new Error(`Randomness must be ${RANDOMNESS_LEN} bytes, got ${randomness.length}`);
|
|
66
|
+
}
|
|
67
|
+
const sho = new ShoHmacSha256(enc.encode('Signal_ZKGroup_20200424_Random_GroupSecretParams_Generate'));
|
|
68
|
+
sho.absorbAndRatchet(randomness);
|
|
69
|
+
const masterKeyBytes = sho.squeezeAndRatchet(GROUP_MASTER_KEY_LEN);
|
|
70
|
+
return deriveGroupSecretParams(masterKeyBytes);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Extract public parameters from secret parameters.
|
|
74
|
+
*/
|
|
75
|
+
export function getGroupPublicParams(secretParams) {
|
|
76
|
+
return {
|
|
77
|
+
groupId: new Uint8Array(secretParams.groupId),
|
|
78
|
+
uidEncPublicKey: secretParams.uidEncKeyPair.publicKey,
|
|
79
|
+
profileKeyEncPublicKey: secretParams.profileKeyEncKeyPair.publicKey,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// ---------------------------------------------------------------------------
|
|
83
|
+
// UID encryption/decryption
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
/**
|
|
86
|
+
* Encrypt a ServiceId using the group's UID encryption key.
|
|
87
|
+
*/
|
|
88
|
+
export function encryptServiceId(params, serviceId) {
|
|
89
|
+
return uidEncryptServiceId(params.uidEncKeyPair, serviceId);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Decrypt a UID ciphertext back to a ServiceId.
|
|
93
|
+
*/
|
|
94
|
+
export function decryptServiceId(params, ciphertext) {
|
|
95
|
+
return uidDecryptServiceId(params.uidEncKeyPair, ciphertext);
|
|
96
|
+
}
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
// Profile key encryption/decryption
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
/**
|
|
101
|
+
* Encrypt a profile key using the group's profile key encryption key.
|
|
102
|
+
*/
|
|
103
|
+
export function encryptProfileKey(params, profileKeyBytes, uidBytes) {
|
|
104
|
+
return pkEncryptProfileKey(params.profileKeyEncKeyPair, profileKeyBytes, uidBytes);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Decrypt a profile key ciphertext back to the 32-byte profile key.
|
|
108
|
+
*/
|
|
109
|
+
export function decryptProfileKey(params, ciphertext, uidBytes) {
|
|
110
|
+
return pkDecryptProfileKey(params.profileKeyEncKeyPair, ciphertext, uidBytes);
|
|
111
|
+
}
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// Blob encryption (AES-256-GCM-SIV)
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
/**
|
|
116
|
+
* Encrypt a blob using AES-256-GCM-SIV with a nonce derived from randomness.
|
|
117
|
+
*
|
|
118
|
+
* Output format: ciphertext || tag || nonce(12) || reserved(1)
|
|
119
|
+
*/
|
|
120
|
+
export function encryptBlob(params, randomness, plaintext) {
|
|
121
|
+
if (randomness.length !== RANDOMNESS_LEN) {
|
|
122
|
+
throw new Error(`Randomness must be ${RANDOMNESS_LEN} bytes, got ${randomness.length}`);
|
|
123
|
+
}
|
|
124
|
+
const sho = new ShoHmacSha256(enc.encode('Signal_ZKGroup_20200424_Random_GroupSecretParams_EncryptBlob'));
|
|
125
|
+
sho.absorbAndRatchet(randomness);
|
|
126
|
+
const nonce = sho.squeezeAndRatchet(AESGCM_NONCE_LEN);
|
|
127
|
+
const cipher = gcmsiv(params.blobKey, nonce);
|
|
128
|
+
const ciphertextWithTag = cipher.encrypt(plaintext);
|
|
129
|
+
// Output: ciphertext+tag || nonce || reserved_byte
|
|
130
|
+
const result = new Uint8Array(ciphertextWithTag.length + AESGCM_NONCE_LEN + 1);
|
|
131
|
+
result.set(ciphertextWithTag, 0);
|
|
132
|
+
result.set(nonce, ciphertextWithTag.length);
|
|
133
|
+
result[result.length - 1] = 0x00; // reserved byte
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Encrypt a blob with padding.
|
|
138
|
+
*
|
|
139
|
+
* Plaintext format: BE_u32(padding_len) || plaintext || zeros(padding_len)
|
|
140
|
+
*/
|
|
141
|
+
export function encryptBlobWithPadding(params, randomness, plaintext, paddingLen) {
|
|
142
|
+
const fullLength = 4 + plaintext.length + paddingLen;
|
|
143
|
+
const padded = new Uint8Array(fullLength);
|
|
144
|
+
// Write padding length as big-endian u32
|
|
145
|
+
new DataView(padded.buffer).setUint32(0, paddingLen, false);
|
|
146
|
+
padded.set(plaintext, 4);
|
|
147
|
+
// Remaining bytes are already zero (padding)
|
|
148
|
+
return encryptBlob(params, randomness, padded);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Decrypt a blob encrypted with encryptBlob.
|
|
152
|
+
*/
|
|
153
|
+
export function decryptBlob(params, ciphertext) {
|
|
154
|
+
if (ciphertext.length < AESGCM_NONCE_LEN + 1) {
|
|
155
|
+
throw new Error('Blob ciphertext too short');
|
|
156
|
+
}
|
|
157
|
+
// Strip reserved byte
|
|
158
|
+
const unreservedLen = ciphertext.length - 1;
|
|
159
|
+
// Last 12 bytes before reserved = nonce
|
|
160
|
+
const nonceStart = unreservedLen - AESGCM_NONCE_LEN;
|
|
161
|
+
const nonce = ciphertext.slice(nonceStart, unreservedLen);
|
|
162
|
+
const ciphertextWithTag = ciphertext.slice(0, nonceStart);
|
|
163
|
+
if (ciphertextWithTag.length < AESGCM_TAG_LEN) {
|
|
164
|
+
throw new Error('Blob ciphertext too short for tag');
|
|
165
|
+
}
|
|
166
|
+
const cipher = gcmsiv(params.blobKey, nonce);
|
|
167
|
+
return cipher.decrypt(ciphertextWithTag);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Decrypt a blob encrypted with encryptBlobWithPadding.
|
|
171
|
+
*/
|
|
172
|
+
export function decryptBlobWithPadding(params, ciphertext) {
|
|
173
|
+
const decrypted = decryptBlob(params, ciphertext);
|
|
174
|
+
if (decrypted.length < 4) {
|
|
175
|
+
throw new Error('Decrypted blob too short for padding header');
|
|
176
|
+
}
|
|
177
|
+
const paddingLen = new DataView(decrypted.buffer, decrypted.byteOffset).getUint32(0, false);
|
|
178
|
+
if (decrypted.length - 4 < paddingLen) {
|
|
179
|
+
throw new Error('Invalid padding length');
|
|
180
|
+
}
|
|
181
|
+
// Return plaintext without padding header and trailing padding
|
|
182
|
+
return decrypted.slice(4, decrypted.length - paddingLen);
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=group-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-params.js","sourceRoot":"","sources":["../../../../../internal/protocol/zk/groups/group-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EACL,mBAAmB,EACnB,gBAAgB,IAAI,mBAAmB,EACvC,gBAAgB,IAAI,mBAAmB,GAGxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,IAAI,mBAAmB,EACxC,iBAAiB,IAAI,mBAAmB,GAGzC,MAAM,0BAA0B,CAAC;AAGlC,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;AAE9B,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,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AED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAyB,EACzB,UAAsB;IAEtB,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAElD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAE5F,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,GAAG,UAAU,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IAED,+DAA+D;IAC/D,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group Send Endorsements -- proving send authorization for group messages
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* GroupSendEndorsement is a MAC over:
|
|
6
|
+
* - a ServiceId (computed from ciphertexts on the group server at issuance,
|
|
7
|
+
* passed decrypted to the chat server for verification)
|
|
8
|
+
* - an expiration timestamp, truncated to day granularity (chosen by the group
|
|
9
|
+
* server at issuance, passed publicly to the chat server for verification)
|
|
10
|
+
*
|
|
11
|
+
* At a high level:
|
|
12
|
+
* 1. Server derives daily key from root key + expiration
|
|
13
|
+
* 2. Server issues endorsements for encrypted member UIDs + batch proof
|
|
14
|
+
* 3. Client receives response, validates proof, extracts endorsements
|
|
15
|
+
* 4. Client may combine/remove endorsements (set operations)
|
|
16
|
+
* 5. Client generates a bearer token by unblinding + hashing
|
|
17
|
+
* 6. Chat server recreates token from revealed attributes and checks match
|
|
18
|
+
*
|
|
19
|
+
* @see https://signal.org/docs/ -- Signal Protocol Specifications
|
|
20
|
+
* @see https://eprint.iacr.org/2019/1416.pdf -- Signal Private Group System
|
|
21
|
+
*/
|
|
22
|
+
import { ServerRootKeyPair, ServerRootPublicKey, ServerDerivedKeyPair, EndorsementResponse, Endorsement } from '../credentials/endorsements.js';
|
|
23
|
+
import type { ServiceId } from './uid-struct.js';
|
|
24
|
+
import type { UidEncCiphertext } from './uid-encryption.js';
|
|
25
|
+
import { type GroupSecretParams } from './group-params.js';
|
|
26
|
+
export {};
|
|
27
|
+
/**
|
|
28
|
+
* A key pair used to sign endorsements for a particular expiration.
|
|
29
|
+
*
|
|
30
|
+
* Derived daily from a {@link ServerRootKeyPair} by absorbing the
|
|
31
|
+
* day-aligned expiration timestamp. Intended to be cheaply cached --
|
|
32
|
+
* regeneration is not expensive, but these are reused frequently
|
|
33
|
+
* enough that caching is worthwhile.
|
|
34
|
+
*/
|
|
35
|
+
export interface GroupSendDerivedKeyPair {
|
|
36
|
+
/** The derived server key pair for endorsement issuance/verification. */
|
|
37
|
+
readonly keyPair: ServerDerivedKeyPair;
|
|
38
|
+
/** Day-aligned expiration timestamp in epoch seconds. */
|
|
39
|
+
readonly expiration: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Derive the appropriate key pair for the given expiration.
|
|
43
|
+
*
|
|
44
|
+
* @param rootKeyPair - The server's root key pair
|
|
45
|
+
* @param expiration - Day-aligned epoch seconds timestamp
|
|
46
|
+
* @returns The derived key pair bound to the expiration
|
|
47
|
+
* @throws Error if expiration is not day-aligned
|
|
48
|
+
*/
|
|
49
|
+
export declare function deriveForExpiration(rootKeyPair: ServerRootKeyPair, expiration: number): GroupSendDerivedKeyPair;
|
|
50
|
+
/**
|
|
51
|
+
* Compute the default expiration for endorsements issued at `currentTime`.
|
|
52
|
+
*
|
|
53
|
+
* Returns the end of the next UTC day, unless that is less than 25 hours
|
|
54
|
+
* away, in which case it returns the end of the following day.
|
|
55
|
+
*
|
|
56
|
+
* This ensures endorsements are always valid for at least 25 hours,
|
|
57
|
+
* providing a comfortable buffer for clock skew and timezone issues.
|
|
58
|
+
*
|
|
59
|
+
* @param currentTime - Current time in epoch seconds
|
|
60
|
+
* @returns Day-aligned expiration timestamp in epoch seconds
|
|
61
|
+
*/
|
|
62
|
+
export declare function defaultExpiration(currentTime: number): number;
|
|
63
|
+
/**
|
|
64
|
+
* A response from the group server containing endorsements for all group
|
|
65
|
+
* members.
|
|
66
|
+
*
|
|
67
|
+
* The group server may cache this for a particular group as long as the
|
|
68
|
+
* group membership does not change (being careful of expiration). It is
|
|
69
|
+
* the same for every requesting member.
|
|
70
|
+
*/
|
|
71
|
+
export interface GroupSendEndorsementsResponse {
|
|
72
|
+
/** The endorsement response containing signed points and batch proof. */
|
|
73
|
+
readonly response: EndorsementResponse;
|
|
74
|
+
/** Day-aligned expiration in epoch seconds for all endorsements. */
|
|
75
|
+
readonly expiration: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Issue endorsements for all group members.
|
|
79
|
+
*
|
|
80
|
+
* Takes an array of UID encryption ciphertexts (one per member), sorts
|
|
81
|
+
* them deterministically, extracts the E_A1 points, and issues
|
|
82
|
+
* endorsements over those points using the derived key pair.
|
|
83
|
+
*
|
|
84
|
+
* @param memberCiphertexts - Encrypted UIDs of group members
|
|
85
|
+
* @param derivedKeyPair - Key pair derived for the target expiration
|
|
86
|
+
* @param randomness - 32 bytes of randomness for the batch proof
|
|
87
|
+
* @returns Response containing endorsements and expiration
|
|
88
|
+
*/
|
|
89
|
+
export declare function issueEndorsements(memberCiphertexts: UidEncCiphertext[], derivedKeyPair: GroupSendDerivedKeyPair, randomness: Uint8Array): GroupSendEndorsementsResponse;
|
|
90
|
+
/**
|
|
91
|
+
* An endorsement as extracted from a {@link GroupSendEndorsementsResponse}.
|
|
92
|
+
*
|
|
93
|
+
* Each received endorsement corresponds to one group member and can be
|
|
94
|
+
* converted to a bearer token for sending messages to that member.
|
|
95
|
+
*/
|
|
96
|
+
export interface ReceivedEndorsement {
|
|
97
|
+
/** The decompressed endorsement, supporting combine/remove/toToken. */
|
|
98
|
+
readonly endorsement: Endorsement;
|
|
99
|
+
/**
|
|
100
|
+
* Generate a bearer token from this endorsement.
|
|
101
|
+
*
|
|
102
|
+
* Uses the group's UID encryption key to unblind the endorsement
|
|
103
|
+
* before hashing. The resulting token can be cached and reused
|
|
104
|
+
* for multiple sends to the same recipient.
|
|
105
|
+
*
|
|
106
|
+
* @param groupSecretParams - The group's secret parameters
|
|
107
|
+
* @returns A GroupSendToken suitable for verification
|
|
108
|
+
*/
|
|
109
|
+
toToken(groupSecretParams: GroupSecretParams): GroupSendToken;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Validate and extract endorsements from a server response.
|
|
113
|
+
*
|
|
114
|
+
* The result will be in the same order as `serviceIds`. The caller
|
|
115
|
+
* should include the current user's ServiceId in `serviceIds` as well.
|
|
116
|
+
*
|
|
117
|
+
* This method:
|
|
118
|
+
* 1. Validates the expiration against `now`
|
|
119
|
+
* 2. Derives the public signing key for verification
|
|
120
|
+
* 3. Computes E_A1 = a1 * M1 for each ServiceId (the encrypted first point)
|
|
121
|
+
* 4. Sorts the points to match the server's deterministic ordering
|
|
122
|
+
* 5. Verifies the batch proof against the sorted points
|
|
123
|
+
* 6. Un-sorts the results to match the original serviceIds order
|
|
124
|
+
*
|
|
125
|
+
* @param response - The server's endorsement response
|
|
126
|
+
* @param serviceIds - ServiceIds of all group members (in caller's order)
|
|
127
|
+
* @param now - Current time in epoch seconds
|
|
128
|
+
* @param groupSecretParams - The group's secret parameters
|
|
129
|
+
* @param rootPublicKey - The server's root public key
|
|
130
|
+
* @returns Array of received endorsements in the same order as serviceIds
|
|
131
|
+
* @throws VerificationFailure if validation or proof verification fails
|
|
132
|
+
*/
|
|
133
|
+
export declare function receiveEndorsements(response: GroupSendEndorsementsResponse, serviceIds: ServiceId[], now: number, groupSecretParams: GroupSecretParams, rootPublicKey: ServerRootPublicKey): ReceivedEndorsement[];
|
|
134
|
+
/**
|
|
135
|
+
* Combine multiple endorsements into a single endorsement.
|
|
136
|
+
*
|
|
137
|
+
* All endorsements must have been generated from the same issuance (same
|
|
138
|
+
* server key and expiration). The combined endorsement can be used to
|
|
139
|
+
* produce a single token that covers all the original recipients.
|
|
140
|
+
*
|
|
141
|
+
* This is a set-like operation: order does not matter.
|
|
142
|
+
*
|
|
143
|
+
* @param endorsements - The endorsements to combine
|
|
144
|
+
* @returns A single combined endorsement
|
|
145
|
+
*/
|
|
146
|
+
export declare function combineEndorsements(endorsements: Endorsement[]): Endorsement;
|
|
147
|
+
/**
|
|
148
|
+
* Remove one endorsement from another.
|
|
149
|
+
*
|
|
150
|
+
* Used to remove a member from a previously-combined endorsement.
|
|
151
|
+
* Removing an endorsement not present in `combined` will produce
|
|
152
|
+
* an endorsement that does not generate a valid token.
|
|
153
|
+
*
|
|
154
|
+
* This is a set-like operation: order does not matter.
|
|
155
|
+
*
|
|
156
|
+
* @param combined - The combined endorsement to remove from
|
|
157
|
+
* @param unwanted - The endorsement to remove
|
|
158
|
+
* @returns A new endorsement with `unwanted` removed
|
|
159
|
+
*/
|
|
160
|
+
export declare function removeEndorsement(combined: Endorsement, unwanted: Endorsement): Endorsement;
|
|
161
|
+
/**
|
|
162
|
+
* A bearer token representing an endorsement.
|
|
163
|
+
*
|
|
164
|
+
* This can be cached by the client for repeatedly sending to the same
|
|
165
|
+
* recipient(s), but must be combined with an expiration to form a
|
|
166
|
+
* {@link GroupSendFullToken} before sending to the chat server.
|
|
167
|
+
*/
|
|
168
|
+
export interface GroupSendToken {
|
|
169
|
+
/** Raw token bytes (16 bytes -- SHA-256 truncated). */
|
|
170
|
+
readonly token: Uint8Array;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A bearer token combined with its expiration timestamp.
|
|
174
|
+
*
|
|
175
|
+
* This is serialized and sent to the chat server for verification.
|
|
176
|
+
*/
|
|
177
|
+
export interface GroupSendFullToken {
|
|
178
|
+
/** The bearer token. */
|
|
179
|
+
readonly token: GroupSendToken;
|
|
180
|
+
/** Day-aligned expiration in epoch seconds. */
|
|
181
|
+
readonly expiration: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Create a full token by attaching an expiration to a token.
|
|
185
|
+
*
|
|
186
|
+
* If the incorrect expiration is used, the token will fail verification.
|
|
187
|
+
*
|
|
188
|
+
* @param token - The bearer token
|
|
189
|
+
* @param expiration - The expiration from the endorsement response
|
|
190
|
+
* @returns A full token ready for verification
|
|
191
|
+
*/
|
|
192
|
+
export declare function createFullToken(token: GroupSendToken, expiration: number): GroupSendFullToken;
|
|
193
|
+
/**
|
|
194
|
+
* Verify that a full token is valid for sending to the given ServiceIds
|
|
195
|
+
* at the current time.
|
|
196
|
+
*
|
|
197
|
+
* The chat server calls this to authorize a group send. Verification:
|
|
198
|
+
* 1. Checks that the token has not expired
|
|
199
|
+
* 2. Asserts the expiration matches the derived key pair
|
|
200
|
+
* 3. Sums the M1 points of all recipient ServiceIds
|
|
201
|
+
* 4. Verifies the token against the summed point using the derived key
|
|
202
|
+
*
|
|
203
|
+
* @param fullToken - The full token to verify
|
|
204
|
+
* @param serviceIds - ServiceIds the sender claims to be sending to
|
|
205
|
+
* @param now - Current time in epoch seconds
|
|
206
|
+
* @param derivedKeyPair - Key pair derived for the token's expiration
|
|
207
|
+
* @returns true if the token is valid
|
|
208
|
+
* @throws VerificationFailure if verification fails
|
|
209
|
+
*/
|
|
210
|
+
export declare function verifyFullToken(fullToken: GroupSendFullToken, serviceIds: ServiceId[], now: number, derivedKeyPair: GroupSendDerivedKeyPair): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Serialize a {@link GroupSendEndorsementsResponse} to bytes.
|
|
213
|
+
*
|
|
214
|
+
* Format: [expiration (8 bytes BE)] [endorsement response bytes]
|
|
215
|
+
*
|
|
216
|
+
* @param response - The response to serialize
|
|
217
|
+
* @returns The serialized bytes
|
|
218
|
+
*/
|
|
219
|
+
export declare function serializeEndorsementsResponse(response: GroupSendEndorsementsResponse): Uint8Array;
|
|
220
|
+
/**
|
|
221
|
+
* Deserialize a {@link GroupSendEndorsementsResponse} from bytes.
|
|
222
|
+
*
|
|
223
|
+
* @param bytes - The serialized bytes
|
|
224
|
+
* @returns The deserialized response
|
|
225
|
+
* @throws Error if the bytes are too short or malformed
|
|
226
|
+
*/
|
|
227
|
+
export declare function deserializeEndorsementsResponse(bytes: Uint8Array): GroupSendEndorsementsResponse;
|
|
228
|
+
/**
|
|
229
|
+
* Serialize a {@link GroupSendFullToken} to bytes.
|
|
230
|
+
*
|
|
231
|
+
* Format: [expiration (8 bytes BE)] [token (16 bytes)]
|
|
232
|
+
*
|
|
233
|
+
* @param fullToken - The full token to serialize
|
|
234
|
+
* @returns The serialized bytes (24 bytes)
|
|
235
|
+
*/
|
|
236
|
+
export declare function serializeFullToken(fullToken: GroupSendFullToken): Uint8Array;
|
|
237
|
+
/**
|
|
238
|
+
* Deserialize a {@link GroupSendFullToken} from bytes.
|
|
239
|
+
*
|
|
240
|
+
* @param bytes - The serialized bytes (24 bytes)
|
|
241
|
+
* @returns The deserialized full token
|
|
242
|
+
* @throws Error if the bytes are malformed
|
|
243
|
+
*/
|
|
244
|
+
export declare function deserializeFullToken(bytes: Uint8Array): GroupSendFullToken;
|
|
245
|
+
//# sourceMappingURL=group-send-endorsement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-send-endorsement.d.ts","sourceRoot":"","sources":["../../../../../internal/protocol/zk/groups/group-send-endorsement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EACL,iBAAiB,EACjB,mBAA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