@textrp/briij-js-sdk 41.0.0
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/CHANGELOG.md +6464 -0
- package/LICENSE +177 -0
- package/README.md +477 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.d.ts +14 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.d.ts.map +1 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.js +1 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.js.map +1 -0
- package/lib/@types/IIdentityServerProvider.d.ts +9 -0
- package/lib/@types/IIdentityServerProvider.d.ts.map +1 -0
- package/lib/@types/IIdentityServerProvider.js +1 -0
- package/lib/@types/IIdentityServerProvider.js.map +1 -0
- package/lib/@types/PushRules.d.ts +140 -0
- package/lib/@types/PushRules.d.ts.map +1 -0
- package/lib/@types/PushRules.js +94 -0
- package/lib/@types/PushRules.js.map +1 -0
- package/lib/@types/another-json.d.js +0 -0
- package/lib/@types/another-json.d.js.map +1 -0
- package/lib/@types/auth.d.ts +213 -0
- package/lib/@types/auth.d.ts.map +1 -0
- package/lib/@types/auth.js +107 -0
- package/lib/@types/auth.js.map +1 -0
- package/lib/@types/beacon.d.ts +106 -0
- package/lib/@types/beacon.d.ts.map +1 -0
- package/lib/@types/beacon.js +119 -0
- package/lib/@types/beacon.js.map +1 -0
- package/lib/@types/common.d.ts +10 -0
- package/lib/@types/common.d.ts.map +1 -0
- package/lib/@types/common.js +1 -0
- package/lib/@types/common.js.map +1 -0
- package/lib/@types/crypto.d.ts +46 -0
- package/lib/@types/crypto.d.ts.map +1 -0
- package/lib/@types/crypto.js +1 -0
- package/lib/@types/crypto.js.map +1 -0
- package/lib/@types/event.d.ts +356 -0
- package/lib/@types/event.d.ts.map +1 -0
- package/lib/@types/event.js +280 -0
- package/lib/@types/event.js.map +1 -0
- package/lib/@types/events.d.ts +92 -0
- package/lib/@types/events.d.ts.map +1 -0
- package/lib/@types/events.js +1 -0
- package/lib/@types/events.js.map +1 -0
- package/lib/@types/extensible_events.d.ts +98 -0
- package/lib/@types/extensible_events.d.ts.map +1 -0
- package/lib/@types/extensible_events.js +116 -0
- package/lib/@types/extensible_events.js.map +1 -0
- package/lib/@types/global.d.js +18 -0
- package/lib/@types/global.d.js.map +1 -0
- package/lib/@types/local_notifications.d.ts +4 -0
- package/lib/@types/local_notifications.d.ts.map +1 -0
- package/lib/@types/local_notifications.js +1 -0
- package/lib/@types/local_notifications.js.map +1 -0
- package/lib/@types/location.d.ts +60 -0
- package/lib/@types/location.d.ts.map +1 -0
- package/lib/@types/location.js +66 -0
- package/lib/@types/location.js.map +1 -0
- package/lib/@types/matrix-sdk-crypto-wasm.d.js +1 -0
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -0
- package/lib/@types/media.d.ts +220 -0
- package/lib/@types/media.d.ts.map +1 -0
- package/lib/@types/media.js +1 -0
- package/lib/@types/media.js.map +1 -0
- package/lib/@types/membership.d.ts +41 -0
- package/lib/@types/membership.d.ts.map +1 -0
- package/lib/@types/membership.js +58 -0
- package/lib/@types/membership.js.map +1 -0
- package/lib/@types/partials.d.ts +72 -0
- package/lib/@types/partials.d.ts.map +1 -0
- package/lib/@types/partials.js +71 -0
- package/lib/@types/partials.js.map +1 -0
- package/lib/@types/polls.d.ts +89 -0
- package/lib/@types/polls.d.ts.map +1 -0
- package/lib/@types/polls.js +86 -0
- package/lib/@types/polls.js.map +1 -0
- package/lib/@types/read_receipts.d.ts +36 -0
- package/lib/@types/read_receipts.d.ts.map +1 -0
- package/lib/@types/read_receipts.js +27 -0
- package/lib/@types/read_receipts.js.map +1 -0
- package/lib/@types/registration.d.ts +85 -0
- package/lib/@types/registration.d.ts.map +1 -0
- package/lib/@types/registration.js +1 -0
- package/lib/@types/registration.js.map +1 -0
- package/lib/@types/requests.d.ts +267 -0
- package/lib/@types/requests.d.ts.map +1 -0
- package/lib/@types/requests.js +42 -0
- package/lib/@types/requests.js.map +1 -0
- package/lib/@types/search.d.ts +90 -0
- package/lib/@types/search.d.ts.map +1 -0
- package/lib/@types/search.js +30 -0
- package/lib/@types/search.js.map +1 -0
- package/lib/@types/signed.d.ts +9 -0
- package/lib/@types/signed.d.ts.map +1 -0
- package/lib/@types/signed.js +1 -0
- package/lib/@types/signed.js.map +1 -0
- package/lib/@types/spaces.d.ts +16 -0
- package/lib/@types/spaces.d.ts.map +1 -0
- package/lib/@types/spaces.js +1 -0
- package/lib/@types/spaces.js.map +1 -0
- package/lib/@types/state_events.d.ts +121 -0
- package/lib/@types/state_events.d.ts.map +1 -0
- package/lib/@types/state_events.js +1 -0
- package/lib/@types/state_events.js.map +1 -0
- package/lib/@types/synapse.d.ts +19 -0
- package/lib/@types/synapse.d.ts.map +1 -0
- package/lib/@types/synapse.js +1 -0
- package/lib/@types/synapse.js.map +1 -0
- package/lib/@types/sync.d.ts +8 -0
- package/lib/@types/sync.d.ts.map +1 -0
- package/lib/@types/sync.js +25 -0
- package/lib/@types/sync.js.map +1 -0
- package/lib/@types/threepids.d.ts +12 -0
- package/lib/@types/threepids.d.ts.map +1 -0
- package/lib/@types/threepids.js +24 -0
- package/lib/@types/threepids.js.map +1 -0
- package/lib/@types/topic.d.ts +55 -0
- package/lib/@types/topic.d.ts.map +1 -0
- package/lib/@types/topic.js +62 -0
- package/lib/@types/topic.js.map +1 -0
- package/lib/@types/uia.d.ts +8 -0
- package/lib/@types/uia.d.ts.map +1 -0
- package/lib/@types/uia.js +1 -0
- package/lib/@types/uia.js.map +1 -0
- package/lib/NamespacedValue.d.ts +32 -0
- package/lib/NamespacedValue.d.ts.map +1 -0
- package/lib/NamespacedValue.js +113 -0
- package/lib/NamespacedValue.js.map +1 -0
- package/lib/ReEmitter.d.ts +15 -0
- package/lib/ReEmitter.d.ts.map +1 -0
- package/lib/ReEmitter.js +87 -0
- package/lib/ReEmitter.js.map +1 -0
- package/lib/ToDeviceMessageQueue.d.ts +30 -0
- package/lib/ToDeviceMessageQueue.d.ts.map +1 -0
- package/lib/ToDeviceMessageQueue.js +135 -0
- package/lib/ToDeviceMessageQueue.js.map +1 -0
- package/lib/autodiscovery.d.ts +136 -0
- package/lib/autodiscovery.d.ts.map +1 -0
- package/lib/autodiscovery.js +464 -0
- package/lib/autodiscovery.js.map +1 -0
- package/lib/base64.d.ts +25 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +95 -0
- package/lib/base64.js.map +1 -0
- package/lib/briij.d.ts +116 -0
- package/lib/briij.d.ts.map +1 -0
- package/lib/briij.js +145 -0
- package/lib/briij.js.map +1 -0
- package/lib/browser-index.d.ts +8 -0
- package/lib/browser-index.d.ts.map +1 -0
- package/lib/browser-index.js +35 -0
- package/lib/browser-index.js.map +1 -0
- package/lib/client.d.ts +3493 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +7482 -0
- package/lib/client.js.map +1 -0
- package/lib/common-crypto/CryptoBackend.d.ts +234 -0
- package/lib/common-crypto/CryptoBackend.d.ts.map +1 -0
- package/lib/common-crypto/CryptoBackend.js +69 -0
- package/lib/common-crypto/CryptoBackend.js.map +1 -0
- package/lib/common-crypto/key-passphrase.d.ts +14 -0
- package/lib/common-crypto/key-passphrase.d.ts.map +1 -0
- package/lib/common-crypto/key-passphrase.js +33 -0
- package/lib/common-crypto/key-passphrase.js.map +1 -0
- package/lib/content-helpers.d.ts +90 -0
- package/lib/content-helpers.d.ts.map +1 -0
- package/lib/content-helpers.js +262 -0
- package/lib/content-helpers.js.map +1 -0
- package/lib/content-repo.d.ts +25 -0
- package/lib/content-repo.d.ts.map +1 -0
- package/lib/content-repo.js +109 -0
- package/lib/content-repo.js.map +1 -0
- package/lib/crypto/store/base.d.ts +301 -0
- package/lib/crypto/store/base.d.ts.map +1 -0
- package/lib/crypto/store/base.js +145 -0
- package/lib/crypto/store/base.js.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +94 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +604 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store.d.ts +251 -0
- package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store.js +477 -0
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -0
- package/lib/crypto/store/localStorage-crypto-store.d.ts +102 -0
- package/lib/crypto/store/localStorage-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/localStorage-crypto-store.js +374 -0
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -0
- package/lib/crypto/store/memory-crypto-store.d.ts +117 -0
- package/lib/crypto/store/memory-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/memory-crypto-store.js +311 -0
- package/lib/crypto/store/memory-crypto-store.js.map +1 -0
- package/lib/crypto-api/CryptoEvent.d.ts +120 -0
- package/lib/crypto-api/CryptoEvent.d.ts.map +1 -0
- package/lib/crypto-api/CryptoEvent.js +137 -0
- package/lib/crypto-api/CryptoEvent.js.map +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts +26 -0
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.js +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.js.map +1 -0
- package/lib/crypto-api/index.d.ts +1160 -0
- package/lib/crypto-api/index.d.ts.map +1 -0
- package/lib/crypto-api/index.js +410 -0
- package/lib/crypto-api/index.js.map +1 -0
- package/lib/crypto-api/key-passphrase.d.ts +11 -0
- package/lib/crypto-api/key-passphrase.d.ts.map +1 -0
- package/lib/crypto-api/key-passphrase.js +51 -0
- package/lib/crypto-api/key-passphrase.js.map +1 -0
- package/lib/crypto-api/keybackup.d.ts +87 -0
- package/lib/crypto-api/keybackup.d.ts.map +1 -0
- package/lib/crypto-api/keybackup.js +1 -0
- package/lib/crypto-api/keybackup.js.map +1 -0
- package/lib/crypto-api/recovery-key.d.ts +11 -0
- package/lib/crypto-api/recovery-key.d.ts.map +1 -0
- package/lib/crypto-api/recovery-key.js +65 -0
- package/lib/crypto-api/recovery-key.js.map +1 -0
- package/lib/crypto-api/verification.d.ts +315 -0
- package/lib/crypto-api/verification.d.ts.map +1 -0
- package/lib/crypto-api/verification.js +130 -0
- package/lib/crypto-api/verification.js.map +1 -0
- package/lib/digest.d.ts +10 -0
- package/lib/digest.d.ts.map +1 -0
- package/lib/digest.js +40 -0
- package/lib/digest.js.map +1 -0
- package/lib/embedded.d.ts +182 -0
- package/lib/embedded.d.ts.map +1 -0
- package/lib/embedded.js +746 -0
- package/lib/embedded.js.map +1 -0
- package/lib/errors.d.ts +38 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +73 -0
- package/lib/errors.js.map +1 -0
- package/lib/event-mapper.d.ts +9 -0
- package/lib/event-mapper.d.ts.map +1 -0
- package/lib/event-mapper.js +74 -0
- package/lib/event-mapper.js.map +1 -0
- package/lib/extensible_events_v1/ExtensibleEvent.d.ts +38 -0
- package/lib/extensible_events_v1/ExtensibleEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/ExtensibleEvent.js +57 -0
- package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -0
- package/lib/extensible_events_v1/InvalidEventError.d.ts +7 -0
- package/lib/extensible_events_v1/InvalidEventError.d.ts.map +1 -0
- package/lib/extensible_events_v1/InvalidEventError.js +25 -0
- package/lib/extensible_events_v1/InvalidEventError.js.map +1 -0
- package/lib/extensible_events_v1/MessageEvent.d.ts +44 -0
- package/lib/extensible_events_v1/MessageEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/MessageEvent.js +134 -0
- package/lib/extensible_events_v1/MessageEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollEndEvent.d.ts +33 -0
- package/lib/extensible_events_v1/PollEndEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollEndEvent.js +88 -0
- package/lib/extensible_events_v1/PollEndEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollResponseEvent.d.ts +49 -0
- package/lib/extensible_events_v1/PollResponseEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollResponseEvent.js +135 -0
- package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollStartEvent.d.ts +71 -0
- package/lib/extensible_events_v1/PollStartEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollStartEvent.js +185 -0
- package/lib/extensible_events_v1/PollStartEvent.js.map +1 -0
- package/lib/extensible_events_v1/utilities.d.ts +14 -0
- package/lib/extensible_events_v1/utilities.d.ts.map +1 -0
- package/lib/extensible_events_v1/utilities.js +34 -0
- package/lib/extensible_events_v1/utilities.js.map +1 -0
- package/lib/feature.d.ts +20 -0
- package/lib/feature.d.ts.map +1 -0
- package/lib/feature.js +89 -0
- package/lib/feature.js.map +1 -0
- package/lib/filter-component.d.ts +64 -0
- package/lib/filter-component.d.ts.map +1 -0
- package/lib/filter-component.js +170 -0
- package/lib/filter-component.js.map +1 -0
- package/lib/filter.d.ts +97 -0
- package/lib/filter.d.ts.map +1 -0
- package/lib/filter.js +207 -0
- package/lib/filter.js.map +1 -0
- package/lib/http-api/errors.d.ts +117 -0
- package/lib/http-api/errors.d.ts.map +1 -0
- package/lib/http-api/errors.js +245 -0
- package/lib/http-api/errors.js.map +1 -0
- package/lib/http-api/fetch.d.ts +80 -0
- package/lib/http-api/fetch.d.ts.map +1 -0
- package/lib/http-api/fetch.js +332 -0
- package/lib/http-api/fetch.js.map +1 -0
- package/lib/http-api/index.d.ts +33 -0
- package/lib/http-api/index.d.ts.map +1 -0
- package/lib/http-api/index.js +178 -0
- package/lib/http-api/index.js.map +1 -0
- package/lib/http-api/interface.d.ts +186 -0
- package/lib/http-api/interface.d.ts.map +1 -0
- package/lib/http-api/interface.js +39 -0
- package/lib/http-api/interface.js.map +1 -0
- package/lib/http-api/method.d.ts +10 -0
- package/lib/http-api/method.d.ts.map +1 -0
- package/lib/http-api/method.js +27 -0
- package/lib/http-api/method.js.map +1 -0
- package/lib/http-api/prefix.d.ts +31 -0
- package/lib/http-api/prefix.d.ts.map +1 -0
- package/lib/http-api/prefix.js +50 -0
- package/lib/http-api/prefix.js.map +1 -0
- package/lib/http-api/refresh.d.ts +53 -0
- package/lib/http-api/refresh.d.ts.map +1 -0
- package/lib/http-api/refresh.js +174 -0
- package/lib/http-api/refresh.js.map +1 -0
- package/lib/http-api/utils.d.ts +37 -0
- package/lib/http-api/utils.d.ts.map +1 -0
- package/lib/http-api/utils.js +182 -0
- package/lib/http-api/utils.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/indexeddb-helpers.d.ts +10 -0
- package/lib/indexeddb-helpers.d.ts.map +1 -0
- package/lib/indexeddb-helpers.js +51 -0
- package/lib/indexeddb-helpers.js.map +1 -0
- package/lib/indexeddb-worker.d.ts +7 -0
- package/lib/indexeddb-worker.d.ts.map +1 -0
- package/lib/indexeddb-worker.js +25 -0
- package/lib/indexeddb-worker.js.map +1 -0
- package/lib/interactive-auth.d.ts +341 -0
- package/lib/interactive-auth.d.ts.map +1 -0
- package/lib/interactive-auth.js +563 -0
- package/lib/interactive-auth.js.map +1 -0
- package/lib/logger.d.ts +124 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +230 -0
- package/lib/logger.js.map +1 -0
- package/lib/matrixrtc/CallMembership.d.ts +154 -0
- package/lib/matrixrtc/CallMembership.d.ts.map +1 -0
- package/lib/matrixrtc/CallMembership.js +469 -0
- package/lib/matrixrtc/CallMembership.js.map +1 -0
- package/lib/matrixrtc/EncryptionManager.d.ts +44 -0
- package/lib/matrixrtc/EncryptionManager.d.ts.map +1 -0
- package/lib/matrixrtc/EncryptionManager.js +13 -0
- package/lib/matrixrtc/EncryptionManager.js.map +1 -0
- package/lib/matrixrtc/IKeyTransport.d.ts +37 -0
- package/lib/matrixrtc/IKeyTransport.d.ts.map +1 -0
- package/lib/matrixrtc/IKeyTransport.js +27 -0
- package/lib/matrixrtc/IKeyTransport.js.map +1 -0
- package/lib/matrixrtc/IMembershipManager.d.ts +94 -0
- package/lib/matrixrtc/IMembershipManager.d.ts.map +1 -0
- package/lib/matrixrtc/IMembershipManager.js +40 -0
- package/lib/matrixrtc/IMembershipManager.js.map +1 -0
- package/lib/matrixrtc/LivekitTransport.d.ts +23 -0
- package/lib/matrixrtc/LivekitTransport.d.ts.map +1 -0
- package/lib/matrixrtc/LivekitTransport.js +29 -0
- package/lib/matrixrtc/LivekitTransport.js.map +1 -0
- package/lib/matrixrtc/MatrixRTCSession.d.ts +343 -0
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -0
- package/lib/matrixrtc/MatrixRTCSession.js +623 -0
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +46 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +1 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.js +149 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -0
- package/lib/matrixrtc/MembershipManager.d.ts +210 -0
- package/lib/matrixrtc/MembershipManager.d.ts.map +1 -0
- package/lib/matrixrtc/MembershipManager.js +977 -0
- package/lib/matrixrtc/MembershipManager.js.map +1 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.d.ts +59 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.js +125 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -0
- package/lib/matrixrtc/RTCEncryptionManager.d.ts +110 -0
- package/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -0
- package/lib/matrixrtc/RTCEncryptionManager.js +376 -0
- package/lib/matrixrtc/RTCEncryptionManager.js.map +1 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.d.ts +30 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.d.ts.map +1 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.js +164 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -0
- package/lib/matrixrtc/index.d.ts +9 -0
- package/lib/matrixrtc/index.d.ts.map +1 -0
- package/lib/matrixrtc/index.js +23 -0
- package/lib/matrixrtc/index.js.map +1 -0
- package/lib/matrixrtc/membershipData/common.d.ts +8 -0
- package/lib/matrixrtc/membershipData/common.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/common.js +26 -0
- package/lib/matrixrtc/membershipData/common.js.map +1 -0
- package/lib/matrixrtc/membershipData/index.d.ts +4 -0
- package/lib/matrixrtc/membershipData/index.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/index.js +20 -0
- package/lib/matrixrtc/membershipData/index.js.map +1 -0
- package/lib/matrixrtc/membershipData/rtc.d.ts +33 -0
- package/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/rtc.js +137 -0
- package/lib/matrixrtc/membershipData/rtc.js.map +1 -0
- package/lib/matrixrtc/membershipData/session.d.ts +77 -0
- package/lib/matrixrtc/membershipData/session.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/session.js +62 -0
- package/lib/matrixrtc/membershipData/session.js.map +1 -0
- package/lib/matrixrtc/types.d.ts +169 -0
- package/lib/matrixrtc/types.d.ts.map +1 -0
- package/lib/matrixrtc/types.js +117 -0
- package/lib/matrixrtc/types.js.map +1 -0
- package/lib/matrixrtc/utils.d.ts +27 -0
- package/lib/matrixrtc/utils.d.ts.map +1 -0
- package/lib/matrixrtc/utils.js +72 -0
- package/lib/matrixrtc/utils.js.map +1 -0
- package/lib/models/MSC3089Branch.d.ts +98 -0
- package/lib/models/MSC3089Branch.d.ts.map +1 -0
- package/lib/models/MSC3089Branch.js +240 -0
- package/lib/models/MSC3089Branch.js.map +1 -0
- package/lib/models/MSC3089TreeSpace.d.ts +166 -0
- package/lib/models/MSC3089TreeSpace.d.ts.map +1 -0
- package/lib/models/MSC3089TreeSpace.js +521 -0
- package/lib/models/MSC3089TreeSpace.js.map +1 -0
- package/lib/models/ToDeviceMessage.d.ts +17 -0
- package/lib/models/ToDeviceMessage.d.ts.map +1 -0
- package/lib/models/ToDeviceMessage.js +1 -0
- package/lib/models/ToDeviceMessage.js.map +1 -0
- package/lib/models/beacon.d.ts +52 -0
- package/lib/models/beacon.d.ts.map +1 -0
- package/lib/models/beacon.js +174 -0
- package/lib/models/beacon.js.map +1 -0
- package/lib/models/compare-event-ordering.d.ts +24 -0
- package/lib/models/compare-event-ordering.d.ts.map +1 -0
- package/lib/models/compare-event-ordering.js +120 -0
- package/lib/models/compare-event-ordering.js.map +1 -0
- package/lib/models/device.d.ts +45 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +77 -0
- package/lib/models/device.js.map +1 -0
- package/lib/models/event-context.d.ts +62 -0
- package/lib/models/event-context.d.ts.map +1 -0
- package/lib/models/event-context.js +113 -0
- package/lib/models/event-context.js.map +1 -0
- package/lib/models/event-status.d.ts +19 -0
- package/lib/models/event-status.d.ts.map +1 -0
- package/lib/models/event-status.js +36 -0
- package/lib/models/event-status.js.map +1 -0
- package/lib/models/event-timeline-set.d.ts +308 -0
- package/lib/models/event-timeline-set.d.ts.map +1 -0
- package/lib/models/event-timeline-set.js +805 -0
- package/lib/models/event-timeline-set.js.map +1 -0
- package/lib/models/event-timeline.d.ts +224 -0
- package/lib/models/event-timeline.d.ts.map +1 -0
- package/lib/models/event-timeline.js +434 -0
- package/lib/models/event-timeline.js.map +1 -0
- package/lib/models/event.d.ts +844 -0
- package/lib/models/event.d.ts.map +1 -0
- package/lib/models/event.js +1600 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/invites-ignorer-types.d.ts +27 -0
- package/lib/models/invites-ignorer-types.d.ts.map +1 -0
- package/lib/models/invites-ignorer-types.js +56 -0
- package/lib/models/invites-ignorer-types.js.map +1 -0
- package/lib/models/invites-ignorer.d.ts +112 -0
- package/lib/models/invites-ignorer.d.ts.map +1 -0
- package/lib/models/invites-ignorer.js +357 -0
- package/lib/models/invites-ignorer.js.map +1 -0
- package/lib/models/poll.d.ts +67 -0
- package/lib/models/poll.d.ts.map +1 -0
- package/lib/models/poll.js +241 -0
- package/lib/models/poll.js.map +1 -0
- package/lib/models/profile-keys.d.ts +17 -0
- package/lib/models/profile-keys.d.ts.map +1 -0
- package/lib/models/profile-keys.js +34 -0
- package/lib/models/profile-keys.js.map +1 -0
- package/lib/models/read-receipt.d.ts +115 -0
- package/lib/models/read-receipt.d.ts.map +1 -0
- package/lib/models/read-receipt.js +366 -0
- package/lib/models/read-receipt.js.map +1 -0
- package/lib/models/related-relations.d.ts +11 -0
- package/lib/models/related-relations.d.ts.map +1 -0
- package/lib/models/related-relations.js +33 -0
- package/lib/models/related-relations.js.map +1 -0
- package/lib/models/relations-container.d.ts +44 -0
- package/lib/models/relations-container.d.ts.map +1 -0
- package/lib/models/relations-container.js +132 -0
- package/lib/models/relations-container.js.map +1 -0
- package/lib/models/relations.d.ts +123 -0
- package/lib/models/relations.d.ts.map +1 -0
- package/lib/models/relations.js +378 -0
- package/lib/models/relations.js.map +1 -0
- package/lib/models/room-member.d.ts +221 -0
- package/lib/models/room-member.d.ts.map +1 -0
- package/lib/models/room-member.js +376 -0
- package/lib/models/room-member.js.map +1 -0
- package/lib/models/room-receipts.d.ts +39 -0
- package/lib/models/room-receipts.d.ts.map +1 -0
- package/lib/models/room-receipts.js +392 -0
- package/lib/models/room-receipts.js.map +1 -0
- package/lib/models/room-state.d.ts +463 -0
- package/lib/models/room-state.d.ts.map +1 -0
- package/lib/models/room-state.js +1066 -0
- package/lib/models/room-state.js.map +1 -0
- package/lib/models/room-sticky-events.d.ts +110 -0
- package/lib/models/room-sticky-events.d.ts.map +1 -0
- package/lib/models/room-sticky-events.js +353 -0
- package/lib/models/room-sticky-events.js.map +1 -0
- package/lib/models/room-summary.d.ts +59 -0
- package/lib/models/room-summary.d.ts.map +1 -0
- package/lib/models/room-summary.js +39 -0
- package/lib/models/room-summary.js.map +1 -0
- package/lib/models/room.d.ts +1285 -0
- package/lib/models/room.d.ts.map +1 -0
- package/lib/models/room.js +3548 -0
- package/lib/models/room.js.map +1 -0
- package/lib/models/search-result.d.ts +20 -0
- package/lib/models/search-result.d.ts.map +1 -0
- package/lib/models/search-result.js +52 -0
- package/lib/models/search-result.js.map +1 -0
- package/lib/models/thread.d.ts +245 -0
- package/lib/models/thread.d.ts.map +1 -0
- package/lib/models/thread.js +866 -0
- package/lib/models/thread.js.map +1 -0
- package/lib/models/typed-event-emitter.d.ts +157 -0
- package/lib/models/typed-event-emitter.d.ts.map +1 -0
- package/lib/models/typed-event-emitter.js +227 -0
- package/lib/models/typed-event-emitter.js.map +1 -0
- package/lib/models/user.d.ts +195 -0
- package/lib/models/user.d.ts.map +1 -0
- package/lib/models/user.js +218 -0
- package/lib/models/user.js.map +1 -0
- package/lib/oidc/authorize.d.ts +93 -0
- package/lib/oidc/authorize.d.ts.map +1 -0
- package/lib/oidc/authorize.js +282 -0
- package/lib/oidc/authorize.js.map +1 -0
- package/lib/oidc/discovery.d.ts +22 -0
- package/lib/oidc/discovery.d.ts.map +1 -0
- package/lib/oidc/discovery.js +78 -0
- package/lib/oidc/discovery.js.map +1 -0
- package/lib/oidc/error.d.ts +18 -0
- package/lib/oidc/error.d.ts.map +1 -0
- package/lib/oidc/error.js +35 -0
- package/lib/oidc/error.js.map +1 -0
- package/lib/oidc/index.d.ts +16 -0
- package/lib/oidc/index.d.ts.map +1 -0
- package/lib/oidc/index.js +29 -0
- package/lib/oidc/index.js.map +1 -0
- package/lib/oidc/register.d.ts +70 -0
- package/lib/oidc/register.d.ts.map +1 -0
- package/lib/oidc/register.js +135 -0
- package/lib/oidc/register.js.map +1 -0
- package/lib/oidc/tokenRefresher.d.ts +91 -0
- package/lib/oidc/tokenRefresher.d.ts.map +1 -0
- package/lib/oidc/tokenRefresher.js +187 -0
- package/lib/oidc/tokenRefresher.js.map +1 -0
- package/lib/oidc/validate.d.ts +78 -0
- package/lib/oidc/validate.d.ts.map +1 -0
- package/lib/oidc/validate.js +181 -0
- package/lib/oidc/validate.js.map +1 -0
- package/lib/pushprocessor.d.ts +140 -0
- package/lib/pushprocessor.d.ts.map +1 -0
- package/lib/pushprocessor.js +702 -0
- package/lib/pushprocessor.js.map +1 -0
- package/lib/randomstring.d.ts +32 -0
- package/lib/randomstring.d.ts.map +1 -0
- package/lib/randomstring.js +97 -0
- package/lib/randomstring.js.map +1 -0
- package/lib/realtime-callbacks.d.ts +18 -0
- package/lib/realtime-callbacks.d.ts.map +1 -0
- package/lib/realtime-callbacks.js +177 -0
- package/lib/realtime-callbacks.js.map +1 -0
- package/lib/receipt-accumulator.d.ts +51 -0
- package/lib/receipt-accumulator.d.ts.map +1 -0
- package/lib/receipt-accumulator.js +164 -0
- package/lib/receipt-accumulator.js.map +1 -0
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts +112 -0
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -0
- package/lib/rendezvous/MSC4108SignInWithQR.js +389 -0
- package/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -0
- package/lib/rendezvous/RendezvousChannel.d.ts +27 -0
- package/lib/rendezvous/RendezvousChannel.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousChannel.js +1 -0
- package/lib/rendezvous/RendezvousChannel.js.map +1 -0
- package/lib/rendezvous/RendezvousCode.d.ts +9 -0
- package/lib/rendezvous/RendezvousCode.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousCode.js +1 -0
- package/lib/rendezvous/RendezvousCode.js.map +1 -0
- package/lib/rendezvous/RendezvousError.d.ts +6 -0
- package/lib/rendezvous/RendezvousError.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousError.js +23 -0
- package/lib/rendezvous/RendezvousError.js.map +1 -0
- package/lib/rendezvous/RendezvousFailureReason.d.ts +31 -0
- package/lib/rendezvous/RendezvousFailureReason.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousFailureReason.js +47 -0
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -0
- package/lib/rendezvous/RendezvousIntent.d.ts +5 -0
- package/lib/rendezvous/RendezvousIntent.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousIntent.js +22 -0
- package/lib/rendezvous/RendezvousIntent.js.map +1 -0
- package/lib/rendezvous/RendezvousTransport.d.ts +36 -0
- package/lib/rendezvous/RendezvousTransport.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousTransport.js +1 -0
- package/lib/rendezvous/RendezvousTransport.js.map +1 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +58 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +1 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +246 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -0
- package/lib/rendezvous/channels/index.d.ts +2 -0
- package/lib/rendezvous/channels/index.d.ts.map +1 -0
- package/lib/rendezvous/channels/index.js +18 -0
- package/lib/rendezvous/channels/index.js.map +1 -0
- package/lib/rendezvous/index.d.ts +10 -0
- package/lib/rendezvous/index.d.ts.map +1 -0
- package/lib/rendezvous/index.js +23 -0
- package/lib/rendezvous/index.js.map +1 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +61 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +1 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js +254 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -0
- package/lib/rendezvous/transports/index.d.ts +2 -0
- package/lib/rendezvous/transports/index.d.ts.map +1 -0
- package/lib/rendezvous/transports/index.js +18 -0
- package/lib/rendezvous/transports/index.js.map +1 -0
- package/lib/room-hierarchy.d.ts +35 -0
- package/lib/room-hierarchy.d.ts.map +1 -0
- package/lib/room-hierarchy.js +136 -0
- package/lib/room-hierarchy.js.map +1 -0
- package/lib/rust-crypto/CrossSigningIdentity.d.ts +35 -0
- package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +1 -0
- package/lib/rust-crypto/CrossSigningIdentity.js +163 -0
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -0
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts +118 -0
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +1 -0
- package/lib/rust-crypto/DehydratedDeviceManager.js +361 -0
- package/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -0
- package/lib/rust-crypto/KeyClaimManager.d.ts +33 -0
- package/lib/rust-crypto/KeyClaimManager.d.ts.map +1 -0
- package/lib/rust-crypto/KeyClaimManager.js +82 -0
- package/lib/rust-crypto/KeyClaimManager.js.map +1 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +36 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.js +194 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -0
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts +47 -0
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +1 -0
- package/lib/rust-crypto/OutgoingRequestsManager.js +175 -0
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +120 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +1 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +469 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -0
- package/lib/rust-crypto/RoomEncryptor.d.ts +100 -0
- package/lib/rust-crypto/RoomEncryptor.d.ts.map +1 -0
- package/lib/rust-crypto/RoomEncryptor.js +308 -0
- package/lib/rust-crypto/RoomEncryptor.js.map +1 -0
- package/lib/rust-crypto/backup.d.ts +278 -0
- package/lib/rust-crypto/backup.d.ts.map +1 -0
- package/lib/rust-crypto/backup.js +898 -0
- package/lib/rust-crypto/backup.js.map +1 -0
- package/lib/rust-crypto/constants.d.ts +3 -0
- package/lib/rust-crypto/constants.d.ts.map +1 -0
- package/lib/rust-crypto/constants.js +19 -0
- package/lib/rust-crypto/constants.js.map +1 -0
- package/lib/rust-crypto/device-converter.d.ts +28 -0
- package/lib/rust-crypto/device-converter.d.ts.map +1 -0
- package/lib/rust-crypto/device-converter.js +123 -0
- package/lib/rust-crypto/device-converter.js.map +1 -0
- package/lib/rust-crypto/index.d.ts +65 -0
- package/lib/rust-crypto/index.d.ts.map +1 -0
- package/lib/rust-crypto/index.js +149 -0
- package/lib/rust-crypto/index.js.map +1 -0
- package/lib/rust-crypto/libolm_migration.d.ts +81 -0
- package/lib/rust-crypto/libolm_migration.d.ts.map +1 -0
- package/lib/rust-crypto/libolm_migration.js +456 -0
- package/lib/rust-crypto/libolm_migration.js.map +1 -0
- package/lib/rust-crypto/rust-crypto.d.ts +576 -0
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -0
- package/lib/rust-crypto/rust-crypto.js +2324 -0
- package/lib/rust-crypto/rust-crypto.js.map +1 -0
- package/lib/rust-crypto/secret-storage.d.ts +22 -0
- package/lib/rust-crypto/secret-storage.d.ts.map +1 -0
- package/lib/rust-crypto/secret-storage.js +63 -0
- package/lib/rust-crypto/secret-storage.js.map +1 -0
- package/lib/rust-crypto/verification.d.ts +321 -0
- package/lib/rust-crypto/verification.d.ts.map +1 -0
- package/lib/rust-crypto/verification.js +817 -0
- package/lib/rust-crypto/verification.js.map +1 -0
- package/lib/scheduler.d.ts +132 -0
- package/lib/scheduler.d.ts.map +1 -0
- package/lib/scheduler.js +259 -0
- package/lib/scheduler.js.map +1 -0
- package/lib/secret-storage.d.ts +383 -0
- package/lib/secret-storage.d.ts.map +1 -0
- package/lib/secret-storage.js +487 -0
- package/lib/secret-storage.js.map +1 -0
- package/lib/serverCapabilities.d.ts +78 -0
- package/lib/serverCapabilities.d.ts.map +1 -0
- package/lib/serverCapabilities.js +104 -0
- package/lib/serverCapabilities.js.map +1 -0
- package/lib/service-types.d.ts +5 -0
- package/lib/service-types.d.ts.map +1 -0
- package/lib/service-types.js +23 -0
- package/lib/service-types.js.map +1 -0
- package/lib/sliding-sync-sdk.d.ts +107 -0
- package/lib/sliding-sync-sdk.d.ts.map +1 -0
- package/lib/sliding-sync-sdk.js +892 -0
- package/lib/sliding-sync-sdk.js.map +1 -0
- package/lib/sliding-sync.d.ts +306 -0
- package/lib/sliding-sync.d.ts.map +1 -0
- package/lib/sliding-sync.js +585 -0
- package/lib/sliding-sync.js.map +1 -0
- package/lib/store/index.d.ts +201 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +1 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/indexeddb-backend.d.ts +24 -0
- package/lib/store/indexeddb-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-backend.js +1 -0
- package/lib/store/indexeddb-backend.js.map +1 -0
- package/lib/store/indexeddb-local-backend.d.ts +129 -0
- package/lib/store/indexeddb-local-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-local-backend.js +599 -0
- package/lib/store/indexeddb-local-backend.js.map +1 -0
- package/lib/store/indexeddb-remote-backend.d.ts +79 -0
- package/lib/store/indexeddb-remote-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-remote-backend.js +209 -0
- package/lib/store/indexeddb-remote-backend.js.map +1 -0
- package/lib/store/indexeddb-store-worker.d.ts +35 -0
- package/lib/store/indexeddb-store-worker.d.ts.map +1 -0
- package/lib/store/indexeddb-store-worker.js +146 -0
- package/lib/store/indexeddb-store-worker.js.map +1 -0
- package/lib/store/indexeddb.d.ts +142 -0
- package/lib/store/indexeddb.d.ts.map +1 -0
- package/lib/store/indexeddb.js +347 -0
- package/lib/store/indexeddb.js.map +1 -0
- package/lib/store/local-storage-events-emitter.d.ts +30 -0
- package/lib/store/local-storage-events-emitter.d.ts.map +1 -0
- package/lib/store/local-storage-events-emitter.js +37 -0
- package/lib/store/local-storage-events-emitter.js.map +1 -0
- package/lib/store/memory.d.ts +209 -0
- package/lib/store/memory.d.ts.map +1 -0
- package/lib/store/memory.js +432 -0
- package/lib/store/memory.js.map +1 -0
- package/lib/store/stub.d.ts +161 -0
- package/lib/store/stub.d.ts.map +1 -0
- package/lib/store/stub.js +268 -0
- package/lib/store/stub.js.map +1 -0
- package/lib/sync-accumulator.d.ts +207 -0
- package/lib/sync-accumulator.d.ts.map +1 -0
- package/lib/sync-accumulator.js +588 -0
- package/lib/sync-accumulator.js.map +1 -0
- package/lib/sync.d.ts +273 -0
- package/lib/sync.d.ts.map +1 -0
- package/lib/sync.js +1764 -0
- package/lib/sync.js.map +1 -0
- package/lib/testing.d.ts +98 -0
- package/lib/testing.d.ts.map +1 -0
- package/lib/testing.js +205 -0
- package/lib/testing.js.map +1 -0
- package/lib/thread-utils.d.ts +10 -0
- package/lib/thread-utils.d.ts.map +1 -0
- package/lib/thread-utils.js +31 -0
- package/lib/thread-utils.js.map +1 -0
- package/lib/timeline-window.d.ts +168 -0
- package/lib/timeline-window.d.ts.map +1 -0
- package/lib/timeline-window.js +494 -0
- package/lib/timeline-window.js.map +1 -0
- package/lib/types.d.ts +33 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +52 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/decryptAESSecretStorageItem.d.ts +12 -0
- package/lib/utils/decryptAESSecretStorageItem.d.ts.map +1 -0
- package/lib/utils/decryptAESSecretStorageItem.js +50 -0
- package/lib/utils/decryptAESSecretStorageItem.js.map +1 -0
- package/lib/utils/encryptAESSecretStorageItem.d.ts +16 -0
- package/lib/utils/encryptAESSecretStorageItem.d.ts.map +1 -0
- package/lib/utils/encryptAESSecretStorageItem.js +68 -0
- package/lib/utils/encryptAESSecretStorageItem.js.map +1 -0
- package/lib/utils/internal/deriveKeys.d.ts +10 -0
- package/lib/utils/internal/deriveKeys.d.ts.map +1 -0
- package/lib/utils/internal/deriveKeys.js +60 -0
- package/lib/utils/internal/deriveKeys.js.map +1 -0
- package/lib/utils/roomVersion.d.ts +13 -0
- package/lib/utils/roomVersion.d.ts.map +1 -0
- package/lib/utils/roomVersion.js +36 -0
- package/lib/utils/roomVersion.js.map +1 -0
- package/lib/utils.d.ts +270 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +764 -0
- package/lib/utils.js.map +1 -0
- package/lib/version-support.d.ts +19 -0
- package/lib/version-support.d.ts.map +1 -0
- package/lib/version-support.js +37 -0
- package/lib/version-support.js.map +1 -0
- package/lib/webrtc/audioContext.d.ts +15 -0
- package/lib/webrtc/audioContext.d.ts.map +1 -0
- package/lib/webrtc/audioContext.js +46 -0
- package/lib/webrtc/audioContext.js.map +1 -0
- package/lib/webrtc/call.d.ts +560 -0
- package/lib/webrtc/call.d.ts.map +1 -0
- package/lib/webrtc/call.js +2596 -0
- package/lib/webrtc/call.js.map +1 -0
- package/lib/webrtc/callEventHandler.d.ts +37 -0
- package/lib/webrtc/callEventHandler.d.ts.map +1 -0
- package/lib/webrtc/callEventHandler.js +344 -0
- package/lib/webrtc/callEventHandler.js.map +1 -0
- package/lib/webrtc/callEventTypes.d.ts +79 -0
- package/lib/webrtc/callEventTypes.d.ts.map +1 -0
- package/lib/webrtc/callEventTypes.js +13 -0
- package/lib/webrtc/callEventTypes.js.map +1 -0
- package/lib/webrtc/callFeed.d.ts +128 -0
- package/lib/webrtc/callFeed.d.ts.map +1 -0
- package/lib/webrtc/callFeed.js +289 -0
- package/lib/webrtc/callFeed.js.map +1 -0
- package/lib/webrtc/groupCall.d.ts +319 -0
- package/lib/webrtc/groupCall.d.ts.map +1 -0
- package/lib/webrtc/groupCall.js +1334 -0
- package/lib/webrtc/groupCall.js.map +1 -0
- package/lib/webrtc/groupCallEventHandler.d.ts +31 -0
- package/lib/webrtc/groupCallEventHandler.d.ts.map +1 -0
- package/lib/webrtc/groupCallEventHandler.js +178 -0
- package/lib/webrtc/groupCallEventHandler.js.map +1 -0
- package/lib/webrtc/mediaHandler.d.ts +89 -0
- package/lib/webrtc/mediaHandler.d.ts.map +1 -0
- package/lib/webrtc/mediaHandler.js +454 -0
- package/lib/webrtc/mediaHandler.js.map +1 -0
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts +8 -0
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +1 -0
- package/lib/webrtc/stats/callFeedStatsReporter.js +79 -0
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -0
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts +25 -0
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +1 -0
- package/lib/webrtc/stats/callStatsReportGatherer.js +199 -0
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.d.ts +17 -0
- package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.js +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -0
- package/lib/webrtc/stats/connectionStats.d.ts +28 -0
- package/lib/webrtc/stats/connectionStats.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStats.js +26 -0
- package/lib/webrtc/stats/connectionStats.js.map +1 -0
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts +5 -0
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStatsBuilder.js +27 -0
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +7 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +121 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -0
- package/lib/webrtc/stats/groupCallStats.d.ts +22 -0
- package/lib/webrtc/stats/groupCallStats.d.ts.map +1 -0
- package/lib/webrtc/stats/groupCallStats.js +78 -0
- package/lib/webrtc/stats/groupCallStats.js.map +1 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +10 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +57 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +12 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.js +58 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts +86 -0
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStats.js +142 -0
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +22 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +76 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -0
- package/lib/webrtc/stats/statsReport.d.ts +99 -0
- package/lib/webrtc/stats/statsReport.d.ts.map +1 -0
- package/lib/webrtc/stats/statsReport.js +32 -0
- package/lib/webrtc/stats/statsReport.js.map +1 -0
- package/lib/webrtc/stats/statsReportEmitter.d.ts +15 -0
- package/lib/webrtc/stats/statsReportEmitter.d.ts.map +1 -0
- package/lib/webrtc/stats/statsReportEmitter.js +33 -0
- package/lib/webrtc/stats/statsReportEmitter.js.map +1 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +16 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +1 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.js +116 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -0
- package/lib/webrtc/stats/trackStatsBuilder.d.ts +19 -0
- package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/trackStatsBuilder.js +168 -0
- package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/transportStats.d.ts +11 -0
- package/lib/webrtc/stats/transportStats.d.ts.map +1 -0
- package/lib/webrtc/stats/transportStats.js +1 -0
- package/lib/webrtc/stats/transportStats.js.map +1 -0
- package/lib/webrtc/stats/transportStatsBuilder.d.ts +5 -0
- package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/transportStatsBuilder.js +34 -0
- package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/valueFormatter.d.ts +4 -0
- package/lib/webrtc/stats/valueFormatter.d.ts.map +1 -0
- package/lib/webrtc/stats/valueFormatter.js +25 -0
- package/lib/webrtc/stats/valueFormatter.js.map +1 -0
- package/package.json +129 -0
- package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -0
- package/src/@types/IIdentityServerProvider.ts +24 -0
- package/src/@types/PushRules.ts +208 -0
- package/src/@types/another-json.d.ts +19 -0
- package/src/@types/auth.ts +258 -0
- package/src/@types/beacon.ts +140 -0
- package/src/@types/common.ts +24 -0
- package/src/@types/crypto.ts +71 -0
- package/src/@types/event.ts +449 -0
- package/src/@types/events.ts +119 -0
- package/src/@types/extensible_events.ts +147 -0
- package/src/@types/global.d.ts +67 -0
- package/src/@types/local_notifications.ts +19 -0
- package/src/@types/location.ts +92 -0
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -0
- package/src/@types/media.ts +245 -0
- package/src/@types/membership.ts +57 -0
- package/src/@types/partials.ts +103 -0
- package/src/@types/polls.ts +120 -0
- package/src/@types/read_receipts.ts +61 -0
- package/src/@types/registration.ts +102 -0
- package/src/@types/requests.ts +346 -0
- package/src/@types/search.ts +119 -0
- package/src/@types/signed.ts +25 -0
- package/src/@types/spaces.ts +37 -0
- package/src/@types/state_events.ts +153 -0
- package/src/@types/synapse.ts +40 -0
- package/src/@types/sync.ts +27 -0
- package/src/@types/threepids.ts +29 -0
- package/src/@types/topic.ts +69 -0
- package/src/@types/uia.ts +24 -0
- package/src/NamespacedValue.ts +121 -0
- package/src/ReEmitter.ts +93 -0
- package/src/ToDeviceMessageQueue.ts +156 -0
- package/src/autodiscovery.ts +505 -0
- package/src/base64.ts +86 -0
- package/src/briij.ts +173 -0
- package/src/browser-index.ts +44 -0
- package/src/client.ts +9031 -0
- package/src/common-crypto/CryptoBackend.ts +295 -0
- package/src/common-crypto/README.md +4 -0
- package/src/common-crypto/key-passphrase.ts +43 -0
- package/src/content-helpers.ts +298 -0
- package/src/content-repo.ts +122 -0
- package/src/crypto/store/base.ts +388 -0
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -0
- package/src/crypto/store/indexeddb-crypto-store.ts +555 -0
- package/src/crypto/store/localStorage-crypto-store.ts +409 -0
- package/src/crypto/store/memory-crypto-store.ts +326 -0
- package/src/crypto-api/CryptoEvent.ts +152 -0
- package/src/crypto-api/CryptoEventHandlerMap.ts +42 -0
- package/src/crypto-api/index.ts +1362 -0
- package/src/crypto-api/key-passphrase.ts +58 -0
- package/src/crypto-api/keybackup.ts +114 -0
- package/src/crypto-api/recovery-key.ts +69 -0
- package/src/crypto-api/verification.ts +382 -0
- package/src/digest.ts +34 -0
- package/src/embedded.ts +865 -0
- package/src/errors.ts +87 -0
- package/src/event-mapper.ts +88 -0
- package/src/extensible_events_v1/ExtensibleEvent.ts +58 -0
- package/src/extensible_events_v1/InvalidEventError.ts +24 -0
- package/src/extensible_events_v1/MessageEvent.ts +143 -0
- package/src/extensible_events_v1/PollEndEvent.ts +97 -0
- package/src/extensible_events_v1/PollResponseEvent.ts +148 -0
- package/src/extensible_events_v1/PollStartEvent.ts +207 -0
- package/src/extensible_events_v1/utilities.ts +35 -0
- package/src/feature.ts +88 -0
- package/src/filter-component.ts +209 -0
- package/src/filter.ts +245 -0
- package/src/http-api/errors.ts +261 -0
- package/src/http-api/fetch.ts +377 -0
- package/src/http-api/index.ts +194 -0
- package/src/http-api/interface.ts +229 -0
- package/src/http-api/method.ts +25 -0
- package/src/http-api/prefix.ts +48 -0
- package/src/http-api/refresh.ts +167 -0
- package/src/http-api/utils.ts +217 -0
- package/src/index.ts +25 -0
- package/src/indexeddb-helpers.ts +50 -0
- package/src/indexeddb-worker.ts +24 -0
- package/src/interactive-auth.ts +700 -0
- package/src/logger.ts +279 -0
- package/src/matrixrtc/CallMembership.ts +438 -0
- package/src/matrixrtc/EncryptionManager.ts +54 -0
- package/src/matrixrtc/IKeyTransport.ts +63 -0
- package/src/matrixrtc/IMembershipManager.ts +120 -0
- package/src/matrixrtc/LivekitTransport.ts +46 -0
- package/src/matrixrtc/MatrixRTCSession.ts +934 -0
- package/src/matrixrtc/MatrixRTCSessionManager.ts +170 -0
- package/src/matrixrtc/MembershipManager.ts +1122 -0
- package/src/matrixrtc/MembershipManagerActionScheduler.ts +135 -0
- package/src/matrixrtc/RTCEncryptionManager.ts +459 -0
- package/src/matrixrtc/ToDeviceKeyTransport.ts +197 -0
- package/src/matrixrtc/index.ts +24 -0
- package/src/matrixrtc/membershipData/common.ts +27 -0
- package/src/matrixrtc/membershipData/index.ts +19 -0
- package/src/matrixrtc/membershipData/rtc.ts +156 -0
- package/src/matrixrtc/membershipData/session.ts +146 -0
- package/src/matrixrtc/types.ts +227 -0
- package/src/matrixrtc/utils.ts +71 -0
- package/src/models/MSC3089Branch.ts +272 -0
- package/src/models/MSC3089TreeSpace.ts +565 -0
- package/src/models/ToDeviceMessage.ts +38 -0
- package/src/models/beacon.ts +213 -0
- package/src/models/compare-event-ordering.ts +139 -0
- package/src/models/device.ts +85 -0
- package/src/models/event-context.ts +110 -0
- package/src/models/event-status.ts +39 -0
- package/src/models/event-timeline-set.ts +962 -0
- package/src/models/event-timeline.ts +461 -0
- package/src/models/event.ts +1819 -0
- package/src/models/invites-ignorer-types.ts +58 -0
- package/src/models/invites-ignorer.ts +341 -0
- package/src/models/poll.ts +285 -0
- package/src/models/profile-keys.ts +33 -0
- package/src/models/read-receipt.ts +422 -0
- package/src/models/related-relations.ts +39 -0
- package/src/models/relations-container.ts +149 -0
- package/src/models/relations.ts +392 -0
- package/src/models/room-member.ts +486 -0
- package/src/models/room-receipts.ts +439 -0
- package/src/models/room-state.ts +1230 -0
- package/src/models/room-sticky-events.ts +383 -0
- package/src/models/room-summary.ts +78 -0
- package/src/models/room.ts +4067 -0
- package/src/models/search-result.ts +57 -0
- package/src/models/thread.ts +928 -0
- package/src/models/typed-event-emitter.ts +246 -0
- package/src/models/user.ts +302 -0
- package/src/oidc/authorize.ts +279 -0
- package/src/oidc/discovery.ts +67 -0
- package/src/oidc/error.ts +33 -0
- package/src/oidc/index.ts +33 -0
- package/src/oidc/register.ts +163 -0
- package/src/oidc/tokenRefresher.ts +184 -0
- package/src/oidc/validate.ts +265 -0
- package/src/pushprocessor.ts +856 -0
- package/src/randomstring.ts +103 -0
- package/src/realtime-callbacks.ts +191 -0
- package/src/receipt-accumulator.ts +189 -0
- package/src/rendezvous/MSC4108SignInWithQR.ts +443 -0
- package/src/rendezvous/RendezvousChannel.ts +48 -0
- package/src/rendezvous/RendezvousCode.ts +25 -0
- package/src/rendezvous/RendezvousError.ts +26 -0
- package/src/rendezvous/RendezvousFailureReason.ts +49 -0
- package/src/rendezvous/RendezvousIntent.ts +20 -0
- package/src/rendezvous/RendezvousTransport.ts +58 -0
- package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -0
- package/src/rendezvous/channels/index.ts +17 -0
- package/src/rendezvous/index.ts +25 -0
- package/src/rendezvous/transports/MSC4108RendezvousSession.ts +272 -0
- package/src/rendezvous/transports/index.ts +17 -0
- package/src/room-hierarchy.ts +152 -0
- package/src/rust-crypto/CrossSigningIdentity.ts +195 -0
- package/src/rust-crypto/DehydratedDeviceManager.ts +392 -0
- package/src/rust-crypto/KeyClaimManager.ts +86 -0
- package/src/rust-crypto/OutgoingRequestProcessor.ts +233 -0
- package/src/rust-crypto/OutgoingRequestsManager.ts +170 -0
- package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +501 -0
- package/src/rust-crypto/RoomEncryptor.ts +362 -0
- package/src/rust-crypto/backup.ts +942 -0
- package/src/rust-crypto/constants.ts +18 -0
- package/src/rust-crypto/device-converter.ts +128 -0
- package/src/rust-crypto/index.ts +251 -0
- package/src/rust-crypto/libolm_migration.ts +532 -0
- package/src/rust-crypto/rust-crypto.ts +2542 -0
- package/src/rust-crypto/secret-storage.ts +60 -0
- package/src/rust-crypto/verification.ts +833 -0
- package/src/scheduler.ts +309 -0
- package/src/secret-storage.ts +714 -0
- package/src/serverCapabilities.ts +146 -0
- package/src/service-types.ts +20 -0
- package/src/sliding-sync-sdk.ts +1005 -0
- package/src/sliding-sync.ts +674 -0
- package/src/store/index.ts +261 -0
- package/src/store/indexeddb-backend.ts +41 -0
- package/src/store/indexeddb-local-backend.ts +610 -0
- package/src/store/indexeddb-remote-backend.ts +212 -0
- package/src/store/indexeddb-store-worker.ts +157 -0
- package/src/store/indexeddb.ts +397 -0
- package/src/store/local-storage-events-emitter.ts +46 -0
- package/src/store/memory.ts +448 -0
- package/src/store/stub.ts +280 -0
- package/src/sync-accumulator.ts +779 -0
- package/src/sync.ts +2020 -0
- package/src/testing.ts +231 -0
- package/src/thread-utils.ts +31 -0
- package/src/timeline-window.ts +534 -0
- package/src/types.ts +59 -0
- package/src/utils/decryptAESSecretStorageItem.ts +54 -0
- package/src/utils/encryptAESSecretStorageItem.ts +73 -0
- package/src/utils/internal/deriveKeys.ts +63 -0
- package/src/utils/roomVersion.ts +35 -0
- package/src/utils.ts +775 -0
- package/src/version-support.ts +50 -0
- package/src/webrtc/audioContext.ts +44 -0
- package/src/webrtc/call.ts +3061 -0
- package/src/webrtc/callEventHandler.ts +425 -0
- package/src/webrtc/callEventTypes.ts +101 -0
- package/src/webrtc/callFeed.ts +364 -0
- package/src/webrtc/groupCall.ts +1729 -0
- package/src/webrtc/groupCallEventHandler.ts +234 -0
- package/src/webrtc/mediaHandler.ts +501 -0
- package/src/webrtc/stats/callFeedStatsReporter.ts +91 -0
- package/src/webrtc/stats/callStatsReportGatherer.ts +219 -0
- package/src/webrtc/stats/callStatsReportSummary.ts +30 -0
- package/src/webrtc/stats/connectionStats.ts +47 -0
- package/src/webrtc/stats/connectionStatsBuilder.ts +28 -0
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -0
- package/src/webrtc/stats/groupCallStats.ts +93 -0
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -0
- package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -0
- package/src/webrtc/stats/media/mediaTrackStats.ts +176 -0
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -0
- package/src/webrtc/stats/statsReport.ts +133 -0
- package/src/webrtc/stats/statsReportEmitter.ts +49 -0
- package/src/webrtc/stats/summaryStatsReportGatherer.ts +148 -0
- package/src/webrtc/stats/trackStatsBuilder.ts +207 -0
- package/src/webrtc/stats/transportStats.ts +26 -0
- package/src/webrtc/stats/transportStatsBuilder.ts +48 -0
- package/src/webrtc/stats/valueFormatter.ts +27 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
/*
|
|
6
|
+
Copyright 2017 - 2021 The Matrix.org Foundation C.I.C.
|
|
7
|
+
|
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
you may not use this file except in compliance with the License.
|
|
10
|
+
You may obtain a copy of the License at
|
|
11
|
+
|
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
|
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
See the License for the specific language governing permissions and
|
|
18
|
+
limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { safeSet } from "../../utils.js";
|
|
22
|
+
import { MigrationState, SESSION_BATCH_SIZE } from "./base.js";
|
|
23
|
+
function encodeSessionKey(senderCurve25519Key, sessionId) {
|
|
24
|
+
return encodeURIComponent(senderCurve25519Key) + "/" + encodeURIComponent(sessionId);
|
|
25
|
+
}
|
|
26
|
+
function decodeSessionKey(key) {
|
|
27
|
+
var keyParts = key.split("/");
|
|
28
|
+
var senderKey = decodeURIComponent(keyParts[0]);
|
|
29
|
+
var sessionId = decodeURIComponent(keyParts[1]);
|
|
30
|
+
return {
|
|
31
|
+
senderKey,
|
|
32
|
+
sessionId
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Internal module. in-memory storage for e2e.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export class MemoryCryptoStore {
|
|
41
|
+
constructor() {
|
|
42
|
+
_defineProperty(this, "migrationState", MigrationState.NOT_STARTED);
|
|
43
|
+
_defineProperty(this, "account", null);
|
|
44
|
+
_defineProperty(this, "crossSigningKeys", null);
|
|
45
|
+
_defineProperty(this, "privateKeys", {});
|
|
46
|
+
_defineProperty(this, "sessions", {});
|
|
47
|
+
_defineProperty(this, "inboundGroupSessions", {});
|
|
48
|
+
_defineProperty(this, "inboundGroupSessionsWithheld", {});
|
|
49
|
+
// Opaque device data object
|
|
50
|
+
_defineProperty(this, "rooms", {});
|
|
51
|
+
_defineProperty(this, "sessionsNeedingBackup", {});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Returns true if this CryptoStore has ever been initialised (ie, it might contain data).
|
|
55
|
+
*
|
|
56
|
+
* Implementation of {@link CryptoStore.containsData}.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
containsData() {
|
|
61
|
+
var _this = this;
|
|
62
|
+
return _asyncToGenerator(function* () {
|
|
63
|
+
// If it contains anything, it should contain an account.
|
|
64
|
+
return _this.account !== null;
|
|
65
|
+
})();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Ensure the database exists and is up-to-date.
|
|
70
|
+
*
|
|
71
|
+
* This must be called before the store can be used.
|
|
72
|
+
*
|
|
73
|
+
* @returns resolves to the store.
|
|
74
|
+
*/
|
|
75
|
+
startup() {
|
|
76
|
+
var _this2 = this;
|
|
77
|
+
return _asyncToGenerator(function* () {
|
|
78
|
+
// No startup work to do for the memory store.
|
|
79
|
+
return _this2;
|
|
80
|
+
})();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Delete all data from this store.
|
|
85
|
+
*
|
|
86
|
+
* @returns Promise which resolves when the store has been cleared.
|
|
87
|
+
*/
|
|
88
|
+
deleteAllData() {
|
|
89
|
+
return Promise.resolve();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Get data on how much of the libolm to Rust Crypto migration has been done.
|
|
94
|
+
*
|
|
95
|
+
* Implementation of {@link CryptoStore.getMigrationState}.
|
|
96
|
+
*
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
getMigrationState() {
|
|
100
|
+
var _this3 = this;
|
|
101
|
+
return _asyncToGenerator(function* () {
|
|
102
|
+
return _this3.migrationState;
|
|
103
|
+
})();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Set data on how much of the libolm to Rust Crypto migration has been done.
|
|
108
|
+
*
|
|
109
|
+
* Implementation of {@link CryptoStore.setMigrationState}.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
setMigrationState(migrationState) {
|
|
114
|
+
var _this4 = this;
|
|
115
|
+
return _asyncToGenerator(function* () {
|
|
116
|
+
_this4.migrationState = migrationState;
|
|
117
|
+
})();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Olm Account
|
|
121
|
+
|
|
122
|
+
getAccount(txn, func) {
|
|
123
|
+
func(this.account);
|
|
124
|
+
}
|
|
125
|
+
storeAccount(txn, accountPickle) {
|
|
126
|
+
this.account = accountPickle;
|
|
127
|
+
}
|
|
128
|
+
getCrossSigningKeys(txn, func) {
|
|
129
|
+
func(this.crossSigningKeys);
|
|
130
|
+
}
|
|
131
|
+
getSecretStorePrivateKey(txn, func, type) {
|
|
132
|
+
var result = this.privateKeys[type];
|
|
133
|
+
func(result || null);
|
|
134
|
+
}
|
|
135
|
+
storeSecretStorePrivateKey(txn, type, key) {
|
|
136
|
+
this.privateKeys[type] = key;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Olm Sessions
|
|
140
|
+
|
|
141
|
+
countEndToEndSessions(txn, func) {
|
|
142
|
+
var count = 0;
|
|
143
|
+
for (var deviceSessions of Object.values(this.sessions)) {
|
|
144
|
+
count += Object.keys(deviceSessions).length;
|
|
145
|
+
}
|
|
146
|
+
func(count);
|
|
147
|
+
}
|
|
148
|
+
getEndToEndSession(deviceKey, sessionId, txn, func) {
|
|
149
|
+
var deviceSessions = this.sessions[deviceKey] || {};
|
|
150
|
+
func(deviceSessions[sessionId] || null);
|
|
151
|
+
}
|
|
152
|
+
getEndToEndSessions(deviceKey, txn, func) {
|
|
153
|
+
func(this.sessions[deviceKey] || {});
|
|
154
|
+
}
|
|
155
|
+
storeEndToEndSession(deviceKey, sessionId, sessionInfo, txn) {
|
|
156
|
+
var deviceSessions = this.sessions[deviceKey];
|
|
157
|
+
if (deviceSessions === undefined) {
|
|
158
|
+
deviceSessions = {};
|
|
159
|
+
this.sessions[deviceKey] = deviceSessions;
|
|
160
|
+
}
|
|
161
|
+
safeSet(deviceSessions, sessionId, sessionInfo);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Fetch a batch of Olm sessions from the database.
|
|
166
|
+
*
|
|
167
|
+
* Implementation of {@link CryptoStore.getEndToEndSessionsBatch}.
|
|
168
|
+
*
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
getEndToEndSessionsBatch() {
|
|
172
|
+
var _this5 = this;
|
|
173
|
+
return _asyncToGenerator(function* () {
|
|
174
|
+
var result = [];
|
|
175
|
+
for (var deviceSessions of Object.values(_this5.sessions)) {
|
|
176
|
+
for (var session of Object.values(deviceSessions)) {
|
|
177
|
+
result.push(session);
|
|
178
|
+
if (result.length >= SESSION_BATCH_SIZE) {
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (result.length === 0) {
|
|
184
|
+
// No sessions left.
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// There are fewer sessions than the batch size; return the final batch of sessions.
|
|
189
|
+
return result;
|
|
190
|
+
})();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Delete a batch of Olm sessions from the database.
|
|
195
|
+
*
|
|
196
|
+
* Implementation of {@link CryptoStore.deleteEndToEndSessionsBatch}.
|
|
197
|
+
*
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
deleteEndToEndSessionsBatch(sessions) {
|
|
201
|
+
var _this6 = this;
|
|
202
|
+
return _asyncToGenerator(function* () {
|
|
203
|
+
for (var {
|
|
204
|
+
deviceKey,
|
|
205
|
+
sessionId
|
|
206
|
+
} of sessions) {
|
|
207
|
+
var deviceSessions = _this6.sessions[deviceKey] || {};
|
|
208
|
+
delete deviceSessions[sessionId];
|
|
209
|
+
if (Object.keys(deviceSessions).length === 0) {
|
|
210
|
+
// No more sessions for this device.
|
|
211
|
+
delete _this6.sessions[deviceKey];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
})();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Inbound Group Sessions
|
|
218
|
+
|
|
219
|
+
getEndToEndInboundGroupSession(senderCurve25519Key, sessionId, txn, func) {
|
|
220
|
+
var k = encodeSessionKey(senderCurve25519Key, sessionId);
|
|
221
|
+
func(this.inboundGroupSessions[k] || null, this.inboundGroupSessionsWithheld[k] || null);
|
|
222
|
+
}
|
|
223
|
+
storeEndToEndInboundGroupSession(senderCurve25519Key, sessionId, sessionData, txn) {
|
|
224
|
+
var k = encodeSessionKey(senderCurve25519Key, sessionId);
|
|
225
|
+
this.inboundGroupSessions[k] = sessionData;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Count the number of Megolm sessions in the database.
|
|
230
|
+
*
|
|
231
|
+
* Implementation of {@link CryptoStore.countEndToEndInboundGroupSessions}.
|
|
232
|
+
*
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
235
|
+
countEndToEndInboundGroupSessions() {
|
|
236
|
+
var _this7 = this;
|
|
237
|
+
return _asyncToGenerator(function* () {
|
|
238
|
+
return Object.keys(_this7.inboundGroupSessions).length;
|
|
239
|
+
})();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Fetch a batch of Megolm sessions from the database.
|
|
244
|
+
*
|
|
245
|
+
* Implementation of {@link CryptoStore.getEndToEndInboundGroupSessionsBatch}.
|
|
246
|
+
*
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
getEndToEndInboundGroupSessionsBatch() {
|
|
250
|
+
var _this8 = this;
|
|
251
|
+
return _asyncToGenerator(function* () {
|
|
252
|
+
var result = [];
|
|
253
|
+
for (var [key, session] of Object.entries(_this8.inboundGroupSessions)) {
|
|
254
|
+
result.push(_objectSpread(_objectSpread({}, decodeSessionKey(key)), {}, {
|
|
255
|
+
sessionData: session,
|
|
256
|
+
needsBackup: key in _this8.sessionsNeedingBackup
|
|
257
|
+
}));
|
|
258
|
+
if (result.length >= SESSION_BATCH_SIZE) {
|
|
259
|
+
return result;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (result.length === 0) {
|
|
263
|
+
// No sessions left.
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// There are fewer sessions than the batch size; return the final batch of sessions.
|
|
268
|
+
return result;
|
|
269
|
+
})();
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Delete a batch of Megolm sessions from the database.
|
|
274
|
+
*
|
|
275
|
+
* Implementation of {@link CryptoStore.deleteEndToEndInboundGroupSessionsBatch}.
|
|
276
|
+
*
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
deleteEndToEndInboundGroupSessionsBatch(sessions) {
|
|
280
|
+
var _this9 = this;
|
|
281
|
+
return _asyncToGenerator(function* () {
|
|
282
|
+
for (var {
|
|
283
|
+
senderKey,
|
|
284
|
+
sessionId
|
|
285
|
+
} of sessions) {
|
|
286
|
+
var k = encodeSessionKey(senderKey, sessionId);
|
|
287
|
+
delete _this9.inboundGroupSessions[k];
|
|
288
|
+
}
|
|
289
|
+
})();
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// E2E rooms
|
|
293
|
+
|
|
294
|
+
getEndToEndRooms(txn, func) {
|
|
295
|
+
func(this.rooms);
|
|
296
|
+
}
|
|
297
|
+
markSessionsNeedingBackup(sessions) {
|
|
298
|
+
for (var session of sessions) {
|
|
299
|
+
var sessionKey = encodeSessionKey(session.senderKey, session.sessionId);
|
|
300
|
+
this.sessionsNeedingBackup[sessionKey] = true;
|
|
301
|
+
}
|
|
302
|
+
return Promise.resolve();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Session key backups
|
|
306
|
+
|
|
307
|
+
doTxn(mode, stores, func) {
|
|
308
|
+
return Promise.resolve(func(null));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=memory-crypto-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-crypto-store.js","names":["safeSet","MigrationState","SESSION_BATCH_SIZE","encodeSessionKey","senderCurve25519Key","sessionId","encodeURIComponent","decodeSessionKey","key","keyParts","split","senderKey","decodeURIComponent","MemoryCryptoStore","constructor","_defineProperty","NOT_STARTED","containsData","_this","_asyncToGenerator","account","startup","_this2","deleteAllData","Promise","resolve","getMigrationState","_this3","migrationState","setMigrationState","_this4","getAccount","txn","func","storeAccount","accountPickle","getCrossSigningKeys","crossSigningKeys","getSecretStorePrivateKey","type","result","privateKeys","storeSecretStorePrivateKey","countEndToEndSessions","count","deviceSessions","Object","values","sessions","keys","length","getEndToEndSession","deviceKey","getEndToEndSessions","storeEndToEndSession","sessionInfo","undefined","getEndToEndSessionsBatch","_this5","session","push","deleteEndToEndSessionsBatch","_this6","getEndToEndInboundGroupSession","k","inboundGroupSessions","inboundGroupSessionsWithheld","storeEndToEndInboundGroupSession","sessionData","countEndToEndInboundGroupSessions","_this7","getEndToEndInboundGroupSessionsBatch","_this8","entries","_objectSpread","needsBackup","sessionsNeedingBackup","deleteEndToEndInboundGroupSessionsBatch","_this9","getEndToEndRooms","rooms","markSessionsNeedingBackup","sessionKey","doTxn","mode","stores"],"sources":["../../../src/crypto/store/memory-crypto-store.ts"],"sourcesContent":["/*\r\nCopyright 2017 - 2021 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nimport { safeSet } from \"../../utils.ts\";\r\nimport {\r\n type CryptoStore,\r\n type ISession,\r\n type SessionExtended,\r\n type ISessionInfo,\r\n type IWithheld,\r\n MigrationState,\r\n type Mode,\r\n type SecretStorePrivateKeys,\r\n SESSION_BATCH_SIZE,\r\n type InboundGroupSessionData,\r\n type IRoomEncryption,\r\n} from \"./base.ts\";\r\nimport { type CrossSigningKeyInfo } from \"../../crypto-api/index.ts\";\r\n\r\nfunction encodeSessionKey(senderCurve25519Key: string, sessionId: string): string {\r\n return encodeURIComponent(senderCurve25519Key) + \"/\" + encodeURIComponent(sessionId);\r\n}\r\n\r\nfunction decodeSessionKey(key: string): { senderKey: string; sessionId: string } {\r\n const keyParts = key.split(\"/\");\r\n const senderKey = decodeURIComponent(keyParts[0]);\r\n const sessionId = decodeURIComponent(keyParts[1]);\r\n return { senderKey, sessionId };\r\n}\r\n\r\n/**\r\n * Internal module. in-memory storage for e2e.\r\n */\r\n\r\nexport class MemoryCryptoStore implements CryptoStore {\r\n private migrationState: MigrationState = MigrationState.NOT_STARTED;\r\n private account: string | null = null;\r\n private crossSigningKeys: Record<string, CrossSigningKeyInfo> | null = null;\r\n private privateKeys: Partial<SecretStorePrivateKeys> = {};\r\n\r\n private sessions: { [deviceKey: string]: { [sessionId: string]: ISessionInfo } } = {};\r\n private inboundGroupSessions: { [sessionKey: string]: InboundGroupSessionData } = {};\r\n private inboundGroupSessionsWithheld: Record<string, IWithheld> = {};\r\n // Opaque device data object\r\n private rooms: { [roomId: string]: IRoomEncryption } = {};\r\n private sessionsNeedingBackup: { [sessionKey: string]: boolean } = {};\r\n\r\n /**\r\n * Returns true if this CryptoStore has ever been initialised (ie, it might contain data).\r\n *\r\n * Implementation of {@link CryptoStore.containsData}.\r\n *\r\n * @internal\r\n */\r\n public async containsData(): Promise<boolean> {\r\n // If it contains anything, it should contain an account.\r\n return this.account !== null;\r\n }\r\n\r\n /**\r\n * Ensure the database exists and is up-to-date.\r\n *\r\n * This must be called before the store can be used.\r\n *\r\n * @returns resolves to the store.\r\n */\r\n public async startup(): Promise<CryptoStore> {\r\n // No startup work to do for the memory store.\r\n return this;\r\n }\r\n\r\n /**\r\n * Delete all data from this store.\r\n *\r\n * @returns Promise which resolves when the store has been cleared.\r\n */\r\n public deleteAllData(): Promise<void> {\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Get data on how much of the libolm to Rust Crypto migration has been done.\r\n *\r\n * Implementation of {@link CryptoStore.getMigrationState}.\r\n *\r\n * @internal\r\n */\r\n public async getMigrationState(): Promise<MigrationState> {\r\n return this.migrationState;\r\n }\r\n\r\n /**\r\n * Set data on how much of the libolm to Rust Crypto migration has been done.\r\n *\r\n * Implementation of {@link CryptoStore.setMigrationState}.\r\n *\r\n * @internal\r\n */\r\n public async setMigrationState(migrationState: MigrationState): Promise<void> {\r\n this.migrationState = migrationState;\r\n }\r\n\r\n // Olm Account\r\n\r\n public getAccount(txn: unknown, func: (accountPickle: string | null) => void): void {\r\n func(this.account);\r\n }\r\n\r\n public storeAccount(txn: unknown, accountPickle: string): void {\r\n this.account = accountPickle;\r\n }\r\n\r\n public getCrossSigningKeys(txn: unknown, func: (keys: Record<string, CrossSigningKeyInfo> | null) => void): void {\r\n func(this.crossSigningKeys);\r\n }\r\n\r\n public getSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\r\n txn: unknown,\r\n func: (key: SecretStorePrivateKeys[K] | null) => void,\r\n type: K,\r\n ): void {\r\n const result = this.privateKeys[type] as SecretStorePrivateKeys[K] | undefined;\r\n func(result || null);\r\n }\r\n\r\n public storeSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\r\n txn: unknown,\r\n type: K,\r\n key: SecretStorePrivateKeys[K],\r\n ): void {\r\n this.privateKeys[type] = key;\r\n }\r\n\r\n // Olm Sessions\r\n\r\n public countEndToEndSessions(txn: unknown, func: (count: number) => void): void {\r\n let count = 0;\r\n for (const deviceSessions of Object.values(this.sessions)) {\r\n count += Object.keys(deviceSessions).length;\r\n }\r\n func(count);\r\n }\r\n\r\n public getEndToEndSession(\r\n deviceKey: string,\r\n sessionId: string,\r\n txn: unknown,\r\n func: (session: ISessionInfo) => void,\r\n ): void {\r\n const deviceSessions = this.sessions[deviceKey] || {};\r\n func(deviceSessions[sessionId] || null);\r\n }\r\n\r\n public getEndToEndSessions(\r\n deviceKey: string,\r\n txn: unknown,\r\n func: (sessions: { [sessionId: string]: ISessionInfo }) => void,\r\n ): void {\r\n func(this.sessions[deviceKey] || {});\r\n }\r\n\r\n public storeEndToEndSession(deviceKey: string, sessionId: string, sessionInfo: ISessionInfo, txn: unknown): void {\r\n let deviceSessions = this.sessions[deviceKey];\r\n if (deviceSessions === undefined) {\r\n deviceSessions = {};\r\n this.sessions[deviceKey] = deviceSessions;\r\n }\r\n safeSet(deviceSessions, sessionId, sessionInfo);\r\n }\r\n\r\n /**\r\n * Fetch a batch of Olm sessions from the database.\r\n *\r\n * Implementation of {@link CryptoStore.getEndToEndSessionsBatch}.\r\n *\r\n * @internal\r\n */\r\n public async getEndToEndSessionsBatch(): Promise<null | ISessionInfo[]> {\r\n const result: ISessionInfo[] = [];\r\n for (const deviceSessions of Object.values(this.sessions)) {\r\n for (const session of Object.values(deviceSessions)) {\r\n result.push(session);\r\n if (result.length >= SESSION_BATCH_SIZE) {\r\n return result;\r\n }\r\n }\r\n }\r\n\r\n if (result.length === 0) {\r\n // No sessions left.\r\n return null;\r\n }\r\n\r\n // There are fewer sessions than the batch size; return the final batch of sessions.\r\n return result;\r\n }\r\n\r\n /**\r\n * Delete a batch of Olm sessions from the database.\r\n *\r\n * Implementation of {@link CryptoStore.deleteEndToEndSessionsBatch}.\r\n *\r\n * @internal\r\n */\r\n public async deleteEndToEndSessionsBatch(sessions: { deviceKey: string; sessionId: string }[]): Promise<void> {\r\n for (const { deviceKey, sessionId } of sessions) {\r\n const deviceSessions = this.sessions[deviceKey] || {};\r\n delete deviceSessions[sessionId];\r\n if (Object.keys(deviceSessions).length === 0) {\r\n // No more sessions for this device.\r\n delete this.sessions[deviceKey];\r\n }\r\n }\r\n }\r\n\r\n // Inbound Group Sessions\r\n\r\n public getEndToEndInboundGroupSession(\r\n senderCurve25519Key: string,\r\n sessionId: string,\r\n txn: unknown,\r\n func: (groupSession: InboundGroupSessionData | null, groupSessionWithheld: IWithheld | null) => void,\r\n ): void {\r\n const k = encodeSessionKey(senderCurve25519Key, sessionId);\r\n func(this.inboundGroupSessions[k] || null, this.inboundGroupSessionsWithheld[k] || null);\r\n }\r\n\r\n public storeEndToEndInboundGroupSession(\r\n senderCurve25519Key: string,\r\n sessionId: string,\r\n sessionData: InboundGroupSessionData,\r\n txn: unknown,\r\n ): void {\r\n const k = encodeSessionKey(senderCurve25519Key, sessionId);\r\n this.inboundGroupSessions[k] = sessionData;\r\n }\r\n\r\n /**\r\n * Count the number of Megolm sessions in the database.\r\n *\r\n * Implementation of {@link CryptoStore.countEndToEndInboundGroupSessions}.\r\n *\r\n * @internal\r\n */\r\n public async countEndToEndInboundGroupSessions(): Promise<number> {\r\n return Object.keys(this.inboundGroupSessions).length;\r\n }\r\n\r\n /**\r\n * Fetch a batch of Megolm sessions from the database.\r\n *\r\n * Implementation of {@link CryptoStore.getEndToEndInboundGroupSessionsBatch}.\r\n *\r\n * @internal\r\n */\r\n public async getEndToEndInboundGroupSessionsBatch(): Promise<null | SessionExtended[]> {\r\n const result: SessionExtended[] = [];\r\n for (const [key, session] of Object.entries(this.inboundGroupSessions)) {\r\n result.push({\r\n ...decodeSessionKey(key),\r\n sessionData: session,\r\n needsBackup: key in this.sessionsNeedingBackup,\r\n });\r\n if (result.length >= SESSION_BATCH_SIZE) {\r\n return result;\r\n }\r\n }\r\n\r\n if (result.length === 0) {\r\n // No sessions left.\r\n return null;\r\n }\r\n\r\n // There are fewer sessions than the batch size; return the final batch of sessions.\r\n return result;\r\n }\r\n\r\n /**\r\n * Delete a batch of Megolm sessions from the database.\r\n *\r\n * Implementation of {@link CryptoStore.deleteEndToEndInboundGroupSessionsBatch}.\r\n *\r\n * @internal\r\n */\r\n public async deleteEndToEndInboundGroupSessionsBatch(\r\n sessions: { senderKey: string; sessionId: string }[],\r\n ): Promise<void> {\r\n for (const { senderKey, sessionId } of sessions) {\r\n const k = encodeSessionKey(senderKey, sessionId);\r\n delete this.inboundGroupSessions[k];\r\n }\r\n }\r\n\r\n // E2E rooms\r\n\r\n public getEndToEndRooms(txn: unknown, func: (rooms: Record<string, IRoomEncryption>) => void): void {\r\n func(this.rooms);\r\n }\r\n\r\n public markSessionsNeedingBackup(sessions: ISession[]): Promise<void> {\r\n for (const session of sessions) {\r\n const sessionKey = encodeSessionKey(session.senderKey, session.sessionId);\r\n this.sessionsNeedingBackup[sessionKey] = true;\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n // Session key backups\r\n\r\n public doTxn<T>(mode: Mode, stores: Iterable<string>, func: (txn?: unknown) => T): Promise<T> {\r\n return Promise.resolve(func(null));\r\n }\r\n}\r\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,gBAAgB;AACxC,SAMIC,cAAc,EAGdC,kBAAkB,QAGf,WAAW;AAGlB,SAASC,gBAAgBA,CAACC,mBAA2B,EAAEC,SAAiB,EAAU;EAC9E,OAAOC,kBAAkB,CAACF,mBAAmB,CAAC,GAAG,GAAG,GAAGE,kBAAkB,CAACD,SAAS,CAAC;AACxF;AAEA,SAASE,gBAAgBA,CAACC,GAAW,EAA4C;EAC7E,IAAMC,Q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EAAEC,MAAwB,EAAEpD,IAA0B,EAAc;IAC1F,OAAOT,OAAO,CAACC,OAAO,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;EACtC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cryptography-related events emitted by the {@link briij.BriijClient}.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum CryptoEvent {
|
|
5
|
+
/**
|
|
6
|
+
* Fires when the trust status of a user changes.
|
|
7
|
+
* The payload is a pair (userId, userTrustLevel). The trust level is one of the values from UserVerificationStatus.
|
|
8
|
+
*/
|
|
9
|
+
UserTrustStatusChanged = "userTrustStatusChanged",
|
|
10
|
+
/**
|
|
11
|
+
* Fires when the key backup status changes.
|
|
12
|
+
* The payload is a boolean indicating whether the key backup is enabled.
|
|
13
|
+
*/
|
|
14
|
+
KeyBackupStatus = "crypto.keyBackupStatus",
|
|
15
|
+
/**
|
|
16
|
+
* Fires when we failed to back up the keys
|
|
17
|
+
* The payload is the error code of the error that occurred.
|
|
18
|
+
*/
|
|
19
|
+
KeyBackupFailed = "crypto.keyBackupFailed",
|
|
20
|
+
/**
|
|
21
|
+
* Fires when the number of sessions that can be backed up changes.
|
|
22
|
+
* The payload is the remaining number of sessions that can be backed up.
|
|
23
|
+
*/
|
|
24
|
+
KeyBackupSessionsRemaining = "crypto.keyBackupSessionsRemaining",
|
|
25
|
+
/**
|
|
26
|
+
* Fires when a new valid backup decryption key is in cache.
|
|
27
|
+
* This will happen when a secret is received from another session, from secret storage,
|
|
28
|
+
* or when a new backup is created from this session.
|
|
29
|
+
*
|
|
30
|
+
* The payload is the version of the backup for which we have the key for.
|
|
31
|
+
*
|
|
32
|
+
* This event is only fired by the rust crypto backend.
|
|
33
|
+
*/
|
|
34
|
+
KeyBackupDecryptionKeyCached = "crypto.keyBackupDecryptionKeyCached",
|
|
35
|
+
/**
|
|
36
|
+
* Fires when a key verification request is received.
|
|
37
|
+
* The payload is a VerificationRequest object representing the request.
|
|
38
|
+
*/
|
|
39
|
+
VerificationRequestReceived = "crypto.verificationRequestReceived",
|
|
40
|
+
/** @deprecated Use {@link DevicesUpdated} instead when using rust crypto */
|
|
41
|
+
WillUpdateDevices = "crypto.willUpdateDevices",
|
|
42
|
+
/**
|
|
43
|
+
* Fires whenever the stored devices for a user have been updated
|
|
44
|
+
* The payload is a pair (userIds, initialFetch).
|
|
45
|
+
*/
|
|
46
|
+
DevicesUpdated = "crypto.devicesUpdated",
|
|
47
|
+
/**
|
|
48
|
+
* Fires when the user's cross-signing keys have changed or cross-signing
|
|
49
|
+
* has been enabled/disabled. The client can use getStoredCrossSigningForUser
|
|
50
|
+
* with the user ID of the logged in user to check if cross-signing is
|
|
51
|
+
* enabled on the account. If enabled, it can test whether the current key
|
|
52
|
+
* is trusted using with checkUserTrust with the user ID of the logged
|
|
53
|
+
* in user. The checkOwnCrossSigningTrust function may be used to reconcile
|
|
54
|
+
* the trust in the account key.
|
|
55
|
+
*
|
|
56
|
+
* The cross-signing API is currently UNSTABLE and may change without notice.
|
|
57
|
+
* @experimental
|
|
58
|
+
*/
|
|
59
|
+
KeysChanged = "crossSigning.keysChanged",
|
|
60
|
+
/**
|
|
61
|
+
* Fires when data is being migrated from legacy crypto to rust crypto.
|
|
62
|
+
*
|
|
63
|
+
* The payload is a pair `(progress, total)`, where `progress` is the number of steps completed so far, and
|
|
64
|
+
* `total` is the total number of steps. When migration is complete, a final instance of the event is emitted, with
|
|
65
|
+
* `progress === total === -1`.
|
|
66
|
+
*/
|
|
67
|
+
LegacyCryptoStoreMigrationProgress = "crypto.legacyCryptoStoreMigrationProgress",
|
|
68
|
+
/**
|
|
69
|
+
* Fires when a new dehydrated device is created locally.
|
|
70
|
+
*
|
|
71
|
+
* After the client calls {@link CryptoApi.startDehydration}, this event
|
|
72
|
+
* will be fired every time a new dehydrated device is created. It may fire
|
|
73
|
+
* before `startDehydration` returns.
|
|
74
|
+
*/
|
|
75
|
+
DehydratedDeviceCreated = "dehydration.DehydratedDeviceCreated",
|
|
76
|
+
/**
|
|
77
|
+
* Fires when a new dehydrated device is successfully uploaded to the server.
|
|
78
|
+
*
|
|
79
|
+
* This should fire shortly after {@link DehydratedDeviceCreated} fires. If
|
|
80
|
+
* upload is unsuccessful, this will be reported either by an error thrown
|
|
81
|
+
* by {@link CryptoApi.startDehydration} (for errors that happen before
|
|
82
|
+
* `startDehydration` returns), or by firing {@link DehydratedDeviceRotationError}
|
|
83
|
+
* (for errors that happen during regular rotation of the dehydrated device)
|
|
84
|
+
*/
|
|
85
|
+
DehydratedDeviceUploaded = "dehydration.DehydratedDeviceUploaded",
|
|
86
|
+
/**
|
|
87
|
+
* Fires when rehydration has started.
|
|
88
|
+
*
|
|
89
|
+
* After the client calls {@link CryptoApi.startDehydration}, this event will
|
|
90
|
+
* fire if a dehydrated device is found and we attempt to rehydrate it.
|
|
91
|
+
*/
|
|
92
|
+
RehydrationStarted = "dehydration.RehydrationStarted",
|
|
93
|
+
/**
|
|
94
|
+
* Fires during rehydration, to inform the application of rehydration progress.
|
|
95
|
+
*
|
|
96
|
+
* The payload is a pair `[roomKeyCount: number, toDeviceCount: number]`,
|
|
97
|
+
* where `roomKeyCount` is the number of room keys that have been received
|
|
98
|
+
* so far, and `toDeviceCount` is the number of to-device messages received
|
|
99
|
+
* so far (including the messages containing room keys).
|
|
100
|
+
*/
|
|
101
|
+
RehydrationProgress = "dehydration.RehydrationProgress",
|
|
102
|
+
/** Fires when rehydration has completed successfully. */
|
|
103
|
+
RehydrationCompleted = "dehydration.RehydrationCompleted",
|
|
104
|
+
/** Fires when there was an error in rehydration.
|
|
105
|
+
*
|
|
106
|
+
* The payload is an error message as a string.
|
|
107
|
+
*/
|
|
108
|
+
RehydrationError = "dehydration.RehydrationError",
|
|
109
|
+
/**
|
|
110
|
+
* Fires when a dehydrated device key has been cached in the local database.
|
|
111
|
+
*/
|
|
112
|
+
DehydrationKeyCached = "dehydration.DehydrationKeyCached",
|
|
113
|
+
/**
|
|
114
|
+
* Fires when an error occurs during periodic rotation of the dehydrated device.
|
|
115
|
+
*
|
|
116
|
+
* The payload is an error message as a string.
|
|
117
|
+
*/
|
|
118
|
+
DehydratedDeviceRotationError = "dehydration.DehydratedDeviceRotationError"
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=CryptoEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoEvent.d.ts","sourceRoot":"","sources":["../../src/crypto-api/CryptoEvent.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,oBAAY,WAAW;IACnB;;;OAGG;IACH,sBAAsB,2BAA2B;IAEjD;;;OAGG;IACH,eAAe,2BAA2B;IAE1C;;;OAGG;IACH,eAAe,2BAA2B;IAE1C;;;OAGG;IACH,0BAA0B,sCAAsC;IAEhE;;;;;;;;OAQG;IACH,4BAA4B,wCAAwC;IAEpE;;;OAGG;IACH,2BAA2B,uCAAuC;IAElE,4EAA4E;IAC5E,iBAAiB,6BAA6B;IAE9C;;;OAGG;IACH,cAAc,0BAA0B;IAExC;;;;;;;;;;;OAWG;IACH,WAAW,6BAA6B;IAExC;;;;;;OAMG;IACH,kCAAkC,8CAA8C;IAEhF;;;;;;OAMG;IACH,uBAAuB,wCAAwC;IAE/D;;;;;;;;OAQG;IACH,wBAAwB,yCAAyC;IAEjE;;;;;OAKG;IACH,kBAAkB,mCAAmC;IAErD;;;;;;;OAOG;IACH,mBAAmB,oCAAoC;IAEvD,yDAAyD;IACzD,oBAAoB,qCAAqC;IAEzD;;;OAGG;IACH,gBAAgB,iCAAiC;IAEjD;;OAEG;IACH,oBAAoB,qCAAqC;IAEzD;;;;OAIG;IACH,6BAA6B,8CAA8C;CAC9E"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 The Matrix.org Foundation C.I.C.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Cryptography-related events emitted by the {@link briij.BriijClient}.
|
|
19
|
+
*/
|
|
20
|
+
export var CryptoEvent = /*#__PURE__*/function (CryptoEvent) {
|
|
21
|
+
/**
|
|
22
|
+
* Fires when the trust status of a user changes.
|
|
23
|
+
* The payload is a pair (userId, userTrustLevel). The trust level is one of the values from UserVerificationStatus.
|
|
24
|
+
*/
|
|
25
|
+
CryptoEvent["UserTrustStatusChanged"] = "userTrustStatusChanged";
|
|
26
|
+
/**
|
|
27
|
+
* Fires when the key backup status changes.
|
|
28
|
+
* The payload is a boolean indicating whether the key backup is enabled.
|
|
29
|
+
*/
|
|
30
|
+
CryptoEvent["KeyBackupStatus"] = "crypto.keyBackupStatus";
|
|
31
|
+
/**
|
|
32
|
+
* Fires when we failed to back up the keys
|
|
33
|
+
* The payload is the error code of the error that occurred.
|
|
34
|
+
*/
|
|
35
|
+
CryptoEvent["KeyBackupFailed"] = "crypto.keyBackupFailed";
|
|
36
|
+
/**
|
|
37
|
+
* Fires when the number of sessions that can be backed up changes.
|
|
38
|
+
* The payload is the remaining number of sessions that can be backed up.
|
|
39
|
+
*/
|
|
40
|
+
CryptoEvent["KeyBackupSessionsRemaining"] = "crypto.keyBackupSessionsRemaining";
|
|
41
|
+
/**
|
|
42
|
+
* Fires when a new valid backup decryption key is in cache.
|
|
43
|
+
* This will happen when a secret is received from another session, from secret storage,
|
|
44
|
+
* or when a new backup is created from this session.
|
|
45
|
+
*
|
|
46
|
+
* The payload is the version of the backup for which we have the key for.
|
|
47
|
+
*
|
|
48
|
+
* This event is only fired by the rust crypto backend.
|
|
49
|
+
*/
|
|
50
|
+
CryptoEvent["KeyBackupDecryptionKeyCached"] = "crypto.keyBackupDecryptionKeyCached";
|
|
51
|
+
/**
|
|
52
|
+
* Fires when a key verification request is received.
|
|
53
|
+
* The payload is a VerificationRequest object representing the request.
|
|
54
|
+
*/
|
|
55
|
+
CryptoEvent["VerificationRequestReceived"] = "crypto.verificationRequestReceived";
|
|
56
|
+
/** @deprecated Use {@link DevicesUpdated} instead when using rust crypto */
|
|
57
|
+
CryptoEvent["WillUpdateDevices"] = "crypto.willUpdateDevices";
|
|
58
|
+
/**
|
|
59
|
+
* Fires whenever the stored devices for a user have been updated
|
|
60
|
+
* The payload is a pair (userIds, initialFetch).
|
|
61
|
+
*/
|
|
62
|
+
CryptoEvent["DevicesUpdated"] = "crypto.devicesUpdated";
|
|
63
|
+
/**
|
|
64
|
+
* Fires when the user's cross-signing keys have changed or cross-signing
|
|
65
|
+
* has been enabled/disabled. The client can use getStoredCrossSigningForUser
|
|
66
|
+
* with the user ID of the logged in user to check if cross-signing is
|
|
67
|
+
* enabled on the account. If enabled, it can test whether the current key
|
|
68
|
+
* is trusted using with checkUserTrust with the user ID of the logged
|
|
69
|
+
* in user. The checkOwnCrossSigningTrust function may be used to reconcile
|
|
70
|
+
* the trust in the account key.
|
|
71
|
+
*
|
|
72
|
+
* The cross-signing API is currently UNSTABLE and may change without notice.
|
|
73
|
+
* @experimental
|
|
74
|
+
*/
|
|
75
|
+
CryptoEvent["KeysChanged"] = "crossSigning.keysChanged";
|
|
76
|
+
/**
|
|
77
|
+
* Fires when data is being migrated from legacy crypto to rust crypto.
|
|
78
|
+
*
|
|
79
|
+
* The payload is a pair `(progress, total)`, where `progress` is the number of steps completed so far, and
|
|
80
|
+
* `total` is the total number of steps. When migration is complete, a final instance of the event is emitted, with
|
|
81
|
+
* `progress === total === -1`.
|
|
82
|
+
*/
|
|
83
|
+
CryptoEvent["LegacyCryptoStoreMigrationProgress"] = "crypto.legacyCryptoStoreMigrationProgress";
|
|
84
|
+
/**
|
|
85
|
+
* Fires when a new dehydrated device is created locally.
|
|
86
|
+
*
|
|
87
|
+
* After the client calls {@link CryptoApi.startDehydration}, this event
|
|
88
|
+
* will be fired every time a new dehydrated device is created. It may fire
|
|
89
|
+
* before `startDehydration` returns.
|
|
90
|
+
*/
|
|
91
|
+
CryptoEvent["DehydratedDeviceCreated"] = "dehydration.DehydratedDeviceCreated";
|
|
92
|
+
/**
|
|
93
|
+
* Fires when a new dehydrated device is successfully uploaded to the server.
|
|
94
|
+
*
|
|
95
|
+
* This should fire shortly after {@link DehydratedDeviceCreated} fires. If
|
|
96
|
+
* upload is unsuccessful, this will be reported either by an error thrown
|
|
97
|
+
* by {@link CryptoApi.startDehydration} (for errors that happen before
|
|
98
|
+
* `startDehydration` returns), or by firing {@link DehydratedDeviceRotationError}
|
|
99
|
+
* (for errors that happen during regular rotation of the dehydrated device)
|
|
100
|
+
*/
|
|
101
|
+
CryptoEvent["DehydratedDeviceUploaded"] = "dehydration.DehydratedDeviceUploaded";
|
|
102
|
+
/**
|
|
103
|
+
* Fires when rehydration has started.
|
|
104
|
+
*
|
|
105
|
+
* After the client calls {@link CryptoApi.startDehydration}, this event will
|
|
106
|
+
* fire if a dehydrated device is found and we attempt to rehydrate it.
|
|
107
|
+
*/
|
|
108
|
+
CryptoEvent["RehydrationStarted"] = "dehydration.RehydrationStarted";
|
|
109
|
+
/**
|
|
110
|
+
* Fires during rehydration, to inform the application of rehydration progress.
|
|
111
|
+
*
|
|
112
|
+
* The payload is a pair `[roomKeyCount: number, toDeviceCount: number]`,
|
|
113
|
+
* where `roomKeyCount` is the number of room keys that have been received
|
|
114
|
+
* so far, and `toDeviceCount` is the number of to-device messages received
|
|
115
|
+
* so far (including the messages containing room keys).
|
|
116
|
+
*/
|
|
117
|
+
CryptoEvent["RehydrationProgress"] = "dehydration.RehydrationProgress";
|
|
118
|
+
/** Fires when rehydration has completed successfully. */
|
|
119
|
+
CryptoEvent["RehydrationCompleted"] = "dehydration.RehydrationCompleted";
|
|
120
|
+
/** Fires when there was an error in rehydration.
|
|
121
|
+
*
|
|
122
|
+
* The payload is an error message as a string.
|
|
123
|
+
*/
|
|
124
|
+
CryptoEvent["RehydrationError"] = "dehydration.RehydrationError";
|
|
125
|
+
/**
|
|
126
|
+
* Fires when a dehydrated device key has been cached in the local database.
|
|
127
|
+
*/
|
|
128
|
+
CryptoEvent["DehydrationKeyCached"] = "dehydration.DehydrationKeyCached";
|
|
129
|
+
/**
|
|
130
|
+
* Fires when an error occurs during periodic rotation of the dehydrated device.
|
|
131
|
+
*
|
|
132
|
+
* The payload is an error message as a string.
|
|
133
|
+
*/
|
|
134
|
+
CryptoEvent["DehydratedDeviceRotationError"] = "dehydration.DehydratedDeviceRotationError";
|
|
135
|
+
return CryptoEvent;
|
|
136
|
+
}({});
|
|
137
|
+
//# sourceMappingURL=CryptoEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoEvent.js","names":["CryptoEvent"],"sources":["../../src/crypto-api/CryptoEvent.ts"],"sourcesContent":["/*\n * Copyright 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Cryptography-related events emitted by the {@link briij.BriijClient}.\n */\nexport enum CryptoEvent {\n /**\n * Fires when the trust status of a user changes.\n * The payload is a pair (userId, userTrustLevel). The trust level is one of the values from UserVerificationStatus.\n */\n UserTrustStatusChanged = \"userTrustStatusChanged\",\n\n /**\n * Fires when the key backup status changes.\n * The payload is a boolean indicating whether the key backup is enabled.\n */\n KeyBackupStatus = \"crypto.keyBackupStatus\",\n\n /**\n * Fires when we failed to back up the keys\n * The payload is the error code of the error that occurred.\n */\n KeyBackupFailed = \"crypto.keyBackupFailed\",\n\n /**\n * Fires when the number of sessions that can be backed up changes.\n * The payload is the remaining number of sessions that can be backed up.\n */\n KeyBackupSessionsRemaining = \"crypto.keyBackupSessionsRemaining\",\n\n /**\n * Fires when a new valid backup decryption key is in cache.\n * This will happen when a secret is received from another session, from secret storage,\n * or when a new backup is created from this session.\n *\n * The payload is the version of the backup for which we have the key for.\n *\n * This event is only fired by the rust crypto backend.\n */\n KeyBackupDecryptionKeyCached = \"crypto.keyBackupDecryptionKeyCached\",\n\n /**\n * Fires when a key verification request is received.\n * The payload is a VerificationRequest object representing the request.\n */\n VerificationRequestReceived = \"crypto.verificationRequestReceived\",\n\n /** @deprecated Use {@link DevicesUpdated} instead when using rust crypto */\n WillUpdateDevices = \"crypto.willUpdateDevices\",\n\n /**\n * Fires whenever the stored devices for a user have been updated\n * The payload is a pair (userIds, initialFetch).\n */\n DevicesUpdated = \"crypto.devicesUpdated\",\n\n /**\n * Fires when the user's cross-signing keys have changed or cross-signing\n * has been enabled/disabled. The client can use getStoredCrossSigningForUser\n * with the user ID of the logged in user to check if cross-signing is\n * enabled on the account. If enabled, it can test whether the current key\n * is trusted using with checkUserTrust with the user ID of the logged\n * in user. The checkOwnCrossSigningTrust function may be used to reconcile\n * the trust in the account key.\n *\n * The cross-signing API is currently UNSTABLE and may change without notice.\n * @experimental\n */\n KeysChanged = \"crossSigning.keysChanged\",\n\n /**\n * Fires when data is being migrated from legacy crypto to rust crypto.\n *\n * The payload is a pair `(progress, total)`, where `progress` is the number of steps completed so far, and\n * `total` is the total number of steps. When migration is complete, a final instance of the event is emitted, with\n * `progress === total === -1`.\n */\n LegacyCryptoStoreMigrationProgress = \"crypto.legacyCryptoStoreMigrationProgress\",\n\n /**\n * Fires when a new dehydrated device is created locally.\n *\n * After the client calls {@link CryptoApi.startDehydration}, this event\n * will be fired every time a new dehydrated device is created. It may fire\n * before `startDehydration` returns.\n */\n DehydratedDeviceCreated = \"dehydration.DehydratedDeviceCreated\",\n\n /**\n * Fires when a new dehydrated device is successfully uploaded to the server.\n *\n * This should fire shortly after {@link DehydratedDeviceCreated} fires. If\n * upload is unsuccessful, this will be reported either by an error thrown\n * by {@link CryptoApi.startDehydration} (for errors that happen before\n * `startDehydration` returns), or by firing {@link DehydratedDeviceRotationError}\n * (for errors that happen during regular rotation of the dehydrated device)\n */\n DehydratedDeviceUploaded = \"dehydration.DehydratedDeviceUploaded\",\n\n /**\n * Fires when rehydration has started.\n *\n * After the client calls {@link CryptoApi.startDehydration}, this event will\n * fire if a dehydrated device is found and we attempt to rehydrate it.\n */\n RehydrationStarted = \"dehydration.RehydrationStarted\",\n\n /**\n * Fires during rehydration, to inform the application of rehydration progress.\n *\n * The payload is a pair `[roomKeyCount: number, toDeviceCount: number]`,\n * where `roomKeyCount` is the number of room keys that have been received\n * so far, and `toDeviceCount` is the number of to-device messages received\n * so far (including the messages containing room keys).\n */\n RehydrationProgress = \"dehydration.RehydrationProgress\",\n\n /** Fires when rehydration has completed successfully. */\n RehydrationCompleted = \"dehydration.RehydrationCompleted\",\n\n /** Fires when there was an error in rehydration.\n *\n * The payload is an error message as a string.\n */\n RehydrationError = \"dehydration.RehydrationError\",\n\n /**\n * Fires when a dehydrated device key has been cached in the local database.\n */\n DehydrationKeyCached = \"dehydration.DehydrationKeyCached\",\n\n /**\n * Fires when an error occurs during periodic rotation of the dehydrated device.\n *\n * The payload is an error message as a string.\n */\n DehydratedDeviceRotationError = \"dehydration.DehydratedDeviceRotationError\",\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,WAAW,0BAAXA,WAAW;EACnB;AACJ;AACA;AACA;EAJYA,WAAW;EAOnB;AACJ;AACA;AACA;EAVYA,WAAW;EAanB;AACJ;AACA;AACA;EAhBYA,WAAW;EAmBnB;AACJ;AACA;AACA;EAtBYA,WAAW;EAyBnB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjCYA,WAAW;EAoCnB;AACJ;AACA;AACA;EAvCYA,WAAW;EA0CnB;EA1CQA,WAAW;EA6CnB;AACJ;AACA;AACA;EAhDYA,WAAW;EAmDnB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA9DYA,WAAW;EAiEnB;AACJ;AACA;AACA;AACA;AACA;AACA;EAvEYA,WAAW;EA0EnB;AACJ;AACA;AACA;AACA;AACA;AACA;EAhFYA,WAAW;EAmFnB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA3FYA,WAAW;EA8FnB;AACJ;AACA;AACA;AACA;AACA;EAnGYA,WAAW;EAsGnB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EA7GYA,WAAW;EAgHnB;EAhHQA,WAAW;EAmHnB;AACJ;AACA;AACA;EAtHYA,WAAW;EAyHnB;AACJ;AACA;EA3HYA,WAAW;EA8HnB;AACJ;AACA;AACA;AACA;EAlIYA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CryptoEvent } from "./CryptoEvent.ts";
|
|
2
|
+
import { type VerificationRequest } from "./verification.ts";
|
|
3
|
+
import { type UserVerificationStatus } from "./index.ts";
|
|
4
|
+
import { type RustBackupCryptoEventMap } from "../rust-crypto/backup.ts";
|
|
5
|
+
import { type EmptyObject } from "../@types/common.ts";
|
|
6
|
+
/**
|
|
7
|
+
* A map of the {@link CryptoEvent} fired by the {@link CryptoApi} and their payloads.
|
|
8
|
+
*/
|
|
9
|
+
export type CryptoEventHandlerMap = {
|
|
10
|
+
[CryptoEvent.VerificationRequestReceived]: (request: VerificationRequest) => void;
|
|
11
|
+
[CryptoEvent.UserTrustStatusChanged]: (userId: string, userTrustLevel: UserVerificationStatus) => void;
|
|
12
|
+
[CryptoEvent.KeyBackupDecryptionKeyCached]: (version: string) => void;
|
|
13
|
+
[CryptoEvent.KeysChanged]: (data: EmptyObject) => void;
|
|
14
|
+
[CryptoEvent.WillUpdateDevices]: (users: string[], initialFetch: boolean) => void;
|
|
15
|
+
[CryptoEvent.DevicesUpdated]: (users: string[], initialFetch: boolean) => void;
|
|
16
|
+
[CryptoEvent.LegacyCryptoStoreMigrationProgress]: (progress: number, total: number) => void;
|
|
17
|
+
[CryptoEvent.DehydratedDeviceCreated]: () => void;
|
|
18
|
+
[CryptoEvent.DehydratedDeviceUploaded]: () => void;
|
|
19
|
+
[CryptoEvent.RehydrationStarted]: () => void;
|
|
20
|
+
[CryptoEvent.RehydrationProgress]: (roomKeyCount: number, toDeviceCount: number) => void;
|
|
21
|
+
[CryptoEvent.RehydrationCompleted]: () => void;
|
|
22
|
+
[CryptoEvent.RehydrationError]: (msg: string) => void;
|
|
23
|
+
[CryptoEvent.DehydrationKeyCached]: () => void;
|
|
24
|
+
[CryptoEvent.DehydratedDeviceRotationError]: (msg: string) => void;
|
|
25
|
+
} & RustBackupCryptoEventMap;
|
|
26
|
+
//# sourceMappingURL=CryptoEventHandlerMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoEventHandlerMap.d.ts","sourceRoot":"","sources":["../../src/crypto-api/CryptoEventHandlerMap.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,KAAK,WAAW,EAAE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