@open-e2ee/signal-protocol-sdk 0.1.0-alpha.6 → 0.1.0-alpha.8
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 +1 -1
- package/ARCHITECTURE.md +1 -1
- package/CHANGELOG.md +876 -3
- package/COMMERCIAL.md +56 -0
- package/README.md +13 -8
- package/SECURITY.md +15 -1
- package/client/README.md +1 -1
- package/dist/client/client.d.ts +32 -28
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +136 -80
- package/dist/client/client.js.map +1 -1
- package/dist/client/compose.d.ts +6 -1
- package/dist/client/compose.d.ts.map +1 -1
- package/dist/client/compose.js +2 -0
- package/dist/client/compose.js.map +1 -1
- package/dist/client/config.d.ts +53 -19
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/endorsement-manager.d.ts +23 -2
- package/dist/client/endorsement-manager.d.ts.map +1 -1
- package/dist/client/endorsement-manager.js +35 -10
- package/dist/client/endorsement-manager.js.map +1 -1
- package/dist/client/groups.d.ts +29 -29
- package/dist/client/groups.d.ts.map +1 -1
- package/dist/client/groups.js +54 -37
- package/dist/client/groups.js.map +1 -1
- package/dist/client/headless.d.ts +1 -1
- package/dist/client/headless.js +1 -1
- package/dist/client/sealed-sender-ops.d.ts +27 -1
- package/dist/client/sealed-sender-ops.d.ts.map +1 -1
- package/dist/client/sealed-sender-ops.js +36 -6
- package/dist/client/sealed-sender-ops.js.map +1 -1
- package/dist/client/signal-service-cipher.d.ts +21 -2
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +119 -53
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +20 -7
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/groups/index.d.ts +4 -4
- package/dist/groups/index.d.ts.map +1 -1
- package/dist/groups/index.js +3 -3
- package/dist/groups/index.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/index.d.ts +1 -1
- package/dist/internal/crypto/index.d.ts.map +1 -1
- package/dist/internal/crypto/index.js +1 -1
- package/dist/internal/crypto/index.js.map +1 -1
- package/dist/internal/crypto/random.d.ts +9 -0
- package/dist/internal/crypto/random.d.ts.map +1 -1
- package/dist/internal/crypto/random.js +16 -0
- package/dist/internal/crypto/random.js.map +1 -1
- package/dist/internal/groups/access-control.d.ts +170 -0
- package/dist/internal/groups/access-control.d.ts.map +1 -0
- package/dist/internal/groups/access-control.js +284 -0
- package/dist/internal/groups/access-control.js.map +1 -0
- package/dist/internal/groups/change-actions.d.ts +57 -0
- package/dist/internal/groups/change-actions.d.ts.map +1 -0
- package/dist/internal/groups/change-actions.js +827 -0
- package/dist/internal/groups/change-actions.js.map +1 -0
- package/dist/internal/groups/change-authorization.d.ts +16 -0
- package/dist/internal/groups/change-authorization.d.ts.map +1 -0
- package/dist/internal/groups/change-authorization.js +120 -0
- package/dist/internal/groups/change-authorization.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/encrypted-state.d.ts +12 -2
- package/dist/internal/groups/encrypted-state.d.ts.map +1 -0
- package/dist/internal/{groups-v2 → groups}/encrypted-state.js +122 -22
- package/dist/internal/groups/encrypted-state.js.map +1 -0
- package/dist/internal/groups/group-id.d.ts +9 -9
- package/dist/internal/groups/group-id.d.ts.map +1 -1
- package/dist/internal/groups/group-id.js +11 -12
- package/dist/internal/groups/group-id.js.map +1 -1
- package/dist/internal/groups/index.d.ts +16 -6
- package/dist/internal/groups/index.d.ts.map +1 -1
- package/dist/internal/groups/index.js +9 -1
- package/dist/internal/groups/index.js.map +1 -1
- package/dist/internal/groups/invite-link.d.ts.map +1 -0
- package/dist/internal/groups/invite-link.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/manager.d.ts +188 -40
- package/dist/internal/groups/manager.d.ts.map +1 -0
- package/dist/internal/groups/manager.js +1923 -0
- package/dist/internal/groups/manager.js.map +1 -0
- package/dist/internal/groups/sdk-store.d.ts +32 -0
- package/dist/internal/groups/sdk-store.d.ts.map +1 -0
- package/dist/internal/groups/sdk-store.js +111 -0
- package/dist/internal/groups/sdk-store.js.map +1 -0
- package/dist/internal/groups/server-engine.d.ts +83 -0
- package/dist/internal/groups/server-engine.d.ts.map +1 -0
- package/dist/internal/groups/server-engine.js +1186 -0
- package/dist/internal/groups/server-engine.js.map +1 -0
- package/dist/internal/groups/trust-root.d.ts +32 -0
- package/dist/internal/groups/trust-root.d.ts.map +1 -0
- package/dist/internal/groups/trust-root.js +91 -0
- package/dist/internal/groups/trust-root.js.map +1 -0
- package/dist/internal/{groups-v2 → groups}/types.d.ts +188 -46
- package/dist/internal/groups/types.d.ts.map +1 -0
- package/dist/internal/{groups-v2 → groups}/types.js +3 -2
- package/dist/internal/groups/types.js.map +1 -0
- package/dist/internal/groups/wire.d.ts +68 -0
- package/dist/internal/groups/wire.d.ts.map +1 -0
- package/dist/internal/groups/wire.js +708 -0
- package/dist/internal/groups/wire.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +32 -18
- package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.js +33 -19
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +8 -14
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +9 -4
- package/dist/internal/protocol/sealed-sender/encryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.js +7 -15
- package/dist/internal/protocol/sealed-sender/encryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +6 -7
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +5 -7
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +45 -0
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/trust-root.js +77 -0
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/types.d.ts +64 -9
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.js +43 -0
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
- package/dist/internal/protocol/sender-keys/index.d.ts +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +38 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +109 -8
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +9 -7
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.js +68 -29
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/server-params.js.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -0
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-struct.js +4 -0
- package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
- package/dist/layers.d.ts +1 -1
- package/dist/layers.js +3 -3
- package/dist/layers.js.map +1 -1
- package/dist/local/store/expo/adapter.d.ts +14 -15
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +109 -102
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/db.d.ts +4 -1
- package/dist/local/store/expo/db.d.ts.map +1 -1
- package/dist/local/store/expo/db.js +5 -0
- package/dist/local/store/expo/db.js.map +1 -1
- package/dist/local/store/expo/index.d.ts +0 -2
- package/dist/local/store/expo/index.d.ts.map +1 -1
- package/dist/local/store/expo/index.js +1 -1
- package/dist/local/store/expo/index.js.map +1 -1
- package/dist/local/store/expo/models/index.d.ts +1 -1
- package/dist/local/store/expo/models/index.d.ts.map +1 -1
- package/dist/local/store/expo/models/index.js +2 -2
- package/dist/local/store/expo/models/index.js.map +1 -1
- package/dist/local/store/expo/models/sender-key.d.ts +101 -77
- package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
- package/dist/local/store/expo/models/sender-key.js +154 -124
- package/dist/local/store/expo/models/sender-key.js.map +1 -1
- package/dist/local/store/expo/schema.d.ts +134 -32
- package/dist/local/store/expo/schema.d.ts.map +1 -1
- package/dist/local/store/expo/schema.js +36 -7
- package/dist/local/store/expo/schema.js.map +1 -1
- package/dist/local/store/mock/adapter.d.ts +1 -0
- package/dist/local/store/mock/adapter.d.ts.map +1 -1
- package/dist/local/store/mock/adapter.js +18 -0
- package/dist/local/store/mock/adapter.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +39 -0
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +163 -8
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/web/adapter.d.ts +1 -0
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +33 -1
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/remote/relay/convex/backend.d.ts +402 -0
- package/dist/remote/relay/convex/backend.d.ts.map +1 -0
- package/dist/remote/relay/convex/backend.js +684 -0
- package/dist/remote/relay/convex/backend.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/api.d.ts +58 -0
- package/dist/remote/relay/convex/component/_generated/api.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/api.js +31 -0
- package/dist/remote/relay/convex/component/_generated/api.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/component.d.ts +480 -0
- package/dist/remote/relay/convex/component/_generated/component.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/component.js +11 -0
- package/dist/remote/relay/convex/component/_generated/component.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts +46 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.js +11 -0
- package/dist/remote/relay/convex/component/_generated/dataModel.js.map +1 -0
- package/dist/remote/relay/convex/component/_generated/server.d.ts +129 -0
- package/dist/remote/relay/convex/component/_generated/server.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/_generated/server.js +79 -0
- package/dist/remote/relay/convex/component/_generated/server.js.map +1 -0
- package/dist/remote/relay/convex/component/accounts.d.ts +43 -0
- package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/accounts.js +181 -0
- package/dist/remote/relay/convex/component/accounts.js.map +1 -0
- package/dist/remote/relay/convex/component/certificates.d.ts +10 -0
- package/dist/remote/relay/convex/component/certificates.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/certificates.js +122 -0
- package/dist/remote/relay/convex/component/certificates.js.map +1 -0
- package/dist/remote/relay/convex/component/cleanup.d.ts +26 -0
- package/dist/remote/relay/convex/component/cleanup.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/cleanup.js +127 -0
- package/dist/remote/relay/convex/component/cleanup.js.map +1 -0
- package/dist/remote/relay/convex/component/convex.config.d.ts +5 -0
- package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/convex.config.js +33 -0
- package/dist/remote/relay/convex/component/convex.config.js.map +1 -0
- package/dist/remote/relay/convex/component/crons.d.ts +3 -0
- package/dist/remote/relay/convex/component/crons.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/crons.js +9 -0
- package/dist/remote/relay/convex/component/crons.js.map +1 -0
- package/dist/remote/relay/convex/component/devices.d.ts +101 -0
- package/dist/remote/relay/convex/component/devices.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/devices.js +299 -0
- package/dist/remote/relay/convex/component/devices.js.map +1 -0
- package/dist/remote/relay/convex/component/errors.d.ts +22 -0
- package/dist/remote/relay/convex/component/errors.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/errors.js +17 -0
- package/dist/remote/relay/convex/component/errors.js.map +1 -0
- package/dist/remote/relay/convex/component/groups.d.ts +60 -0
- package/dist/remote/relay/convex/component/groups.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/groups.js +331 -0
- package/dist/remote/relay/convex/component/groups.js.map +1 -0
- package/dist/remote/relay/convex/component/keys.d.ts +130 -0
- package/dist/remote/relay/convex/component/keys.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/keys.js +578 -0
- package/dist/remote/relay/convex/component/keys.js.map +1 -0
- package/dist/remote/relay/convex/component/messages.d.ts +119 -0
- package/dist/remote/relay/convex/component/messages.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/messages.js +649 -0
- package/dist/remote/relay/convex/component/messages.js.map +1 -0
- package/dist/remote/relay/convex/component/provisioning.d.ts +92 -0
- package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/provisioning.js +359 -0
- package/dist/remote/relay/convex/component/provisioning.js.map +1 -0
- package/dist/remote/relay/convex/component/runtime.d.ts +18 -0
- package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/runtime.js +142 -0
- package/dist/remote/relay/convex/component/runtime.js.map +1 -0
- package/dist/remote/relay/convex/component/schema.d.ts +344 -0
- package/dist/remote/relay/convex/component/schema.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/schema.js +266 -0
- package/dist/remote/relay/convex/component/schema.js.map +1 -0
- package/dist/remote/relay/convex/component/zkAuth.d.ts +12 -0
- package/dist/remote/relay/convex/component/zkAuth.d.ts.map +1 -0
- package/dist/remote/relay/convex/component/zkAuth.js +71 -0
- package/dist/remote/relay/convex/component/zkAuth.js.map +1 -0
- package/dist/remote/relay/convex/constants.d.ts +3 -0
- package/dist/remote/relay/convex/constants.d.ts.map +1 -0
- package/dist/remote/relay/convex/constants.js +3 -0
- package/dist/remote/relay/convex/constants.js.map +1 -0
- package/dist/remote/relay/convex/group-server.d.ts +25 -21
- package/dist/remote/relay/convex/group-server.d.ts.map +1 -1
- package/dist/remote/relay/convex/group-server.js +51 -21
- package/dist/remote/relay/convex/group-server.js.map +1 -1
- package/dist/remote/relay/convex/index.d.ts +4 -1
- package/dist/remote/relay/convex/index.d.ts.map +1 -1
- package/dist/remote/relay/convex/index.js +3 -1
- package/dist/remote/relay/convex/index.js.map +1 -1
- package/dist/remote/relay/convex/relay.d.ts +54 -67
- package/dist/remote/relay/convex/relay.d.ts.map +1 -1
- package/dist/remote/relay/convex/relay.js +123 -42
- package/dist/remote/relay/convex/relay.js.map +1 -1
- package/dist/remote/relay/convex/types.d.ts +16 -103
- package/dist/remote/relay/convex/types.d.ts.map +1 -1
- package/dist/remote/relay/convex/types.js +8 -13
- package/dist/remote/relay/convex/types.js.map +1 -1
- package/dist/remote/relay/index.d.ts +1 -1
- package/dist/remote/relay/index.d.ts.map +1 -1
- package/dist/remote/relay/mock/adapter.d.ts +33 -20
- package/dist/remote/relay/mock/adapter.d.ts.map +1 -1
- package/dist/remote/relay/mock/adapter.js +98 -81
- package/dist/remote/relay/mock/adapter.js.map +1 -1
- package/dist/remote/relay/mock/group-server.d.ts +9 -0
- package/dist/remote/relay/mock/group-server.d.ts.map +1 -0
- package/dist/remote/relay/mock/group-server.js +9 -0
- package/dist/remote/relay/mock/group-server.js.map +1 -0
- package/dist/remote/relay/types.d.ts +73 -79
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/remote/relay/types.js +0 -1
- package/dist/remote/relay/types.js.map +1 -1
- package/dist/types/api.d.ts +23 -2
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/protocol-config.d.ts +51 -0
- package/dist/types/protocol-config.d.ts.map +1 -1
- package/dist/types/protocol-config.js +46 -0
- package/dist/types/protocol-config.js.map +1 -1
- package/docs/ASSURANCE.md +10 -6
- package/docs/CLIENT_COMPOSITION.md +23 -69
- package/docs/DEVIATIONS.md +77 -41
- package/docs/E2EE.md +71 -6
- package/docs/GETTING_STARTED.md +1 -1
- package/docs/PACKAGE_SURFACE.md +6 -0
- package/docs/RECIPES.md +1 -1
- package/docs/SECURITY.md +8 -0
- package/groups/README.md +16 -5
- package/local/store/expo/README.md +10 -1
- package/local/store/node/README.md +10 -1
- package/package.json +20 -4
- package/remote/relay/convex/README.md +6 -0
- package/remote/relay/convex/component/README.md +428 -0
- package/scripts/oe-groups.mjs +162 -0
- package/dist/internal/groups-v2/access-control.d.ts +0 -108
- package/dist/internal/groups-v2/access-control.d.ts.map +0 -1
- package/dist/internal/groups-v2/access-control.js +0 -191
- package/dist/internal/groups-v2/access-control.js.map +0 -1
- package/dist/internal/groups-v2/change-actions.d.ts +0 -40
- package/dist/internal/groups-v2/change-actions.d.ts.map +0 -1
- package/dist/internal/groups-v2/change-actions.js +0 -363
- package/dist/internal/groups-v2/change-actions.js.map +0 -1
- package/dist/internal/groups-v2/encrypted-state.d.ts.map +0 -1
- package/dist/internal/groups-v2/encrypted-state.js.map +0 -1
- package/dist/internal/groups-v2/index.d.ts +0 -19
- package/dist/internal/groups-v2/index.d.ts.map +0 -1
- package/dist/internal/groups-v2/index.js +0 -11
- package/dist/internal/groups-v2/index.js.map +0 -1
- package/dist/internal/groups-v2/invite-link.d.ts.map +0 -1
- package/dist/internal/groups-v2/invite-link.js.map +0 -1
- package/dist/internal/groups-v2/manager.d.ts.map +0 -1
- package/dist/internal/groups-v2/manager.js +0 -1095
- package/dist/internal/groups-v2/manager.js.map +0 -1
- package/dist/internal/groups-v2/types.d.ts.map +0 -1
- package/dist/internal/groups-v2/types.js.map +0 -1
- package/docs/api/README.md +0 -471
- package/docs/api/classes/EncryptionError.md +0 -112
- package/docs/api/classes/EndorsementManager.md +0 -307
- package/docs/api/classes/SealedSenderAuthError.md +0 -127
- package/docs/api/classes/ServerDerivedKeyPair.md +0 -68
- package/docs/api/classes/ServerDerivedPublicKey.md +0 -33
- package/docs/api/classes/ServerRootKeyPair.md +0 -94
- package/docs/api/classes/ServerRootPublicKey.md +0 -72
- package/docs/api/classes/SignalProtocolBlockingManager.md +0 -106
- package/docs/api/classes/SignalProtocolClient.md +0 -2654
- package/docs/api/classes/VerificationFailure.md +0 -25
- package/docs/api/enumerations/ContentHint.md +0 -63
- package/docs/api/enumerations/EncryptionErrorCode.md +0 -488
- package/docs/api/enumerations/IdentityKeyChange.md +0 -65
- package/docs/api/enumerations/MessageType.md +0 -29
- package/docs/api/enumerations/TrustDirection.md +0 -33
- package/docs/api/enumerations/TypingAction.md +0 -31
- package/docs/api/functions/createDefaultSignalProtocolContentAdapter.md +0 -13
- package/docs/api/functions/createDefaultSignalProtocolLogger.md +0 -36
- package/docs/api/functions/createGroupId.md +0 -32
- package/docs/api/functions/createSignalProtocolClient.md +0 -36
- package/docs/api/functions/createSignalProtocolClientConfig.md +0 -24
- package/docs/api/functions/extractGroupId.md +0 -32
- package/docs/api/functions/formatVersion.md +0 -25
- package/docs/api/functions/isCompatible.md +0 -31
- package/docs/api/functions/isGroupId.md +0 -37
- package/docs/api/functions/isSealedSenderAuthError.md +0 -25
- package/docs/api/functions/parseVersion.md +0 -29
- package/docs/api/functions/resolveSPQRLimits.md +0 -21
- package/docs/api/functions/resolveSignalProtocolLogger.md +0 -42
- package/docs/api/interfaces/AccountIdentityProvisioning.md +0 -43
- package/docs/api/interfaces/AccountIdentityRotation.md +0 -69
- package/docs/api/interfaces/AttachmentTransferOptions.md +0 -49
- package/docs/api/interfaces/BlockedRecipientEntry.md +0 -25
- package/docs/api/interfaces/BlockedRecipientsSyncInput.md +0 -27
- package/docs/api/interfaces/ConfigurationSyncInput.md +0 -19
- package/docs/api/interfaces/CredentialPublicKey.md +0 -25
- package/docs/api/interfaces/DataMessageInput.md +0 -21
- package/docs/api/interfaces/DecryptedEnvelope.md +0 -95
- package/docs/api/interfaces/DecryptedGroup.md +0 -86
- package/docs/api/interfaces/DeviceInfo.md +0 -79
- package/docs/api/interfaces/DeviceRecord.md +0 -87
- package/docs/api/interfaces/DeviceRegistration.md +0 -27
- package/docs/api/interfaces/DoubleRatchetConfig.md +0 -36
- package/docs/api/interfaces/EcOneTimePreKey.md +0 -27
- package/docs/api/interfaces/EcSignedPreKey.md +0 -39
- package/docs/api/interfaces/EcSignedPreKeyUpload.md +0 -50
- package/docs/api/interfaces/EncryptionErrorContext.md +0 -51
- package/docs/api/interfaces/Envelope.md +0 -154
- package/docs/api/interfaces/ForceKeyResetResult.md +0 -37
- package/docs/api/interfaces/GroupAuthorization.md +0 -23
- package/docs/api/interfaces/GroupChangeEntry.md +0 -42
- package/docs/api/interfaces/GroupMemberDevice.md +0 -26
- package/docs/api/interfaces/IEcOneTimePreKeyStore.md +0 -86
- package/docs/api/interfaces/IEcSignedPreKeyStore.md +0 -133
- package/docs/api/interfaces/IGroupServer.md +0 -120
- package/docs/api/interfaces/IGroupStateStore.md +0 -128
- package/docs/api/interfaces/IIdentityKeyStore.md +0 -312
- package/docs/api/interfaces/IKemPreKeyStore.md +0 -144
- package/docs/api/interfaces/IKyberLastResortPreKeyStore.md +0 -112
- package/docs/api/interfaces/ILogger.md +0 -117
- package/docs/api/interfaces/IProtocolStore.md +0 -1033
- package/docs/api/interfaces/ISenderKeyStore.md +0 -417
- package/docs/api/interfaces/ISesameStore.md +0 -249
- package/docs/api/interfaces/ISessionStore.md +0 -178
- package/docs/api/interfaces/ISignalProtocolClient.md +0 -1185
- package/docs/api/interfaces/ISignalProtocolLocalSecretVault.md +0 -71
- package/docs/api/interfaces/ISignalProtocolLocalStore.md +0 -2053
- package/docs/api/interfaces/ISignalProtocolManager.md +0 -272
- package/docs/api/interfaces/ISignalProtocolRelayServer.md +0 -1329
- package/docs/api/interfaces/IdentityKeyPair.md +0 -49
- package/docs/api/interfaces/IncomingEnvelope.md +0 -91
- package/docs/api/interfaces/InspectedSignalProtocolContent.md +0 -43
- package/docs/api/interfaces/KDFChain.md +0 -31
- package/docs/api/interfaces/KemLastResortPreKeyUpload.md +0 -50
- package/docs/api/interfaces/KeyPair.md +0 -23
- package/docs/api/interfaces/KyberPreKey.md +0 -42
- package/docs/api/interfaces/MLKEMBraidAgentState.md +0 -191
- package/docs/api/interfaces/MLKEMBraidMessage.md +0 -49
- package/docs/api/interfaces/MediaAttachmentDeleteSyncInput.md +0 -31
- package/docs/api/interfaces/MessageHeader.md +0 -49
- package/docs/api/interfaces/MessageRecord.md +0 -86
- package/docs/api/interfaces/ParsedReceiptContent.md +0 -19
- package/docs/api/interfaces/ParsedTypingContent.md +0 -19
- package/docs/api/interfaces/PreKeyMaintenanceStore.md +0 -88
- package/docs/api/interfaces/PreKeyMessage.md +0 -159
- package/docs/api/interfaces/PreKeyStatusResult.md +0 -21
- package/docs/api/interfaces/PreKeyUpload.md +0 -42
- package/docs/api/interfaces/ProcessEnvelopeOptions.md +0 -72
- package/docs/api/interfaces/ProtocolAddress.md +0 -38
- package/docs/api/interfaces/ProtocolStrategyConfig.md +0 -91
- package/docs/api/interfaces/RatchetMessage.md +0 -96
- package/docs/api/interfaces/ReadSyncEntryInput.md +0 -19
- package/docs/api/interfaces/ReceiverChain.md +0 -43
- package/docs/api/interfaces/RecipientUsernameSyncInput.md +0 -31
- package/docs/api/interfaces/RelayPreKeyBundle.md +0 -254
- package/docs/api/interfaces/RemoteObjectDownload.md +0 -33
- package/docs/api/interfaces/RemoteObjectUpload.md +0 -49
- package/docs/api/interfaces/ResolvedSPQRInfoStrings.md +0 -27
- package/docs/api/interfaces/ResolvedSPQRLimits.md +0 -37
- package/docs/api/interfaces/RetryRequest.md +0 -80
- package/docs/api/interfaces/SCKAState.md +0 -65
- package/docs/api/interfaces/SPQRLimits.md +0 -40
- package/docs/api/interfaces/SPQRState.md +0 -191
- package/docs/api/interfaces/SafetyNumber.md +0 -60
- package/docs/api/interfaces/SafetyNumberConfirmation.md +0 -46
- package/docs/api/interfaces/SealedSenderConfig.md +0 -70
- package/docs/api/interfaces/SendOptions.md +0 -191
- package/docs/api/interfaces/SendResult.md +0 -93
- package/docs/api/interfaces/SenderKeyDistributionMessage.md +0 -43
- package/docs/api/interfaces/SenderKeyState.md +0 -76
- package/docs/api/interfaces/SenderKeysConfig.md +0 -65
- package/docs/api/interfaces/SentSyncTranscriptInput.md +0 -31
- package/docs/api/interfaces/ServiceId.md +0 -19
- package/docs/api/interfaces/SesameMessage.md +0 -84
- package/docs/api/interfaces/SesameStats.md +0 -57
- package/docs/api/interfaces/SessionHealthResult.md +0 -120
- package/docs/api/interfaces/SessionRecord.md +0 -80
- package/docs/api/interfaces/SessionRecordMetadata.md +0 -109
- package/docs/api/interfaces/SessionState.md +0 -368
- package/docs/api/interfaces/SessionTrustCommit.md +0 -58
- package/docs/api/interfaces/SignalProtocolBlockingHooks.md +0 -44
- package/docs/api/interfaces/SignalProtocolBlockingManagerOptions.md +0 -31
- package/docs/api/interfaces/SignalProtocolBlockingMirror.md +0 -30
- package/docs/api/interfaces/SignalProtocolBlockingStore.md +0 -83
- package/docs/api/interfaces/SignalProtocolClientAdapterConfig.md +0 -44
- package/docs/api/interfaces/SignalProtocolClientCompositionOptions.md +0 -693
- package/docs/api/interfaces/SignalProtocolClientConfig.md +0 -839
- package/docs/api/interfaces/SignalProtocolClientDeleteLocalAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientHooks.md +0 -506
- package/docs/api/interfaces/SignalProtocolClientIdentityConfig.md +0 -35
- package/docs/api/interfaces/SignalProtocolClientLoadLocalAttachmentInput.md +0 -187
- package/docs/api/interfaces/SignalProtocolClientLoadedLocalAttachment.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMedia.md +0 -83
- package/docs/api/interfaces/SignalProtocolClientMediaCompletedResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaConfig.md +0 -157
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadCompletedResult.md +0 -37
- package/docs/api/interfaces/SignalProtocolClientMediaDownloadNotNeededResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaFailedResult.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMediaOperationOptions.md +0 -53
- package/docs/api/interfaces/SignalProtocolClientMediaPendingResult.md +0 -19
- package/docs/api/interfaces/SignalProtocolClientMediaProcessResult.md +0 -43
- package/docs/api/interfaces/SignalProtocolClientMediaSkippedResult.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientMediaUploadCompletedResult.md +0 -31
- package/docs/api/interfaces/SignalProtocolClientProcessPendingMediaOptions.md +0 -87
- package/docs/api/interfaces/SignalProtocolClientSaveDownloadedAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientSaveUploadedAttachmentInput.md +0 -25
- package/docs/api/interfaces/SignalProtocolClientSyncDeleteInput.md +0 -19
- package/docs/api/interfaces/SignalProtocolConfig.md +0 -50
- package/docs/api/interfaces/SignalProtocolContentAdapter.md +0 -325
- package/docs/api/interfaces/SignalProtocolRemoteObjectStore.md +0 -88
- package/docs/api/interfaces/SkippedSenderMessageKey.md +0 -26
- package/docs/api/interfaces/TaskNotificationAckSyncInput.md +0 -31
- package/docs/api/interfaces/TripleRatchetState.md +0 -64
- package/docs/api/interfaces/UserRecord.md +0 -71
- package/docs/api/interfaces/UsernameStateSyncInput.md +0 -19
- package/docs/api/interfaces/VerificationStateSyncInput.md +0 -31
- package/docs/api/interfaces/VersionNegotiationState.md +0 -84
- package/docs/api/interfaces/ViewOnceOpenSyncInput.md +0 -19
- package/docs/api/namespaces/ProtocolAddress/README.md +0 -33
- package/docs/api/namespaces/ProtocolAddress/functions/create.md +0 -41
- package/docs/api/namespaces/ProtocolAddress/functions/equals.md +0 -39
- package/docs/api/namespaces/ProtocolAddress/functions/fromStorageKey.md +0 -36
- package/docs/api/namespaces/ProtocolAddress/functions/isUser.md +0 -39
- package/docs/api/namespaces/ProtocolAddress/functions/isValid.md +0 -34
- package/docs/api/namespaces/ProtocolAddress/functions/parse.md +0 -41
- package/docs/api/namespaces/ProtocolAddress/functions/toStorageKey.md +0 -38
- package/docs/api/namespaces/ProtocolAddress/functions/toString.md +0 -34
- package/docs/api/namespaces/SessionRecord/README.md +0 -30
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrent.md +0 -40
- package/docs/api/namespaces/SessionRecord/functions/archiveCurrentState.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/create.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/deserialize.md +0 -29
- package/docs/api/namespaces/SessionRecord/functions/findSession.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/getAllSessions.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/getArchivedCount.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/hasCurrentSession.md +0 -25
- package/docs/api/namespaces/SessionRecord/functions/hasUsableSenderChain.md +0 -36
- package/docs/api/namespaces/SessionRecord/functions/promoteSession.md +0 -34
- package/docs/api/namespaces/SessionRecord/functions/serialize.md +0 -28
- package/docs/api/namespaces/SessionRecord/variables/MAX_ARCHIVED_SESSIONS.md +0 -14
- package/docs/api/namespaces/SessionState/README.md +0 -15
- package/docs/api/namespaces/SessionState/functions/getSessionId.md +0 -32
- package/docs/api/namespaces/blocking/README.md +0 -43
- package/docs/api/namespaces/encoding/README.md +0 -33
- package/docs/api/namespaces/encoding/functions/base64ToUrlSafe.md +0 -28
- package/docs/api/namespaces/encoding/functions/bytesToBase64.md +0 -21
- package/docs/api/namespaces/encoding/functions/bytesToString.md +0 -21
- package/docs/api/namespaces/encoding/functions/bytesToUrlSafeBase64.md +0 -33
- package/docs/api/namespaces/encoding/functions/concatBytes.md +0 -21
- package/docs/api/namespaces/encoding/functions/stringToBytes.md +0 -21
- package/docs/api/namespaces/encoding/functions/urlSafeToBase64.md +0 -27
- package/docs/api/namespaces/keys/README.md +0 -130
- package/docs/api/namespaces/keys/functions/acceptContactIdentityRotation.md +0 -33
- package/docs/api/namespaces/keys/functions/assertIdentityCommitment.md +0 -25
- package/docs/api/namespaces/keys/functions/canonicalizeDeviceIdentityKey.md +0 -30
- package/docs/api/namespaces/keys/functions/compareDeviceIdentityKeys.md +0 -28
- package/docs/api/namespaces/keys/functions/compositeIdentitiesEqual.md +0 -23
- package/docs/api/namespaces/keys/functions/createCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/createPreKeySignatureContext.md +0 -31
- package/docs/api/namespaces/keys/functions/createUnverifiedContactIdentityRecord.md +0 -23
- package/docs/api/namespaces/keys/functions/decodeCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/deriveIdentityCommitment.md +0 -19
- package/docs/api/namespaces/keys/functions/encodeCompositeIdentityV1.md +0 -19
- package/docs/api/namespaces/keys/functions/evaluateContactIdentityCandidate.md +0 -27
- package/docs/api/namespaces/keys/functions/generateEcOneTimePreKeys.md +0 -37
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKey.md +0 -39
- package/docs/api/namespaces/keys/functions/generateEcSignedPreKeyId.md +0 -21
- package/docs/api/namespaces/keys/functions/generateIdentityKeyPair.md +0 -24
- package/docs/api/namespaces/keys/functions/generateKemOneTimePreKeys.md +0 -47
- package/docs/api/namespaces/keys/functions/generateKyberLastResortPreKey.md +0 -37
- package/docs/api/namespaces/keys/functions/generateRegistrationId.md +0 -13
- package/docs/api/namespaces/keys/functions/isValidDeviceIdentityKey.md +0 -22
- package/docs/api/namespaces/keys/functions/signMlKem1024PreKey.md +0 -29
- package/docs/api/namespaces/keys/functions/signPreKey.md +0 -31
- package/docs/api/namespaces/keys/functions/validateContactIdentityRecord.md +0 -19
- package/docs/api/namespaces/keys/functions/verifyContactIdentityRecord.md +0 -31
- package/docs/api/namespaces/keys/functions/verifyMlKem1024PreKey.md +0 -33
- package/docs/api/namespaces/keys/functions/verifyPreKeySignature.md +0 -35
- package/docs/api/namespaces/keys/interfaces/CompositeIdentityV1.md +0 -33
- package/docs/api/namespaces/keys/interfaces/ContactIdentityRecord.md +0 -53
- package/docs/api/namespaces/keys/interfaces/KemOneTimePreKey.md +0 -43
- package/docs/api/namespaces/keys/type-aliases/IdentityCandidateStatus.md +0 -9
- package/docs/api/namespaces/keys/type-aliases/IdentityTrustState.md +0 -9
- package/docs/api/namespaces/keys/type-aliases/IdentityType.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_ED25519_TAG.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_LENGTH.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_VERSION.md +0 -9
- package/docs/api/namespaces/keys/variables/COMPOSITE_IDENTITY_V1_X25519_TAG.md +0 -9
- package/docs/api/namespaces/keys/variables/IDENTITY_COMMITMENT_V1_DOMAIN.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_ML_KEM_1024.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_ALGORITHM_X25519.md +0 -9
- package/docs/api/namespaces/keys/variables/PREKEY_SIGNATURE_V1_DOMAIN.md +0 -9
- package/docs/api/namespaces/keys/variables/UNPINNED_DEVICE_IDENTITY_KEY.md +0 -18
- package/docs/api/namespaces/media/README.md +0 -105
- package/docs/api/namespaces/media/classes/MediaAttachmentError.md +0 -57
- package/docs/api/namespaces/media/functions/createByteRangeMediaAttachmentTransfer.md +0 -19
- package/docs/api/namespaces/media/functions/createMediaAttachmentDeliveryId.md +0 -29
- package/docs/api/namespaces/media/functions/createMediaAttachmentId.md +0 -19
- package/docs/api/namespaces/media/functions/createMediaAttachmentMessage.md +0 -25
- package/docs/api/namespaces/media/functions/createMediaAttachmentPointer.md +0 -19
- package/docs/api/namespaces/media/functions/createTusMediaAttachmentTransfer.md +0 -19
- package/docs/api/namespaces/media/functions/deleteMediaAttachment.md +0 -23
- package/docs/api/namespaces/media/functions/executeMediaAttachmentJob.md +0 -23
- package/docs/api/namespaces/media/functions/isMediaAttachmentFlagSet.md +0 -19
- package/docs/api/namespaces/media/functions/parseMediaAttachmentMessage.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanup.md +0 -23
- package/docs/api/namespaces/media/functions/planMediaAttachmentCleanupJobs.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentDeleteSync.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentDownloadJob.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentOpen.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentProcessing.md +0 -19
- package/docs/api/namespaces/media/functions/planMediaAttachmentUploadJob.md +0 -19
- package/docs/api/namespaces/media/functions/prepareMediaAttachmentUpload.md +0 -30
- package/docs/api/namespaces/media/functions/resolveMediaAttachment.md +0 -30
- package/docs/api/namespaces/media/functions/serializeMediaAttachmentMessage.md +0 -25
- package/docs/api/namespaces/media/functions/validateMediaAttachmentPolicy.md +0 -23
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentPartialStore.md +0 -68
- package/docs/api/namespaces/media/interfaces/ByteRangeMediaAttachmentTransferOptions.md +0 -91
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentOptions.md +0 -25
- package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentResult.md +0 -19
- package/docs/api/namespaces/media/interfaces/ExecuteMediaAttachmentJobOptions.md +0 -157
- package/docs/api/namespaces/media/interfaces/MediaAttachmentBackgroundJob.md +0 -85
- package/docs/api/namespaces/media/interfaces/MediaAttachmentCleanupPlan.md +0 -37
- package/docs/api/namespaces/media/interfaces/MediaAttachmentJobExecutionResult.md +0 -55
- package/docs/api/namespaces/media/interfaces/MediaAttachmentMessage.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentOpenDecision.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPointer.md +0 -133
- package/docs/api/namespaces/media/interfaces/MediaAttachmentPolicy.md +0 -67
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProcessingPlan.md +0 -73
- package/docs/api/namespaces/media/interfaces/MediaAttachmentProgress.md +0 -69
- package/docs/api/namespaces/media/interfaces/MediaAttachmentResumeState.md +0 -37
- package/docs/api/namespaces/media/interfaces/MediaAttachmentRetryOptions.md +0 -31
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransfer.md +0 -51
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferCheckpoint.md +0 -69
- package/docs/api/namespaces/media/interfaces/MediaAttachmentTransferOptions.md +0 -67
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadJobData.md +0 -19
- package/docs/api/namespaces/media/interfaces/MediaAttachmentUploadResponse.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentCleanupJobsInput.md +0 -61
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDeleteSyncInput.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentDownloadJobInput.md +0 -161
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentOpenInput.md +0 -25
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentProcessingInput.md +0 -83
- package/docs/api/namespaces/media/interfaces/PlanMediaAttachmentUploadJobInput.md +0 -147
- package/docs/api/namespaces/media/interfaces/PrepareMediaAttachmentUploadOptions.md +0 -144
- package/docs/api/namespaces/media/interfaces/ResolveMediaAttachmentOptions.md +0 -55
- package/docs/api/namespaces/media/interfaces/ResolvedMediaAttachment.md +0 -109
- package/docs/api/namespaces/media/interfaces/TusMediaAttachmentTransferOptions.md +0 -85
- package/docs/api/namespaces/media/type-aliases/CreateMediaAttachmentPointerInput.md +0 -15
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCheckpointCallback.md +0 -19
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentCleanupReason.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentErrorCode.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentFlag.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobExecutionStatus.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobOperation.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobPriority.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSkipReason.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentJobSource.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentKnownIds.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentMessageType.md +0 -9
- package/docs/api/namespaces/media/type-aliases/MediaAttachmentProgressCallback.md +0 -19
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_DEFAULTS.md +0 -47
- package/docs/api/namespaces/media/variables/MEDIA_ATTACHMENT_POLICY_PRESETS.md +0 -95
- package/docs/api/namespaces/media/variables/MediaAttachmentCleanupReason.md +0 -27
- package/docs/api/namespaces/media/variables/MediaAttachmentErrorCode.md +0 -75
- package/docs/api/namespaces/media/variables/MediaAttachmentFlag.md +0 -23
- package/docs/api/namespaces/media/variables/MediaAttachmentJobExecutionStatus.md +0 -19
- package/docs/api/namespaces/media/variables/MediaAttachmentJobOperation.md +0 -31
- package/docs/api/namespaces/media/variables/MediaAttachmentJobPriority.md +0 -23
- package/docs/api/namespaces/media/variables/MediaAttachmentJobSource.md +0 -51
- package/docs/api/namespaces/media/variables/MediaAttachmentMessageType.md +0 -15
- package/docs/api/namespaces/media/variables/downloadMediaAttachment.md +0 -30
- package/docs/api/namespaces/safety/README.md +0 -61
- package/docs/api/namespaces/safety/classes/DisplayableFingerprint.md +0 -108
- package/docs/api/namespaces/safety/classes/Fingerprint.md +0 -104
- package/docs/api/namespaces/safety/classes/ScannableFingerprint.md +0 -209
- package/docs/api/namespaces/safety/functions/base64ToBytes.md +0 -21
- package/docs/api/namespaces/safety/functions/clearFingerprintCache.md +0 -15
- package/docs/api/namespaces/safety/functions/compareSafetyNumbers.md +0 -25
- package/docs/api/namespaces/safety/functions/createFingerprintData.md +0 -60
- package/docs/api/namespaces/safety/functions/extractQrData.md +0 -34
- package/docs/api/namespaces/safety/functions/generateCompositeSafetyNumber.md +0 -39
- package/docs/api/namespaces/safety/functions/generateEmojiFingerprint.md +0 -24
- package/docs/api/namespaces/safety/functions/generateSingleKeyReferenceSafetyNumber.md +0 -51
- package/docs/api/namespaces/safety/functions/generateVerifySchemeUrl.md +0 -32
- package/docs/api/namespaces/safety/functions/generateVerifyUrl.md +0 -49
- package/docs/api/namespaces/safety/functions/isValidSafetyNumber.md +0 -21
- package/docs/api/namespaces/safety/functions/isVerifyUrl.md +0 -45
- package/docs/api/namespaces/safety/functions/parseVerifyUrl.md +0 -31
- package/docs/api/namespaces/safety/interfaces/FingerprintData.md +0 -52
- package/docs/api/namespaces/safety/interfaces/SafetyNumber.md +0 -49
- package/docs/api/namespaces/safety/interfaces/VerifyLinkConfig.md +0 -28
- package/docs/api/namespaces/safety/interfaces/VerifyUrlParams.md +0 -49
- package/docs/api/namespaces/safety/type-aliases/CompareResult.md +0 -21
- package/docs/api/namespaces/safety/variables/DEFAULT_VERIFY_LINK_CONFIG.md +0 -12
- package/docs/api/namespaces/safety/variables/FINGERPRINT_ITERATIONS.md +0 -12
- package/docs/api/namespaces/safety/variables/FINGERPRINT_VERSION.md +0 -12
- package/docs/api/namespaces/safety/variables/VERIFY_BASE_URL.md +0 -11
- package/docs/api/namespaces/safety/variables/VERIFY_SCHEME_URL.md +0 -11
- package/docs/api/type-aliases/Base64.md +0 -20
- package/docs/api/type-aliases/BraidPolicy.md +0 -11
- package/docs/api/type-aliases/Bytes.md +0 -20
- package/docs/api/type-aliases/Ciphertext.md +0 -21
- package/docs/api/type-aliases/DeviceType.md +0 -11
- package/docs/api/type-aliases/DownloadedAttachment.md +0 -11
- package/docs/api/type-aliases/GroupId.md +0 -27
- package/docs/api/type-aliases/Hex.md +0 -20
- package/docs/api/type-aliases/HookName.md +0 -11
- package/docs/api/type-aliases/PostQuantumPolicy.md +0 -11
- package/docs/api/type-aliases/PreparedAttachmentUpload.md +0 -14
- package/docs/api/type-aliases/PrivateKey.md +0 -22
- package/docs/api/type-aliases/ProgressCallback.md +0 -45
- package/docs/api/type-aliases/PublicKey.md +0 -22
- package/docs/api/type-aliases/RemoteObjectCompleteUploadRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectDeleteRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectDownloadRequest.md +0 -19
- package/docs/api/type-aliases/RemoteObjectUploadRequest.md +0 -42
- package/docs/api/type-aliases/SCKAMode.md +0 -11
- package/docs/api/type-aliases/SealedSenderAuth.md +0 -15
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaCleanupResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaDownloadResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaOperationResult.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadInput.md +0 -9
- package/docs/api/type-aliases/SignalProtocolClientMediaUploadResult.md +0 -9
- package/docs/api/type-aliases/Signature.md +0 -21
- package/docs/api/type-aliases/Unsubscribe.md +0 -15
- package/docs/api/variables/BraidPolicy.md +0 -21
- package/docs/api/variables/DEFAULT_DEVICE_ID.md +0 -12
- package/docs/api/variables/DOUBLE_RATCHET_SPEC.md +0 -11
- package/docs/api/variables/GROUP_V2_PREFIX.md +0 -11
- package/docs/api/variables/KEY_REFRESH_INTERVAL_MS_DEFAULT.md +0 -11
- package/docs/api/variables/MAX_MESSAGE_KEYS.md +0 -14
- package/docs/api/variables/MAX_PREKEY_AGE_MS_DEFAULT.md +0 -11
- package/docs/api/variables/MAX_RECEIVER_CHAINS.md +0 -14
- package/docs/api/variables/MAX_REGISTRATION_ID.md +0 -16
- package/docs/api/variables/MAX_SKIP.md +0 -11
- package/docs/api/variables/MESSAGE_FORMAT.md +0 -11
- package/docs/api/variables/MIN_REGISTRATION_ID.md +0 -16
- package/docs/api/variables/ML_KEM_BRAID_SPEC.md +0 -11
- package/docs/api/variables/ONE_TIME_PREKEY_BATCH_SIZE.md +0 -21
- package/docs/api/variables/PQXDH_SPEC.md +0 -11
- package/docs/api/variables/PostQuantumPolicy.md +0 -21
- package/docs/api/variables/SENDER_KEY_FORMAT.md +0 -11
- package/docs/api/variables/SENDER_KEY_SPEC.md +0 -11
- package/docs/api/variables/SESAME_SPEC.md +0 -11
- package/docs/api/variables/SESSION_FORMAT.md +0 -11
- package/docs/api/variables/SPQR_LIMITS_DEFAULTS.md +0 -11
- package/docs/api/variables/X3DH_SPEC.md +0 -9
- package/docs/api/variables/defaultSignalProtocolLogger.md +0 -32
- /package/dist/internal/{groups-v2 → groups}/invite-link.d.ts +0 -0
- /package/dist/internal/{groups-v2 → groups}/invite-link.js +0 -0
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Wire types for the Convex relay adapter.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The component's tables are isolated: an application cannot read or query
|
|
5
|
+
* them, only call the component's functions. Row types for those tables would
|
|
6
|
+
* describe values no consumer can obtain, so none are declared here — see
|
|
7
|
+
* `remote/relay/convex/component/schema.ts` for the storage layout and
|
|
8
|
+
* `docs/SCHEMA.md` for what is stored and for how long.
|
|
6
9
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - identityKeys
|
|
10
|
-
* - ecPreKeys
|
|
11
|
-
* - ecSignedPreKeys
|
|
12
|
-
* - kemOneTimePreKeys
|
|
13
|
-
* - kemLastResortPreKeys
|
|
14
|
-
* - messages
|
|
15
|
-
* - provisioningSessions
|
|
16
|
-
* - prekeyBundleFetches
|
|
10
|
+
* What crosses the boundary is function arguments and return values, and those
|
|
11
|
+
* are derived from the component's own validators rather than restated.
|
|
17
12
|
*/
|
|
18
13
|
export {};
|
|
19
14
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../remote/relay/convex/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../remote/relay/convex/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
* @see docs/INTERFACES.md
|
|
30
30
|
*/
|
|
31
31
|
export {};
|
|
32
|
-
export type { ISignalProtocolRelayServer,
|
|
32
|
+
export type { ISignalProtocolRelayServer, Envelope, DeviceInfo, DeviceType, DeviceRegistration, PreKeyUpload, PreKeyBundle, Unsubscribe, AccountIdentityProvisioning, AccountIdentityRotation, IRelayGroupServer, } from './types.js';
|
|
33
33
|
export { MockSignalProtocolRelayServer } from './mock/index.js';
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../remote/relay/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;GAIG;AACH,OAAO,EAAE,CAAC;AACV,YAAY,EACV,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../remote/relay/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;GAIG;AACH,OAAO,EAAE,CAAC;AACV,YAAY,EACV,0BAA0B,EAC1B,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,2BAA2B,EAC3B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,6BAA6B,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
* WARNING: All data is lost when the adapter is destroyed.
|
|
8
8
|
* DO NOT use in production.
|
|
9
9
|
*/
|
|
10
|
-
import type { ISignalProtocolRelayServer, Envelope, SealedSenderAuth, DeviceInfo, DeviceRegistration, PreKeyUpload, PreKeyBundle, EcSignedPreKeyUpload, KemLastResortPreKeyUpload, Unsubscribe, GroupMemberDevice, GroupChangeEntry, RetryRequest, AccountIdentityProvisioning, AccountIdentityRotation } from '../types.js';
|
|
11
|
-
import type { GroupAuthorization } from '../../../internal/groups
|
|
10
|
+
import type { ISignalProtocolRelayServer, Envelope, SealedSenderAuth, DeviceInfo, DeviceRegistration, PreKeyUpload, PreKeyBundle, EcSignedPreKeyUpload, KemLastResortPreKeyUpload, Unsubscribe, GroupMemberDevice, GroupChangeEntry, RetryRequest, AccountIdentityProvisioning, AccountIdentityRotation, IRelayGroupServer } from '../types.js';
|
|
11
|
+
import type { GroupAuthorization } from '../../../internal/groups/manager.js';
|
|
12
12
|
import type { CompositeIdentityV1, IdentityType } from '../../../keys/types.js';
|
|
13
|
+
import { type ServerPublicParams } from '../../../internal/protocol/zk/groups/server-params.js';
|
|
14
|
+
import { type ServiceId } from '../../../internal/protocol/zk/groups/uid-struct.js';
|
|
13
15
|
import { MockRelayFailureController, type MockRelayFailureOptions } from './failures.js';
|
|
14
16
|
export interface MockSignalProtocolRelayServerOptions {
|
|
15
17
|
failures?: MockRelayFailureOptions;
|
|
@@ -51,16 +53,15 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
51
53
|
private clientMessageReceipts;
|
|
52
54
|
private messageCounter;
|
|
53
55
|
private subscriptions;
|
|
54
|
-
private groupMembers;
|
|
55
56
|
private provisioningSessions;
|
|
56
57
|
private provisioningCounter;
|
|
57
58
|
private ecSignedPreKeyMetadata;
|
|
58
59
|
private kemLastResortPreKeyMetadata;
|
|
59
60
|
private retryRequests;
|
|
60
61
|
private retryRequestSubscriptions;
|
|
61
|
-
private
|
|
62
|
-
private
|
|
63
|
-
|
|
62
|
+
private readonly serverSecretParams;
|
|
63
|
+
private readonly groupAuthorizationServer;
|
|
64
|
+
readonly groupServer: IRelayGroupServer;
|
|
64
65
|
constructor(options?: MockSignalProtocolRelayServerOptions);
|
|
65
66
|
/** Build a storage key with explicit identity-type separation. */
|
|
66
67
|
private storageKey;
|
|
@@ -99,7 +100,6 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
99
100
|
}>;
|
|
100
101
|
uploadEcSignedPreKey(userId: string, ecSignedPreKey: EcSignedPreKeyUpload, identityType?: IdentityType): Promise<void>;
|
|
101
102
|
uploadKemLastResortPreKey(userId: string, kemLastResortPreKey: KemLastResortPreKeyUpload, identityType?: IdentityType): Promise<void>;
|
|
102
|
-
getGroupMembers(groupId: string): Promise<GroupMemberDevice[]>;
|
|
103
103
|
getActiveDevices(userId: string): Promise<GroupMemberDevice[]>;
|
|
104
104
|
createProvisioningSession(userId: string, ephemeralPublicKey: string): Promise<{
|
|
105
105
|
sessionId: string;
|
|
@@ -113,6 +113,7 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
113
113
|
getProvisioningMessage(sessionId: string): Promise<{
|
|
114
114
|
status: 'waiting' | 'connected' | 'ready' | 'linked_pending_ack' | 'completed' | 'rolled_back' | 'expired';
|
|
115
115
|
message: string | null;
|
|
116
|
+
expiresAt: number | null;
|
|
116
117
|
}>;
|
|
117
118
|
completeProvisioning(sessionId: string, deviceMetadata: {
|
|
118
119
|
encryptedDeviceName: ArrayBuffer;
|
|
@@ -154,7 +155,7 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
154
155
|
* Parses the binary blob, constructs per-device ReceivedMessages,
|
|
155
156
|
* and fans out via send().
|
|
156
157
|
*/
|
|
157
|
-
sendMultiRecipientUnidentified(sentMessageBase64: string, auth: SealedSenderAuth, timestamp: number,
|
|
158
|
+
sendMultiRecipientUnidentified(sentMessageBase64: string, auth: SealedSenderAuth, timestamp: number, recipientUserIds?: string[], clientMessageId?: string): Promise<{
|
|
158
159
|
messageId: string;
|
|
159
160
|
serverTimestamp: number;
|
|
160
161
|
uuids404: string[];
|
|
@@ -165,19 +166,36 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
165
166
|
setSenderCertificate(deviceId: number, certificate: string): void;
|
|
166
167
|
sendRetryRequest(request: RetryRequest): Promise<void>;
|
|
167
168
|
subscribeRetryRequests(userId: string, deviceId: number, handler: (request: RetryRequest) => Promise<void>): Unsubscribe;
|
|
168
|
-
createGroupState(groupId: Uint8Array, encryptedState: Uint8Array,
|
|
169
|
-
|
|
169
|
+
createGroupState(groupId: Uint8Array, encryptedState: Uint8Array, authorization: GroupAuthorization): Promise<void>;
|
|
170
|
+
createGroup(groupId: Uint8Array, encryptedState: Uint8Array, authorization: GroupAuthorization): Promise<void>;
|
|
171
|
+
getGroupState(groupId: Uint8Array, authorization: GroupAuthorization, version?: number): Promise<{
|
|
170
172
|
encryptedState: Uint8Array;
|
|
171
173
|
version: number;
|
|
174
|
+
baselineSignature: Uint8Array;
|
|
172
175
|
} | null>;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
getGroup(groupId: Uint8Array, authorization: GroupAuthorization, version?: number): Promise<{
|
|
177
|
+
encryptedState: Uint8Array;
|
|
178
|
+
version: number;
|
|
179
|
+
baselineSignature: Uint8Array;
|
|
180
|
+
} | null>;
|
|
181
|
+
getGroupJoinInfo(groupId: Uint8Array, inviteLinkPassword: Uint8Array, authorization: GroupAuthorization): Promise<{
|
|
182
|
+
encryptedJoinInfo: Uint8Array;
|
|
183
|
+
version: number;
|
|
184
|
+
} | null>;
|
|
185
|
+
getGroupChanges(groupId: Uint8Array, fromVersion: number, authorization: GroupAuthorization): Promise<GroupChangeEntry[]>;
|
|
186
|
+
submitGroupChange(groupId: Uint8Array, expectedVersion: number, actions: Uint8Array, inviteLinkPassword: Uint8Array, authorization: GroupAuthorization): Promise<GroupChangeEntry>;
|
|
177
187
|
private userIdentities;
|
|
178
188
|
private getOrCreateIdentity;
|
|
179
189
|
issueAuthCredential(userId: string): Promise<Uint8Array>;
|
|
180
|
-
|
|
190
|
+
issueProfileKeyCredential(userId: string, profileKey: Uint8Array): Promise<Uint8Array>;
|
|
191
|
+
/** Published parameters for wiring the executable reference group server. */
|
|
192
|
+
getGroupServerPublicParams(): ServerPublicParams;
|
|
193
|
+
/** Service IDs deterministically associated with a mock relay account. */
|
|
194
|
+
getGroupServiceIds(userId: string): {
|
|
195
|
+
aci: ServiceId;
|
|
196
|
+
pni?: ServiceId;
|
|
197
|
+
};
|
|
198
|
+
refreshGroupSendEndorsements(groupId: Uint8Array, authorization: GroupAuthorization): Promise<{
|
|
181
199
|
endorsements: Uint8Array;
|
|
182
200
|
expiration: number;
|
|
183
201
|
}>;
|
|
@@ -193,10 +211,6 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
193
211
|
* Clear all in-memory data.
|
|
194
212
|
*/
|
|
195
213
|
clear(): void;
|
|
196
|
-
/**
|
|
197
|
-
* Set group members for deterministic local setup.
|
|
198
|
-
*/
|
|
199
|
-
setGroupMembers(groupId: string, members: GroupMemberDevice[]): void;
|
|
200
214
|
/**
|
|
201
215
|
* Inspect pending messages for a device.
|
|
202
216
|
*/
|
|
@@ -240,7 +254,6 @@ export declare class MockSignalProtocolRelayServer implements ISignalProtocolRel
|
|
|
240
254
|
*/
|
|
241
255
|
setPreKeyCount(userId: string, deviceId: number, type: 'ec' | 'kem', count: number, identityType?: IdentityType): void;
|
|
242
256
|
private recordConsumedPreKeyIds;
|
|
243
|
-
private groupIdToHex;
|
|
244
257
|
private deliverEnvelope;
|
|
245
258
|
private deliverPending;
|
|
246
259
|
private uint8ArrayToBase64;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../remote/relay/mock/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,0BAA0B,EAC1B,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC3B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../remote/relay/mock/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,0BAA0B,EAC1B,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC3B,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAS7E,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,oDAAoD,CAAC;AAS5D,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,iDAAiD,CAAC;AAazD,OAAO,EACL,0BAA0B,EAC1B,KAAK,uBAAuB,EAC7B,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,EAA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CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EACpF,YAAY,GAAE,YAAoB,GACjC,IAAI,CAGN;IAED;;;;;;;;;;OAUG;IACH,cAAc,CACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,GAAG,KAAK,EAClB,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,YAAoB,GACjC,IAAI,CAeN;IAMD,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,kBAAkB;CAW3B"}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
import { compositeIdentitiesEqual, decodeCompositeIdentityV1, deriveIdentityCommitment, encodeCompositeIdentityV1, } from '../../../keys/identity.js';
|
|
11
11
|
import { constantTimeEqual } from '../../../internal/crypto/utils.js';
|
|
12
12
|
import { PROVISIONING_SESSION_TTL_MS } from '../../../device/constants.js';
|
|
13
|
-
import { generateServerSecretParams,
|
|
13
|
+
import { generateServerSecretParams, } from '../../../internal/protocol/zk/groups/server-params.js';
|
|
14
14
|
import { issueAuthCredential as issueAuthCredentialZk, serializeAuthCredentialResponse, } from '../../../internal/protocol/zk/groups/auth-credential.js';
|
|
15
|
+
import { issueProfileKeyCredential as issueProfileKeyCredentialZk, serializeProfileKeyCredentialResponse, } from '../../../internal/protocol/zk/groups/profile-key-credential.js';
|
|
15
16
|
import { SERVICE_ID_ACI, SERVICE_ID_PNI, uuidToBytes, } from '../../../internal/protocol/zk/groups/uid-struct.js';
|
|
16
17
|
import { SECONDS_PER_DAY } from '../../../internal/protocol/zk/groups/group-params.js';
|
|
17
18
|
import { defaultExpiration, deriveForExpiration, issueEndorsements, serializeEndorsementsResponse, } from '../../../internal/protocol/zk/groups/group-send-endorsement.js';
|
|
@@ -21,6 +22,7 @@ import { ristretto255 } from '@noble/curves/ed25519.js';
|
|
|
21
22
|
import { MAX_DEVICES } from '../../../device/constants.js';
|
|
22
23
|
import { SealedSenderAuthError } from '../../../types/errors.js';
|
|
23
24
|
import { MockRelayFailureController, } from './failures.js';
|
|
25
|
+
import { MockGroupAuthorizationServer } from './group-server.js';
|
|
24
26
|
/**
|
|
25
27
|
* Simulate the serialization boundary of a real relay.
|
|
26
28
|
*
|
|
@@ -30,6 +32,16 @@ import { MockRelayFailureController, } from './failures.js';
|
|
|
30
32
|
function cloneRelayValue(value) {
|
|
31
33
|
return structuredClone(value);
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Reject an expired provisioning session. Throw-only, mirroring the Convex
|
|
37
|
+
* component: expiry is never stored, only computed. Sessions that lapse are
|
|
38
|
+
* rejected here and reported as `expired` by `getProvisioningMessage`.
|
|
39
|
+
*/
|
|
40
|
+
function requireLiveProvisioningSession(session, sessionId) {
|
|
41
|
+
if (session.expiresAt <= Date.now()) {
|
|
42
|
+
throw new Error(`Provisioning session ${sessionId} expired`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
33
45
|
export class MockSignalProtocolRelayServer {
|
|
34
46
|
failures;
|
|
35
47
|
// Device registry
|
|
@@ -51,8 +63,6 @@ export class MockSignalProtocolRelayServer {
|
|
|
51
63
|
messageCounter = 0;
|
|
52
64
|
// Subscriptions
|
|
53
65
|
subscriptions = new Map();
|
|
54
|
-
// Group members for deterministic group-message fanout.
|
|
55
|
-
groupMembers = new Map(); // key: groupId
|
|
56
66
|
// Provisioning sessions
|
|
57
67
|
provisioningSessions = new Map();
|
|
58
68
|
provisioningCounter = 0;
|
|
@@ -62,13 +72,17 @@ export class MockSignalProtocolRelayServer {
|
|
|
62
72
|
// Retry requests (SESAME spec §6.2)
|
|
63
73
|
retryRequests = new Map(); // key: `${originalSenderUserId}:${originalSenderDeviceId}`
|
|
64
74
|
retryRequestSubscriptions = new Map();
|
|
65
|
-
// GroupsV2 encrypted state (server-opaque)
|
|
66
|
-
groupStates = new Map(); // key: hex(groupId)
|
|
67
|
-
groupChangeLogs = new Map(); // key: hex(groupId)
|
|
68
75
|
// Server secret params for signing and ZK auth (deterministic local seed)
|
|
69
76
|
serverSecretParams = generateServerSecretParams(new Uint8Array(32));
|
|
77
|
+
groupAuthorizationServer = new MockGroupAuthorizationServer(this.serverSecretParams);
|
|
78
|
+
groupServer;
|
|
70
79
|
constructor(options = {}) {
|
|
71
80
|
this.failures = new MockRelayFailureController(options.failures, (targetKey, envelope) => this.deliverEnvelope(targetKey, envelope), (targetKey) => this.deliverPending(targetKey));
|
|
81
|
+
this.groupServer = {
|
|
82
|
+
server: this.groupAuthorizationServer,
|
|
83
|
+
issueAuthCredential: (userId) => this.issueAuthCredential(userId),
|
|
84
|
+
issueProfileKeyCredential: (userId, profileKey) => this.issueProfileKeyCredential(userId, profileKey),
|
|
85
|
+
};
|
|
72
86
|
}
|
|
73
87
|
/** Build a storage key with explicit identity-type separation. */
|
|
74
88
|
storageKey(userId, deviceId, identityType = 'aci') {
|
|
@@ -507,9 +521,6 @@ export class MockSignalProtocolRelayServer {
|
|
|
507
521
|
},
|
|
508
522
|
], identityType);
|
|
509
523
|
}
|
|
510
|
-
async getGroupMembers(groupId) {
|
|
511
|
-
return cloneRelayValue(this.groupMembers.get(groupId) || []);
|
|
512
|
-
}
|
|
513
524
|
async getActiveDevices(userId) {
|
|
514
525
|
const deviceInfos = this.devices.get(userId) || [];
|
|
515
526
|
return deviceInfos
|
|
@@ -529,7 +540,7 @@ export class MockSignalProtocolRelayServer {
|
|
|
529
540
|
}
|
|
530
541
|
}
|
|
531
542
|
for (const session of this.provisioningSessions.values()) {
|
|
532
|
-
const sessionExpired =
|
|
543
|
+
const sessionExpired = session.expiresAt <= now;
|
|
533
544
|
if (session.userId === userId &&
|
|
534
545
|
session.assignedDeviceId &&
|
|
535
546
|
!sessionExpired &&
|
|
@@ -547,7 +558,7 @@ export class MockSignalProtocolRelayServer {
|
|
|
547
558
|
userId,
|
|
548
559
|
ephemeralPublicKey,
|
|
549
560
|
status: 'waiting',
|
|
550
|
-
|
|
561
|
+
expiresAt: now + PROVISIONING_SESSION_TTL_MS,
|
|
551
562
|
assignedDeviceId,
|
|
552
563
|
});
|
|
553
564
|
return { sessionId };
|
|
@@ -560,6 +571,7 @@ export class MockSignalProtocolRelayServer {
|
|
|
560
571
|
if (session.status !== 'waiting') {
|
|
561
572
|
throw new Error(`Provisioning session ${sessionId} is not in waiting state`);
|
|
562
573
|
}
|
|
574
|
+
requireLiveProvisioningSession(session, sessionId);
|
|
563
575
|
session.newDeviceEphemeralPublicKey = ephemeralPublicKey;
|
|
564
576
|
session.deviceMetadata = cloneRelayValue(deviceMetadata);
|
|
565
577
|
session.status = 'connected';
|
|
@@ -569,6 +581,7 @@ export class MockSignalProtocolRelayServer {
|
|
|
569
581
|
if (!session) {
|
|
570
582
|
throw new Error(`Provisioning session ${sessionId} not found`);
|
|
571
583
|
}
|
|
584
|
+
requireLiveProvisioningSession(session, sessionId);
|
|
572
585
|
if (session.status !== 'connected') {
|
|
573
586
|
throw new Error(`Provisioning session ${sessionId} is not in connected state`);
|
|
574
587
|
}
|
|
@@ -578,17 +591,22 @@ export class MockSignalProtocolRelayServer {
|
|
|
578
591
|
async getProvisioningMessage(sessionId) {
|
|
579
592
|
const session = this.provisioningSessions.get(sessionId);
|
|
580
593
|
if (!session) {
|
|
581
|
-
return { status: 'expired', message: null };
|
|
594
|
+
return { status: 'expired', message: null, expiresAt: null };
|
|
582
595
|
}
|
|
583
|
-
//
|
|
584
|
-
|
|
585
|
-
|
|
596
|
+
// Expiry is a computed status, never a stored one — reads do not mutate.
|
|
597
|
+
// Mirrors the Convex component, where a `patch` before a throw would be
|
|
598
|
+
// rolled back anyway and the cleanup cron deletes expired rows outright.
|
|
599
|
+
if (session.status !== 'completed' &&
|
|
600
|
+
session.status !== 'rolled_back' &&
|
|
601
|
+
session.expiresAt <= Date.now()) {
|
|
602
|
+
return { status: 'expired', message: null, expiresAt: session.expiresAt };
|
|
586
603
|
}
|
|
587
604
|
return {
|
|
588
605
|
status: session.status,
|
|
589
606
|
message: session.status === 'ready' || session.status === 'linked_pending_ack'
|
|
590
607
|
? session.encryptedMessage || null
|
|
591
608
|
: null,
|
|
609
|
+
expiresAt: session.expiresAt,
|
|
592
610
|
};
|
|
593
611
|
}
|
|
594
612
|
async completeProvisioning(sessionId, deviceMetadata) {
|
|
@@ -596,6 +614,9 @@ export class MockSignalProtocolRelayServer {
|
|
|
596
614
|
if (!session) {
|
|
597
615
|
throw new Error(`Provisioning session ${sessionId} not found`);
|
|
598
616
|
}
|
|
617
|
+
// Reject completion of an expired session — including one already in
|
|
618
|
+
// `linked_pending_ack`, whose device the cleanup cron is entitled to reap.
|
|
619
|
+
requireLiveProvisioningSession(session, sessionId);
|
|
599
620
|
if (session.status !== 'ready' && session.status !== 'linked_pending_ack') {
|
|
600
621
|
throw new Error(`Provisioning session ${sessionId} is not ready`);
|
|
601
622
|
}
|
|
@@ -632,6 +653,9 @@ export class MockSignalProtocolRelayServer {
|
|
|
632
653
|
}
|
|
633
654
|
this.devices.set(session.userId, existingDevices);
|
|
634
655
|
session.status = 'linked_pending_ack';
|
|
656
|
+
// Grant the acknowledgment its own full TTL window rather than whatever
|
|
657
|
+
// remains of the original session.
|
|
658
|
+
session.expiresAt = now + PROVISIONING_SESSION_TTL_MS;
|
|
635
659
|
return { deviceId: session.assignedDeviceId };
|
|
636
660
|
}
|
|
637
661
|
async acknowledgeProvisioning(sessionId) {
|
|
@@ -642,6 +666,8 @@ export class MockSignalProtocolRelayServer {
|
|
|
642
666
|
if (session.status !== 'linked_pending_ack') {
|
|
643
667
|
throw new Error(`Provisioning session ${sessionId} is not awaiting acknowledgment`);
|
|
644
668
|
}
|
|
669
|
+
// An expired ack window is a rolled-back link, not a race the ack can win.
|
|
670
|
+
requireLiveProvisioningSession(session, sessionId);
|
|
645
671
|
session.status = 'completed';
|
|
646
672
|
delete session.encryptedMessage;
|
|
647
673
|
delete session.newDeviceEphemeralPublicKey;
|
|
@@ -710,7 +736,7 @@ export class MockSignalProtocolRelayServer {
|
|
|
710
736
|
* Parses the binary blob, constructs per-device ReceivedMessages,
|
|
711
737
|
* and fans out via send().
|
|
712
738
|
*/
|
|
713
|
-
async sendMultiRecipientUnidentified(sentMessageBase64, auth, timestamp,
|
|
739
|
+
async sendMultiRecipientUnidentified(sentMessageBase64, auth, timestamp, recipientUserIds, clientMessageId) {
|
|
714
740
|
void auth; // Accept but don't validate in mock
|
|
715
741
|
const { base64ToBytes, bytesToBase64 } = await import('../../../internal/crypto/index.js');
|
|
716
742
|
const { asBase64 } = await import('../../../types/utils.js');
|
|
@@ -731,7 +757,6 @@ export class MockSignalProtocolRelayServer {
|
|
|
731
757
|
senderDeviceId: 0,
|
|
732
758
|
ciphertext: bytesToBase64(receivedMsg),
|
|
733
759
|
messageType: 'unidentified_sender',
|
|
734
|
-
groupId,
|
|
735
760
|
timestamp,
|
|
736
761
|
clientMessageId,
|
|
737
762
|
});
|
|
@@ -784,47 +809,28 @@ export class MockSignalProtocolRelayServer {
|
|
|
784
809
|
};
|
|
785
810
|
}
|
|
786
811
|
// ============================================================================
|
|
787
|
-
//
|
|
812
|
+
// Group state (encrypted, server-opaque)
|
|
788
813
|
// ============================================================================
|
|
789
|
-
async createGroupState(groupId, encryptedState,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
return
|
|
803
|
-
}
|
|
804
|
-
async
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
if (current.version !== expectedVersion) {
|
|
811
|
-
throw new Error(`Version conflict: expected ${expectedVersion}, got ${current.version}`);
|
|
812
|
-
}
|
|
813
|
-
const newVersion = current.version + 1;
|
|
814
|
-
const randomness = crypto.getRandomValues(new Uint8Array(32));
|
|
815
|
-
const serverSignature = serverSign(this.serverSecretParams, randomness, encryptedChange);
|
|
816
|
-
const entry = {
|
|
817
|
-
version: newVersion,
|
|
818
|
-
encryptedChange: cloneRelayValue(encryptedChange),
|
|
819
|
-
serverSignature,
|
|
820
|
-
timestamp: Date.now(),
|
|
821
|
-
};
|
|
822
|
-
current.encryptedState = cloneRelayValue(updatedEncryptedState);
|
|
823
|
-
current.version = newVersion;
|
|
824
|
-
const changes = this.groupChangeLogs.get(key) ?? [];
|
|
825
|
-
changes.push(cloneRelayValue(entry));
|
|
826
|
-
this.groupChangeLogs.set(key, changes);
|
|
827
|
-
return cloneRelayValue({ serverSignature });
|
|
814
|
+
async createGroupState(groupId, encryptedState, authorization) {
|
|
815
|
+
await this.groupAuthorizationServer.createGroup(groupId, encryptedState, authorization);
|
|
816
|
+
}
|
|
817
|
+
async createGroup(groupId, encryptedState, authorization) {
|
|
818
|
+
await this.createGroupState(groupId, encryptedState, authorization);
|
|
819
|
+
}
|
|
820
|
+
async getGroupState(groupId, authorization, version) {
|
|
821
|
+
return this.groupAuthorizationServer.getGroup(groupId, authorization, version);
|
|
822
|
+
}
|
|
823
|
+
async getGroup(groupId, authorization, version) {
|
|
824
|
+
return this.getGroupState(groupId, authorization, version);
|
|
825
|
+
}
|
|
826
|
+
async getGroupJoinInfo(groupId, inviteLinkPassword, authorization) {
|
|
827
|
+
return this.groupAuthorizationServer.getGroupJoinInfo(groupId, inviteLinkPassword, authorization);
|
|
828
|
+
}
|
|
829
|
+
async getGroupChanges(groupId, fromVersion, authorization) {
|
|
830
|
+
return this.groupAuthorizationServer.getGroupChanges(groupId, fromVersion, authorization);
|
|
831
|
+
}
|
|
832
|
+
async submitGroupChange(groupId, expectedVersion, actions, inviteLinkPassword, authorization) {
|
|
833
|
+
return this.groupAuthorizationServer.submitGroupChange(groupId, expectedVersion, actions, inviteLinkPassword, authorization);
|
|
828
834
|
}
|
|
829
835
|
// ============================================================================
|
|
830
836
|
// ZK Auth Credentials (anonymous group access)
|
|
@@ -842,22 +848,46 @@ export class MockSignalProtocolRelayServer {
|
|
|
842
848
|
async issueAuthCredential(userId) {
|
|
843
849
|
const identity = this.getOrCreateIdentity(userId);
|
|
844
850
|
const aci = { kind: SERVICE_ID_ACI, uuid: uuidToBytes(identity.uuid) };
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
+
const pni = identity.phoneNumberIdentifier
|
|
852
|
+
? {
|
|
853
|
+
kind: SERVICE_ID_PNI,
|
|
854
|
+
uuid: uuidToBytes(identity.phoneNumberIdentifier),
|
|
855
|
+
}
|
|
856
|
+
: undefined;
|
|
851
857
|
const redemptionTime = Math.floor(Date.now() / 1000 / SECONDS_PER_DAY) * SECONDS_PER_DAY;
|
|
852
858
|
const randomness = crypto.getRandomValues(new Uint8Array(32));
|
|
853
859
|
const response = issueAuthCredentialZk(this.serverSecretParams.credentialKeyPair, aci, pni, redemptionTime, randomness);
|
|
854
860
|
return serializeAuthCredentialResponse(response);
|
|
855
861
|
}
|
|
856
|
-
async
|
|
857
|
-
const
|
|
858
|
-
const
|
|
862
|
+
async issueProfileKeyCredential(userId, profileKey) {
|
|
863
|
+
const { aci } = this.getGroupServiceIds(userId);
|
|
864
|
+
const now = Math.floor(Date.now() / 1000);
|
|
865
|
+
const redemptionTime = Math.floor(now / SECONDS_PER_DAY) * SECONDS_PER_DAY +
|
|
866
|
+
2 * SECONDS_PER_DAY;
|
|
867
|
+
const response = issueProfileKeyCredentialZk(this.serverSecretParams.profileKeyCredentialKeyPair, aci, profileKey, redemptionTime, crypto.getRandomValues(new Uint8Array(32)));
|
|
868
|
+
return serializeProfileKeyCredentialResponse(response);
|
|
869
|
+
}
|
|
870
|
+
/** Published parameters for wiring the executable reference group server. */
|
|
871
|
+
getGroupServerPublicParams() {
|
|
872
|
+
return this.groupAuthorizationServer.publicParams;
|
|
873
|
+
}
|
|
874
|
+
/** Service IDs deterministically associated with a mock relay account. */
|
|
875
|
+
getGroupServiceIds(userId) {
|
|
876
|
+
const identity = this.getOrCreateIdentity(userId);
|
|
877
|
+
return {
|
|
878
|
+
aci: { kind: SERVICE_ID_ACI, uuid: uuidToBytes(identity.uuid) },
|
|
879
|
+
pni: identity.phoneNumberIdentifier
|
|
880
|
+
? {
|
|
881
|
+
kind: SERVICE_ID_PNI,
|
|
882
|
+
uuid: uuidToBytes(identity.phoneNumberIdentifier),
|
|
883
|
+
}
|
|
884
|
+
: undefined,
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
async refreshGroupSendEndorsements(groupId, authorization) {
|
|
888
|
+
const group = await this.groupAuthorizationServer.getGroup(groupId, authorization);
|
|
859
889
|
if (!group) {
|
|
860
|
-
throw new Error(
|
|
890
|
+
throw new Error('Group not found');
|
|
861
891
|
}
|
|
862
892
|
// Extract UidEncCiphertext objects from the serialized encrypted state.
|
|
863
893
|
// Matches the same parsing logic used by convex/signal/groups.ts.
|
|
@@ -921,26 +951,18 @@ export class MockSignalProtocolRelayServer {
|
|
|
921
951
|
this.pendingMessages.clear();
|
|
922
952
|
this.clientMessageReceipts.clear();
|
|
923
953
|
this.subscriptions.clear();
|
|
924
|
-
this.groupMembers.clear();
|
|
925
954
|
this.provisioningSessions.clear();
|
|
926
955
|
this.ecSignedPreKeyMetadata.clear();
|
|
927
956
|
this.kemLastResortPreKeyMetadata.clear();
|
|
928
957
|
this.retryRequests.clear();
|
|
929
958
|
this.retryRequestSubscriptions.clear();
|
|
930
|
-
this.
|
|
931
|
-
this.groupChangeLogs.clear();
|
|
959
|
+
this.groupAuthorizationServer.clear();
|
|
932
960
|
this.userIdentities.clear();
|
|
933
961
|
this.senderCertificates.clear();
|
|
934
962
|
this.failures.reset();
|
|
935
963
|
this.messageCounter = 0;
|
|
936
964
|
this.provisioningCounter = 0;
|
|
937
965
|
}
|
|
938
|
-
/**
|
|
939
|
-
* Set group members for deterministic local setup.
|
|
940
|
-
*/
|
|
941
|
-
setGroupMembers(groupId, members) {
|
|
942
|
-
this.groupMembers.set(groupId, cloneRelayValue(members));
|
|
943
|
-
}
|
|
944
966
|
/**
|
|
945
967
|
* Inspect pending messages for a device.
|
|
946
968
|
*/
|
|
@@ -1023,11 +1045,6 @@ export class MockSignalProtocolRelayServer {
|
|
|
1023
1045
|
}
|
|
1024
1046
|
consumed.set(storageKey, keyIds);
|
|
1025
1047
|
}
|
|
1026
|
-
groupIdToHex(groupId) {
|
|
1027
|
-
return Array.from(groupId)
|
|
1028
|
-
.map((b) => b.toString(16).padStart(2, '0'))
|
|
1029
|
-
.join('');
|
|
1030
|
-
}
|
|
1031
1048
|
deliverEnvelope(targetKey, envelope) {
|
|
1032
1049
|
const subscribers = this.subscriptions.get(targetKey) || [];
|
|
1033
1050
|
for (const callback of subscribers) {
|