@unwanted/matrix-sdk-mini 34.12.0-1 → 34.12.0-3
Sign up to get free protection for your applications and to get access to all the features.
- package/git-revision.txt +1 -1
- package/lib/@types/event.d.ts +0 -19
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/global.d.js +0 -2
- package/lib/@types/global.d.js.map +1 -1
- package/lib/browser-index.d.ts.map +1 -1
- package/lib/browser-index.js +0 -11
- package/lib/browser-index.js.map +1 -1
- package/lib/client.d.ts +2 -1224
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +345 -2826
- package/lib/client.js.map +1 -1
- package/lib/embedded.d.ts +0 -22
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +24 -167
- package/lib/embedded.js.map +1 -1
- package/lib/event-mapper.d.ts.map +1 -1
- package/lib/event-mapper.js +0 -4
- package/lib/event-mapper.js.map +1 -1
- package/lib/matrix.d.ts +0 -25
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +1 -30
- package/lib/matrix.js.map +1 -1
- package/lib/models/MSC3089Branch.d.ts.map +1 -1
- package/lib/models/MSC3089Branch.js +0 -3
- package/lib/models/MSC3089Branch.js.map +1 -1
- package/lib/models/event.d.ts +0 -94
- package/lib/models/event.d.ts.map +1 -1
- package/lib/models/event.js +0 -274
- package/lib/models/event.js.map +1 -1
- package/lib/models/poll.d.ts.map +1 -1
- package/lib/models/poll.js +1 -5
- package/lib/models/poll.js.map +1 -1
- package/lib/models/relations-container.d.ts.map +1 -1
- package/lib/models/relations-container.js +1 -7
- package/lib/models/relations-container.js.map +1 -1
- package/lib/models/relations.d.ts +0 -1
- package/lib/models/relations.d.ts.map +1 -1
- package/lib/models/relations.js +0 -8
- package/lib/models/relations.js.map +1 -1
- package/lib/models/room-state.d.ts.map +1 -1
- package/lib/models/room-state.js +10 -26
- package/lib/models/room-state.js.map +1 -1
- package/lib/models/room.d.ts +0 -18
- package/lib/models/room.d.ts.map +1 -1
- package/lib/models/room.js +94 -148
- package/lib/models/room.js.map +1 -1
- package/lib/models/thread.d.ts.map +1 -1
- package/lib/models/thread.js +0 -1
- package/lib/models/thread.js.map +1 -1
- package/lib/sliding-sync-sdk.d.ts +2 -3
- package/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/lib/sliding-sync-sdk.js +41 -90
- package/lib/sliding-sync-sdk.js.map +1 -1
- package/lib/sync.d.ts +0 -12
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +1 -73
- package/lib/sync.js.map +1 -1
- package/lib/testing.d.ts +0 -48
- package/lib/testing.d.ts.map +1 -1
- package/lib/testing.js +0 -105
- package/lib/testing.js.map +1 -1
- package/package.json +1 -3
- package/src/@types/event.ts +2 -36
- package/src/@types/global.d.ts +0 -3
- package/src/browser-index.ts +0 -11
- package/src/client.ts +52 -2876
- package/src/embedded.ts +3 -132
- package/src/event-mapper.ts +0 -4
- package/src/matrix.ts +0 -41
- package/src/models/MSC3089Branch.ts +0 -3
- package/src/models/event.ts +0 -289
- package/src/models/poll.ts +0 -6
- package/src/models/relations-container.ts +1 -8
- package/src/models/relations.ts +0 -8
- package/src/models/room-state.ts +2 -8
- package/src/models/room.ts +0 -62
- package/src/models/thread.ts +0 -1
- package/src/sliding-sync-sdk.ts +2 -72
- package/src/sync.ts +1 -98
- package/src/testing.ts +0 -108
- package/lib/@types/crypto.d.ts +0 -47
- package/lib/@types/crypto.d.ts.map +0 -1
- package/lib/@types/crypto.js +0 -1
- package/lib/@types/crypto.js.map +0 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js +0 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +0 -1
- package/lib/common-crypto/CryptoBackend.d.ts +0 -240
- package/lib/common-crypto/CryptoBackend.d.ts.map +0 -1
- package/lib/common-crypto/CryptoBackend.js +0 -73
- package/lib/common-crypto/CryptoBackend.js.map +0 -1
- package/lib/common-crypto/key-passphrase.d.ts +0 -14
- package/lib/common-crypto/key-passphrase.d.ts.map +0 -1
- package/lib/common-crypto/key-passphrase.js +0 -33
- package/lib/common-crypto/key-passphrase.js.map +0 -1
- package/lib/crypto/CrossSigning.d.ts +0 -184
- package/lib/crypto/CrossSigning.d.ts.map +0 -1
- package/lib/crypto/CrossSigning.js +0 -718
- package/lib/crypto/CrossSigning.js.map +0 -1
- package/lib/crypto/DeviceList.d.ts +0 -216
- package/lib/crypto/DeviceList.d.ts.map +0 -1
- package/lib/crypto/DeviceList.js +0 -892
- package/lib/crypto/DeviceList.js.map +0 -1
- package/lib/crypto/EncryptionSetup.d.ts +0 -152
- package/lib/crypto/EncryptionSetup.d.ts.map +0 -1
- package/lib/crypto/EncryptionSetup.js +0 -356
- package/lib/crypto/EncryptionSetup.js.map +0 -1
- package/lib/crypto/OlmDevice.d.ts +0 -457
- package/lib/crypto/OlmDevice.d.ts.map +0 -1
- package/lib/crypto/OlmDevice.js +0 -1241
- package/lib/crypto/OlmDevice.js.map +0 -1
- package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts +0 -109
- package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts.map +0 -1
- package/lib/crypto/OutgoingRoomKeyRequestManager.js +0 -415
- package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +0 -1
- package/lib/crypto/RoomList.d.ts +0 -26
- package/lib/crypto/RoomList.d.ts.map +0 -1
- package/lib/crypto/RoomList.js +0 -71
- package/lib/crypto/RoomList.js.map +0 -1
- package/lib/crypto/SecretSharing.d.ts +0 -24
- package/lib/crypto/SecretSharing.d.ts.map +0 -1
- package/lib/crypto/SecretSharing.js +0 -194
- package/lib/crypto/SecretSharing.js.map +0 -1
- package/lib/crypto/SecretStorage.d.ts +0 -55
- package/lib/crypto/SecretStorage.d.ts.map +0 -1
- package/lib/crypto/SecretStorage.js +0 -118
- package/lib/crypto/SecretStorage.js.map +0 -1
- package/lib/crypto/aes.d.ts +0 -6
- package/lib/crypto/aes.d.ts.map +0 -1
- package/lib/crypto/aes.js +0 -24
- package/lib/crypto/aes.js.map +0 -1
- package/lib/crypto/algorithms/base.d.ts +0 -156
- package/lib/crypto/algorithms/base.d.ts.map +0 -1
- package/lib/crypto/algorithms/base.js +0 -187
- package/lib/crypto/algorithms/base.js.map +0 -1
- package/lib/crypto/algorithms/index.d.ts +0 -4
- package/lib/crypto/algorithms/index.d.ts.map +0 -1
- package/lib/crypto/algorithms/index.js +0 -20
- package/lib/crypto/algorithms/index.js.map +0 -1
- package/lib/crypto/algorithms/megolm.d.ts +0 -385
- package/lib/crypto/algorithms/megolm.d.ts.map +0 -1
- package/lib/crypto/algorithms/megolm.js +0 -1822
- package/lib/crypto/algorithms/megolm.js.map +0 -1
- package/lib/crypto/algorithms/olm.d.ts +0 -5
- package/lib/crypto/algorithms/olm.d.ts.map +0 -1
- package/lib/crypto/algorithms/olm.js +0 -299
- package/lib/crypto/algorithms/olm.js.map +0 -1
- package/lib/crypto/api.d.ts +0 -32
- package/lib/crypto/api.d.ts.map +0 -1
- package/lib/crypto/api.js +0 -22
- package/lib/crypto/api.js.map +0 -1
- package/lib/crypto/backup.d.ts +0 -227
- package/lib/crypto/backup.d.ts.map +0 -1
- package/lib/crypto/backup.js +0 -824
- package/lib/crypto/backup.js.map +0 -1
- package/lib/crypto/crypto.d.ts +0 -3
- package/lib/crypto/crypto.d.ts.map +0 -1
- package/lib/crypto/crypto.js +0 -19
- package/lib/crypto/crypto.js.map +0 -1
- package/lib/crypto/dehydration.d.ts +0 -34
- package/lib/crypto/dehydration.d.ts.map +0 -1
- package/lib/crypto/dehydration.js +0 -252
- package/lib/crypto/dehydration.js.map +0 -1
- package/lib/crypto/device-converter.d.ts +0 -9
- package/lib/crypto/device-converter.d.ts.map +0 -1
- package/lib/crypto/device-converter.js +0 -42
- package/lib/crypto/device-converter.js.map +0 -1
- package/lib/crypto/deviceinfo.d.ts +0 -99
- package/lib/crypto/deviceinfo.d.ts.map +0 -1
- package/lib/crypto/deviceinfo.js +0 -148
- package/lib/crypto/deviceinfo.js.map +0 -1
- package/lib/crypto/index.d.ts +0 -1209
- package/lib/crypto/index.d.ts.map +0 -1
- package/lib/crypto/index.js +0 -4097
- package/lib/crypto/index.js.map +0 -1
- package/lib/crypto/key_passphrase.d.ts +0 -14
- package/lib/crypto/key_passphrase.d.ts.map +0 -1
- package/lib/crypto/key_passphrase.js +0 -44
- package/lib/crypto/key_passphrase.js.map +0 -1
- package/lib/crypto/keybackup.d.ts +0 -18
- package/lib/crypto/keybackup.d.ts.map +0 -1
- package/lib/crypto/keybackup.js +0 -1
- package/lib/crypto/keybackup.js.map +0 -1
- package/lib/crypto/olmlib.d.ts +0 -129
- package/lib/crypto/olmlib.d.ts.map +0 -1
- package/lib/crypto/olmlib.js +0 -492
- package/lib/crypto/olmlib.js.map +0 -1
- package/lib/crypto/recoverykey.d.ts +0 -2
- package/lib/crypto/recoverykey.d.ts.map +0 -1
- package/lib/crypto/recoverykey.js +0 -19
- package/lib/crypto/recoverykey.js.map +0 -1
- package/lib/crypto/store/base.d.ts +0 -252
- package/lib/crypto/store/base.d.ts.map +0 -1
- package/lib/crypto/store/base.js +0 -64
- package/lib/crypto/store/base.js.map +0 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +0 -187
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +0 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +0 -1145
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +0 -1
- package/lib/crypto/store/indexeddb-crypto-store.d.ts +0 -432
- package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +0 -1
- package/lib/crypto/store/indexeddb-crypto-store.js +0 -728
- package/lib/crypto/store/indexeddb-crypto-store.js.map +0 -1
- package/lib/crypto/store/localStorage-crypto-store.d.ts +0 -119
- package/lib/crypto/store/localStorage-crypto-store.d.ts.map +0 -1
- package/lib/crypto/store/localStorage-crypto-store.js +0 -531
- package/lib/crypto/store/localStorage-crypto-store.js.map +0 -1
- package/lib/crypto/store/memory-crypto-store.d.ts +0 -215
- package/lib/crypto/store/memory-crypto-store.d.ts.map +0 -1
- package/lib/crypto/store/memory-crypto-store.js +0 -622
- package/lib/crypto/store/memory-crypto-store.js.map +0 -1
- package/lib/crypto/verification/Base.d.ts +0 -105
- package/lib/crypto/verification/Base.d.ts.map +0 -1
- package/lib/crypto/verification/Base.js +0 -372
- package/lib/crypto/verification/Base.js.map +0 -1
- package/lib/crypto/verification/Error.d.ts +0 -35
- package/lib/crypto/verification/Error.d.ts.map +0 -1
- package/lib/crypto/verification/Error.js +0 -86
- package/lib/crypto/verification/Error.js.map +0 -1
- package/lib/crypto/verification/IllegalMethod.d.ts +0 -15
- package/lib/crypto/verification/IllegalMethod.d.ts.map +0 -1
- package/lib/crypto/verification/IllegalMethod.js +0 -43
- package/lib/crypto/verification/IllegalMethod.js.map +0 -1
- package/lib/crypto/verification/QRCode.d.ts +0 -51
- package/lib/crypto/verification/QRCode.d.ts.map +0 -1
- package/lib/crypto/verification/QRCode.js +0 -277
- package/lib/crypto/verification/QRCode.js.map +0 -1
- package/lib/crypto/verification/SAS.d.ts +0 -27
- package/lib/crypto/verification/SAS.d.ts.map +0 -1
- package/lib/crypto/verification/SAS.js +0 -485
- package/lib/crypto/verification/SAS.js.map +0 -1
- package/lib/crypto/verification/SASDecimal.d.ts +0 -8
- package/lib/crypto/verification/SASDecimal.d.ts.map +0 -1
- package/lib/crypto/verification/SASDecimal.js +0 -34
- package/lib/crypto/verification/SASDecimal.js.map +0 -1
- package/lib/crypto/verification/request/Channel.d.ts +0 -18
- package/lib/crypto/verification/request/Channel.d.ts.map +0 -1
- package/lib/crypto/verification/request/Channel.js +0 -1
- package/lib/crypto/verification/request/Channel.js.map +0 -1
- package/lib/crypto/verification/request/InRoomChannel.d.ts +0 -113
- package/lib/crypto/verification/request/InRoomChannel.d.ts.map +0 -1
- package/lib/crypto/verification/request/InRoomChannel.js +0 -351
- package/lib/crypto/verification/request/InRoomChannel.js.map +0 -1
- package/lib/crypto/verification/request/ToDeviceChannel.d.ts +0 -105
- package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +0 -1
- package/lib/crypto/verification/request/ToDeviceChannel.js +0 -328
- package/lib/crypto/verification/request/ToDeviceChannel.js.map +0 -1
- package/lib/crypto/verification/request/VerificationRequest.d.ts +0 -227
- package/lib/crypto/verification/request/VerificationRequest.d.ts.map +0 -1
- package/lib/crypto/verification/request/VerificationRequest.js +0 -937
- package/lib/crypto/verification/request/VerificationRequest.js.map +0 -1
- package/lib/crypto-api/CryptoEvent.d.ts +0 -69
- package/lib/crypto-api/CryptoEvent.d.ts.map +0 -1
- package/lib/crypto-api/CryptoEvent.js +0 -33
- package/lib/crypto-api/CryptoEvent.js.map +0 -1
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts +0 -16
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +0 -1
- package/lib/crypto-api/CryptoEventHandlerMap.js +0 -22
- package/lib/crypto-api/CryptoEventHandlerMap.js.map +0 -1
- package/lib/crypto-api/index.d.ts +0 -978
- package/lib/crypto-api/index.d.ts.map +0 -1
- package/lib/crypto-api/index.js +0 -304
- package/lib/crypto-api/index.js.map +0 -1
- package/lib/crypto-api/key-passphrase.d.ts +0 -11
- package/lib/crypto-api/key-passphrase.d.ts.map +0 -1
- package/lib/crypto-api/key-passphrase.js +0 -51
- package/lib/crypto-api/key-passphrase.js.map +0 -1
- package/lib/crypto-api/keybackup.d.ts +0 -88
- package/lib/crypto-api/keybackup.d.ts.map +0 -1
- package/lib/crypto-api/keybackup.js +0 -1
- package/lib/crypto-api/keybackup.js.map +0 -1
- package/lib/crypto-api/recovery-key.d.ts +0 -11
- package/lib/crypto-api/recovery-key.d.ts.map +0 -1
- package/lib/crypto-api/recovery-key.js +0 -65
- package/lib/crypto-api/recovery-key.js.map +0 -1
- package/lib/crypto-api/verification.d.ts +0 -344
- package/lib/crypto-api/verification.d.ts.map +0 -1
- package/lib/crypto-api/verification.js +0 -91
- package/lib/crypto-api/verification.js.map +0 -1
- package/lib/matrixrtc/CallMembership.d.ts +0 -66
- package/lib/matrixrtc/CallMembership.d.ts.map +0 -1
- package/lib/matrixrtc/CallMembership.js +0 -197
- package/lib/matrixrtc/CallMembership.js.map +0 -1
- package/lib/matrixrtc/LivekitFocus.d.ts +0 -16
- package/lib/matrixrtc/LivekitFocus.d.ts.map +0 -1
- package/lib/matrixrtc/LivekitFocus.js +0 -20
- package/lib/matrixrtc/LivekitFocus.js.map +0 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts +0 -295
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +0 -1
- package/lib/matrixrtc/MatrixRTCSession.js +0 -1043
- package/lib/matrixrtc/MatrixRTCSession.js.map +0 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +0 -40
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +0 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js +0 -146
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +0 -1
- package/lib/matrixrtc/focus.d.ts +0 -10
- package/lib/matrixrtc/focus.d.ts.map +0 -1
- package/lib/matrixrtc/focus.js +0 -1
- package/lib/matrixrtc/focus.js.map +0 -1
- package/lib/matrixrtc/index.d.ts +0 -7
- package/lib/matrixrtc/index.d.ts.map +0 -1
- package/lib/matrixrtc/index.js +0 -21
- package/lib/matrixrtc/index.js.map +0 -1
- package/lib/matrixrtc/types.d.ts +0 -19
- package/lib/matrixrtc/types.d.ts.map +0 -1
- package/lib/matrixrtc/types.js +0 -1
- package/lib/matrixrtc/types.js.map +0 -1
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts +0 -112
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +0 -1
- package/lib/rendezvous/MSC4108SignInWithQR.js +0 -392
- package/lib/rendezvous/MSC4108SignInWithQR.js.map +0 -1
- package/lib/rendezvous/RendezvousChannel.d.ts +0 -27
- package/lib/rendezvous/RendezvousChannel.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousChannel.js +0 -1
- package/lib/rendezvous/RendezvousChannel.js.map +0 -1
- package/lib/rendezvous/RendezvousCode.d.ts +0 -9
- package/lib/rendezvous/RendezvousCode.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousCode.js +0 -1
- package/lib/rendezvous/RendezvousCode.js.map +0 -1
- package/lib/rendezvous/RendezvousError.d.ts +0 -6
- package/lib/rendezvous/RendezvousError.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousError.js +0 -23
- package/lib/rendezvous/RendezvousError.js.map +0 -1
- package/lib/rendezvous/RendezvousFailureReason.d.ts +0 -31
- package/lib/rendezvous/RendezvousFailureReason.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousFailureReason.js +0 -38
- package/lib/rendezvous/RendezvousFailureReason.js.map +0 -1
- package/lib/rendezvous/RendezvousIntent.d.ts +0 -5
- package/lib/rendezvous/RendezvousIntent.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousIntent.js +0 -22
- package/lib/rendezvous/RendezvousIntent.js.map +0 -1
- package/lib/rendezvous/RendezvousTransport.d.ts +0 -36
- package/lib/rendezvous/RendezvousTransport.d.ts.map +0 -1
- package/lib/rendezvous/RendezvousTransport.js +0 -1
- package/lib/rendezvous/RendezvousTransport.js.map +0 -1
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +0 -58
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +0 -1
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +0 -246
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +0 -1
- package/lib/rendezvous/channels/index.d.ts +0 -2
- package/lib/rendezvous/channels/index.d.ts.map +0 -1
- package/lib/rendezvous/channels/index.js +0 -18
- package/lib/rendezvous/channels/index.js.map +0 -1
- package/lib/rendezvous/index.d.ts +0 -10
- package/lib/rendezvous/index.d.ts.map +0 -1
- package/lib/rendezvous/index.js +0 -23
- package/lib/rendezvous/index.js.map +0 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +0 -61
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +0 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -253
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +0 -1
- package/lib/rendezvous/transports/index.d.ts +0 -2
- package/lib/rendezvous/transports/index.d.ts.map +0 -1
- package/lib/rendezvous/transports/index.js +0 -18
- package/lib/rendezvous/transports/index.js.map +0 -1
- package/lib/rust-crypto/CrossSigningIdentity.d.ts +0 -33
- package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +0 -1
- package/lib/rust-crypto/CrossSigningIdentity.js +0 -157
- package/lib/rust-crypto/CrossSigningIdentity.js.map +0 -1
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts +0 -98
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +0 -1
- package/lib/rust-crypto/DehydratedDeviceManager.js +0 -285
- package/lib/rust-crypto/DehydratedDeviceManager.js.map +0 -1
- package/lib/rust-crypto/KeyClaimManager.d.ts +0 -33
- package/lib/rust-crypto/KeyClaimManager.d.ts.map +0 -1
- package/lib/rust-crypto/KeyClaimManager.js +0 -82
- package/lib/rust-crypto/KeyClaimManager.js.map +0 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +0 -43
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +0 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -195
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +0 -1
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts +0 -47
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +0 -1
- package/lib/rust-crypto/OutgoingRequestsManager.js +0 -148
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +0 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +0 -120
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +0 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +0 -467
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +0 -1
- package/lib/rust-crypto/RoomEncryptor.d.ts +0 -98
- package/lib/rust-crypto/RoomEncryptor.d.ts.map +0 -1
- package/lib/rust-crypto/RoomEncryptor.js +0 -299
- package/lib/rust-crypto/RoomEncryptor.js.map +0 -1
- package/lib/rust-crypto/backup.d.ts +0 -254
- package/lib/rust-crypto/backup.d.ts.map +0 -1
- package/lib/rust-crypto/backup.js +0 -837
- package/lib/rust-crypto/backup.js.map +0 -1
- package/lib/rust-crypto/constants.d.ts +0 -3
- package/lib/rust-crypto/constants.d.ts.map +0 -1
- package/lib/rust-crypto/constants.js +0 -19
- package/lib/rust-crypto/constants.js.map +0 -1
- package/lib/rust-crypto/device-converter.d.ts +0 -28
- package/lib/rust-crypto/device-converter.d.ts.map +0 -1
- package/lib/rust-crypto/device-converter.js +0 -123
- package/lib/rust-crypto/device-converter.js.map +0 -1
- package/lib/rust-crypto/index.d.ts +0 -61
- package/lib/rust-crypto/index.d.ts.map +0 -1
- package/lib/rust-crypto/index.js +0 -152
- package/lib/rust-crypto/index.js.map +0 -1
- package/lib/rust-crypto/libolm_migration.d.ts +0 -81
- package/lib/rust-crypto/libolm_migration.d.ts.map +0 -1
- package/lib/rust-crypto/libolm_migration.js +0 -459
- package/lib/rust-crypto/libolm_migration.js.map +0 -1
- package/lib/rust-crypto/rust-crypto.d.ts +0 -556
- package/lib/rust-crypto/rust-crypto.d.ts.map +0 -1
- package/lib/rust-crypto/rust-crypto.js +0 -2016
- package/lib/rust-crypto/rust-crypto.js.map +0 -1
- package/lib/rust-crypto/secret-storage.d.ts +0 -22
- package/lib/rust-crypto/secret-storage.d.ts.map +0 -1
- package/lib/rust-crypto/secret-storage.js +0 -63
- package/lib/rust-crypto/secret-storage.js.map +0 -1
- package/lib/rust-crypto/verification.d.ts +0 -319
- package/lib/rust-crypto/verification.d.ts.map +0 -1
- package/lib/rust-crypto/verification.js +0 -816
- package/lib/rust-crypto/verification.js.map +0 -1
- package/lib/secret-storage.d.ts +0 -370
- package/lib/secret-storage.d.ts.map +0 -1
- package/lib/secret-storage.js +0 -466
- package/lib/secret-storage.js.map +0 -1
- package/lib/webrtc/audioContext.d.ts +0 -15
- package/lib/webrtc/audioContext.d.ts.map +0 -1
- package/lib/webrtc/audioContext.js +0 -46
- package/lib/webrtc/audioContext.js.map +0 -1
- package/lib/webrtc/call.d.ts +0 -560
- package/lib/webrtc/call.d.ts.map +0 -1
- package/lib/webrtc/call.js +0 -2541
- package/lib/webrtc/call.js.map +0 -1
- package/lib/webrtc/callEventHandler.d.ts +0 -37
- package/lib/webrtc/callEventHandler.d.ts.map +0 -1
- package/lib/webrtc/callEventHandler.js +0 -344
- package/lib/webrtc/callEventHandler.js.map +0 -1
- package/lib/webrtc/callEventTypes.d.ts +0 -73
- package/lib/webrtc/callEventTypes.d.ts.map +0 -1
- package/lib/webrtc/callEventTypes.js +0 -13
- package/lib/webrtc/callEventTypes.js.map +0 -1
- package/lib/webrtc/callFeed.d.ts +0 -128
- package/lib/webrtc/callFeed.d.ts.map +0 -1
- package/lib/webrtc/callFeed.js +0 -289
- package/lib/webrtc/callFeed.js.map +0 -1
- package/lib/webrtc/groupCall.d.ts +0 -323
- package/lib/webrtc/groupCall.d.ts.map +0 -1
- package/lib/webrtc/groupCall.js +0 -1337
- package/lib/webrtc/groupCall.js.map +0 -1
- package/lib/webrtc/groupCallEventHandler.d.ts +0 -31
- package/lib/webrtc/groupCallEventHandler.d.ts.map +0 -1
- package/lib/webrtc/groupCallEventHandler.js +0 -178
- package/lib/webrtc/groupCallEventHandler.js.map +0 -1
- package/lib/webrtc/mediaHandler.d.ts +0 -89
- package/lib/webrtc/mediaHandler.d.ts.map +0 -1
- package/lib/webrtc/mediaHandler.js +0 -437
- package/lib/webrtc/mediaHandler.js.map +0 -1
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts +0 -8
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +0 -1
- package/lib/webrtc/stats/callFeedStatsReporter.js +0 -82
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +0 -1
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts +0 -25
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +0 -1
- package/lib/webrtc/stats/callStatsReportGatherer.js +0 -199
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.d.ts +0 -17
- package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.js +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.js.map +0 -1
- package/lib/webrtc/stats/connectionStats.d.ts +0 -28
- package/lib/webrtc/stats/connectionStats.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStats.js +0 -26
- package/lib/webrtc/stats/connectionStats.js.map +0 -1
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts +0 -5
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStatsBuilder.js +0 -27
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +0 -7
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +0 -121
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +0 -1
- package/lib/webrtc/stats/groupCallStats.d.ts +0 -22
- package/lib/webrtc/stats/groupCallStats.d.ts.map +0 -1
- package/lib/webrtc/stats/groupCallStats.js +0 -78
- package/lib/webrtc/stats/groupCallStats.js.map +0 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +0 -10
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +0 -57
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +0 -12
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.js +0 -62
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts +0 -86
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStats.js +0 -142
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +0 -22
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +0 -76
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +0 -1
- package/lib/webrtc/stats/statsReport.d.ts +0 -99
- package/lib/webrtc/stats/statsReport.d.ts.map +0 -1
- package/lib/webrtc/stats/statsReport.js +0 -32
- package/lib/webrtc/stats/statsReport.js.map +0 -1
- package/lib/webrtc/stats/statsReportEmitter.d.ts +0 -15
- package/lib/webrtc/stats/statsReportEmitter.d.ts.map +0 -1
- package/lib/webrtc/stats/statsReportEmitter.js +0 -33
- package/lib/webrtc/stats/statsReportEmitter.js.map +0 -1
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +0 -16
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +0 -1
- package/lib/webrtc/stats/summaryStatsReportGatherer.js +0 -116
- package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +0 -1
- package/lib/webrtc/stats/trackStatsBuilder.d.ts +0 -19
- package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/trackStatsBuilder.js +0 -168
- package/lib/webrtc/stats/trackStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/transportStats.d.ts +0 -11
- package/lib/webrtc/stats/transportStats.d.ts.map +0 -1
- package/lib/webrtc/stats/transportStats.js +0 -1
- package/lib/webrtc/stats/transportStats.js.map +0 -1
- package/lib/webrtc/stats/transportStatsBuilder.d.ts +0 -5
- package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/transportStatsBuilder.js +0 -34
- package/lib/webrtc/stats/transportStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/valueFormatter.d.ts +0 -4
- package/lib/webrtc/stats/valueFormatter.d.ts.map +0 -1
- package/lib/webrtc/stats/valueFormatter.js +0 -25
- package/lib/webrtc/stats/valueFormatter.js.map +0 -1
- package/src/@types/crypto.ts +0 -73
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -44
- package/src/common-crypto/CryptoBackend.ts +0 -302
- package/src/common-crypto/README.md +0 -4
- package/src/common-crypto/key-passphrase.ts +0 -43
- package/src/crypto/CrossSigning.ts +0 -773
- package/src/crypto/DeviceList.ts +0 -989
- package/src/crypto/EncryptionSetup.ts +0 -351
- package/src/crypto/OlmDevice.ts +0 -1500
- package/src/crypto/OutgoingRoomKeyRequestManager.ts +0 -485
- package/src/crypto/RoomList.ts +0 -70
- package/src/crypto/SecretSharing.ts +0 -240
- package/src/crypto/SecretStorage.ts +0 -136
- package/src/crypto/aes.ts +0 -23
- package/src/crypto/algorithms/base.ts +0 -236
- package/src/crypto/algorithms/index.ts +0 -20
- package/src/crypto/algorithms/megolm.ts +0 -2216
- package/src/crypto/algorithms/olm.ts +0 -381
- package/src/crypto/api.ts +0 -70
- package/src/crypto/backup.ts +0 -922
- package/src/crypto/crypto.ts +0 -18
- package/src/crypto/dehydration.ts +0 -272
- package/src/crypto/device-converter.ts +0 -45
- package/src/crypto/deviceinfo.ts +0 -158
- package/src/crypto/index.ts +0 -4414
- package/src/crypto/key_passphrase.ts +0 -42
- package/src/crypto/keybackup.ts +0 -47
- package/src/crypto/olmlib.ts +0 -539
- package/src/crypto/recoverykey.ts +0 -18
- package/src/crypto/store/base.ts +0 -348
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +0 -1250
- package/src/crypto/store/indexeddb-crypto-store.ts +0 -845
- package/src/crypto/store/localStorage-crypto-store.ts +0 -579
- package/src/crypto/store/memory-crypto-store.ts +0 -680
- package/src/crypto/verification/Base.ts +0 -409
- package/src/crypto/verification/Error.ts +0 -76
- package/src/crypto/verification/IllegalMethod.ts +0 -50
- package/src/crypto/verification/QRCode.ts +0 -310
- package/src/crypto/verification/SAS.ts +0 -494
- package/src/crypto/verification/SASDecimal.ts +0 -37
- package/src/crypto/verification/request/Channel.ts +0 -34
- package/src/crypto/verification/request/InRoomChannel.ts +0 -371
- package/src/crypto/verification/request/ToDeviceChannel.ts +0 -354
- package/src/crypto/verification/request/VerificationRequest.ts +0 -976
- package/src/crypto-api/CryptoEvent.ts +0 -93
- package/src/crypto-api/CryptoEventHandlerMap.ts +0 -32
- package/src/crypto-api/index.ts +0 -1175
- package/src/crypto-api/key-passphrase.ts +0 -58
- package/src/crypto-api/keybackup.ts +0 -115
- package/src/crypto-api/recovery-key.ts +0 -69
- package/src/crypto-api/verification.ts +0 -408
- package/src/matrixrtc/CallMembership.ts +0 -247
- package/src/matrixrtc/LivekitFocus.ts +0 -39
- package/src/matrixrtc/MatrixRTCSession.ts +0 -1319
- package/src/matrixrtc/MatrixRTCSessionManager.ts +0 -166
- package/src/matrixrtc/focus.ts +0 -25
- package/src/matrixrtc/index.ts +0 -22
- package/src/matrixrtc/types.ts +0 -36
- package/src/rendezvous/MSC4108SignInWithQR.ts +0 -444
- package/src/rendezvous/RendezvousChannel.ts +0 -48
- package/src/rendezvous/RendezvousCode.ts +0 -25
- package/src/rendezvous/RendezvousError.ts +0 -26
- package/src/rendezvous/RendezvousFailureReason.ts +0 -49
- package/src/rendezvous/RendezvousIntent.ts +0 -20
- package/src/rendezvous/RendezvousTransport.ts +0 -58
- package/src/rendezvous/channels/MSC4108SecureChannel.ts +0 -270
- package/src/rendezvous/channels/index.ts +0 -17
- package/src/rendezvous/index.ts +0 -25
- package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -270
- package/src/rendezvous/transports/index.ts +0 -17
- package/src/rust-crypto/CrossSigningIdentity.ts +0 -183
- package/src/rust-crypto/DehydratedDeviceManager.ts +0 -306
- package/src/rust-crypto/KeyClaimManager.ts +0 -86
- package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -236
- package/src/rust-crypto/OutgoingRequestsManager.ts +0 -143
- package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +0 -501
- package/src/rust-crypto/RoomEncryptor.ts +0 -352
- package/src/rust-crypto/backup.ts +0 -881
- package/src/rust-crypto/constants.ts +0 -18
- package/src/rust-crypto/device-converter.ts +0 -128
- package/src/rust-crypto/index.ts +0 -237
- package/src/rust-crypto/libolm_migration.ts +0 -530
- package/src/rust-crypto/rust-crypto.ts +0 -2205
- package/src/rust-crypto/secret-storage.ts +0 -60
- package/src/rust-crypto/verification.ts +0 -830
- package/src/secret-storage.ts +0 -693
- package/src/webrtc/audioContext.ts +0 -44
- package/src/webrtc/call.ts +0 -3074
- package/src/webrtc/callEventHandler.ts +0 -425
- package/src/webrtc/callEventTypes.ts +0 -93
- package/src/webrtc/callFeed.ts +0 -364
- package/src/webrtc/groupCall.ts +0 -1735
- package/src/webrtc/groupCallEventHandler.ts +0 -234
- package/src/webrtc/mediaHandler.ts +0 -484
- package/src/webrtc/stats/callFeedStatsReporter.ts +0 -94
- package/src/webrtc/stats/callStatsReportGatherer.ts +0 -219
- package/src/webrtc/stats/callStatsReportSummary.ts +0 -30
- package/src/webrtc/stats/connectionStats.ts +0 -47
- package/src/webrtc/stats/connectionStatsBuilder.ts +0 -28
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +0 -140
- package/src/webrtc/stats/groupCallStats.ts +0 -93
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +0 -57
- package/src/webrtc/stats/media/mediaTrackHandler.ts +0 -76
- package/src/webrtc/stats/media/mediaTrackStats.ts +0 -176
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +0 -90
- package/src/webrtc/stats/statsReport.ts +0 -133
- package/src/webrtc/stats/statsReportEmitter.ts +0 -49
- package/src/webrtc/stats/summaryStatsReportGatherer.ts +0 -148
- package/src/webrtc/stats/trackStatsBuilder.ts +0 -207
- package/src/webrtc/stats/transportStats.ts +0 -26
- package/src/webrtc/stats/transportStatsBuilder.ts +0 -48
- package/src/webrtc/stats/valueFormatter.ts +0 -27
package/lib/client.d.ts
CHANGED
@@ -2,39 +2,24 @@
|
|
2
2
|
* This is an internal module. See {@link MatrixClient} for the public class.
|
3
3
|
*/
|
4
4
|
import { Optional } from "matrix-events-sdk";
|
5
|
-
import type { IDeviceKeys, IMegolmSessionData, IOneTimeKey } from "./@types/crypto.ts";
|
6
5
|
import { ISyncStateData, SetPresence, SyncApi, SyncApiOptions, SyncState } from "./sync.ts";
|
7
6
|
import { EventStatus, IContent, IDecryptOptions, IEvent, MatrixEvent, MatrixEventEvent, MatrixEventHandlerMap, PushDetails } from "./models/event.ts";
|
8
|
-
import { CallEvent, CallEventHandlerMap, MatrixCall } from "./webrtc/call.ts";
|
9
7
|
import { Filter, IFilterDefinition } from "./filter.ts";
|
10
|
-
import { CallEventHandler, CallEventHandlerEvent, CallEventHandlerEventHandlerMap } from "./webrtc/callEventHandler.ts";
|
11
|
-
import { GroupCallEventHandler, GroupCallEventHandlerEvent, GroupCallEventHandlerEventHandlerMap } from "./webrtc/groupCallEventHandler.ts";
|
12
8
|
import { QueryDict } from "./utils.ts";
|
13
9
|
import { Direction, EventTimeline } from "./models/event-timeline.ts";
|
14
10
|
import { IActionsObject, PushProcessor } from "./pushprocessor.ts";
|
15
11
|
import { AutoDiscoveryAction } from "./autodiscovery.ts";
|
16
|
-
import { IExportedDevice as IExportedOlmDevice } from "./crypto/OlmDevice.ts";
|
17
|
-
import { IOlmDevice } from "./crypto/algorithms/megolm.ts";
|
18
12
|
import { TypedReEmitter } from "./ReEmitter.ts";
|
19
|
-
import { IRoomEncryption } from "./crypto/RoomList.ts";
|
20
13
|
import { Logger } from "./logger.ts";
|
21
14
|
import { SERVICE_TYPES } from "./service-types.ts";
|
22
15
|
import { FileType, HttpApiEvent, HttpApiEventHandlerMap, IHttpOpts, IRequestOpts, MatrixError, MatrixHttpApi, TokenRefreshFunction, Upload, UploadOpts, UploadResponse } from "./http-api/index.ts";
|
23
|
-
import { Crypto, CryptoEvent as LegacyCryptoEvent, CryptoEventHandlerMap as LegacyCryptoEventHandlerMap, ICheckOwnCrossSigningTrustOpts } from "./crypto/index.ts";
|
24
|
-
import { DeviceInfo } from "./crypto/deviceinfo.ts";
|
25
16
|
import { User, UserEvent, UserEventHandlerMap } from "./models/user.ts";
|
26
|
-
import { IDehydratedDevice, IDehydratedDeviceKeyInfo } from "./crypto/dehydration.ts";
|
27
|
-
import { IKeyBackupInfo, IKeyBackupPrepareOpts, IKeyBackupRestoreOpts, IKeyBackupRestoreResult } from "./crypto/keybackup.ts";
|
28
17
|
import { IIdentityServerProvider } from "./@types/IIdentityServerProvider.ts";
|
29
18
|
import { MatrixScheduler } from "./scheduler.ts";
|
30
19
|
import { BeaconEvent, BeaconEventHandlerMap } from "./models/beacon.ts";
|
31
20
|
import { AuthDict } from "./interactive-auth.ts";
|
32
21
|
import { IMinimalEvent, IRoomEvent, IStateEvent } from "./sync-accumulator.ts";
|
33
|
-
import { CrossSigningKey, ICreateSecretStorageOpts, IEncryptedEventInfo, IRecoveryKey } from "./crypto/api.ts";
|
34
22
|
import { EventTimelineSet } from "./models/event-timeline-set.ts";
|
35
|
-
import { VerificationRequest } from "./crypto/verification/request/VerificationRequest.ts";
|
36
|
-
import { VerificationBase as Verification } from "./crypto/verification/Base.ts";
|
37
|
-
import { CrossSigningInfo, DeviceTrustLevel, ICacheCallbacks, UserTrustLevel } from "./crypto/CrossSigning.ts";
|
38
23
|
import { Room, RoomEvent, RoomEventHandlerMap, RoomNameState } from "./models/room.ts";
|
39
24
|
import { RoomMemberEvent, RoomMemberEventHandlerMap } from "./models/room-member.ts";
|
40
25
|
import { RoomStateEvent, RoomStateEventHandlerMap } from "./models/room-state.ts";
|
@@ -42,19 +27,14 @@ import { DelayedEventInfo, IAddThreePidOnlyBody, IBindThreePidBody, ICreateRoomO
|
|
42
27
|
import { EventType, RelationType, RoomType, StateEvents, TimelineEvents } from "./@types/event.ts";
|
43
28
|
import { IdServerUnbindResult, JoinRule, Preset, Visibility } from "./@types/partials.ts";
|
44
29
|
import { EventMapper, MapperOpts } from "./event-mapper.ts";
|
45
|
-
import { IKeyBackup, IKeyBackupCheck, IPreparedKeyBackupVersion, TrustInfo } from "./crypto/backup.ts";
|
46
30
|
import { MSC3089TreeSpace } from "./models/MSC3089TreeSpace.ts";
|
47
31
|
import { ISignatures } from "./@types/signed.ts";
|
48
32
|
import { IStore } from "./store/index.ts";
|
49
|
-
import { ISecretRequest } from "./crypto/SecretStorage.ts";
|
50
33
|
import { IEventWithRoomId, ISearchRequestBody, ISearchResponse, ISearchResults, IStateEventWithRoomId } from "./@types/search.ts";
|
51
34
|
import { ISynapseAdminDeactivateResponse, ISynapseAdminWhoisResponse } from "./@types/synapse.ts";
|
52
35
|
import { IHierarchyRoom } from "./@types/spaces.ts";
|
53
36
|
import { IPusher, IPusherRequest, IPushRule, IPushRules, PushRuleAction, PushRuleKind, RuleId } from "./@types/PushRules.ts";
|
54
37
|
import { IThreepid } from "./@types/threepids.ts";
|
55
|
-
import { CryptoStore, OutgoingRoomKeyRequest } from "./crypto/store/base.ts";
|
56
|
-
import { GroupCall, GroupCallIntent, GroupCallType, IGroupCallDataChannelOptions } from "./webrtc/groupCall.ts";
|
57
|
-
import { MediaHandler } from "./webrtc/mediaHandler.ts";
|
58
38
|
import { ILoginFlowsResponse, IRefreshTokenResponse, LoginRequest, LoginResponse, LoginTokenPostResponse, SSOAction } from "./@types/auth.ts";
|
59
39
|
import { TypedEventEmitter } from "./models/typed-event-emitter.ts";
|
60
40
|
import { ReceiptType } from "./@types/read_receipts.ts";
|
@@ -68,11 +48,7 @@ import { IgnoredInvites } from "./models/invites-ignorer.ts";
|
|
68
48
|
import { UIAResponse } from "./@types/uia.ts";
|
69
49
|
import { LocalNotificationSettings } from "./@types/local_notifications.ts";
|
70
50
|
import { Feature, ServerSupport } from "./feature.ts";
|
71
|
-
import { BootstrapCrossSigningOpts, CrossSigningKeyInfo, CryptoApi, ImportRoomKeysOpts, CryptoEvent, CryptoEventHandlerMap, CryptoCallbacks } from "./crypto-api/index.ts";
|
72
|
-
import { DeviceInfoMap } from "./crypto/DeviceList.ts";
|
73
|
-
import { AddSecretStorageKeyOpts, SecretStorageKeyDescription, ServerSideSecretStorage } from "./secret-storage.ts";
|
74
51
|
import { RegisterRequest, RegisterResponse } from "./@types/registration.ts";
|
75
|
-
import { MatrixRTCSessionManager } from "./matrixrtc/MatrixRTCSessionManager.ts";
|
76
52
|
import { Membership } from "./@types/membership.ts";
|
77
53
|
import { RoomMessageEventContent } from "./@types/events.ts";
|
78
54
|
import { ImageInfo } from "./@types/media.ts";
|
@@ -81,7 +57,6 @@ export type Store = IStore;
|
|
81
57
|
export type ResetTimelineCallback = (roomId: string) => boolean;
|
82
58
|
export declare const UNSTABLE_MSC3852_LAST_SEEN_UA: UnstableValue<"last_seen_user_agent", "org.matrix.msc3852.last_seen_user_agent">;
|
83
59
|
interface IExportedDevice {
|
84
|
-
olmDevice: IExportedOlmDevice;
|
85
60
|
userId: string;
|
86
61
|
deviceId: string;
|
87
62
|
}
|
@@ -99,19 +74,6 @@ export interface ICreateClientOpts {
|
|
99
74
|
* will create a default store if needed.
|
100
75
|
*/
|
101
76
|
store?: Store;
|
102
|
-
/**
|
103
|
-
* A store to be used for end-to-end crypto session data.
|
104
|
-
* The `createClient` helper will create a default store if needed. Calls the factory supplied to
|
105
|
-
* {@link setCryptoStoreFactory} if unspecified; or if no factory has been
|
106
|
-
* specified, uses a default implementation (indexeddb in the browser,
|
107
|
-
* in-memory otherwise).
|
108
|
-
*
|
109
|
-
* This is only used for the legacy crypto implementation (as used by {@link MatrixClient#initCrypto}),
|
110
|
-
* but if you use the rust crypto implementation ({@link MatrixClient#initRustCrypto}) and the device
|
111
|
-
* previously used legacy crypto (so must be migrated), then this must still be provided, so that the
|
112
|
-
* data can be migrated from the legacy store.
|
113
|
-
*/
|
114
|
-
cryptoStore?: CryptoStore;
|
115
77
|
/**
|
116
78
|
* The scheduler to use. If not
|
117
79
|
* specified, this client will not retry requests on failure. This client
|
@@ -227,10 +189,6 @@ export interface ICreateClientOpts {
|
|
227
189
|
*/
|
228
190
|
useE2eForGroupCall?: boolean;
|
229
191
|
livekitServiceURL?: string;
|
230
|
-
/**
|
231
|
-
* Crypto callbacks provided by the application
|
232
|
-
*/
|
233
|
-
cryptoCallbacks?: CryptoCallbacks;
|
234
192
|
/**
|
235
193
|
* Method to generate room names for empty rooms and rooms names based on membership.
|
236
194
|
* Defaults to a built-in English handler with basic pluralisation.
|
@@ -325,12 +283,6 @@ export declare const UNSTABLE_MSC2666_MUTUAL_ROOMS = "uk.half-shot.msc2666.mutua
|
|
325
283
|
export declare const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_mutual_rooms";
|
326
284
|
export declare const UNSTABLE_MSC4140_DELAYED_EVENTS = "org.matrix.msc4140";
|
327
285
|
export declare const UNSTABLE_MSC4133_EXTENDED_PROFILES = "uk.tcpip.msc4133";
|
328
|
-
declare enum CrossSigningKeyType {
|
329
|
-
MasterKey = "master_key",
|
330
|
-
SelfSigningKey = "self_signing_key",
|
331
|
-
UserSigningKey = "user_signing_key"
|
332
|
-
}
|
333
|
-
export type CrossSigningKeys = Record<CrossSigningKeyType, CrossSigningKeyInfo>;
|
334
286
|
export type SendToDeviceContentMap = Map<string, Map<string, Record<string, any>>>;
|
335
287
|
export interface ISignedKey {
|
336
288
|
keys: Record<string, string>;
|
@@ -339,7 +291,6 @@ export interface ISignedKey {
|
|
339
291
|
algorithms: string[];
|
340
292
|
device_id: string;
|
341
293
|
}
|
342
|
-
export type KeySignatures = Record<string, Record<string, CrossSigningKeyInfo | ISignedKey>>;
|
343
294
|
export interface IUploadKeySignaturesResponse {
|
344
295
|
failures: Record<string, Record<string, {
|
345
296
|
errcode: string;
|
@@ -409,11 +360,6 @@ export interface IRequestMsisdnTokenResponse extends IRequestTokenResponse {
|
|
409
360
|
success: boolean;
|
410
361
|
intl_fmt: string;
|
411
362
|
}
|
412
|
-
export interface IUploadKeysRequest {
|
413
|
-
"device_keys"?: Required<IDeviceKeys>;
|
414
|
-
"one_time_keys"?: Record<string, IOneTimeKey>;
|
415
|
-
"org.matrix.msc2732.fallback_keys"?: Record<string, IOneTimeKey>;
|
416
|
-
}
|
417
363
|
export interface IQueryKeysRequest {
|
418
364
|
device_keys: {
|
419
365
|
[userId: string]: string[];
|
@@ -502,33 +448,6 @@ export interface Keys {
|
|
502
448
|
usage: string[];
|
503
449
|
user_id: string;
|
504
450
|
}
|
505
|
-
export interface SigningKeys extends Keys {
|
506
|
-
signatures: ISignatures;
|
507
|
-
}
|
508
|
-
export interface DeviceKeys {
|
509
|
-
[deviceId: string]: IDeviceKeys & {
|
510
|
-
unsigned?: {
|
511
|
-
device_display_name: string;
|
512
|
-
};
|
513
|
-
};
|
514
|
-
}
|
515
|
-
export interface IDownloadKeyResult {
|
516
|
-
failures: {
|
517
|
-
[serverName: string]: object;
|
518
|
-
};
|
519
|
-
device_keys: {
|
520
|
-
[userId: string]: DeviceKeys;
|
521
|
-
};
|
522
|
-
master_keys?: {
|
523
|
-
[userId: string]: Keys;
|
524
|
-
};
|
525
|
-
self_signing_keys?: {
|
526
|
-
[userId: string]: SigningKeys;
|
527
|
-
};
|
528
|
-
user_signing_keys?: {
|
529
|
-
[userId: string]: SigningKeys;
|
530
|
-
};
|
531
|
-
}
|
532
451
|
export interface IClaimOTKsResult {
|
533
452
|
failures: {
|
534
453
|
[serverName: string]: object;
|
@@ -620,12 +539,10 @@ export declare enum ClientEvent {
|
|
620
539
|
}
|
621
540
|
type RoomEvents = RoomEvent.Name | RoomEvent.Redaction | RoomEvent.RedactionCancelled | RoomEvent.Receipt | RoomEvent.Tags | RoomEvent.LocalEchoUpdated | RoomEvent.HistoryImportedWithinTimeline | RoomEvent.AccountData | RoomEvent.MyMembership | RoomEvent.Timeline | RoomEvent.TimelineReset;
|
622
541
|
type RoomStateEvents = RoomStateEvent.Events | RoomStateEvent.Members | RoomStateEvent.NewMember | RoomStateEvent.Update | RoomStateEvent.Marker;
|
623
|
-
type LegacyCryptoEvents = LegacyCryptoEvent.KeySignatureUploadFailure | LegacyCryptoEvent.KeyBackupStatus | LegacyCryptoEvent.KeyBackupFailed | LegacyCryptoEvent.KeyBackupSessionsRemaining | LegacyCryptoEvent.KeyBackupDecryptionKeyCached | LegacyCryptoEvent.RoomKeyRequest | LegacyCryptoEvent.RoomKeyRequestCancellation | LegacyCryptoEvent.VerificationRequest | LegacyCryptoEvent.VerificationRequestReceived | LegacyCryptoEvent.DeviceVerificationChanged | LegacyCryptoEvent.UserTrustStatusChanged | LegacyCryptoEvent.KeysChanged | LegacyCryptoEvent.Warning | LegacyCryptoEvent.DevicesUpdated | LegacyCryptoEvent.WillUpdateDevices | LegacyCryptoEvent.LegacyCryptoStoreMigrationProgress;
|
624
|
-
type CryptoEvents = (typeof CryptoEvent)[keyof typeof CryptoEvent];
|
625
542
|
type MatrixEventEvents = MatrixEventEvent.Decrypted | MatrixEventEvent.Replaced | MatrixEventEvent.VisibilityChange;
|
626
543
|
type RoomMemberEvents = RoomMemberEvent.Name | RoomMemberEvent.Typing | RoomMemberEvent.PowerLevel | RoomMemberEvent.Membership;
|
627
544
|
type UserEvents = UserEvent.AvatarUrl | UserEvent.DisplayName | UserEvent.Presence | UserEvent.CurrentlyActive | UserEvent.LastPresenceTs;
|
628
|
-
export type EmittedEvents = ClientEvent | RoomEvents | RoomStateEvents |
|
545
|
+
export type EmittedEvents = ClientEvent | RoomEvents | RoomStateEvents | MatrixEventEvents | RoomMemberEvents | UserEvents | HttpApiEvent.SessionLoggedOut | HttpApiEvent.NoConsent | BeaconEvent;
|
629
546
|
export type ClientEventHandlerMap = {
|
630
547
|
/**
|
631
548
|
* Fires whenever the SDK's syncing state is updated. The state can be one of:
|
@@ -821,7 +738,7 @@ export type ClientEventHandlerMap = {
|
|
821
738
|
[ClientEvent.ReceivedVoipEvent]: (event: MatrixEvent) => void;
|
822
739
|
[ClientEvent.TurnServers]: (servers: ITurnServer[]) => void;
|
823
740
|
[ClientEvent.TurnServersError]: (error: Error, fatal: boolean) => void;
|
824
|
-
} & RoomEventHandlerMap & RoomStateEventHandlerMap &
|
741
|
+
} & RoomEventHandlerMap & RoomStateEventHandlerMap & MatrixEventHandlerMap & RoomMemberEventHandlerMap & UserEventHandlerMap & HttpApiEventHandlerMap & BeaconEventHandlerMap;
|
825
742
|
/**
|
826
743
|
* Represents a Matrix Client. Only directly construct this if you want to use
|
827
744
|
* custom modules. Normally, {@link createClient} should be used
|
@@ -858,17 +775,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
858
775
|
http: MatrixHttpApi<IHttpOpts & {
|
859
776
|
onlyData: true;
|
860
777
|
}>;
|
861
|
-
/**
|
862
|
-
* The libolm crypto implementation, if it is in use.
|
863
|
-
*
|
864
|
-
* @deprecated This should not be used. Instead, use the methods exposed directly on this class or
|
865
|
-
* (where they are available) via {@link getCrypto}.
|
866
|
-
*/
|
867
|
-
crypto?: Crypto;
|
868
|
-
private cryptoBackend?;
|
869
|
-
cryptoCallbacks: CryptoCallbacks;
|
870
|
-
callEventHandler?: CallEventHandler;
|
871
|
-
groupCallEventHandler?: GroupCallEventHandler;
|
872
778
|
supportsCallTransfer: boolean;
|
873
779
|
forceTURN: boolean;
|
874
780
|
iceCandidatePoolSize: number;
|
@@ -876,7 +782,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
876
782
|
baseUrl: string;
|
877
783
|
readonly isVoipWithNoMediaAllowed: boolean;
|
878
784
|
useLivekitForGroupCalls: boolean;
|
879
|
-
protected canSupportVoip: boolean;
|
880
785
|
protected peekSync: SyncApi | null;
|
881
786
|
protected isGuestAccount: boolean;
|
882
787
|
protected ongoingScrollbacks: {
|
@@ -886,7 +791,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
886
791
|
};
|
887
792
|
};
|
888
793
|
protected notifTimelineSet: EventTimelineSet | null;
|
889
|
-
protected cryptoStore?: CryptoStore;
|
890
794
|
protected verificationMethods?: string[];
|
891
795
|
protected fallbackICEServerAllowed: boolean;
|
892
796
|
protected syncApi?: SlidingSyncSdk | SyncApi;
|
@@ -902,12 +806,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
902
806
|
protected serverVersionsPromise?: Promise<IServerVersions>;
|
903
807
|
protected clientWellKnown?: IClientWellKnown;
|
904
808
|
protected clientWellKnownPromise?: Promise<IClientWellKnown>;
|
905
|
-
protected turnServers: ITurnServer[];
|
906
|
-
protected turnServersExpiry: number;
|
907
|
-
protected checkTurnServersIntervalID?: ReturnType<typeof setInterval>;
|
908
|
-
protected exportedOlmDeviceToImport?: IExportedOlmDevice;
|
909
809
|
protected txnCtr: number;
|
910
|
-
protected mediaHandler: MediaHandler;
|
911
810
|
protected sessionId: string;
|
912
811
|
/** IDs of events which are currently being encrypted.
|
913
812
|
*
|
@@ -918,9 +817,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
918
817
|
private useE2eForGroupCall;
|
919
818
|
private toDeviceMessageQueue;
|
920
819
|
livekitServiceURL?: string;
|
921
|
-
private _secretStorage;
|
922
820
|
readonly ignoredInvites: IgnoredInvites;
|
923
|
-
readonly matrixRTC: MatrixRTCSessionManager;
|
924
821
|
private serverCapabilitiesService;
|
925
822
|
constructor(opts: IMatrixClientCreateOpts);
|
926
823
|
set store(newStore: Store);
|
@@ -942,53 +839,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
942
839
|
* clean shutdown.
|
943
840
|
*/
|
944
841
|
stopClient(): void;
|
945
|
-
/**
|
946
|
-
* Try to rehydrate a device if available. The client must have been
|
947
|
-
* initialized with a `cryptoCallback.getDehydrationKey` option, and this
|
948
|
-
* function must be called before initCrypto and startClient are called.
|
949
|
-
*
|
950
|
-
* @returns Promise which resolves to undefined if a device could not be dehydrated, or
|
951
|
-
* to the new device ID if the dehydration was successful.
|
952
|
-
* @returns Rejects: with an error response.
|
953
|
-
*
|
954
|
-
* @deprecated MSC2697 device dehydration is not supported for rust cryptography.
|
955
|
-
*/
|
956
|
-
rehydrateDevice(): Promise<string | undefined>;
|
957
|
-
/**
|
958
|
-
* Get the current dehydrated device, if any
|
959
|
-
* @returns A promise of an object containing the dehydrated device
|
960
|
-
*
|
961
|
-
* @deprecated MSC2697 device dehydration is not supported for rust cryptography.
|
962
|
-
*/
|
963
|
-
getDehydratedDevice(): Promise<IDehydratedDevice | undefined>;
|
964
|
-
/**
|
965
|
-
* Set the dehydration key. This will also periodically dehydrate devices to
|
966
|
-
* the server.
|
967
|
-
*
|
968
|
-
* @param key - the dehydration key
|
969
|
-
* @param keyInfo - Information about the key. Primarily for
|
970
|
-
* information about how to generate the key from a passphrase.
|
971
|
-
* @param deviceDisplayName - The device display name for the
|
972
|
-
* dehydrated device.
|
973
|
-
* @returns A promise that resolves when the dehydrated device is stored.
|
974
|
-
*
|
975
|
-
* @deprecated Not supported for Rust Cryptography.
|
976
|
-
*/
|
977
|
-
setDehydrationKey(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<void>;
|
978
|
-
/**
|
979
|
-
* Creates a new MSC2967 dehydrated device (without queuing periodic dehydration)
|
980
|
-
* @param key - the dehydration key
|
981
|
-
* @param keyInfo - Information about the key. Primarily for
|
982
|
-
* information about how to generate the key from a passphrase.
|
983
|
-
* @param deviceDisplayName - The device display name for the
|
984
|
-
* dehydrated device.
|
985
|
-
* @returns the device id of the newly created dehydrated device
|
986
|
-
*
|
987
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.startDehydration}.
|
988
|
-
*/
|
989
|
-
createDehydratedDevice(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<string | undefined>;
|
990
|
-
/** @deprecated Not supported for Rust Cryptography. */
|
991
|
-
exportDevice(): Promise<IExportedDevice | undefined>;
|
992
842
|
/**
|
993
843
|
* Clear any data out of the persistent stores used by the client.
|
994
844
|
*
|
@@ -1028,15 +878,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
1028
878
|
* @returns session ID
|
1029
879
|
*/
|
1030
880
|
getSessionId(): string;
|
1031
|
-
/**
|
1032
|
-
* Check if the runtime environment supports VoIP calling.
|
1033
|
-
* @returns True if VoIP is supported.
|
1034
|
-
*/
|
1035
|
-
supportsVoip(): boolean;
|
1036
|
-
/**
|
1037
|
-
* @returns
|
1038
|
-
*/
|
1039
|
-
getMediaHandler(): MediaHandler;
|
1040
881
|
/**
|
1041
882
|
* Set whether VoIP calls are forced to use only TURN
|
1042
883
|
* candidates. This is the same as the forceTURN option
|
@@ -1055,40 +896,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
1055
896
|
* @returns boolean Whether group call signalling will be encrypted
|
1056
897
|
*/
|
1057
898
|
getUseE2eForGroupCall(): boolean;
|
1058
|
-
/**
|
1059
|
-
* Creates a new call.
|
1060
|
-
* The place*Call methods on the returned call can be used to actually place a call
|
1061
|
-
*
|
1062
|
-
* @param roomId - The room the call is to be placed in.
|
1063
|
-
* @returns the call or null if the browser doesn't support calling.
|
1064
|
-
*/
|
1065
|
-
createCall(roomId: string): MatrixCall | null;
|
1066
|
-
/**
|
1067
|
-
* Creates a new group call and sends the associated state event
|
1068
|
-
* to alert other members that the room now has a group call.
|
1069
|
-
*
|
1070
|
-
* @param roomId - The room the call is to be placed in.
|
1071
|
-
*/
|
1072
|
-
createGroupCall(roomId: string, type: GroupCallType, isPtt: boolean, intent: GroupCallIntent, dataChannelsEnabled?: boolean, dataChannelOptions?: IGroupCallDataChannelOptions): Promise<GroupCall>;
|
1073
899
|
getLivekitServiceURL(): string | undefined;
|
1074
900
|
setLivekitServiceURL(newURL: string): void;
|
1075
|
-
/**
|
1076
|
-
* Wait until an initial state for the given room has been processed by the
|
1077
|
-
* client and the client is aware of any ongoing group calls. Awaiting on
|
1078
|
-
* the promise returned by this method before calling getGroupCallForRoom()
|
1079
|
-
* avoids races where getGroupCallForRoom is called before the state for that
|
1080
|
-
* room has been processed. It does not, however, fix other races, eg. two
|
1081
|
-
* clients both creating a group call at the same time.
|
1082
|
-
* @param roomId - The room ID to wait for
|
1083
|
-
* @returns A promise that resolves once existing group calls in the room
|
1084
|
-
* have been processed.
|
1085
|
-
*/
|
1086
|
-
waitUntilRoomReadyForGroupCalls(roomId: string): Promise<void>;
|
1087
|
-
/**
|
1088
|
-
* Get an existing group call for the provided room.
|
1089
|
-
* @returns The group call or null if it doesn't already exist.
|
1090
|
-
*/
|
1091
|
-
getGroupCallForRoom(roomId: string): GroupCall | null;
|
1092
901
|
/**
|
1093
902
|
* Get the current sync state.
|
1094
903
|
* @returns the sync state, which may be null.
|
@@ -1167,965 +976,10 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
1167
976
|
* @returns A promise which resolves to the capabilities of the homeserver
|
1168
977
|
*/
|
1169
978
|
fetchCapabilities(): Promise<Capabilities>;
|
1170
|
-
/**
|
1171
|
-
* Initialise support for end-to-end encryption in this client, using libolm.
|
1172
|
-
*
|
1173
|
-
* You should call this method after creating the matrixclient, but *before*
|
1174
|
-
* calling `startClient`, if you want to support end-to-end encryption.
|
1175
|
-
*
|
1176
|
-
* It will return a Promise which will resolve when the crypto layer has been
|
1177
|
-
* successfully initialised.
|
1178
|
-
*
|
1179
|
-
* @deprecated libolm is deprecated. Prefer {@link initRustCrypto}.
|
1180
|
-
*/
|
1181
|
-
initCrypto(): Promise<void>;
|
1182
|
-
/**
|
1183
|
-
* Initialise support for end-to-end encryption in this client, using the rust matrix-sdk-crypto.
|
1184
|
-
*
|
1185
|
-
* An alternative to {@link initCrypto}.
|
1186
|
-
*
|
1187
|
-
* @param args.useIndexedDB - True to use an indexeddb store, false to use an in-memory store. Defaults to 'true'.
|
1188
|
-
* @param args.storageKey - A key with which to encrypt the indexeddb store. If provided, it must be exactly
|
1189
|
-
* 32 bytes of data, and must be the same each time the client is initialised for a given device.
|
1190
|
-
* If both this and `storagePassword` are unspecified, the store will be unencrypted.
|
1191
|
-
* @param args.storagePassword - An alternative to `storageKey`. A password which will be used to derive a key to
|
1192
|
-
* encrypt the store with. Deriving a key from a password is (deliberately) a slow operation, so prefer
|
1193
|
-
* to pass a `storageKey` directly where possible.
|
1194
|
-
*
|
1195
|
-
* @returns a Promise which will resolve when the crypto layer has been
|
1196
|
-
* successfully initialised.
|
1197
|
-
*/
|
1198
|
-
initRustCrypto(args?: {
|
1199
|
-
useIndexedDB?: boolean;
|
1200
|
-
storageKey?: Uint8Array;
|
1201
|
-
storagePassword?: string;
|
1202
|
-
}): Promise<void>;
|
1203
|
-
/**
|
1204
|
-
* Access the server-side secret storage API for this client.
|
1205
|
-
*/
|
1206
|
-
get secretStorage(): ServerSideSecretStorage;
|
1207
|
-
/**
|
1208
|
-
* Access the crypto API for this client.
|
1209
|
-
*
|
1210
|
-
* If end-to-end encryption has been enabled for this client (via {@link initCrypto} or {@link initRustCrypto}),
|
1211
|
-
* returns an object giving access to the crypto API. Otherwise, returns `undefined`.
|
1212
|
-
*/
|
1213
|
-
getCrypto(): CryptoApi | undefined;
|
1214
|
-
/**
|
1215
|
-
* Is end-to-end crypto enabled for this client.
|
1216
|
-
* @returns True if end-to-end is enabled.
|
1217
|
-
* @deprecated prefer {@link getCrypto}
|
1218
|
-
*/
|
1219
|
-
isCryptoEnabled(): boolean;
|
1220
|
-
/**
|
1221
|
-
* Get the Ed25519 key for this device
|
1222
|
-
*
|
1223
|
-
* @returns base64-encoded ed25519 key. Null if crypto is
|
1224
|
-
* disabled.
|
1225
|
-
*
|
1226
|
-
* @deprecated Not supported for Rust Cryptography.Prefer {@link CryptoApi.getOwnDeviceKeys}
|
1227
|
-
*/
|
1228
|
-
getDeviceEd25519Key(): string | null;
|
1229
|
-
/**
|
1230
|
-
* Get the Curve25519 key for this device
|
1231
|
-
*
|
1232
|
-
* @returns base64-encoded curve25519 key. Null if crypto is
|
1233
|
-
* disabled.
|
1234
|
-
*
|
1235
|
-
* @deprecated Not supported for Rust Cryptography. Use {@link CryptoApi.getOwnDeviceKeys}
|
1236
|
-
*/
|
1237
|
-
getDeviceCurve25519Key(): string | null;
|
1238
979
|
/**
|
1239
980
|
* @deprecated Does nothing.
|
1240
981
|
*/
|
1241
982
|
uploadKeys(): Promise<void>;
|
1242
|
-
/**
|
1243
|
-
* Download the keys for a list of users and stores the keys in the session
|
1244
|
-
* store.
|
1245
|
-
* @param userIds - The users to fetch.
|
1246
|
-
* @param forceDownload - Always download the keys even if cached.
|
1247
|
-
*
|
1248
|
-
* @returns A promise which resolves to a map userId-\>deviceId-\>`DeviceInfo`
|
1249
|
-
*
|
1250
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
1251
|
-
*/
|
1252
|
-
downloadKeys(userIds: string[], forceDownload?: boolean): Promise<DeviceInfoMap>;
|
1253
|
-
/**
|
1254
|
-
* Get the stored device keys for a user id
|
1255
|
-
*
|
1256
|
-
* @param userId - the user to list keys for.
|
1257
|
-
*
|
1258
|
-
* @returns list of devices
|
1259
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
1260
|
-
*/
|
1261
|
-
getStoredDevicesForUser(userId: string): DeviceInfo[];
|
1262
|
-
/**
|
1263
|
-
* Get the stored device key for a user id and device id
|
1264
|
-
*
|
1265
|
-
* @param userId - the user to list keys for.
|
1266
|
-
* @param deviceId - unique identifier for the device
|
1267
|
-
*
|
1268
|
-
* @returns device or null
|
1269
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
1270
|
-
*/
|
1271
|
-
getStoredDevice(userId: string, deviceId: string): DeviceInfo | null;
|
1272
|
-
/**
|
1273
|
-
* Mark the given device as verified
|
1274
|
-
*
|
1275
|
-
* @param userId - owner of the device
|
1276
|
-
* @param deviceId - unique identifier for the device or user's
|
1277
|
-
* cross-signing public key ID.
|
1278
|
-
*
|
1279
|
-
* @param verified - whether to mark the device as verified. defaults
|
1280
|
-
* to 'true'.
|
1281
|
-
*
|
1282
|
-
* @returns
|
1283
|
-
*
|
1284
|
-
* @remarks
|
1285
|
-
* Fires {@link CryptoEvent#DeviceVerificationChanged}
|
1286
|
-
*/
|
1287
|
-
setDeviceVerified(userId: string, deviceId: string, verified?: boolean): Promise<void>;
|
1288
|
-
/**
|
1289
|
-
* Mark the given device as blocked/unblocked
|
1290
|
-
*
|
1291
|
-
* @param userId - owner of the device
|
1292
|
-
* @param deviceId - unique identifier for the device or user's
|
1293
|
-
* cross-signing public key ID.
|
1294
|
-
*
|
1295
|
-
* @param blocked - whether to mark the device as blocked. defaults
|
1296
|
-
* to 'true'.
|
1297
|
-
*
|
1298
|
-
* @returns
|
1299
|
-
*
|
1300
|
-
* @remarks
|
1301
|
-
* Fires {@link LegacyCryptoEvent.DeviceVerificationChanged}
|
1302
|
-
*
|
1303
|
-
* @deprecated Not supported for Rust Cryptography.
|
1304
|
-
*/
|
1305
|
-
setDeviceBlocked(userId: string, deviceId: string, blocked?: boolean): Promise<void>;
|
1306
|
-
/**
|
1307
|
-
* Mark the given device as known/unknown
|
1308
|
-
*
|
1309
|
-
* @param userId - owner of the device
|
1310
|
-
* @param deviceId - unique identifier for the device or user's
|
1311
|
-
* cross-signing public key ID.
|
1312
|
-
*
|
1313
|
-
* @param known - whether to mark the device as known. defaults
|
1314
|
-
* to 'true'.
|
1315
|
-
*
|
1316
|
-
* @returns
|
1317
|
-
*
|
1318
|
-
* @remarks
|
1319
|
-
* Fires {@link CryptoEvent#DeviceVerificationChanged}
|
1320
|
-
*
|
1321
|
-
* @deprecated Not supported for Rust Cryptography.
|
1322
|
-
*/
|
1323
|
-
setDeviceKnown(userId: string, deviceId: string, known?: boolean): Promise<void>;
|
1324
|
-
private setDeviceVerification;
|
1325
|
-
/**
|
1326
|
-
* Request a key verification from another user, using a DM.
|
1327
|
-
*
|
1328
|
-
* @param userId - the user to request verification with
|
1329
|
-
* @param roomId - the room to use for verification
|
1330
|
-
*
|
1331
|
-
* @returns resolves to a VerificationRequest
|
1332
|
-
* when the request has been sent to the other party.
|
1333
|
-
*
|
1334
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.requestVerificationDM}.
|
1335
|
-
*/
|
1336
|
-
requestVerificationDM(userId: string, roomId: string): Promise<VerificationRequest>;
|
1337
|
-
/**
|
1338
|
-
* Finds a DM verification request that is already in progress for the given room id
|
1339
|
-
*
|
1340
|
-
* @param roomId - the room to use for verification
|
1341
|
-
*
|
1342
|
-
* @returns the VerificationRequest that is in progress, if any
|
1343
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.findVerificationRequestDMInProgress}.
|
1344
|
-
*/
|
1345
|
-
findVerificationRequestDMInProgress(roomId: string): VerificationRequest | undefined;
|
1346
|
-
/**
|
1347
|
-
* Returns all to-device verification requests that are already in progress for the given user id
|
1348
|
-
*
|
1349
|
-
* @param userId - the ID of the user to query
|
1350
|
-
*
|
1351
|
-
* @returns the VerificationRequests that are in progress
|
1352
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getVerificationRequestsToDeviceInProgress}.
|
1353
|
-
*/
|
1354
|
-
getVerificationRequestsToDeviceInProgress(userId: string): VerificationRequest[];
|
1355
|
-
/**
|
1356
|
-
* Request a key verification from another user.
|
1357
|
-
*
|
1358
|
-
* @param userId - the user to request verification with
|
1359
|
-
* @param devices - array of device IDs to send requests to. Defaults to
|
1360
|
-
* all devices owned by the user
|
1361
|
-
*
|
1362
|
-
* @returns resolves to a VerificationRequest
|
1363
|
-
* when the request has been sent to the other party.
|
1364
|
-
*
|
1365
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
|
1366
|
-
*/
|
1367
|
-
requestVerification(userId: string, devices?: string[]): Promise<VerificationRequest>;
|
1368
|
-
/**
|
1369
|
-
* Begin a key verification.
|
1370
|
-
*
|
1371
|
-
* @param method - the verification method to use
|
1372
|
-
* @param userId - the user to verify keys with
|
1373
|
-
* @param deviceId - the device to verify
|
1374
|
-
*
|
1375
|
-
* @returns a verification object
|
1376
|
-
* @deprecated Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
|
1377
|
-
*/
|
1378
|
-
beginKeyVerification(method: string, userId: string, deviceId: string): Verification<any, any>;
|
1379
|
-
/**
|
1380
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#checkKey}.
|
1381
|
-
*/
|
1382
|
-
checkSecretStorageKey(key: Uint8Array, info: SecretStorageKeyDescription): Promise<boolean>;
|
1383
|
-
/**
|
1384
|
-
* Set the global override for whether the client should ever send encrypted
|
1385
|
-
* messages to unverified devices. This provides the default for rooms which
|
1386
|
-
* do not specify a value.
|
1387
|
-
*
|
1388
|
-
* @param value - whether to blacklist all unverified devices by default
|
1389
|
-
*
|
1390
|
-
* @deprecated Prefer direct access to {@link CryptoApi.globalBlacklistUnverifiedDevices}:
|
1391
|
-
*
|
1392
|
-
* ```javascript
|
1393
|
-
* client.getCrypto().globalBlacklistUnverifiedDevices = value;
|
1394
|
-
* ```
|
1395
|
-
*/
|
1396
|
-
setGlobalBlacklistUnverifiedDevices(value: boolean): boolean;
|
1397
|
-
/**
|
1398
|
-
* @returns whether to blacklist all unverified devices by default
|
1399
|
-
*
|
1400
|
-
* @deprecated Prefer direct access to {@link CryptoApi.globalBlacklistUnverifiedDevices}:
|
1401
|
-
*
|
1402
|
-
* ```javascript
|
1403
|
-
* value = client.getCrypto().globalBlacklistUnverifiedDevices;
|
1404
|
-
* ```
|
1405
|
-
*/
|
1406
|
-
getGlobalBlacklistUnverifiedDevices(): boolean;
|
1407
|
-
/**
|
1408
|
-
* Set whether sendMessage in a room with unknown and unverified devices
|
1409
|
-
* should throw an error and not send them message. This has 'Global' for
|
1410
|
-
* symmetry with setGlobalBlacklistUnverifiedDevices but there is currently
|
1411
|
-
* no room-level equivalent for this setting.
|
1412
|
-
*
|
1413
|
-
* This API is currently UNSTABLE and may change or be removed without notice.
|
1414
|
-
*
|
1415
|
-
* It has no effect with the Rust crypto implementation.
|
1416
|
-
*
|
1417
|
-
* @param value - whether error on unknown devices
|
1418
|
-
*
|
1419
|
-
* ```ts
|
1420
|
-
* client.getCrypto().globalErrorOnUnknownDevices = value;
|
1421
|
-
* ```
|
1422
|
-
*/
|
1423
|
-
setGlobalErrorOnUnknownDevices(value: boolean): void;
|
1424
|
-
/**
|
1425
|
-
* @returns whether to error on unknown devices
|
1426
|
-
*
|
1427
|
-
* This API is currently UNSTABLE and may change or be removed without notice.
|
1428
|
-
*/
|
1429
|
-
getGlobalErrorOnUnknownDevices(): boolean;
|
1430
|
-
/**
|
1431
|
-
* Get the ID of one of the user's cross-signing keys
|
1432
|
-
*
|
1433
|
-
* @param type - The type of key to get the ID of. One of
|
1434
|
-
* "master", "self_signing", or "user_signing". Defaults to "master".
|
1435
|
-
*
|
1436
|
-
* @returns the key ID
|
1437
|
-
* @deprecated Not supported for Rust Cryptography. prefer {@link Crypto.CryptoApi#getCrossSigningKeyId}
|
1438
|
-
*/
|
1439
|
-
getCrossSigningId(type?: CrossSigningKey | string): string | null;
|
1440
|
-
/**
|
1441
|
-
* Get the cross signing information for a given user.
|
1442
|
-
*
|
1443
|
-
* The cross-signing API is currently UNSTABLE and may change without notice.
|
1444
|
-
*
|
1445
|
-
* @param userId - the user ID to get the cross-signing info for.
|
1446
|
-
*
|
1447
|
-
* @returns the cross signing information for the user.
|
1448
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#userHasCrossSigningKeys}
|
1449
|
-
*/
|
1450
|
-
getStoredCrossSigningForUser(userId: string): CrossSigningInfo | null;
|
1451
|
-
/**
|
1452
|
-
* Check whether a given user is trusted.
|
1453
|
-
*
|
1454
|
-
* The cross-signing API is currently UNSTABLE and may change without notice.
|
1455
|
-
*
|
1456
|
-
* @param userId - The ID of the user to check.
|
1457
|
-
*
|
1458
|
-
* @deprecated Use {@link Crypto.CryptoApi.getUserVerificationStatus | `CryptoApi.getUserVerificationStatus`}
|
1459
|
-
*/
|
1460
|
-
checkUserTrust(userId: string): UserTrustLevel;
|
1461
|
-
/**
|
1462
|
-
* Check whether a given device is trusted.
|
1463
|
-
*
|
1464
|
-
* The cross-signing API is currently UNSTABLE and may change without notice.
|
1465
|
-
*
|
1466
|
-
* @param userId - The ID of the user whose devices is to be checked.
|
1467
|
-
* @param deviceId - The ID of the device to check
|
1468
|
-
*
|
1469
|
-
* @deprecated Use {@link Crypto.CryptoApi.getDeviceVerificationStatus | `CryptoApi.getDeviceVerificationStatus`}
|
1470
|
-
*/
|
1471
|
-
checkDeviceTrust(userId: string, deviceId: string): DeviceTrustLevel;
|
1472
|
-
/**
|
1473
|
-
* Check whether one of our own devices is cross-signed by our
|
1474
|
-
* user's stored keys, regardless of whether we trust those keys yet.
|
1475
|
-
*
|
1476
|
-
* @param deviceId - The ID of the device to check
|
1477
|
-
*
|
1478
|
-
* @returns true if the device is cross-signed
|
1479
|
-
*
|
1480
|
-
* @deprecated Not supported for Rust Cryptography.
|
1481
|
-
*/
|
1482
|
-
checkIfOwnDeviceCrossSigned(deviceId: string): boolean;
|
1483
|
-
/**
|
1484
|
-
* Check the copy of our cross-signing key that we have in the device list and
|
1485
|
-
* see if we can get the private key. If so, mark it as trusted.
|
1486
|
-
* @param opts - ICheckOwnCrossSigningTrustOpts object
|
1487
|
-
*
|
1488
|
-
* @deprecated Unneeded for the new crypto
|
1489
|
-
*/
|
1490
|
-
checkOwnCrossSigningTrust(opts?: ICheckOwnCrossSigningTrustOpts): Promise<void>;
|
1491
|
-
/**
|
1492
|
-
* Checks that a given cross-signing private key matches a given public key.
|
1493
|
-
* This can be used by the getCrossSigningKey callback to verify that the
|
1494
|
-
* private key it is about to supply is the one that was requested.
|
1495
|
-
* @param privateKey - The private key
|
1496
|
-
* @param expectedPublicKey - The public key
|
1497
|
-
* @returns true if the key matches, otherwise false
|
1498
|
-
*
|
1499
|
-
* @deprecated Not supported for Rust Cryptography.
|
1500
|
-
*/
|
1501
|
-
checkCrossSigningPrivateKey(privateKey: Uint8Array, expectedPublicKey: string): boolean;
|
1502
|
-
/**
|
1503
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestDeviceVerification}.
|
1504
|
-
*/
|
1505
|
-
legacyDeviceVerification(userId: string, deviceId: string, method: string): Promise<VerificationRequest>;
|
1506
|
-
/**
|
1507
|
-
* Perform any background tasks that can be done before a message is ready to
|
1508
|
-
* send, in order to speed up sending of the message.
|
1509
|
-
* @param room - the room the event is in
|
1510
|
-
*
|
1511
|
-
* @deprecated Prefer {@link CryptoApi.prepareToEncrypt | `CryptoApi.prepareToEncrypt`}:
|
1512
|
-
*
|
1513
|
-
* ```javascript
|
1514
|
-
* client.getCrypto().prepareToEncrypt(room);
|
1515
|
-
* ```
|
1516
|
-
*/
|
1517
|
-
prepareToEncrypt(room: Room): void;
|
1518
|
-
/**
|
1519
|
-
* Checks if the user has previously published cross-signing keys
|
1520
|
-
*
|
1521
|
-
* This means downloading the devicelist for the user and checking if the list includes
|
1522
|
-
* the cross-signing pseudo-device.
|
1523
|
-
*
|
1524
|
-
* @deprecated Prefer {@link CryptoApi.userHasCrossSigningKeys | `CryptoApi.userHasCrossSigningKeys`}:
|
1525
|
-
*
|
1526
|
-
* ```javascript
|
1527
|
-
* result = client.getCrypto().userHasCrossSigningKeys();
|
1528
|
-
* ```
|
1529
|
-
*/
|
1530
|
-
userHasCrossSigningKeys(): Promise<boolean>;
|
1531
|
-
/**
|
1532
|
-
* Checks whether cross signing:
|
1533
|
-
* - is enabled on this account and trusted by this device
|
1534
|
-
* - has private keys either cached locally or stored in secret storage
|
1535
|
-
*
|
1536
|
-
* If this function returns false, bootstrapCrossSigning() can be used
|
1537
|
-
* to fix things such that it returns true. That is to say, after
|
1538
|
-
* bootstrapCrossSigning() completes successfully, this function should
|
1539
|
-
* return true.
|
1540
|
-
* @returns True if cross-signing is ready to be used on this device
|
1541
|
-
* @deprecated Prefer {@link CryptoApi.isCrossSigningReady | `CryptoApi.isCrossSigningReady`}:
|
1542
|
-
*/
|
1543
|
-
isCrossSigningReady(): Promise<boolean>;
|
1544
|
-
/**
|
1545
|
-
* Bootstrap cross-signing by creating keys if needed. If everything is already
|
1546
|
-
* set up, then no changes are made, so this is safe to run to ensure
|
1547
|
-
* cross-signing is ready for use.
|
1548
|
-
*
|
1549
|
-
* This function:
|
1550
|
-
* - creates new cross-signing keys if they are not found locally cached nor in
|
1551
|
-
* secret storage (if it has been set up)
|
1552
|
-
*
|
1553
|
-
* @deprecated Prefer {@link CryptoApi.bootstrapCrossSigning | `CryptoApi.bootstrapCrossSigning`}.
|
1554
|
-
*/
|
1555
|
-
bootstrapCrossSigning(opts: BootstrapCrossSigningOpts): Promise<void>;
|
1556
|
-
/**
|
1557
|
-
* Whether to trust a others users signatures of their devices.
|
1558
|
-
* If false, devices will only be considered 'verified' if we have
|
1559
|
-
* verified that device individually (effectively disabling cross-signing).
|
1560
|
-
*
|
1561
|
-
* Default: true
|
1562
|
-
*
|
1563
|
-
* @returns True if trusting cross-signed devices
|
1564
|
-
*
|
1565
|
-
* @deprecated Prefer {@link CryptoApi.getTrustCrossSignedDevices | `CryptoApi.getTrustCrossSignedDevices`}.
|
1566
|
-
*/
|
1567
|
-
getCryptoTrustCrossSignedDevices(): boolean;
|
1568
|
-
/**
|
1569
|
-
* See getCryptoTrustCrossSignedDevices
|
1570
|
-
*
|
1571
|
-
* @param val - True to trust cross-signed devices
|
1572
|
-
*
|
1573
|
-
* @deprecated Prefer {@link CryptoApi.setTrustCrossSignedDevices | `CryptoApi.setTrustCrossSignedDevices`}.
|
1574
|
-
*/
|
1575
|
-
setCryptoTrustCrossSignedDevices(val: boolean): void;
|
1576
|
-
/**
|
1577
|
-
* Counts the number of end to end session keys that are waiting to be backed up
|
1578
|
-
* @returns Promise which resolves to the number of sessions requiring backup
|
1579
|
-
*
|
1580
|
-
* @deprecated Not supported for Rust Cryptography.
|
1581
|
-
*/
|
1582
|
-
countSessionsNeedingBackup(): Promise<number>;
|
1583
|
-
/**
|
1584
|
-
* Get information about the encryption of an event
|
1585
|
-
*
|
1586
|
-
* @param event - event to be checked
|
1587
|
-
* @returns The event information.
|
1588
|
-
* @deprecated Prefer {@link Crypto.CryptoApi.getEncryptionInfoForEvent | `CryptoApi.getEncryptionInfoForEvent`}.
|
1589
|
-
*/
|
1590
|
-
getEventEncryptionInfo(event: MatrixEvent): IEncryptedEventInfo;
|
1591
|
-
/**
|
1592
|
-
* Create a recovery key from a user-supplied passphrase.
|
1593
|
-
*
|
1594
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1595
|
-
*
|
1596
|
-
* @param password - Passphrase string that can be entered by the user
|
1597
|
-
* when restoring the backup as an alternative to entering the recovery key.
|
1598
|
-
* Optional.
|
1599
|
-
* @returns Object with public key metadata, encoded private
|
1600
|
-
* recovery key which should be disposed of after displaying to the user,
|
1601
|
-
* and raw private key to avoid round tripping if needed.
|
1602
|
-
*
|
1603
|
-
* @deprecated Prefer {@link CryptoApi.createRecoveryKeyFromPassphrase | `CryptoApi.createRecoveryKeyFromPassphrase`}.
|
1604
|
-
*/
|
1605
|
-
createRecoveryKeyFromPassphrase(password?: string): Promise<IRecoveryKey>;
|
1606
|
-
/**
|
1607
|
-
* Checks whether secret storage:
|
1608
|
-
* - is enabled on this account
|
1609
|
-
* - is storing cross-signing private keys
|
1610
|
-
* - is storing session backup key (if enabled)
|
1611
|
-
*
|
1612
|
-
* If this function returns false, bootstrapSecretStorage() can be used
|
1613
|
-
* to fix things such that it returns true. That is to say, after
|
1614
|
-
* bootstrapSecretStorage() completes successfully, this function should
|
1615
|
-
* return true.
|
1616
|
-
*
|
1617
|
-
* @returns True if secret storage is ready to be used on this device
|
1618
|
-
* @deprecated Prefer {@link CryptoApi.isSecretStorageReady | `CryptoApi.isSecretStorageReady`}.
|
1619
|
-
*/
|
1620
|
-
isSecretStorageReady(): Promise<boolean>;
|
1621
|
-
/**
|
1622
|
-
* Bootstrap Secure Secret Storage if needed by creating a default key. If everything is
|
1623
|
-
* already set up, then no changes are made, so this is safe to run to ensure secret
|
1624
|
-
* storage is ready for use.
|
1625
|
-
*
|
1626
|
-
* This function
|
1627
|
-
* - creates a new Secure Secret Storage key if no default key exists
|
1628
|
-
* - if a key backup exists, it is migrated to store the key in the Secret
|
1629
|
-
* Storage
|
1630
|
-
* - creates a backup if none exists, and one is requested
|
1631
|
-
* - migrates Secure Secret Storage to use the latest algorithm, if an outdated
|
1632
|
-
* algorithm is found
|
1633
|
-
*
|
1634
|
-
* @deprecated Use {@link CryptoApi.bootstrapSecretStorage | `CryptoApi.bootstrapSecretStorage`}.
|
1635
|
-
*/
|
1636
|
-
bootstrapSecretStorage(opts: ICreateSecretStorageOpts): Promise<void>;
|
1637
|
-
/**
|
1638
|
-
* Add a key for encrypting secrets.
|
1639
|
-
*
|
1640
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1641
|
-
*
|
1642
|
-
* @param algorithm - the algorithm used by the key
|
1643
|
-
* @param opts - the options for the algorithm. The properties used
|
1644
|
-
* depend on the algorithm given.
|
1645
|
-
* @param keyName - the name of the key. If not given, a random name will be generated.
|
1646
|
-
*
|
1647
|
-
* @returns An object with:
|
1648
|
-
* keyId: the ID of the key
|
1649
|
-
* keyInfo: details about the key (iv, mac, passphrase)
|
1650
|
-
*
|
1651
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#addKey}.
|
1652
|
-
*/
|
1653
|
-
addSecretStorageKey(algorithm: string, opts: AddSecretStorageKeyOpts, keyName?: string): Promise<{
|
1654
|
-
keyId: string;
|
1655
|
-
keyInfo: SecretStorageKeyDescription;
|
1656
|
-
}>;
|
1657
|
-
/**
|
1658
|
-
* Check whether we have a key with a given ID.
|
1659
|
-
*
|
1660
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1661
|
-
*
|
1662
|
-
* @param keyId - The ID of the key to check
|
1663
|
-
* for. Defaults to the default key ID if not provided.
|
1664
|
-
* @returns Whether we have the key.
|
1665
|
-
*
|
1666
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#hasKey}.
|
1667
|
-
*/
|
1668
|
-
hasSecretStorageKey(keyId?: string): Promise<boolean>;
|
1669
|
-
/**
|
1670
|
-
* Store an encrypted secret on the server.
|
1671
|
-
*
|
1672
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1673
|
-
*
|
1674
|
-
* @param name - The name of the secret
|
1675
|
-
* @param secret - The secret contents.
|
1676
|
-
* @param keys - The IDs of the keys to use to encrypt the secret or null/undefined
|
1677
|
-
* to use the default (will throw if no default key is set).
|
1678
|
-
*
|
1679
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#store}.
|
1680
|
-
*/
|
1681
|
-
storeSecret(name: string, secret: string, keys?: string[]): Promise<void>;
|
1682
|
-
/**
|
1683
|
-
* Get a secret from storage.
|
1684
|
-
*
|
1685
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1686
|
-
*
|
1687
|
-
* @param name - the name of the secret
|
1688
|
-
*
|
1689
|
-
* @returns the contents of the secret
|
1690
|
-
*
|
1691
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#get}.
|
1692
|
-
*/
|
1693
|
-
getSecret(name: string): Promise<string | undefined>;
|
1694
|
-
/**
|
1695
|
-
* Check if a secret is stored on the server.
|
1696
|
-
*
|
1697
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1698
|
-
*
|
1699
|
-
* @param name - the name of the secret
|
1700
|
-
* @returns map of key name to key info the secret is encrypted
|
1701
|
-
* with, or null if it is not present or not encrypted with a trusted
|
1702
|
-
* key
|
1703
|
-
*
|
1704
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#isStored}.
|
1705
|
-
*/
|
1706
|
-
isSecretStored(name: string): Promise<Record<string, SecretStorageKeyDescription> | null>;
|
1707
|
-
/**
|
1708
|
-
* Request a secret from another device.
|
1709
|
-
*
|
1710
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1711
|
-
*
|
1712
|
-
* @param name - the name of the secret to request
|
1713
|
-
* @param devices - the devices to request the secret from
|
1714
|
-
*
|
1715
|
-
* @returns the secret request object
|
1716
|
-
* @deprecated Not supported for Rust Cryptography.
|
1717
|
-
*/
|
1718
|
-
requestSecret(name: string, devices: string[]): ISecretRequest;
|
1719
|
-
/**
|
1720
|
-
* Get the current default key ID for encrypting secrets.
|
1721
|
-
*
|
1722
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1723
|
-
*
|
1724
|
-
* @returns The default key ID or null if no default key ID is set
|
1725
|
-
*
|
1726
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#getDefaultKeyId}.
|
1727
|
-
*/
|
1728
|
-
getDefaultSecretStorageKeyId(): Promise<string | null>;
|
1729
|
-
/**
|
1730
|
-
* Set the current default key ID for encrypting secrets.
|
1731
|
-
*
|
1732
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1733
|
-
*
|
1734
|
-
* @param keyId - The new default key ID
|
1735
|
-
*
|
1736
|
-
* @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#setDefaultKeyId}.
|
1737
|
-
*/
|
1738
|
-
setDefaultSecretStorageKeyId(keyId: string): Promise<void>;
|
1739
|
-
/**
|
1740
|
-
* Checks that a given secret storage private key matches a given public key.
|
1741
|
-
* This can be used by the getSecretStorageKey callback to verify that the
|
1742
|
-
* private key it is about to supply is the one that was requested.
|
1743
|
-
*
|
1744
|
-
* The Secure Secret Storage API is currently UNSTABLE and may change without notice.
|
1745
|
-
*
|
1746
|
-
* @param privateKey - The private key
|
1747
|
-
* @param expectedPublicKey - The public key
|
1748
|
-
* @returns true if the key matches, otherwise false
|
1749
|
-
*
|
1750
|
-
* @deprecated The use of asymmetric keys for SSSS is deprecated.
|
1751
|
-
* Use {@link SecretStorage.ServerSideSecretStorage#checkKey} for symmetric keys.
|
1752
|
-
*/
|
1753
|
-
checkSecretStoragePrivateKey(privateKey: Uint8Array, expectedPublicKey: string): boolean;
|
1754
|
-
/**
|
1755
|
-
* Get e2e information on the device that sent an event
|
1756
|
-
*
|
1757
|
-
* @param event - event to be checked
|
1758
|
-
* @deprecated Not supported for Rust Cryptography.
|
1759
|
-
*/
|
1760
|
-
getEventSenderDeviceInfo(event: MatrixEvent): Promise<DeviceInfo | null>;
|
1761
|
-
/**
|
1762
|
-
* Check if the sender of an event is verified
|
1763
|
-
*
|
1764
|
-
* @param event - event to be checked
|
1765
|
-
*
|
1766
|
-
* @returns true if the sender of this event has been verified using
|
1767
|
-
* {@link MatrixClient#setDeviceVerified}.
|
1768
|
-
*
|
1769
|
-
* @deprecated Not supported for Rust Cryptography.
|
1770
|
-
*/
|
1771
|
-
isEventSenderVerified(event: MatrixEvent): Promise<boolean>;
|
1772
|
-
/**
|
1773
|
-
* Get outgoing room key request for this event if there is one.
|
1774
|
-
* @param event - The event to check for
|
1775
|
-
*
|
1776
|
-
* @returns A room key request, or null if there is none
|
1777
|
-
*
|
1778
|
-
* @deprecated Not supported for Rust Cryptography.
|
1779
|
-
*/
|
1780
|
-
getOutgoingRoomKeyRequest(event: MatrixEvent): Promise<OutgoingRoomKeyRequest | null>;
|
1781
|
-
/**
|
1782
|
-
* Cancel a room key request for this event if one is ongoing and resend the
|
1783
|
-
* request.
|
1784
|
-
* @param event - event of which to cancel and resend the room
|
1785
|
-
* key request.
|
1786
|
-
* @returns A promise that will resolve when the key request is queued
|
1787
|
-
*
|
1788
|
-
* @deprecated Not supported for Rust Cryptography.
|
1789
|
-
*/
|
1790
|
-
cancelAndResendEventRoomKeyRequest(event: MatrixEvent): Promise<void>;
|
1791
|
-
/**
|
1792
|
-
* Enable end-to-end encryption for a room. This does not modify room state.
|
1793
|
-
* Any messages sent before the returned promise resolves will be sent unencrypted.
|
1794
|
-
* @param roomId - The room ID to enable encryption in.
|
1795
|
-
* @param config - The encryption config for the room.
|
1796
|
-
* @returns A promise that will resolve when encryption is set up.
|
1797
|
-
*
|
1798
|
-
* @deprecated Not supported for Rust Cryptography. To enable encryption in a room, send an `m.room.encryption`
|
1799
|
-
* state event.
|
1800
|
-
*/
|
1801
|
-
setRoomEncryption(roomId: string, config: IRoomEncryption): Promise<void>;
|
1802
|
-
/**
|
1803
|
-
* Whether encryption is enabled for a room.
|
1804
|
-
* @param roomId - the room id to query.
|
1805
|
-
* @returns whether encryption is enabled.
|
1806
|
-
*
|
1807
|
-
* @deprecated Not correctly supported for Rust Cryptography. Use {@link CryptoApi.isEncryptionEnabledInRoom} and/or
|
1808
|
-
* {@link Room.hasEncryptionStateEvent}.
|
1809
|
-
*/
|
1810
|
-
isRoomEncrypted(roomId: string): boolean;
|
1811
|
-
/**
|
1812
|
-
* Encrypts and sends a given object via Olm to-device messages to a given
|
1813
|
-
* set of devices.
|
1814
|
-
*
|
1815
|
-
* @param userDeviceInfoArr - list of deviceInfo objects representing the devices to send to
|
1816
|
-
*
|
1817
|
-
* @param payload - fields to include in the encrypted payload
|
1818
|
-
*
|
1819
|
-
* @returns Promise which
|
1820
|
-
* resolves once the message has been encrypted and sent to the given
|
1821
|
-
* userDeviceMap, and returns the `{ contentMap, deviceInfoByDeviceId }`
|
1822
|
-
* of the successfully sent messages.
|
1823
|
-
*
|
1824
|
-
* @deprecated Instead use {@link CryptoApi.encryptToDeviceMessages} followed by {@link queueToDevice}.
|
1825
|
-
*/
|
1826
|
-
encryptAndSendToDevices(userDeviceInfoArr: IOlmDevice<DeviceInfo>[], payload: object): Promise<void>;
|
1827
|
-
/**
|
1828
|
-
* Forces the current outbound group session to be discarded such
|
1829
|
-
* that another one will be created next time an event is sent.
|
1830
|
-
*
|
1831
|
-
* @param roomId - The ID of the room to discard the session for
|
1832
|
-
*
|
1833
|
-
* @deprecated Prefer {@link CryptoApi.forceDiscardSession | `CryptoApi.forceDiscardSession`}:
|
1834
|
-
*/
|
1835
|
-
forceDiscardSession(roomId: string): void;
|
1836
|
-
/**
|
1837
|
-
* Get a list containing all of the room keys
|
1838
|
-
*
|
1839
|
-
* This should be encrypted before returning it to the user.
|
1840
|
-
*
|
1841
|
-
* @returns a promise which resolves to a list of session export objects
|
1842
|
-
*
|
1843
|
-
* @deprecated Prefer {@link CryptoApi.exportRoomKeys | `CryptoApi.exportRoomKeys`}:
|
1844
|
-
*
|
1845
|
-
* ```javascript
|
1846
|
-
* sessionData = await client.getCrypto().exportRoomKeys();
|
1847
|
-
* ```
|
1848
|
-
*/
|
1849
|
-
exportRoomKeys(): Promise<IMegolmSessionData[]>;
|
1850
|
-
/**
|
1851
|
-
* Import a list of room keys previously exported by exportRoomKeys
|
1852
|
-
*
|
1853
|
-
* @param keys - a list of session export objects
|
1854
|
-
* @param opts - options object
|
1855
|
-
*
|
1856
|
-
* @returns a promise which resolves when the keys have been imported
|
1857
|
-
*
|
1858
|
-
* @deprecated Prefer {@link CryptoApi.importRoomKeys | `CryptoApi.importRoomKeys`}:
|
1859
|
-
* ```javascript
|
1860
|
-
* await client.getCrypto()?.importRoomKeys([..]);
|
1861
|
-
* ```
|
1862
|
-
*/
|
1863
|
-
importRoomKeys(keys: IMegolmSessionData[], opts?: ImportRoomKeysOpts): Promise<void>;
|
1864
|
-
/**
|
1865
|
-
* Force a re-check of the local key backup status against
|
1866
|
-
* what's on the server.
|
1867
|
-
*
|
1868
|
-
* @returns Object with backup info (as returned by
|
1869
|
-
* getKeyBackupVersion) in backupInfo and
|
1870
|
-
* trust information (as returned by isKeyBackupTrusted)
|
1871
|
-
* in trustInfo.
|
1872
|
-
*
|
1873
|
-
* @deprecated Prefer {@link Crypto.CryptoApi.checkKeyBackupAndEnable}.
|
1874
|
-
*/
|
1875
|
-
checkKeyBackup(): Promise<IKeyBackupCheck | null>;
|
1876
|
-
/**
|
1877
|
-
* Get information about the current key backup from the server.
|
1878
|
-
*
|
1879
|
-
* Performs some basic validity checks on the shape of the result, and raises an error if it is not as expected.
|
1880
|
-
*
|
1881
|
-
* **Note**: there is no (supported) way to distinguish between "failure to talk to the server" and "another client
|
1882
|
-
* uploaded a key backup version using an algorithm I don't understand.
|
1883
|
-
*
|
1884
|
-
* @returns Information object from API, or null if no backup is present on the server.
|
1885
|
-
*
|
1886
|
-
* @deprecated Prefer {@link CryptoApi.getKeyBackupInfo}.
|
1887
|
-
*/
|
1888
|
-
getKeyBackupVersion(): Promise<IKeyBackupInfo | null>;
|
1889
|
-
/**
|
1890
|
-
* @param info - key backup info dict from getKeyBackupVersion()
|
1891
|
-
*
|
1892
|
-
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.isKeyBackupTrusted | `CryptoApi.isKeyBackupTrusted`}.
|
1893
|
-
*/
|
1894
|
-
isKeyBackupTrusted(info: IKeyBackupInfo): Promise<TrustInfo>;
|
1895
|
-
/**
|
1896
|
-
* @returns true if the client is configured to back up keys to
|
1897
|
-
* the server, otherwise false. If we haven't completed a successful check
|
1898
|
-
* of key backup status yet, returns null.
|
1899
|
-
*
|
1900
|
-
* @deprecated Not supported for Rust Cryptography. Prefer direct access to {@link Crypto.CryptoApi.getActiveSessionBackupVersion}:
|
1901
|
-
*
|
1902
|
-
* ```javascript
|
1903
|
-
* let enabled = (await client.getCrypto().getActiveSessionBackupVersion()) !== null;
|
1904
|
-
* ```
|
1905
|
-
*/
|
1906
|
-
getKeyBackupEnabled(): boolean | null;
|
1907
|
-
/**
|
1908
|
-
* Enable backing up of keys, using data previously returned from
|
1909
|
-
* getKeyBackupVersion.
|
1910
|
-
*
|
1911
|
-
* @param info - Backup information object as returned by getKeyBackupVersion
|
1912
|
-
* @returns Promise which resolves when complete.
|
1913
|
-
*
|
1914
|
-
* @deprecated Do not call this directly. Instead call {@link Crypto.CryptoApi.checkKeyBackupAndEnable}.
|
1915
|
-
*/
|
1916
|
-
enableKeyBackup(info: IKeyBackupInfo): Promise<void>;
|
1917
|
-
/**
|
1918
|
-
* Disable backing up of keys.
|
1919
|
-
*
|
1920
|
-
* @deprecated Not supported for Rust Cryptography. It should be unnecessary to disable key backup.
|
1921
|
-
*/
|
1922
|
-
disableKeyBackup(): void;
|
1923
|
-
/**
|
1924
|
-
* Set up the data required to create a new backup version. The backup version
|
1925
|
-
* will not be created and enabled until createKeyBackupVersion is called.
|
1926
|
-
*
|
1927
|
-
* @param password - Passphrase string that can be entered by the user
|
1928
|
-
* when restoring the backup as an alternative to entering the recovery key.
|
1929
|
-
* Optional.
|
1930
|
-
*
|
1931
|
-
* @returns Object that can be passed to createKeyBackupVersion and
|
1932
|
-
* additionally has a 'recovery_key' member with the user-facing recovery key string.
|
1933
|
-
*
|
1934
|
-
* @deprecated Not supported for Rust cryptography. Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
|
1935
|
-
*/
|
1936
|
-
prepareKeyBackupVersion(password?: string | Uint8Array | null, opts?: IKeyBackupPrepareOpts): Promise<Pick<IPreparedKeyBackupVersion, "algorithm" | "auth_data" | "recovery_key">>;
|
1937
|
-
/**
|
1938
|
-
* Check whether the key backup private key is stored in secret storage.
|
1939
|
-
* @returns map of key name to key info the secret is
|
1940
|
-
* encrypted with, or null if it is not present or not encrypted with a
|
1941
|
-
* trusted key
|
1942
|
-
*/
|
1943
|
-
isKeyBackupKeyStored(): Promise<Record<string, SecretStorageKeyDescription> | null>;
|
1944
|
-
/**
|
1945
|
-
* Create a new key backup version and enable it, using the information return
|
1946
|
-
* from prepareKeyBackupVersion.
|
1947
|
-
*
|
1948
|
-
* @param info - Info object from prepareKeyBackupVersion
|
1949
|
-
* @returns Object with 'version' param indicating the version created
|
1950
|
-
*
|
1951
|
-
* @deprecated Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
|
1952
|
-
*/
|
1953
|
-
createKeyBackupVersion(info: IKeyBackupInfo): Promise<IKeyBackupInfo>;
|
1954
|
-
/**
|
1955
|
-
* @deprecated Use {@link Crypto.CryptoApi.deleteKeyBackupVersion | `CryptoApi.deleteKeyBackupVersion`}.
|
1956
|
-
*/
|
1957
|
-
deleteKeyBackupVersion(version: string): Promise<void>;
|
1958
|
-
private makeKeyBackupPath;
|
1959
|
-
/**
|
1960
|
-
* Back up session keys to the homeserver.
|
1961
|
-
* @param roomId - ID of the room that the keys are for Optional.
|
1962
|
-
* @param sessionId - ID of the session that the keys are for Optional.
|
1963
|
-
* @param version - backup version Optional.
|
1964
|
-
* @param data - Object keys to send
|
1965
|
-
* @returns a promise that will resolve when the keys
|
1966
|
-
* are uploaded
|
1967
|
-
*
|
1968
|
-
* @deprecated Not supported for Rust Cryptography.
|
1969
|
-
*/
|
1970
|
-
sendKeyBackup(roomId: undefined, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
|
1971
|
-
sendKeyBackup(roomId: string, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
|
1972
|
-
sendKeyBackup(roomId: string, sessionId: string, version: string | undefined, data: IKeyBackup): Promise<void>;
|
1973
|
-
/**
|
1974
|
-
* Marks all group sessions as needing to be backed up and schedules them to
|
1975
|
-
* upload in the background as soon as possible.
|
1976
|
-
*
|
1977
|
-
* @deprecated Not supported for Rust Cryptography. This is done automatically as part of
|
1978
|
-
* {@link CryptoApi.resetKeyBackup}, so there is probably no need to call this manually.
|
1979
|
-
*/
|
1980
|
-
scheduleAllGroupSessionsForBackup(): Promise<void>;
|
1981
|
-
/**
|
1982
|
-
* Marks all group sessions as needing to be backed up without scheduling
|
1983
|
-
* them to upload in the background.
|
1984
|
-
*
|
1985
|
-
* (This is done automatically as part of {@link CryptoApi.resetKeyBackup},
|
1986
|
-
* so there is probably no need to call this manually.)
|
1987
|
-
*
|
1988
|
-
* @returns Promise which resolves to the number of sessions requiring a backup.
|
1989
|
-
* @deprecated Not supported for Rust Cryptography.
|
1990
|
-
*/
|
1991
|
-
flagAllGroupSessionsForBackup(): Promise<number>;
|
1992
|
-
/**
|
1993
|
-
* Return true if recovery key is valid.
|
1994
|
-
* Try to decode the recovery key and check if it's successful.
|
1995
|
-
* @param recoveryKey
|
1996
|
-
* @deprecated Use {@link decodeRecoveryKey} directly
|
1997
|
-
*/
|
1998
|
-
isValidRecoveryKey(recoveryKey: string): boolean;
|
1999
|
-
/**
|
2000
|
-
* Get the raw key for a key backup from the password
|
2001
|
-
* Used when migrating key backups into SSSS
|
2002
|
-
*
|
2003
|
-
* The cross-signing API is currently UNSTABLE and may change without notice.
|
2004
|
-
*
|
2005
|
-
* @param password - Passphrase
|
2006
|
-
* @param backupInfo - Backup metadata from `checkKeyBackup`
|
2007
|
-
* @returns key backup key
|
2008
|
-
* @deprecated Deriving a backup key from a passphrase is not part of the matrix spec. Instead, a random key is generated and stored/shared via 4S.
|
2009
|
-
*/
|
2010
|
-
keyBackupKeyFromPassword(password: string, backupInfo: IKeyBackupInfo): Promise<Uint8Array>;
|
2011
|
-
/**
|
2012
|
-
* Get the raw key for a key backup from the recovery key
|
2013
|
-
* Used when migrating key backups into SSSS
|
2014
|
-
*
|
2015
|
-
* The cross-signing API is currently UNSTABLE and may change without notice.
|
2016
|
-
*
|
2017
|
-
* @param recoveryKey - The recovery key
|
2018
|
-
* @returns key backup key
|
2019
|
-
* @deprecated Use {@link decodeRecoveryKey} directly
|
2020
|
-
*/
|
2021
|
-
keyBackupKeyFromRecoveryKey(recoveryKey: string): Uint8Array;
|
2022
|
-
/**
|
2023
|
-
* Restore from an existing key backup via a passphrase.
|
2024
|
-
*
|
2025
|
-
* @param password - Passphrase
|
2026
|
-
* @param targetRoomId - Room ID to target a specific room.
|
2027
|
-
* Restores all rooms if omitted.
|
2028
|
-
* @param targetSessionId - Session ID to target a specific session.
|
2029
|
-
* Restores all sessions if omitted.
|
2030
|
-
* @param backupInfo - Backup metadata from `getKeyBackupVersion` or `checkKeyBackup`.`backupInfo`
|
2031
|
-
* @param opts - Optional params such as callbacks
|
2032
|
-
* @returns Status of restoration with `total` and `imported`
|
2033
|
-
* key counts.
|
2034
|
-
*
|
2035
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
|
2036
|
-
*/
|
2037
|
-
restoreKeyBackupWithPassword(password: string, targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2038
|
-
/**
|
2039
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
|
2040
|
-
*/
|
2041
|
-
restoreKeyBackupWithPassword(password: string, targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2042
|
-
/**
|
2043
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
|
2044
|
-
*/
|
2045
|
-
restoreKeyBackupWithPassword(password: string, targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2046
|
-
/**
|
2047
|
-
* Restore from an existing key backup via a private key stored in secret
|
2048
|
-
* storage.
|
2049
|
-
*
|
2050
|
-
* @param backupInfo - Backup metadata from `checkKeyBackup`
|
2051
|
-
* @param targetRoomId - Room ID to target a specific room.
|
2052
|
-
* Restores all rooms if omitted.
|
2053
|
-
* @param targetSessionId - Session ID to target a specific session.
|
2054
|
-
* Restores all sessions if omitted.
|
2055
|
-
* @param opts - Optional params such as callbacks
|
2056
|
-
* @returns Status of restoration with `total` and `imported`
|
2057
|
-
* key counts.
|
2058
|
-
*
|
2059
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2060
|
-
*/
|
2061
|
-
restoreKeyBackupWithSecretStorage(backupInfo: IKeyBackupInfo, targetRoomId?: string, targetSessionId?: string, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2062
|
-
/**
|
2063
|
-
* Restore from an existing key backup via an encoded recovery key.
|
2064
|
-
*
|
2065
|
-
* @param recoveryKey - Encoded recovery key
|
2066
|
-
* @param targetRoomId - Room ID to target a specific room.
|
2067
|
-
* Restores all rooms if omitted.
|
2068
|
-
* @param targetSessionId - Session ID to target a specific session.
|
2069
|
-
* Restores all sessions if omitted.
|
2070
|
-
* @param backupInfo - Backup metadata from `checkKeyBackup`
|
2071
|
-
* @param opts - Optional params such as callbacks
|
2072
|
-
|
2073
|
-
* @returns Status of restoration with `total` and `imported`
|
2074
|
-
* key counts.
|
2075
|
-
*
|
2076
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2077
|
-
*/
|
2078
|
-
restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2079
|
-
/**
|
2080
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2081
|
-
*/
|
2082
|
-
restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2083
|
-
/**
|
2084
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2085
|
-
*/
|
2086
|
-
restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2087
|
-
/**
|
2088
|
-
* Restore from an existing key backup via a private key stored locally
|
2089
|
-
* @param targetRoomId
|
2090
|
-
* @param targetSessionId
|
2091
|
-
* @param backupInfo
|
2092
|
-
* @param opts
|
2093
|
-
*
|
2094
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2095
|
-
*/
|
2096
|
-
restoreKeyBackupWithCache(targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2097
|
-
/**
|
2098
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2099
|
-
*/
|
2100
|
-
restoreKeyBackupWithCache(targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2101
|
-
/**
|
2102
|
-
* @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
|
2103
|
-
*/
|
2104
|
-
restoreKeyBackupWithCache(targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
|
2105
|
-
private restoreKeyBackup;
|
2106
|
-
/**
|
2107
|
-
* This method calculates the total number of keys present in the response of a `/room_keys/keys` call.
|
2108
|
-
*
|
2109
|
-
* @param res - The response from the server containing the keys to be counted.
|
2110
|
-
*
|
2111
|
-
* @returns The total number of keys in the backup.
|
2112
|
-
*/
|
2113
|
-
private getTotalKeyCount;
|
2114
|
-
/**
|
2115
|
-
* This method handles the decryption of a full backup, i.e a call to `/room_keys/keys`.
|
2116
|
-
* It will decrypt the keys in chunks and call the `block` callback for each chunk.
|
2117
|
-
*
|
2118
|
-
* @param res - The response from the server containing the keys to be decrypted.
|
2119
|
-
* @param backupDecryptor - An instance of the BackupDecryptor class used to decrypt the keys.
|
2120
|
-
* @param chunkSize - The size of the chunks to be processed at a time.
|
2121
|
-
* @param block - A callback function that is called for each chunk of keys.
|
2122
|
-
*
|
2123
|
-
* @returns A promise that resolves when the decryption is complete.
|
2124
|
-
*/
|
2125
|
-
private handleDecryptionOfAFullBackup;
|
2126
|
-
deleteKeysFromBackup(roomId: undefined, sessionId: undefined, version?: string): Promise<void>;
|
2127
|
-
deleteKeysFromBackup(roomId: string, sessionId: undefined, version?: string): Promise<void>;
|
2128
|
-
deleteKeysFromBackup(roomId: string, sessionId: string, version?: string): Promise<void>;
|
2129
983
|
/**
|
2130
984
|
* Get the config for the media repository.
|
2131
985
|
* @returns Promise which resolves with an object containing the config.
|
@@ -2333,13 +1187,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
2333
1187
|
* @returns returns a promise which resolves with the result of the delayed send request
|
2334
1188
|
*/
|
2335
1189
|
protected encryptAndSendEvent(room: Room | null, event: MatrixEvent, delayOpts: SendDelayedEventRequestOpts): Promise<SendDelayedEventResponse>;
|
2336
|
-
private encryptEventIfNeeded;
|
2337
|
-
/**
|
2338
|
-
* Determine whether a given event should be encrypted when we send it to the given room.
|
2339
|
-
*
|
2340
|
-
* This takes into account event type and room configuration.
|
2341
|
-
*/
|
2342
|
-
private shouldEncryptEventForRoom;
|
2343
1190
|
/**
|
2344
1191
|
* Returns the eventType that should be used taking encryption into account
|
2345
1192
|
* for a given eventType.
|
@@ -2960,8 +1807,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
2960
1807
|
* @returns Rejects: with an error response.
|
2961
1808
|
*/
|
2962
1809
|
getOpenIdToken(): Promise<IOpenIDToken>;
|
2963
|
-
private startCallEventHandler;
|
2964
|
-
private startMatrixRTC;
|
2965
1810
|
/**
|
2966
1811
|
* Once the client has been initialised, we want to clear notifications we
|
2967
1812
|
* know for a fact should be here.
|
@@ -2973,24 +1818,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
2973
1818
|
* we have on record matches.
|
2974
1819
|
*/
|
2975
1820
|
private fixupRoomNotifications;
|
2976
|
-
/**
|
2977
|
-
* @returns Promise which resolves: ITurnServerResponse object
|
2978
|
-
* @returns Rejects: with an error response.
|
2979
|
-
*/
|
2980
|
-
turnServer(): Promise<ITurnServerResponse>;
|
2981
|
-
/**
|
2982
|
-
* Get the TURN servers for this homeserver.
|
2983
|
-
* @returns The servers or an empty list.
|
2984
|
-
*/
|
2985
|
-
getTurnServers(): ITurnServer[];
|
2986
|
-
/**
|
2987
|
-
* Get the unix timestamp (in milliseconds) at which the current
|
2988
|
-
* TURN credentials (from getTurnServers) expire
|
2989
|
-
* @returns The expiry timestamp in milliseconds
|
2990
|
-
*/
|
2991
|
-
getTurnServersExpiry(): number;
|
2992
|
-
get pollingTurnServers(): boolean;
|
2993
|
-
checkTurnServers(): Promise<boolean | undefined>;
|
2994
1821
|
/**
|
2995
1822
|
* Set whether to allow a fallback ICE server should be used for negotiating a
|
2996
1823
|
* WebRTC connection if the homeserver doesn't provide any servers. Defaults to
|
@@ -3119,13 +1946,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
3119
1946
|
nextBatch?: string | null;
|
3120
1947
|
prevBatch?: string | null;
|
3121
1948
|
}>;
|
3122
|
-
/**
|
3123
|
-
* The app may wish to see if we have a key cached without
|
3124
|
-
* triggering a user interaction.
|
3125
|
-
*
|
3126
|
-
* @deprecated Not supported for Rust Cryptography.
|
3127
|
-
*/
|
3128
|
-
getCrossSigningCacheCallbacks(): ICacheCallbacks | undefined;
|
3129
1949
|
/**
|
3130
1950
|
* Generates a random string suitable for use as a client secret. <strong>This
|
3131
1951
|
* method is experimental and may change.</strong>
|
@@ -3793,47 +2613,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
3793
2613
|
body: ISearchRequestBody;
|
3794
2614
|
next_batch?: string;
|
3795
2615
|
}, abortSignal?: AbortSignal): Promise<ISearchResponse>;
|
3796
|
-
/**
|
3797
|
-
* Upload keys
|
3798
|
-
*
|
3799
|
-
* @param content - body of upload request
|
3800
|
-
*
|
3801
|
-
* @param opts - this method no longer takes any opts,
|
3802
|
-
* used to take opts.device_id but this was not removed from the spec as a redundant parameter
|
3803
|
-
*
|
3804
|
-
* @returns Promise which resolves: result object. Rejects: with
|
3805
|
-
* an error response ({@link MatrixError}).
|
3806
|
-
*/
|
3807
|
-
uploadKeysRequest(content: IUploadKeysRequest, opts?: void): Promise<IKeysUploadResponse>;
|
3808
|
-
uploadKeySignatures(content: KeySignatures): Promise<IUploadKeySignaturesResponse>;
|
3809
|
-
/**
|
3810
|
-
* Download device keys
|
3811
|
-
*
|
3812
|
-
* @param userIds - list of users to get keys for
|
3813
|
-
*
|
3814
|
-
* @param token - sync token to pass in the query request, to help
|
3815
|
-
* the HS give the most recent results
|
3816
|
-
*
|
3817
|
-
* @returns Promise which resolves: result object. Rejects: with
|
3818
|
-
* an error response ({@link MatrixError}).
|
3819
|
-
*/
|
3820
|
-
downloadKeysForUsers(userIds: string[], { token }?: {
|
3821
|
-
token?: string;
|
3822
|
-
}): Promise<IDownloadKeyResult>;
|
3823
|
-
/**
|
3824
|
-
* Claim one-time keys
|
3825
|
-
*
|
3826
|
-
* @param devices - a list of [userId, deviceId] pairs
|
3827
|
-
*
|
3828
|
-
* @param keyAlgorithm - desired key type
|
3829
|
-
*
|
3830
|
-
* @param timeout - the time (in milliseconds) to wait for keys from remote
|
3831
|
-
* servers
|
3832
|
-
*
|
3833
|
-
* @returns Promise which resolves: result object. Rejects: with
|
3834
|
-
* an error response ({@link MatrixError}).
|
3835
|
-
*/
|
3836
|
-
claimOneTimeKeys(devices: [string, string][], keyAlgorithm?: string, timeout?: number): Promise<IClaimOTKsResult>;
|
3837
2616
|
/**
|
3838
2617
|
* Ask the server for a list of users who have changed their device lists
|
3839
2618
|
* between a pair of sync tokens
|
@@ -3846,7 +2625,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
3846
2625
|
changed: string[];
|
3847
2626
|
left: string[];
|
3848
2627
|
}>;
|
3849
|
-
uploadDeviceSigningKeys(auth?: AuthDict, keys?: CrossSigningKeys): Promise<{}>;
|
3850
2628
|
/**
|
3851
2629
|
* Register with an identity server using the OpenID token from the user's
|
3852
2630
|
* Homeserver, which can be retrieved via
|