@unwanted/matrix-sdk-mini 34.12.0-2 → 34.12.0-3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (467) hide show
  1. package/git-revision.txt +1 -1
  2. package/lib/@types/global.d.js +0 -2
  3. package/lib/@types/global.d.js.map +1 -1
  4. package/lib/browser-index.d.ts.map +1 -1
  5. package/lib/browser-index.js +0 -11
  6. package/lib/browser-index.js.map +1 -1
  7. package/lib/client.d.ts +2 -1176
  8. package/lib/client.d.ts.map +1 -1
  9. package/lib/client.js +346 -2717
  10. package/lib/client.js.map +1 -1
  11. package/lib/embedded.d.ts +0 -22
  12. package/lib/embedded.d.ts.map +1 -1
  13. package/lib/embedded.js +24 -166
  14. package/lib/embedded.js.map +1 -1
  15. package/lib/event-mapper.d.ts.map +1 -1
  16. package/lib/event-mapper.js +0 -4
  17. package/lib/event-mapper.js.map +1 -1
  18. package/lib/matrix.d.ts +0 -19
  19. package/lib/matrix.d.ts.map +1 -1
  20. package/lib/matrix.js +1 -26
  21. package/lib/matrix.js.map +1 -1
  22. package/lib/models/MSC3089Branch.d.ts.map +1 -1
  23. package/lib/models/MSC3089Branch.js +0 -3
  24. package/lib/models/MSC3089Branch.js.map +1 -1
  25. package/lib/models/event.d.ts +0 -94
  26. package/lib/models/event.d.ts.map +1 -1
  27. package/lib/models/event.js +0 -274
  28. package/lib/models/event.js.map +1 -1
  29. package/lib/models/poll.d.ts.map +1 -1
  30. package/lib/models/poll.js +1 -5
  31. package/lib/models/poll.js.map +1 -1
  32. package/lib/models/relations-container.d.ts.map +1 -1
  33. package/lib/models/relations-container.js +1 -7
  34. package/lib/models/relations-container.js.map +1 -1
  35. package/lib/models/relations.d.ts +0 -1
  36. package/lib/models/relations.d.ts.map +1 -1
  37. package/lib/models/relations.js +0 -8
  38. package/lib/models/relations.js.map +1 -1
  39. package/lib/models/room-state.d.ts.map +1 -1
  40. package/lib/models/room-state.js +10 -26
  41. package/lib/models/room-state.js.map +1 -1
  42. package/lib/models/room.d.ts +0 -18
  43. package/lib/models/room.d.ts.map +1 -1
  44. package/lib/models/room.js +94 -148
  45. package/lib/models/room.js.map +1 -1
  46. package/lib/models/thread.d.ts.map +1 -1
  47. package/lib/models/thread.js +0 -1
  48. package/lib/models/thread.js.map +1 -1
  49. package/lib/sliding-sync-sdk.d.ts +2 -3
  50. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  51. package/lib/sliding-sync-sdk.js +41 -90
  52. package/lib/sliding-sync-sdk.js.map +1 -1
  53. package/lib/sync.d.ts +0 -12
  54. package/lib/sync.d.ts.map +1 -1
  55. package/lib/sync.js +1 -73
  56. package/lib/sync.js.map +1 -1
  57. package/lib/testing.d.ts +0 -48
  58. package/lib/testing.d.ts.map +1 -1
  59. package/lib/testing.js +0 -105
  60. package/lib/testing.js.map +1 -1
  61. package/package.json +1 -3
  62. package/src/@types/global.d.ts +0 -3
  63. package/src/browser-index.ts +0 -11
  64. package/src/client.ts +57 -2732
  65. package/src/embedded.ts +3 -130
  66. package/src/event-mapper.ts +0 -4
  67. package/src/matrix.ts +0 -28
  68. package/src/models/MSC3089Branch.ts +0 -3
  69. package/src/models/event.ts +0 -289
  70. package/src/models/poll.ts +0 -6
  71. package/src/models/relations-container.ts +1 -8
  72. package/src/models/relations.ts +0 -8
  73. package/src/models/room-state.ts +2 -8
  74. package/src/models/room.ts +0 -62
  75. package/src/models/thread.ts +0 -1
  76. package/src/sliding-sync-sdk.ts +2 -72
  77. package/src/sync.ts +1 -98
  78. package/src/testing.ts +0 -108
  79. package/lib/@types/crypto.d.ts +0 -47
  80. package/lib/@types/crypto.d.ts.map +0 -1
  81. package/lib/@types/crypto.js +0 -1
  82. package/lib/@types/crypto.js.map +0 -1
  83. package/lib/@types/matrix-sdk-crypto-wasm.d.js +0 -1
  84. package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +0 -1
  85. package/lib/common-crypto/CryptoBackend.d.ts +0 -240
  86. package/lib/common-crypto/CryptoBackend.d.ts.map +0 -1
  87. package/lib/common-crypto/CryptoBackend.js +0 -73
  88. package/lib/common-crypto/CryptoBackend.js.map +0 -1
  89. package/lib/common-crypto/key-passphrase.d.ts +0 -14
  90. package/lib/common-crypto/key-passphrase.d.ts.map +0 -1
  91. package/lib/common-crypto/key-passphrase.js +0 -33
  92. package/lib/common-crypto/key-passphrase.js.map +0 -1
  93. package/lib/crypto/CrossSigning.d.ts +0 -184
  94. package/lib/crypto/CrossSigning.d.ts.map +0 -1
  95. package/lib/crypto/CrossSigning.js +0 -718
  96. package/lib/crypto/CrossSigning.js.map +0 -1
  97. package/lib/crypto/DeviceList.d.ts +0 -216
  98. package/lib/crypto/DeviceList.d.ts.map +0 -1
  99. package/lib/crypto/DeviceList.js +0 -892
  100. package/lib/crypto/DeviceList.js.map +0 -1
  101. package/lib/crypto/EncryptionSetup.d.ts +0 -152
  102. package/lib/crypto/EncryptionSetup.d.ts.map +0 -1
  103. package/lib/crypto/EncryptionSetup.js +0 -356
  104. package/lib/crypto/EncryptionSetup.js.map +0 -1
  105. package/lib/crypto/OlmDevice.d.ts +0 -457
  106. package/lib/crypto/OlmDevice.d.ts.map +0 -1
  107. package/lib/crypto/OlmDevice.js +0 -1241
  108. package/lib/crypto/OlmDevice.js.map +0 -1
  109. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts +0 -109
  110. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts.map +0 -1
  111. package/lib/crypto/OutgoingRoomKeyRequestManager.js +0 -415
  112. package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +0 -1
  113. package/lib/crypto/RoomList.d.ts +0 -26
  114. package/lib/crypto/RoomList.d.ts.map +0 -1
  115. package/lib/crypto/RoomList.js +0 -71
  116. package/lib/crypto/RoomList.js.map +0 -1
  117. package/lib/crypto/SecretSharing.d.ts +0 -24
  118. package/lib/crypto/SecretSharing.d.ts.map +0 -1
  119. package/lib/crypto/SecretSharing.js +0 -194
  120. package/lib/crypto/SecretSharing.js.map +0 -1
  121. package/lib/crypto/SecretStorage.d.ts +0 -55
  122. package/lib/crypto/SecretStorage.d.ts.map +0 -1
  123. package/lib/crypto/SecretStorage.js +0 -118
  124. package/lib/crypto/SecretStorage.js.map +0 -1
  125. package/lib/crypto/aes.d.ts +0 -6
  126. package/lib/crypto/aes.d.ts.map +0 -1
  127. package/lib/crypto/aes.js +0 -24
  128. package/lib/crypto/aes.js.map +0 -1
  129. package/lib/crypto/algorithms/base.d.ts +0 -156
  130. package/lib/crypto/algorithms/base.d.ts.map +0 -1
  131. package/lib/crypto/algorithms/base.js +0 -187
  132. package/lib/crypto/algorithms/base.js.map +0 -1
  133. package/lib/crypto/algorithms/index.d.ts +0 -4
  134. package/lib/crypto/algorithms/index.d.ts.map +0 -1
  135. package/lib/crypto/algorithms/index.js +0 -20
  136. package/lib/crypto/algorithms/index.js.map +0 -1
  137. package/lib/crypto/algorithms/megolm.d.ts +0 -385
  138. package/lib/crypto/algorithms/megolm.d.ts.map +0 -1
  139. package/lib/crypto/algorithms/megolm.js +0 -1822
  140. package/lib/crypto/algorithms/megolm.js.map +0 -1
  141. package/lib/crypto/algorithms/olm.d.ts +0 -5
  142. package/lib/crypto/algorithms/olm.d.ts.map +0 -1
  143. package/lib/crypto/algorithms/olm.js +0 -299
  144. package/lib/crypto/algorithms/olm.js.map +0 -1
  145. package/lib/crypto/api.d.ts +0 -32
  146. package/lib/crypto/api.d.ts.map +0 -1
  147. package/lib/crypto/api.js +0 -22
  148. package/lib/crypto/api.js.map +0 -1
  149. package/lib/crypto/backup.d.ts +0 -227
  150. package/lib/crypto/backup.d.ts.map +0 -1
  151. package/lib/crypto/backup.js +0 -824
  152. package/lib/crypto/backup.js.map +0 -1
  153. package/lib/crypto/crypto.d.ts +0 -3
  154. package/lib/crypto/crypto.d.ts.map +0 -1
  155. package/lib/crypto/crypto.js +0 -19
  156. package/lib/crypto/crypto.js.map +0 -1
  157. package/lib/crypto/dehydration.d.ts +0 -34
  158. package/lib/crypto/dehydration.d.ts.map +0 -1
  159. package/lib/crypto/dehydration.js +0 -252
  160. package/lib/crypto/dehydration.js.map +0 -1
  161. package/lib/crypto/device-converter.d.ts +0 -9
  162. package/lib/crypto/device-converter.d.ts.map +0 -1
  163. package/lib/crypto/device-converter.js +0 -42
  164. package/lib/crypto/device-converter.js.map +0 -1
  165. package/lib/crypto/deviceinfo.d.ts +0 -99
  166. package/lib/crypto/deviceinfo.d.ts.map +0 -1
  167. package/lib/crypto/deviceinfo.js +0 -148
  168. package/lib/crypto/deviceinfo.js.map +0 -1
  169. package/lib/crypto/index.d.ts +0 -1209
  170. package/lib/crypto/index.d.ts.map +0 -1
  171. package/lib/crypto/index.js +0 -4097
  172. package/lib/crypto/index.js.map +0 -1
  173. package/lib/crypto/key_passphrase.d.ts +0 -14
  174. package/lib/crypto/key_passphrase.d.ts.map +0 -1
  175. package/lib/crypto/key_passphrase.js +0 -44
  176. package/lib/crypto/key_passphrase.js.map +0 -1
  177. package/lib/crypto/keybackup.d.ts +0 -18
  178. package/lib/crypto/keybackup.d.ts.map +0 -1
  179. package/lib/crypto/keybackup.js +0 -1
  180. package/lib/crypto/keybackup.js.map +0 -1
  181. package/lib/crypto/olmlib.d.ts +0 -129
  182. package/lib/crypto/olmlib.d.ts.map +0 -1
  183. package/lib/crypto/olmlib.js +0 -492
  184. package/lib/crypto/olmlib.js.map +0 -1
  185. package/lib/crypto/recoverykey.d.ts +0 -2
  186. package/lib/crypto/recoverykey.d.ts.map +0 -1
  187. package/lib/crypto/recoverykey.js +0 -19
  188. package/lib/crypto/recoverykey.js.map +0 -1
  189. package/lib/crypto/store/base.d.ts +0 -252
  190. package/lib/crypto/store/base.d.ts.map +0 -1
  191. package/lib/crypto/store/base.js +0 -64
  192. package/lib/crypto/store/base.js.map +0 -1
  193. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +0 -187
  194. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +0 -1
  195. package/lib/crypto/store/indexeddb-crypto-store-backend.js +0 -1145
  196. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +0 -1
  197. package/lib/crypto/store/indexeddb-crypto-store.d.ts +0 -432
  198. package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +0 -1
  199. package/lib/crypto/store/indexeddb-crypto-store.js +0 -728
  200. package/lib/crypto/store/indexeddb-crypto-store.js.map +0 -1
  201. package/lib/crypto/store/localStorage-crypto-store.d.ts +0 -119
  202. package/lib/crypto/store/localStorage-crypto-store.d.ts.map +0 -1
  203. package/lib/crypto/store/localStorage-crypto-store.js +0 -531
  204. package/lib/crypto/store/localStorage-crypto-store.js.map +0 -1
  205. package/lib/crypto/store/memory-crypto-store.d.ts +0 -215
  206. package/lib/crypto/store/memory-crypto-store.d.ts.map +0 -1
  207. package/lib/crypto/store/memory-crypto-store.js +0 -622
  208. package/lib/crypto/store/memory-crypto-store.js.map +0 -1
  209. package/lib/crypto/verification/Base.d.ts +0 -105
  210. package/lib/crypto/verification/Base.d.ts.map +0 -1
  211. package/lib/crypto/verification/Base.js +0 -372
  212. package/lib/crypto/verification/Base.js.map +0 -1
  213. package/lib/crypto/verification/Error.d.ts +0 -35
  214. package/lib/crypto/verification/Error.d.ts.map +0 -1
  215. package/lib/crypto/verification/Error.js +0 -86
  216. package/lib/crypto/verification/Error.js.map +0 -1
  217. package/lib/crypto/verification/IllegalMethod.d.ts +0 -15
  218. package/lib/crypto/verification/IllegalMethod.d.ts.map +0 -1
  219. package/lib/crypto/verification/IllegalMethod.js +0 -43
  220. package/lib/crypto/verification/IllegalMethod.js.map +0 -1
  221. package/lib/crypto/verification/QRCode.d.ts +0 -51
  222. package/lib/crypto/verification/QRCode.d.ts.map +0 -1
  223. package/lib/crypto/verification/QRCode.js +0 -277
  224. package/lib/crypto/verification/QRCode.js.map +0 -1
  225. package/lib/crypto/verification/SAS.d.ts +0 -27
  226. package/lib/crypto/verification/SAS.d.ts.map +0 -1
  227. package/lib/crypto/verification/SAS.js +0 -485
  228. package/lib/crypto/verification/SAS.js.map +0 -1
  229. package/lib/crypto/verification/SASDecimal.d.ts +0 -8
  230. package/lib/crypto/verification/SASDecimal.d.ts.map +0 -1
  231. package/lib/crypto/verification/SASDecimal.js +0 -34
  232. package/lib/crypto/verification/SASDecimal.js.map +0 -1
  233. package/lib/crypto/verification/request/Channel.d.ts +0 -18
  234. package/lib/crypto/verification/request/Channel.d.ts.map +0 -1
  235. package/lib/crypto/verification/request/Channel.js +0 -1
  236. package/lib/crypto/verification/request/Channel.js.map +0 -1
  237. package/lib/crypto/verification/request/InRoomChannel.d.ts +0 -113
  238. package/lib/crypto/verification/request/InRoomChannel.d.ts.map +0 -1
  239. package/lib/crypto/verification/request/InRoomChannel.js +0 -351
  240. package/lib/crypto/verification/request/InRoomChannel.js.map +0 -1
  241. package/lib/crypto/verification/request/ToDeviceChannel.d.ts +0 -105
  242. package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +0 -1
  243. package/lib/crypto/verification/request/ToDeviceChannel.js +0 -328
  244. package/lib/crypto/verification/request/ToDeviceChannel.js.map +0 -1
  245. package/lib/crypto/verification/request/VerificationRequest.d.ts +0 -227
  246. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +0 -1
  247. package/lib/crypto/verification/request/VerificationRequest.js +0 -937
  248. package/lib/crypto/verification/request/VerificationRequest.js.map +0 -1
  249. package/lib/crypto-api/CryptoEvent.d.ts +0 -69
  250. package/lib/crypto-api/CryptoEvent.d.ts.map +0 -1
  251. package/lib/crypto-api/CryptoEvent.js +0 -33
  252. package/lib/crypto-api/CryptoEvent.js.map +0 -1
  253. package/lib/crypto-api/CryptoEventHandlerMap.d.ts +0 -16
  254. package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +0 -1
  255. package/lib/crypto-api/CryptoEventHandlerMap.js +0 -22
  256. package/lib/crypto-api/CryptoEventHandlerMap.js.map +0 -1
  257. package/lib/crypto-api/index.d.ts +0 -978
  258. package/lib/crypto-api/index.d.ts.map +0 -1
  259. package/lib/crypto-api/index.js +0 -304
  260. package/lib/crypto-api/index.js.map +0 -1
  261. package/lib/crypto-api/key-passphrase.d.ts +0 -11
  262. package/lib/crypto-api/key-passphrase.d.ts.map +0 -1
  263. package/lib/crypto-api/key-passphrase.js +0 -51
  264. package/lib/crypto-api/key-passphrase.js.map +0 -1
  265. package/lib/crypto-api/keybackup.d.ts +0 -88
  266. package/lib/crypto-api/keybackup.d.ts.map +0 -1
  267. package/lib/crypto-api/keybackup.js +0 -1
  268. package/lib/crypto-api/keybackup.js.map +0 -1
  269. package/lib/crypto-api/recovery-key.d.ts +0 -11
  270. package/lib/crypto-api/recovery-key.d.ts.map +0 -1
  271. package/lib/crypto-api/recovery-key.js +0 -65
  272. package/lib/crypto-api/recovery-key.js.map +0 -1
  273. package/lib/crypto-api/verification.d.ts +0 -344
  274. package/lib/crypto-api/verification.d.ts.map +0 -1
  275. package/lib/crypto-api/verification.js +0 -91
  276. package/lib/crypto-api/verification.js.map +0 -1
  277. package/lib/rendezvous/MSC4108SignInWithQR.d.ts +0 -112
  278. package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +0 -1
  279. package/lib/rendezvous/MSC4108SignInWithQR.js +0 -392
  280. package/lib/rendezvous/MSC4108SignInWithQR.js.map +0 -1
  281. package/lib/rendezvous/RendezvousChannel.d.ts +0 -27
  282. package/lib/rendezvous/RendezvousChannel.d.ts.map +0 -1
  283. package/lib/rendezvous/RendezvousChannel.js +0 -1
  284. package/lib/rendezvous/RendezvousChannel.js.map +0 -1
  285. package/lib/rendezvous/RendezvousCode.d.ts +0 -9
  286. package/lib/rendezvous/RendezvousCode.d.ts.map +0 -1
  287. package/lib/rendezvous/RendezvousCode.js +0 -1
  288. package/lib/rendezvous/RendezvousCode.js.map +0 -1
  289. package/lib/rendezvous/RendezvousError.d.ts +0 -6
  290. package/lib/rendezvous/RendezvousError.d.ts.map +0 -1
  291. package/lib/rendezvous/RendezvousError.js +0 -23
  292. package/lib/rendezvous/RendezvousError.js.map +0 -1
  293. package/lib/rendezvous/RendezvousFailureReason.d.ts +0 -31
  294. package/lib/rendezvous/RendezvousFailureReason.d.ts.map +0 -1
  295. package/lib/rendezvous/RendezvousFailureReason.js +0 -38
  296. package/lib/rendezvous/RendezvousFailureReason.js.map +0 -1
  297. package/lib/rendezvous/RendezvousIntent.d.ts +0 -5
  298. package/lib/rendezvous/RendezvousIntent.d.ts.map +0 -1
  299. package/lib/rendezvous/RendezvousIntent.js +0 -22
  300. package/lib/rendezvous/RendezvousIntent.js.map +0 -1
  301. package/lib/rendezvous/RendezvousTransport.d.ts +0 -36
  302. package/lib/rendezvous/RendezvousTransport.d.ts.map +0 -1
  303. package/lib/rendezvous/RendezvousTransport.js +0 -1
  304. package/lib/rendezvous/RendezvousTransport.js.map +0 -1
  305. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +0 -58
  306. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +0 -1
  307. package/lib/rendezvous/channels/MSC4108SecureChannel.js +0 -246
  308. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +0 -1
  309. package/lib/rendezvous/channels/index.d.ts +0 -2
  310. package/lib/rendezvous/channels/index.d.ts.map +0 -1
  311. package/lib/rendezvous/channels/index.js +0 -18
  312. package/lib/rendezvous/channels/index.js.map +0 -1
  313. package/lib/rendezvous/index.d.ts +0 -10
  314. package/lib/rendezvous/index.d.ts.map +0 -1
  315. package/lib/rendezvous/index.js +0 -23
  316. package/lib/rendezvous/index.js.map +0 -1
  317. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +0 -61
  318. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +0 -1
  319. package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -253
  320. package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +0 -1
  321. package/lib/rendezvous/transports/index.d.ts +0 -2
  322. package/lib/rendezvous/transports/index.d.ts.map +0 -1
  323. package/lib/rendezvous/transports/index.js +0 -18
  324. package/lib/rendezvous/transports/index.js.map +0 -1
  325. package/lib/rust-crypto/CrossSigningIdentity.d.ts +0 -33
  326. package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +0 -1
  327. package/lib/rust-crypto/CrossSigningIdentity.js +0 -157
  328. package/lib/rust-crypto/CrossSigningIdentity.js.map +0 -1
  329. package/lib/rust-crypto/DehydratedDeviceManager.d.ts +0 -98
  330. package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +0 -1
  331. package/lib/rust-crypto/DehydratedDeviceManager.js +0 -285
  332. package/lib/rust-crypto/DehydratedDeviceManager.js.map +0 -1
  333. package/lib/rust-crypto/KeyClaimManager.d.ts +0 -33
  334. package/lib/rust-crypto/KeyClaimManager.d.ts.map +0 -1
  335. package/lib/rust-crypto/KeyClaimManager.js +0 -82
  336. package/lib/rust-crypto/KeyClaimManager.js.map +0 -1
  337. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +0 -43
  338. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +0 -1
  339. package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -195
  340. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +0 -1
  341. package/lib/rust-crypto/OutgoingRequestsManager.d.ts +0 -47
  342. package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +0 -1
  343. package/lib/rust-crypto/OutgoingRequestsManager.js +0 -148
  344. package/lib/rust-crypto/OutgoingRequestsManager.js.map +0 -1
  345. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +0 -120
  346. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +0 -1
  347. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +0 -467
  348. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +0 -1
  349. package/lib/rust-crypto/RoomEncryptor.d.ts +0 -98
  350. package/lib/rust-crypto/RoomEncryptor.d.ts.map +0 -1
  351. package/lib/rust-crypto/RoomEncryptor.js +0 -299
  352. package/lib/rust-crypto/RoomEncryptor.js.map +0 -1
  353. package/lib/rust-crypto/backup.d.ts +0 -254
  354. package/lib/rust-crypto/backup.d.ts.map +0 -1
  355. package/lib/rust-crypto/backup.js +0 -837
  356. package/lib/rust-crypto/backup.js.map +0 -1
  357. package/lib/rust-crypto/constants.d.ts +0 -3
  358. package/lib/rust-crypto/constants.d.ts.map +0 -1
  359. package/lib/rust-crypto/constants.js +0 -19
  360. package/lib/rust-crypto/constants.js.map +0 -1
  361. package/lib/rust-crypto/device-converter.d.ts +0 -28
  362. package/lib/rust-crypto/device-converter.d.ts.map +0 -1
  363. package/lib/rust-crypto/device-converter.js +0 -123
  364. package/lib/rust-crypto/device-converter.js.map +0 -1
  365. package/lib/rust-crypto/index.d.ts +0 -61
  366. package/lib/rust-crypto/index.d.ts.map +0 -1
  367. package/lib/rust-crypto/index.js +0 -152
  368. package/lib/rust-crypto/index.js.map +0 -1
  369. package/lib/rust-crypto/libolm_migration.d.ts +0 -81
  370. package/lib/rust-crypto/libolm_migration.d.ts.map +0 -1
  371. package/lib/rust-crypto/libolm_migration.js +0 -459
  372. package/lib/rust-crypto/libolm_migration.js.map +0 -1
  373. package/lib/rust-crypto/rust-crypto.d.ts +0 -556
  374. package/lib/rust-crypto/rust-crypto.d.ts.map +0 -1
  375. package/lib/rust-crypto/rust-crypto.js +0 -2016
  376. package/lib/rust-crypto/rust-crypto.js.map +0 -1
  377. package/lib/rust-crypto/secret-storage.d.ts +0 -22
  378. package/lib/rust-crypto/secret-storage.d.ts.map +0 -1
  379. package/lib/rust-crypto/secret-storage.js +0 -63
  380. package/lib/rust-crypto/secret-storage.js.map +0 -1
  381. package/lib/rust-crypto/verification.d.ts +0 -319
  382. package/lib/rust-crypto/verification.d.ts.map +0 -1
  383. package/lib/rust-crypto/verification.js +0 -816
  384. package/lib/rust-crypto/verification.js.map +0 -1
  385. package/lib/secret-storage.d.ts +0 -370
  386. package/lib/secret-storage.d.ts.map +0 -1
  387. package/lib/secret-storage.js +0 -466
  388. package/lib/secret-storage.js.map +0 -1
  389. package/src/@types/crypto.ts +0 -73
  390. package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -44
  391. package/src/common-crypto/CryptoBackend.ts +0 -302
  392. package/src/common-crypto/README.md +0 -4
  393. package/src/common-crypto/key-passphrase.ts +0 -43
  394. package/src/crypto/CrossSigning.ts +0 -773
  395. package/src/crypto/DeviceList.ts +0 -989
  396. package/src/crypto/EncryptionSetup.ts +0 -351
  397. package/src/crypto/OlmDevice.ts +0 -1500
  398. package/src/crypto/OutgoingRoomKeyRequestManager.ts +0 -485
  399. package/src/crypto/RoomList.ts +0 -70
  400. package/src/crypto/SecretSharing.ts +0 -240
  401. package/src/crypto/SecretStorage.ts +0 -136
  402. package/src/crypto/aes.ts +0 -23
  403. package/src/crypto/algorithms/base.ts +0 -236
  404. package/src/crypto/algorithms/index.ts +0 -20
  405. package/src/crypto/algorithms/megolm.ts +0 -2216
  406. package/src/crypto/algorithms/olm.ts +0 -381
  407. package/src/crypto/api.ts +0 -70
  408. package/src/crypto/backup.ts +0 -922
  409. package/src/crypto/crypto.ts +0 -18
  410. package/src/crypto/dehydration.ts +0 -272
  411. package/src/crypto/device-converter.ts +0 -45
  412. package/src/crypto/deviceinfo.ts +0 -158
  413. package/src/crypto/index.ts +0 -4414
  414. package/src/crypto/key_passphrase.ts +0 -42
  415. package/src/crypto/keybackup.ts +0 -47
  416. package/src/crypto/olmlib.ts +0 -539
  417. package/src/crypto/recoverykey.ts +0 -18
  418. package/src/crypto/store/base.ts +0 -348
  419. package/src/crypto/store/indexeddb-crypto-store-backend.ts +0 -1250
  420. package/src/crypto/store/indexeddb-crypto-store.ts +0 -845
  421. package/src/crypto/store/localStorage-crypto-store.ts +0 -579
  422. package/src/crypto/store/memory-crypto-store.ts +0 -680
  423. package/src/crypto/verification/Base.ts +0 -409
  424. package/src/crypto/verification/Error.ts +0 -76
  425. package/src/crypto/verification/IllegalMethod.ts +0 -50
  426. package/src/crypto/verification/QRCode.ts +0 -310
  427. package/src/crypto/verification/SAS.ts +0 -494
  428. package/src/crypto/verification/SASDecimal.ts +0 -37
  429. package/src/crypto/verification/request/Channel.ts +0 -34
  430. package/src/crypto/verification/request/InRoomChannel.ts +0 -371
  431. package/src/crypto/verification/request/ToDeviceChannel.ts +0 -354
  432. package/src/crypto/verification/request/VerificationRequest.ts +0 -976
  433. package/src/crypto-api/CryptoEvent.ts +0 -93
  434. package/src/crypto-api/CryptoEventHandlerMap.ts +0 -32
  435. package/src/crypto-api/index.ts +0 -1175
  436. package/src/crypto-api/key-passphrase.ts +0 -58
  437. package/src/crypto-api/keybackup.ts +0 -115
  438. package/src/crypto-api/recovery-key.ts +0 -69
  439. package/src/crypto-api/verification.ts +0 -408
  440. package/src/rendezvous/MSC4108SignInWithQR.ts +0 -444
  441. package/src/rendezvous/RendezvousChannel.ts +0 -48
  442. package/src/rendezvous/RendezvousCode.ts +0 -25
  443. package/src/rendezvous/RendezvousError.ts +0 -26
  444. package/src/rendezvous/RendezvousFailureReason.ts +0 -49
  445. package/src/rendezvous/RendezvousIntent.ts +0 -20
  446. package/src/rendezvous/RendezvousTransport.ts +0 -58
  447. package/src/rendezvous/channels/MSC4108SecureChannel.ts +0 -270
  448. package/src/rendezvous/channels/index.ts +0 -17
  449. package/src/rendezvous/index.ts +0 -25
  450. package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -270
  451. package/src/rendezvous/transports/index.ts +0 -17
  452. package/src/rust-crypto/CrossSigningIdentity.ts +0 -183
  453. package/src/rust-crypto/DehydratedDeviceManager.ts +0 -306
  454. package/src/rust-crypto/KeyClaimManager.ts +0 -86
  455. package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -236
  456. package/src/rust-crypto/OutgoingRequestsManager.ts +0 -143
  457. package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +0 -501
  458. package/src/rust-crypto/RoomEncryptor.ts +0 -352
  459. package/src/rust-crypto/backup.ts +0 -881
  460. package/src/rust-crypto/constants.ts +0 -18
  461. package/src/rust-crypto/device-converter.ts +0 -128
  462. package/src/rust-crypto/index.ts +0 -237
  463. package/src/rust-crypto/libolm_migration.ts +0 -530
  464. package/src/rust-crypto/rust-crypto.ts +0 -2205
  465. package/src/rust-crypto/secret-storage.ts +0 -60
  466. package/src/rust-crypto/verification.ts +0 -830
  467. package/src/secret-storage.ts +0 -693
package/lib/client.d.ts CHANGED
@@ -2,7 +2,6 @@
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
7
  import { Filter, IFilterDefinition } from "./filter.ts";
@@ -10,28 +9,17 @@ import { QueryDict } from "./utils.ts";
10
9
  import { Direction, EventTimeline } from "./models/event-timeline.ts";
11
10
  import { IActionsObject, PushProcessor } from "./pushprocessor.ts";
12
11
  import { AutoDiscoveryAction } from "./autodiscovery.ts";
13
- import { IExportedDevice as IExportedOlmDevice } from "./crypto/OlmDevice.ts";
14
- import { IOlmDevice } from "./crypto/algorithms/megolm.ts";
15
12
  import { TypedReEmitter } from "./ReEmitter.ts";
16
- import { IRoomEncryption } from "./crypto/RoomList.ts";
17
13
  import { Logger } from "./logger.ts";
18
14
  import { SERVICE_TYPES } from "./service-types.ts";
19
15
  import { FileType, HttpApiEvent, HttpApiEventHandlerMap, IHttpOpts, IRequestOpts, MatrixError, MatrixHttpApi, TokenRefreshFunction, Upload, UploadOpts, UploadResponse } from "./http-api/index.ts";
20
- import { Crypto, CryptoEvent as LegacyCryptoEvent, CryptoEventHandlerMap as LegacyCryptoEventHandlerMap, ICheckOwnCrossSigningTrustOpts } from "./crypto/index.ts";
21
- import { DeviceInfo } from "./crypto/deviceinfo.ts";
22
16
  import { User, UserEvent, UserEventHandlerMap } from "./models/user.ts";
23
- import { IDehydratedDevice, IDehydratedDeviceKeyInfo } from "./crypto/dehydration.ts";
24
- import { IKeyBackupInfo, IKeyBackupPrepareOpts, IKeyBackupRestoreOpts, IKeyBackupRestoreResult } from "./crypto/keybackup.ts";
25
17
  import { IIdentityServerProvider } from "./@types/IIdentityServerProvider.ts";
26
18
  import { MatrixScheduler } from "./scheduler.ts";
27
19
  import { BeaconEvent, BeaconEventHandlerMap } from "./models/beacon.ts";
28
20
  import { AuthDict } from "./interactive-auth.ts";
29
21
  import { IMinimalEvent, IRoomEvent, IStateEvent } from "./sync-accumulator.ts";
30
- import { CrossSigningKey, ICreateSecretStorageOpts, IEncryptedEventInfo, IRecoveryKey } from "./crypto/api.ts";
31
22
  import { EventTimelineSet } from "./models/event-timeline-set.ts";
32
- import { VerificationRequest } from "./crypto/verification/request/VerificationRequest.ts";
33
- import { VerificationBase as Verification } from "./crypto/verification/Base.ts";
34
- import { CrossSigningInfo, DeviceTrustLevel, ICacheCallbacks, UserTrustLevel } from "./crypto/CrossSigning.ts";
35
23
  import { Room, RoomEvent, RoomEventHandlerMap, RoomNameState } from "./models/room.ts";
36
24
  import { RoomMemberEvent, RoomMemberEventHandlerMap } from "./models/room-member.ts";
37
25
  import { RoomStateEvent, RoomStateEventHandlerMap } from "./models/room-state.ts";
@@ -39,17 +27,14 @@ import { DelayedEventInfo, IAddThreePidOnlyBody, IBindThreePidBody, ICreateRoomO
39
27
  import { EventType, RelationType, RoomType, StateEvents, TimelineEvents } from "./@types/event.ts";
40
28
  import { IdServerUnbindResult, JoinRule, Preset, Visibility } from "./@types/partials.ts";
41
29
  import { EventMapper, MapperOpts } from "./event-mapper.ts";
42
- import { IKeyBackup, IKeyBackupCheck, IPreparedKeyBackupVersion, TrustInfo } from "./crypto/backup.ts";
43
30
  import { MSC3089TreeSpace } from "./models/MSC3089TreeSpace.ts";
44
31
  import { ISignatures } from "./@types/signed.ts";
45
32
  import { IStore } from "./store/index.ts";
46
- import { ISecretRequest } from "./crypto/SecretStorage.ts";
47
33
  import { IEventWithRoomId, ISearchRequestBody, ISearchResponse, ISearchResults, IStateEventWithRoomId } from "./@types/search.ts";
48
34
  import { ISynapseAdminDeactivateResponse, ISynapseAdminWhoisResponse } from "./@types/synapse.ts";
49
35
  import { IHierarchyRoom } from "./@types/spaces.ts";
50
36
  import { IPusher, IPusherRequest, IPushRule, IPushRules, PushRuleAction, PushRuleKind, RuleId } from "./@types/PushRules.ts";
51
37
  import { IThreepid } from "./@types/threepids.ts";
52
- import { CryptoStore, OutgoingRoomKeyRequest } from "./crypto/store/base.ts";
53
38
  import { ILoginFlowsResponse, IRefreshTokenResponse, LoginRequest, LoginResponse, LoginTokenPostResponse, SSOAction } from "./@types/auth.ts";
54
39
  import { TypedEventEmitter } from "./models/typed-event-emitter.ts";
55
40
  import { ReceiptType } from "./@types/read_receipts.ts";
@@ -63,9 +48,6 @@ import { IgnoredInvites } from "./models/invites-ignorer.ts";
63
48
  import { UIAResponse } from "./@types/uia.ts";
64
49
  import { LocalNotificationSettings } from "./@types/local_notifications.ts";
65
50
  import { Feature, ServerSupport } from "./feature.ts";
66
- import { BootstrapCrossSigningOpts, CrossSigningKeyInfo, CryptoApi, ImportRoomKeysOpts, CryptoEvent, CryptoEventHandlerMap, CryptoCallbacks } from "./crypto-api/index.ts";
67
- import { DeviceInfoMap } from "./crypto/DeviceList.ts";
68
- import { AddSecretStorageKeyOpts, SecretStorageKeyDescription, ServerSideSecretStorage } from "./secret-storage.ts";
69
51
  import { RegisterRequest, RegisterResponse } from "./@types/registration.ts";
70
52
  import { Membership } from "./@types/membership.ts";
71
53
  import { RoomMessageEventContent } from "./@types/events.ts";
@@ -75,7 +57,6 @@ export type Store = IStore;
75
57
  export type ResetTimelineCallback = (roomId: string) => boolean;
76
58
  export declare const UNSTABLE_MSC3852_LAST_SEEN_UA: UnstableValue<"last_seen_user_agent", "org.matrix.msc3852.last_seen_user_agent">;
77
59
  interface IExportedDevice {
78
- olmDevice: IExportedOlmDevice;
79
60
  userId: string;
80
61
  deviceId: string;
81
62
  }
@@ -93,19 +74,6 @@ export interface ICreateClientOpts {
93
74
  * will create a default store if needed.
94
75
  */
95
76
  store?: Store;
96
- /**
97
- * A store to be used for end-to-end crypto session data.
98
- * The `createClient` helper will create a default store if needed. Calls the factory supplied to
99
- * {@link setCryptoStoreFactory} if unspecified; or if no factory has been
100
- * specified, uses a default implementation (indexeddb in the browser,
101
- * in-memory otherwise).
102
- *
103
- * This is only used for the legacy crypto implementation (as used by {@link MatrixClient#initCrypto}),
104
- * but if you use the rust crypto implementation ({@link MatrixClient#initRustCrypto}) and the device
105
- * previously used legacy crypto (so must be migrated), then this must still be provided, so that the
106
- * data can be migrated from the legacy store.
107
- */
108
- cryptoStore?: CryptoStore;
109
77
  /**
110
78
  * The scheduler to use. If not
111
79
  * specified, this client will not retry requests on failure. This client
@@ -221,10 +189,6 @@ export interface ICreateClientOpts {
221
189
  */
222
190
  useE2eForGroupCall?: boolean;
223
191
  livekitServiceURL?: string;
224
- /**
225
- * Crypto callbacks provided by the application
226
- */
227
- cryptoCallbacks?: CryptoCallbacks;
228
192
  /**
229
193
  * Method to generate room names for empty rooms and rooms names based on membership.
230
194
  * Defaults to a built-in English handler with basic pluralisation.
@@ -319,12 +283,6 @@ export declare const UNSTABLE_MSC2666_MUTUAL_ROOMS = "uk.half-shot.msc2666.mutua
319
283
  export declare const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_mutual_rooms";
320
284
  export declare const UNSTABLE_MSC4140_DELAYED_EVENTS = "org.matrix.msc4140";
321
285
  export declare const UNSTABLE_MSC4133_EXTENDED_PROFILES = "uk.tcpip.msc4133";
322
- declare enum CrossSigningKeyType {
323
- MasterKey = "master_key",
324
- SelfSigningKey = "self_signing_key",
325
- UserSigningKey = "user_signing_key"
326
- }
327
- export type CrossSigningKeys = Record<CrossSigningKeyType, CrossSigningKeyInfo>;
328
286
  export type SendToDeviceContentMap = Map<string, Map<string, Record<string, any>>>;
329
287
  export interface ISignedKey {
330
288
  keys: Record<string, string>;
@@ -333,7 +291,6 @@ export interface ISignedKey {
333
291
  algorithms: string[];
334
292
  device_id: string;
335
293
  }
336
- export type KeySignatures = Record<string, Record<string, CrossSigningKeyInfo | ISignedKey>>;
337
294
  export interface IUploadKeySignaturesResponse {
338
295
  failures: Record<string, Record<string, {
339
296
  errcode: string;
@@ -403,11 +360,6 @@ export interface IRequestMsisdnTokenResponse extends IRequestTokenResponse {
403
360
  success: boolean;
404
361
  intl_fmt: string;
405
362
  }
406
- export interface IUploadKeysRequest {
407
- "device_keys"?: Required<IDeviceKeys>;
408
- "one_time_keys"?: Record<string, IOneTimeKey>;
409
- "org.matrix.msc2732.fallback_keys"?: Record<string, IOneTimeKey>;
410
- }
411
363
  export interface IQueryKeysRequest {
412
364
  device_keys: {
413
365
  [userId: string]: string[];
@@ -496,33 +448,6 @@ export interface Keys {
496
448
  usage: string[];
497
449
  user_id: string;
498
450
  }
499
- export interface SigningKeys extends Keys {
500
- signatures: ISignatures;
501
- }
502
- export interface DeviceKeys {
503
- [deviceId: string]: IDeviceKeys & {
504
- unsigned?: {
505
- device_display_name: string;
506
- };
507
- };
508
- }
509
- export interface IDownloadKeyResult {
510
- failures: {
511
- [serverName: string]: object;
512
- };
513
- device_keys: {
514
- [userId: string]: DeviceKeys;
515
- };
516
- master_keys?: {
517
- [userId: string]: Keys;
518
- };
519
- self_signing_keys?: {
520
- [userId: string]: SigningKeys;
521
- };
522
- user_signing_keys?: {
523
- [userId: string]: SigningKeys;
524
- };
525
- }
526
451
  export interface IClaimOTKsResult {
527
452
  failures: {
528
453
  [serverName: string]: object;
@@ -614,12 +539,10 @@ export declare enum ClientEvent {
614
539
  }
615
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;
616
541
  type RoomStateEvents = RoomStateEvent.Events | RoomStateEvent.Members | RoomStateEvent.NewMember | RoomStateEvent.Update | RoomStateEvent.Marker;
617
- 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;
618
- type CryptoEvents = (typeof CryptoEvent)[keyof typeof CryptoEvent];
619
542
  type MatrixEventEvents = MatrixEventEvent.Decrypted | MatrixEventEvent.Replaced | MatrixEventEvent.VisibilityChange;
620
543
  type RoomMemberEvents = RoomMemberEvent.Name | RoomMemberEvent.Typing | RoomMemberEvent.PowerLevel | RoomMemberEvent.Membership;
621
544
  type UserEvents = UserEvent.AvatarUrl | UserEvent.DisplayName | UserEvent.Presence | UserEvent.CurrentlyActive | UserEvent.LastPresenceTs;
622
- export type EmittedEvents = ClientEvent | RoomEvents | RoomStateEvents | LegacyCryptoEvents | CryptoEvents | MatrixEventEvents | RoomMemberEvents | UserEvents | HttpApiEvent.SessionLoggedOut | HttpApiEvent.NoConsent | BeaconEvent;
545
+ export type EmittedEvents = ClientEvent | RoomEvents | RoomStateEvents | MatrixEventEvents | RoomMemberEvents | UserEvents | HttpApiEvent.SessionLoggedOut | HttpApiEvent.NoConsent | BeaconEvent;
623
546
  export type ClientEventHandlerMap = {
624
547
  /**
625
548
  * Fires whenever the SDK's syncing state is updated. The state can be one of:
@@ -815,7 +738,7 @@ export type ClientEventHandlerMap = {
815
738
  [ClientEvent.ReceivedVoipEvent]: (event: MatrixEvent) => void;
816
739
  [ClientEvent.TurnServers]: (servers: ITurnServer[]) => void;
817
740
  [ClientEvent.TurnServersError]: (error: Error, fatal: boolean) => void;
818
- } & RoomEventHandlerMap & RoomStateEventHandlerMap & LegacyCryptoEventHandlerMap & CryptoEventHandlerMap & MatrixEventHandlerMap & RoomMemberEventHandlerMap & UserEventHandlerMap & HttpApiEventHandlerMap & BeaconEventHandlerMap;
741
+ } & RoomEventHandlerMap & RoomStateEventHandlerMap & MatrixEventHandlerMap & RoomMemberEventHandlerMap & UserEventHandlerMap & HttpApiEventHandlerMap & BeaconEventHandlerMap;
819
742
  /**
820
743
  * Represents a Matrix Client. Only directly construct this if you want to use
821
744
  * custom modules. Normally, {@link createClient} should be used
@@ -852,15 +775,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
852
775
  http: MatrixHttpApi<IHttpOpts & {
853
776
  onlyData: true;
854
777
  }>;
855
- /**
856
- * The libolm crypto implementation, if it is in use.
857
- *
858
- * @deprecated This should not be used. Instead, use the methods exposed directly on this class or
859
- * (where they are available) via {@link getCrypto}.
860
- */
861
- crypto?: Crypto;
862
- private cryptoBackend?;
863
- cryptoCallbacks: CryptoCallbacks;
864
778
  supportsCallTransfer: boolean;
865
779
  forceTURN: boolean;
866
780
  iceCandidatePoolSize: number;
@@ -868,7 +782,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
868
782
  baseUrl: string;
869
783
  readonly isVoipWithNoMediaAllowed: boolean;
870
784
  useLivekitForGroupCalls: boolean;
871
- protected canSupportVoip: boolean;
872
785
  protected peekSync: SyncApi | null;
873
786
  protected isGuestAccount: boolean;
874
787
  protected ongoingScrollbacks: {
@@ -878,7 +791,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
878
791
  };
879
792
  };
880
793
  protected notifTimelineSet: EventTimelineSet | null;
881
- protected cryptoStore?: CryptoStore;
882
794
  protected verificationMethods?: string[];
883
795
  protected fallbackICEServerAllowed: boolean;
884
796
  protected syncApi?: SlidingSyncSdk | SyncApi;
@@ -894,10 +806,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
894
806
  protected serverVersionsPromise?: Promise<IServerVersions>;
895
807
  protected clientWellKnown?: IClientWellKnown;
896
808
  protected clientWellKnownPromise?: Promise<IClientWellKnown>;
897
- protected turnServers: ITurnServer[];
898
- protected turnServersExpiry: number;
899
- protected checkTurnServersIntervalID?: ReturnType<typeof setInterval>;
900
- protected exportedOlmDeviceToImport?: IExportedOlmDevice;
901
809
  protected txnCtr: number;
902
810
  protected sessionId: string;
903
811
  /** IDs of events which are currently being encrypted.
@@ -909,7 +817,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
909
817
  private useE2eForGroupCall;
910
818
  private toDeviceMessageQueue;
911
819
  livekitServiceURL?: string;
912
- private _secretStorage;
913
820
  readonly ignoredInvites: IgnoredInvites;
914
821
  private serverCapabilitiesService;
915
822
  constructor(opts: IMatrixClientCreateOpts);
@@ -932,53 +839,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
932
839
  * clean shutdown.
933
840
  */
934
841
  stopClient(): void;
935
- /**
936
- * Try to rehydrate a device if available. The client must have been
937
- * initialized with a `cryptoCallback.getDehydrationKey` option, and this
938
- * function must be called before initCrypto and startClient are called.
939
- *
940
- * @returns Promise which resolves to undefined if a device could not be dehydrated, or
941
- * to the new device ID if the dehydration was successful.
942
- * @returns Rejects: with an error response.
943
- *
944
- * @deprecated MSC2697 device dehydration is not supported for rust cryptography.
945
- */
946
- rehydrateDevice(): Promise<string | undefined>;
947
- /**
948
- * Get the current dehydrated device, if any
949
- * @returns A promise of an object containing the dehydrated device
950
- *
951
- * @deprecated MSC2697 device dehydration is not supported for rust cryptography.
952
- */
953
- getDehydratedDevice(): Promise<IDehydratedDevice | undefined>;
954
- /**
955
- * Set the dehydration key. This will also periodically dehydrate devices to
956
- * the server.
957
- *
958
- * @param key - the dehydration key
959
- * @param keyInfo - Information about the key. Primarily for
960
- * information about how to generate the key from a passphrase.
961
- * @param deviceDisplayName - The device display name for the
962
- * dehydrated device.
963
- * @returns A promise that resolves when the dehydrated device is stored.
964
- *
965
- * @deprecated Not supported for Rust Cryptography.
966
- */
967
- setDehydrationKey(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<void>;
968
- /**
969
- * Creates a new MSC2967 dehydrated device (without queuing periodic dehydration)
970
- * @param key - the dehydration key
971
- * @param keyInfo - Information about the key. Primarily for
972
- * information about how to generate the key from a passphrase.
973
- * @param deviceDisplayName - The device display name for the
974
- * dehydrated device.
975
- * @returns the device id of the newly created dehydrated device
976
- *
977
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.startDehydration}.
978
- */
979
- createDehydratedDevice(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<string | undefined>;
980
- /** @deprecated Not supported for Rust Cryptography. */
981
- exportDevice(): Promise<IExportedDevice | undefined>;
982
842
  /**
983
843
  * Clear any data out of the persistent stores used by the client.
984
844
  *
@@ -1018,11 +878,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
1018
878
  * @returns session ID
1019
879
  */
1020
880
  getSessionId(): string;
1021
- /**
1022
- * Check if the runtime environment supports VoIP calling.
1023
- * @returns True if VoIP is supported.
1024
- */
1025
- supportsVoip(): boolean;
1026
881
  /**
1027
882
  * Set whether VoIP calls are forced to use only TURN
1028
883
  * candidates. This is the same as the forceTURN option
@@ -1121,965 +976,10 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
1121
976
  * @returns A promise which resolves to the capabilities of the homeserver
1122
977
  */
1123
978
  fetchCapabilities(): Promise<Capabilities>;
1124
- /**
1125
- * Initialise support for end-to-end encryption in this client, using libolm.
1126
- *
1127
- * You should call this method after creating the matrixclient, but *before*
1128
- * calling `startClient`, if you want to support end-to-end encryption.
1129
- *
1130
- * It will return a Promise which will resolve when the crypto layer has been
1131
- * successfully initialised.
1132
- *
1133
- * @deprecated libolm is deprecated. Prefer {@link initRustCrypto}.
1134
- */
1135
- initCrypto(): Promise<void>;
1136
- /**
1137
- * Initialise support for end-to-end encryption in this client, using the rust matrix-sdk-crypto.
1138
- *
1139
- * An alternative to {@link initCrypto}.
1140
- *
1141
- * @param args.useIndexedDB - True to use an indexeddb store, false to use an in-memory store. Defaults to 'true'.
1142
- * @param args.storageKey - A key with which to encrypt the indexeddb store. If provided, it must be exactly
1143
- * 32 bytes of data, and must be the same each time the client is initialised for a given device.
1144
- * If both this and `storagePassword` are unspecified, the store will be unencrypted.
1145
- * @param args.storagePassword - An alternative to `storageKey`. A password which will be used to derive a key to
1146
- * encrypt the store with. Deriving a key from a password is (deliberately) a slow operation, so prefer
1147
- * to pass a `storageKey` directly where possible.
1148
- *
1149
- * @returns a Promise which will resolve when the crypto layer has been
1150
- * successfully initialised.
1151
- */
1152
- initRustCrypto(args?: {
1153
- useIndexedDB?: boolean;
1154
- storageKey?: Uint8Array;
1155
- storagePassword?: string;
1156
- }): Promise<void>;
1157
- /**
1158
- * Access the server-side secret storage API for this client.
1159
- */
1160
- get secretStorage(): ServerSideSecretStorage;
1161
- /**
1162
- * Access the crypto API for this client.
1163
- *
1164
- * If end-to-end encryption has been enabled for this client (via {@link initCrypto} or {@link initRustCrypto}),
1165
- * returns an object giving access to the crypto API. Otherwise, returns `undefined`.
1166
- */
1167
- getCrypto(): CryptoApi | undefined;
1168
- /**
1169
- * Is end-to-end crypto enabled for this client.
1170
- * @returns True if end-to-end is enabled.
1171
- * @deprecated prefer {@link getCrypto}
1172
- */
1173
- isCryptoEnabled(): boolean;
1174
- /**
1175
- * Get the Ed25519 key for this device
1176
- *
1177
- * @returns base64-encoded ed25519 key. Null if crypto is
1178
- * disabled.
1179
- *
1180
- * @deprecated Not supported for Rust Cryptography.Prefer {@link CryptoApi.getOwnDeviceKeys}
1181
- */
1182
- getDeviceEd25519Key(): string | null;
1183
- /**
1184
- * Get the Curve25519 key for this device
1185
- *
1186
- * @returns base64-encoded curve25519 key. Null if crypto is
1187
- * disabled.
1188
- *
1189
- * @deprecated Not supported for Rust Cryptography. Use {@link CryptoApi.getOwnDeviceKeys}
1190
- */
1191
- getDeviceCurve25519Key(): string | null;
1192
979
  /**
1193
980
  * @deprecated Does nothing.
1194
981
  */
1195
982
  uploadKeys(): Promise<void>;
1196
- /**
1197
- * Download the keys for a list of users and stores the keys in the session
1198
- * store.
1199
- * @param userIds - The users to fetch.
1200
- * @param forceDownload - Always download the keys even if cached.
1201
- *
1202
- * @returns A promise which resolves to a map userId-\>deviceId-\>`DeviceInfo`
1203
- *
1204
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
1205
- */
1206
- downloadKeys(userIds: string[], forceDownload?: boolean): Promise<DeviceInfoMap>;
1207
- /**
1208
- * Get the stored device keys for a user id
1209
- *
1210
- * @param userId - the user to list keys for.
1211
- *
1212
- * @returns list of devices
1213
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
1214
- */
1215
- getStoredDevicesForUser(userId: string): DeviceInfo[];
1216
- /**
1217
- * Get the stored device key for a user id and device id
1218
- *
1219
- * @param userId - the user to list keys for.
1220
- * @param deviceId - unique identifier for the device
1221
- *
1222
- * @returns device or null
1223
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
1224
- */
1225
- getStoredDevice(userId: string, deviceId: string): DeviceInfo | null;
1226
- /**
1227
- * Mark the given device as verified
1228
- *
1229
- * @param userId - owner of the device
1230
- * @param deviceId - unique identifier for the device or user's
1231
- * cross-signing public key ID.
1232
- *
1233
- * @param verified - whether to mark the device as verified. defaults
1234
- * to 'true'.
1235
- *
1236
- * @returns
1237
- *
1238
- * @remarks
1239
- * Fires {@link CryptoEvent#DeviceVerificationChanged}
1240
- */
1241
- setDeviceVerified(userId: string, deviceId: string, verified?: boolean): Promise<void>;
1242
- /**
1243
- * Mark the given device as blocked/unblocked
1244
- *
1245
- * @param userId - owner of the device
1246
- * @param deviceId - unique identifier for the device or user's
1247
- * cross-signing public key ID.
1248
- *
1249
- * @param blocked - whether to mark the device as blocked. defaults
1250
- * to 'true'.
1251
- *
1252
- * @returns
1253
- *
1254
- * @remarks
1255
- * Fires {@link LegacyCryptoEvent.DeviceVerificationChanged}
1256
- *
1257
- * @deprecated Not supported for Rust Cryptography.
1258
- */
1259
- setDeviceBlocked(userId: string, deviceId: string, blocked?: boolean): Promise<void>;
1260
- /**
1261
- * Mark the given device as known/unknown
1262
- *
1263
- * @param userId - owner of the device
1264
- * @param deviceId - unique identifier for the device or user's
1265
- * cross-signing public key ID.
1266
- *
1267
- * @param known - whether to mark the device as known. defaults
1268
- * to 'true'.
1269
- *
1270
- * @returns
1271
- *
1272
- * @remarks
1273
- * Fires {@link CryptoEvent#DeviceVerificationChanged}
1274
- *
1275
- * @deprecated Not supported for Rust Cryptography.
1276
- */
1277
- setDeviceKnown(userId: string, deviceId: string, known?: boolean): Promise<void>;
1278
- private setDeviceVerification;
1279
- /**
1280
- * Request a key verification from another user, using a DM.
1281
- *
1282
- * @param userId - the user to request verification with
1283
- * @param roomId - the room to use for verification
1284
- *
1285
- * @returns resolves to a VerificationRequest
1286
- * when the request has been sent to the other party.
1287
- *
1288
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.requestVerificationDM}.
1289
- */
1290
- requestVerificationDM(userId: string, roomId: string): Promise<VerificationRequest>;
1291
- /**
1292
- * Finds a DM verification request that is already in progress for the given room id
1293
- *
1294
- * @param roomId - the room to use for verification
1295
- *
1296
- * @returns the VerificationRequest that is in progress, if any
1297
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.findVerificationRequestDMInProgress}.
1298
- */
1299
- findVerificationRequestDMInProgress(roomId: string): VerificationRequest | undefined;
1300
- /**
1301
- * Returns all to-device verification requests that are already in progress for the given user id
1302
- *
1303
- * @param userId - the ID of the user to query
1304
- *
1305
- * @returns the VerificationRequests that are in progress
1306
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getVerificationRequestsToDeviceInProgress}.
1307
- */
1308
- getVerificationRequestsToDeviceInProgress(userId: string): VerificationRequest[];
1309
- /**
1310
- * Request a key verification from another user.
1311
- *
1312
- * @param userId - the user to request verification with
1313
- * @param devices - array of device IDs to send requests to. Defaults to
1314
- * all devices owned by the user
1315
- *
1316
- * @returns resolves to a VerificationRequest
1317
- * when the request has been sent to the other party.
1318
- *
1319
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
1320
- */
1321
- requestVerification(userId: string, devices?: string[]): Promise<VerificationRequest>;
1322
- /**
1323
- * Begin a key verification.
1324
- *
1325
- * @param method - the verification method to use
1326
- * @param userId - the user to verify keys with
1327
- * @param deviceId - the device to verify
1328
- *
1329
- * @returns a verification object
1330
- * @deprecated Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
1331
- */
1332
- beginKeyVerification(method: string, userId: string, deviceId: string): Verification<any, any>;
1333
- /**
1334
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#checkKey}.
1335
- */
1336
- checkSecretStorageKey(key: Uint8Array, info: SecretStorageKeyDescription): Promise<boolean>;
1337
- /**
1338
- * Set the global override for whether the client should ever send encrypted
1339
- * messages to unverified devices. This provides the default for rooms which
1340
- * do not specify a value.
1341
- *
1342
- * @param value - whether to blacklist all unverified devices by default
1343
- *
1344
- * @deprecated Prefer direct access to {@link CryptoApi.globalBlacklistUnverifiedDevices}:
1345
- *
1346
- * ```javascript
1347
- * client.getCrypto().globalBlacklistUnverifiedDevices = value;
1348
- * ```
1349
- */
1350
- setGlobalBlacklistUnverifiedDevices(value: boolean): boolean;
1351
- /**
1352
- * @returns whether to blacklist all unverified devices by default
1353
- *
1354
- * @deprecated Prefer direct access to {@link CryptoApi.globalBlacklistUnverifiedDevices}:
1355
- *
1356
- * ```javascript
1357
- * value = client.getCrypto().globalBlacklistUnverifiedDevices;
1358
- * ```
1359
- */
1360
- getGlobalBlacklistUnverifiedDevices(): boolean;
1361
- /**
1362
- * Set whether sendMessage in a room with unknown and unverified devices
1363
- * should throw an error and not send them message. This has 'Global' for
1364
- * symmetry with setGlobalBlacklistUnverifiedDevices but there is currently
1365
- * no room-level equivalent for this setting.
1366
- *
1367
- * This API is currently UNSTABLE and may change or be removed without notice.
1368
- *
1369
- * It has no effect with the Rust crypto implementation.
1370
- *
1371
- * @param value - whether error on unknown devices
1372
- *
1373
- * ```ts
1374
- * client.getCrypto().globalErrorOnUnknownDevices = value;
1375
- * ```
1376
- */
1377
- setGlobalErrorOnUnknownDevices(value: boolean): void;
1378
- /**
1379
- * @returns whether to error on unknown devices
1380
- *
1381
- * This API is currently UNSTABLE and may change or be removed without notice.
1382
- */
1383
- getGlobalErrorOnUnknownDevices(): boolean;
1384
- /**
1385
- * Get the ID of one of the user's cross-signing keys
1386
- *
1387
- * @param type - The type of key to get the ID of. One of
1388
- * "master", "self_signing", or "user_signing". Defaults to "master".
1389
- *
1390
- * @returns the key ID
1391
- * @deprecated Not supported for Rust Cryptography. prefer {@link Crypto.CryptoApi#getCrossSigningKeyId}
1392
- */
1393
- getCrossSigningId(type?: CrossSigningKey | string): string | null;
1394
- /**
1395
- * Get the cross signing information for a given user.
1396
- *
1397
- * The cross-signing API is currently UNSTABLE and may change without notice.
1398
- *
1399
- * @param userId - the user ID to get the cross-signing info for.
1400
- *
1401
- * @returns the cross signing information for the user.
1402
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#userHasCrossSigningKeys}
1403
- */
1404
- getStoredCrossSigningForUser(userId: string): CrossSigningInfo | null;
1405
- /**
1406
- * Check whether a given user is trusted.
1407
- *
1408
- * The cross-signing API is currently UNSTABLE and may change without notice.
1409
- *
1410
- * @param userId - The ID of the user to check.
1411
- *
1412
- * @deprecated Use {@link Crypto.CryptoApi.getUserVerificationStatus | `CryptoApi.getUserVerificationStatus`}
1413
- */
1414
- checkUserTrust(userId: string): UserTrustLevel;
1415
- /**
1416
- * Check whether a given device is trusted.
1417
- *
1418
- * The cross-signing API is currently UNSTABLE and may change without notice.
1419
- *
1420
- * @param userId - The ID of the user whose devices is to be checked.
1421
- * @param deviceId - The ID of the device to check
1422
- *
1423
- * @deprecated Use {@link Crypto.CryptoApi.getDeviceVerificationStatus | `CryptoApi.getDeviceVerificationStatus`}
1424
- */
1425
- checkDeviceTrust(userId: string, deviceId: string): DeviceTrustLevel;
1426
- /**
1427
- * Check whether one of our own devices is cross-signed by our
1428
- * user's stored keys, regardless of whether we trust those keys yet.
1429
- *
1430
- * @param deviceId - The ID of the device to check
1431
- *
1432
- * @returns true if the device is cross-signed
1433
- *
1434
- * @deprecated Not supported for Rust Cryptography.
1435
- */
1436
- checkIfOwnDeviceCrossSigned(deviceId: string): boolean;
1437
- /**
1438
- * Check the copy of our cross-signing key that we have in the device list and
1439
- * see if we can get the private key. If so, mark it as trusted.
1440
- * @param opts - ICheckOwnCrossSigningTrustOpts object
1441
- *
1442
- * @deprecated Unneeded for the new crypto
1443
- */
1444
- checkOwnCrossSigningTrust(opts?: ICheckOwnCrossSigningTrustOpts): Promise<void>;
1445
- /**
1446
- * Checks that a given cross-signing private key matches a given public key.
1447
- * This can be used by the getCrossSigningKey callback to verify that the
1448
- * private key it is about to supply is the one that was requested.
1449
- * @param privateKey - The private key
1450
- * @param expectedPublicKey - The public key
1451
- * @returns true if the key matches, otherwise false
1452
- *
1453
- * @deprecated Not supported for Rust Cryptography.
1454
- */
1455
- checkCrossSigningPrivateKey(privateKey: Uint8Array, expectedPublicKey: string): boolean;
1456
- /**
1457
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestDeviceVerification}.
1458
- */
1459
- legacyDeviceVerification(userId: string, deviceId: string, method: string): Promise<VerificationRequest>;
1460
- /**
1461
- * Perform any background tasks that can be done before a message is ready to
1462
- * send, in order to speed up sending of the message.
1463
- * @param room - the room the event is in
1464
- *
1465
- * @deprecated Prefer {@link CryptoApi.prepareToEncrypt | `CryptoApi.prepareToEncrypt`}:
1466
- *
1467
- * ```javascript
1468
- * client.getCrypto().prepareToEncrypt(room);
1469
- * ```
1470
- */
1471
- prepareToEncrypt(room: Room): void;
1472
- /**
1473
- * Checks if the user has previously published cross-signing keys
1474
- *
1475
- * This means downloading the devicelist for the user and checking if the list includes
1476
- * the cross-signing pseudo-device.
1477
- *
1478
- * @deprecated Prefer {@link CryptoApi.userHasCrossSigningKeys | `CryptoApi.userHasCrossSigningKeys`}:
1479
- *
1480
- * ```javascript
1481
- * result = client.getCrypto().userHasCrossSigningKeys();
1482
- * ```
1483
- */
1484
- userHasCrossSigningKeys(): Promise<boolean>;
1485
- /**
1486
- * Checks whether cross signing:
1487
- * - is enabled on this account and trusted by this device
1488
- * - has private keys either cached locally or stored in secret storage
1489
- *
1490
- * If this function returns false, bootstrapCrossSigning() can be used
1491
- * to fix things such that it returns true. That is to say, after
1492
- * bootstrapCrossSigning() completes successfully, this function should
1493
- * return true.
1494
- * @returns True if cross-signing is ready to be used on this device
1495
- * @deprecated Prefer {@link CryptoApi.isCrossSigningReady | `CryptoApi.isCrossSigningReady`}:
1496
- */
1497
- isCrossSigningReady(): Promise<boolean>;
1498
- /**
1499
- * Bootstrap cross-signing by creating keys if needed. If everything is already
1500
- * set up, then no changes are made, so this is safe to run to ensure
1501
- * cross-signing is ready for use.
1502
- *
1503
- * This function:
1504
- * - creates new cross-signing keys if they are not found locally cached nor in
1505
- * secret storage (if it has been set up)
1506
- *
1507
- * @deprecated Prefer {@link CryptoApi.bootstrapCrossSigning | `CryptoApi.bootstrapCrossSigning`}.
1508
- */
1509
- bootstrapCrossSigning(opts: BootstrapCrossSigningOpts): Promise<void>;
1510
- /**
1511
- * Whether to trust a others users signatures of their devices.
1512
- * If false, devices will only be considered 'verified' if we have
1513
- * verified that device individually (effectively disabling cross-signing).
1514
- *
1515
- * Default: true
1516
- *
1517
- * @returns True if trusting cross-signed devices
1518
- *
1519
- * @deprecated Prefer {@link CryptoApi.getTrustCrossSignedDevices | `CryptoApi.getTrustCrossSignedDevices`}.
1520
- */
1521
- getCryptoTrustCrossSignedDevices(): boolean;
1522
- /**
1523
- * See getCryptoTrustCrossSignedDevices
1524
- *
1525
- * @param val - True to trust cross-signed devices
1526
- *
1527
- * @deprecated Prefer {@link CryptoApi.setTrustCrossSignedDevices | `CryptoApi.setTrustCrossSignedDevices`}.
1528
- */
1529
- setCryptoTrustCrossSignedDevices(val: boolean): void;
1530
- /**
1531
- * Counts the number of end to end session keys that are waiting to be backed up
1532
- * @returns Promise which resolves to the number of sessions requiring backup
1533
- *
1534
- * @deprecated Not supported for Rust Cryptography.
1535
- */
1536
- countSessionsNeedingBackup(): Promise<number>;
1537
- /**
1538
- * Get information about the encryption of an event
1539
- *
1540
- * @param event - event to be checked
1541
- * @returns The event information.
1542
- * @deprecated Prefer {@link Crypto.CryptoApi.getEncryptionInfoForEvent | `CryptoApi.getEncryptionInfoForEvent`}.
1543
- */
1544
- getEventEncryptionInfo(event: MatrixEvent): IEncryptedEventInfo;
1545
- /**
1546
- * Create a recovery key from a user-supplied passphrase.
1547
- *
1548
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1549
- *
1550
- * @param password - Passphrase string that can be entered by the user
1551
- * when restoring the backup as an alternative to entering the recovery key.
1552
- * Optional.
1553
- * @returns Object with public key metadata, encoded private
1554
- * recovery key which should be disposed of after displaying to the user,
1555
- * and raw private key to avoid round tripping if needed.
1556
- *
1557
- * @deprecated Prefer {@link CryptoApi.createRecoveryKeyFromPassphrase | `CryptoApi.createRecoveryKeyFromPassphrase`}.
1558
- */
1559
- createRecoveryKeyFromPassphrase(password?: string): Promise<IRecoveryKey>;
1560
- /**
1561
- * Checks whether secret storage:
1562
- * - is enabled on this account
1563
- * - is storing cross-signing private keys
1564
- * - is storing session backup key (if enabled)
1565
- *
1566
- * If this function returns false, bootstrapSecretStorage() can be used
1567
- * to fix things such that it returns true. That is to say, after
1568
- * bootstrapSecretStorage() completes successfully, this function should
1569
- * return true.
1570
- *
1571
- * @returns True if secret storage is ready to be used on this device
1572
- * @deprecated Prefer {@link CryptoApi.isSecretStorageReady | `CryptoApi.isSecretStorageReady`}.
1573
- */
1574
- isSecretStorageReady(): Promise<boolean>;
1575
- /**
1576
- * Bootstrap Secure Secret Storage if needed by creating a default key. If everything is
1577
- * already set up, then no changes are made, so this is safe to run to ensure secret
1578
- * storage is ready for use.
1579
- *
1580
- * This function
1581
- * - creates a new Secure Secret Storage key if no default key exists
1582
- * - if a key backup exists, it is migrated to store the key in the Secret
1583
- * Storage
1584
- * - creates a backup if none exists, and one is requested
1585
- * - migrates Secure Secret Storage to use the latest algorithm, if an outdated
1586
- * algorithm is found
1587
- *
1588
- * @deprecated Use {@link CryptoApi.bootstrapSecretStorage | `CryptoApi.bootstrapSecretStorage`}.
1589
- */
1590
- bootstrapSecretStorage(opts: ICreateSecretStorageOpts): Promise<void>;
1591
- /**
1592
- * Add a key for encrypting secrets.
1593
- *
1594
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1595
- *
1596
- * @param algorithm - the algorithm used by the key
1597
- * @param opts - the options for the algorithm. The properties used
1598
- * depend on the algorithm given.
1599
- * @param keyName - the name of the key. If not given, a random name will be generated.
1600
- *
1601
- * @returns An object with:
1602
- * keyId: the ID of the key
1603
- * keyInfo: details about the key (iv, mac, passphrase)
1604
- *
1605
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#addKey}.
1606
- */
1607
- addSecretStorageKey(algorithm: string, opts: AddSecretStorageKeyOpts, keyName?: string): Promise<{
1608
- keyId: string;
1609
- keyInfo: SecretStorageKeyDescription;
1610
- }>;
1611
- /**
1612
- * Check whether we have a key with a given ID.
1613
- *
1614
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1615
- *
1616
- * @param keyId - The ID of the key to check
1617
- * for. Defaults to the default key ID if not provided.
1618
- * @returns Whether we have the key.
1619
- *
1620
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#hasKey}.
1621
- */
1622
- hasSecretStorageKey(keyId?: string): Promise<boolean>;
1623
- /**
1624
- * Store an encrypted secret on the server.
1625
- *
1626
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1627
- *
1628
- * @param name - The name of the secret
1629
- * @param secret - The secret contents.
1630
- * @param keys - The IDs of the keys to use to encrypt the secret or null/undefined
1631
- * to use the default (will throw if no default key is set).
1632
- *
1633
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#store}.
1634
- */
1635
- storeSecret(name: string, secret: string, keys?: string[]): Promise<void>;
1636
- /**
1637
- * Get a secret from storage.
1638
- *
1639
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1640
- *
1641
- * @param name - the name of the secret
1642
- *
1643
- * @returns the contents of the secret
1644
- *
1645
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#get}.
1646
- */
1647
- getSecret(name: string): Promise<string | undefined>;
1648
- /**
1649
- * Check if a secret is stored on the server.
1650
- *
1651
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1652
- *
1653
- * @param name - the name of the secret
1654
- * @returns map of key name to key info the secret is encrypted
1655
- * with, or null if it is not present or not encrypted with a trusted
1656
- * key
1657
- *
1658
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#isStored}.
1659
- */
1660
- isSecretStored(name: string): Promise<Record<string, SecretStorageKeyDescription> | null>;
1661
- /**
1662
- * Request a secret from another device.
1663
- *
1664
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1665
- *
1666
- * @param name - the name of the secret to request
1667
- * @param devices - the devices to request the secret from
1668
- *
1669
- * @returns the secret request object
1670
- * @deprecated Not supported for Rust Cryptography.
1671
- */
1672
- requestSecret(name: string, devices: string[]): ISecretRequest;
1673
- /**
1674
- * Get the current default key ID for encrypting secrets.
1675
- *
1676
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1677
- *
1678
- * @returns The default key ID or null if no default key ID is set
1679
- *
1680
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#getDefaultKeyId}.
1681
- */
1682
- getDefaultSecretStorageKeyId(): Promise<string | null>;
1683
- /**
1684
- * Set the current default key ID for encrypting secrets.
1685
- *
1686
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1687
- *
1688
- * @param keyId - The new default key ID
1689
- *
1690
- * @deprecated Use {@link MatrixClient#secretStorage} and {@link SecretStorage.ServerSideSecretStorage#setDefaultKeyId}.
1691
- */
1692
- setDefaultSecretStorageKeyId(keyId: string): Promise<void>;
1693
- /**
1694
- * Checks that a given secret storage private key matches a given public key.
1695
- * This can be used by the getSecretStorageKey callback to verify that the
1696
- * private key it is about to supply is the one that was requested.
1697
- *
1698
- * The Secure Secret Storage API is currently UNSTABLE and may change without notice.
1699
- *
1700
- * @param privateKey - The private key
1701
- * @param expectedPublicKey - The public key
1702
- * @returns true if the key matches, otherwise false
1703
- *
1704
- * @deprecated The use of asymmetric keys for SSSS is deprecated.
1705
- * Use {@link SecretStorage.ServerSideSecretStorage#checkKey} for symmetric keys.
1706
- */
1707
- checkSecretStoragePrivateKey(privateKey: Uint8Array, expectedPublicKey: string): boolean;
1708
- /**
1709
- * Get e2e information on the device that sent an event
1710
- *
1711
- * @param event - event to be checked
1712
- * @deprecated Not supported for Rust Cryptography.
1713
- */
1714
- getEventSenderDeviceInfo(event: MatrixEvent): Promise<DeviceInfo | null>;
1715
- /**
1716
- * Check if the sender of an event is verified
1717
- *
1718
- * @param event - event to be checked
1719
- *
1720
- * @returns true if the sender of this event has been verified using
1721
- * {@link MatrixClient#setDeviceVerified}.
1722
- *
1723
- * @deprecated Not supported for Rust Cryptography.
1724
- */
1725
- isEventSenderVerified(event: MatrixEvent): Promise<boolean>;
1726
- /**
1727
- * Get outgoing room key request for this event if there is one.
1728
- * @param event - The event to check for
1729
- *
1730
- * @returns A room key request, or null if there is none
1731
- *
1732
- * @deprecated Not supported for Rust Cryptography.
1733
- */
1734
- getOutgoingRoomKeyRequest(event: MatrixEvent): Promise<OutgoingRoomKeyRequest | null>;
1735
- /**
1736
- * Cancel a room key request for this event if one is ongoing and resend the
1737
- * request.
1738
- * @param event - event of which to cancel and resend the room
1739
- * key request.
1740
- * @returns A promise that will resolve when the key request is queued
1741
- *
1742
- * @deprecated Not supported for Rust Cryptography.
1743
- */
1744
- cancelAndResendEventRoomKeyRequest(event: MatrixEvent): Promise<void>;
1745
- /**
1746
- * Enable end-to-end encryption for a room. This does not modify room state.
1747
- * Any messages sent before the returned promise resolves will be sent unencrypted.
1748
- * @param roomId - The room ID to enable encryption in.
1749
- * @param config - The encryption config for the room.
1750
- * @returns A promise that will resolve when encryption is set up.
1751
- *
1752
- * @deprecated Not supported for Rust Cryptography. To enable encryption in a room, send an `m.room.encryption`
1753
- * state event.
1754
- */
1755
- setRoomEncryption(roomId: string, config: IRoomEncryption): Promise<void>;
1756
- /**
1757
- * Whether encryption is enabled for a room.
1758
- * @param roomId - the room id to query.
1759
- * @returns whether encryption is enabled.
1760
- *
1761
- * @deprecated Not correctly supported for Rust Cryptography. Use {@link CryptoApi.isEncryptionEnabledInRoom} and/or
1762
- * {@link Room.hasEncryptionStateEvent}.
1763
- */
1764
- isRoomEncrypted(roomId: string): boolean;
1765
- /**
1766
- * Encrypts and sends a given object via Olm to-device messages to a given
1767
- * set of devices.
1768
- *
1769
- * @param userDeviceInfoArr - list of deviceInfo objects representing the devices to send to
1770
- *
1771
- * @param payload - fields to include in the encrypted payload
1772
- *
1773
- * @returns Promise which
1774
- * resolves once the message has been encrypted and sent to the given
1775
- * userDeviceMap, and returns the `{ contentMap, deviceInfoByDeviceId }`
1776
- * of the successfully sent messages.
1777
- *
1778
- * @deprecated Instead use {@link CryptoApi.encryptToDeviceMessages} followed by {@link queueToDevice}.
1779
- */
1780
- encryptAndSendToDevices(userDeviceInfoArr: IOlmDevice<DeviceInfo>[], payload: object): Promise<void>;
1781
- /**
1782
- * Forces the current outbound group session to be discarded such
1783
- * that another one will be created next time an event is sent.
1784
- *
1785
- * @param roomId - The ID of the room to discard the session for
1786
- *
1787
- * @deprecated Prefer {@link CryptoApi.forceDiscardSession | `CryptoApi.forceDiscardSession`}:
1788
- */
1789
- forceDiscardSession(roomId: string): void;
1790
- /**
1791
- * Get a list containing all of the room keys
1792
- *
1793
- * This should be encrypted before returning it to the user.
1794
- *
1795
- * @returns a promise which resolves to a list of session export objects
1796
- *
1797
- * @deprecated Prefer {@link CryptoApi.exportRoomKeys | `CryptoApi.exportRoomKeys`}:
1798
- *
1799
- * ```javascript
1800
- * sessionData = await client.getCrypto().exportRoomKeys();
1801
- * ```
1802
- */
1803
- exportRoomKeys(): Promise<IMegolmSessionData[]>;
1804
- /**
1805
- * Import a list of room keys previously exported by exportRoomKeys
1806
- *
1807
- * @param keys - a list of session export objects
1808
- * @param opts - options object
1809
- *
1810
- * @returns a promise which resolves when the keys have been imported
1811
- *
1812
- * @deprecated Prefer {@link CryptoApi.importRoomKeys | `CryptoApi.importRoomKeys`}:
1813
- * ```javascript
1814
- * await client.getCrypto()?.importRoomKeys([..]);
1815
- * ```
1816
- */
1817
- importRoomKeys(keys: IMegolmSessionData[], opts?: ImportRoomKeysOpts): Promise<void>;
1818
- /**
1819
- * Force a re-check of the local key backup status against
1820
- * what's on the server.
1821
- *
1822
- * @returns Object with backup info (as returned by
1823
- * getKeyBackupVersion) in backupInfo and
1824
- * trust information (as returned by isKeyBackupTrusted)
1825
- * in trustInfo.
1826
- *
1827
- * @deprecated Prefer {@link Crypto.CryptoApi.checkKeyBackupAndEnable}.
1828
- */
1829
- checkKeyBackup(): Promise<IKeyBackupCheck | null>;
1830
- /**
1831
- * Get information about the current key backup from the server.
1832
- *
1833
- * Performs some basic validity checks on the shape of the result, and raises an error if it is not as expected.
1834
- *
1835
- * **Note**: there is no (supported) way to distinguish between "failure to talk to the server" and "another client
1836
- * uploaded a key backup version using an algorithm I don't understand.
1837
- *
1838
- * @returns Information object from API, or null if no backup is present on the server.
1839
- *
1840
- * @deprecated Prefer {@link CryptoApi.getKeyBackupInfo}.
1841
- */
1842
- getKeyBackupVersion(): Promise<IKeyBackupInfo | null>;
1843
- /**
1844
- * @param info - key backup info dict from getKeyBackupVersion()
1845
- *
1846
- * @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.isKeyBackupTrusted | `CryptoApi.isKeyBackupTrusted`}.
1847
- */
1848
- isKeyBackupTrusted(info: IKeyBackupInfo): Promise<TrustInfo>;
1849
- /**
1850
- * @returns true if the client is configured to back up keys to
1851
- * the server, otherwise false. If we haven't completed a successful check
1852
- * of key backup status yet, returns null.
1853
- *
1854
- * @deprecated Not supported for Rust Cryptography. Prefer direct access to {@link Crypto.CryptoApi.getActiveSessionBackupVersion}:
1855
- *
1856
- * ```javascript
1857
- * let enabled = (await client.getCrypto().getActiveSessionBackupVersion()) !== null;
1858
- * ```
1859
- */
1860
- getKeyBackupEnabled(): boolean | null;
1861
- /**
1862
- * Enable backing up of keys, using data previously returned from
1863
- * getKeyBackupVersion.
1864
- *
1865
- * @param info - Backup information object as returned by getKeyBackupVersion
1866
- * @returns Promise which resolves when complete.
1867
- *
1868
- * @deprecated Do not call this directly. Instead call {@link Crypto.CryptoApi.checkKeyBackupAndEnable}.
1869
- */
1870
- enableKeyBackup(info: IKeyBackupInfo): Promise<void>;
1871
- /**
1872
- * Disable backing up of keys.
1873
- *
1874
- * @deprecated Not supported for Rust Cryptography. It should be unnecessary to disable key backup.
1875
- */
1876
- disableKeyBackup(): void;
1877
- /**
1878
- * Set up the data required to create a new backup version. The backup version
1879
- * will not be created and enabled until createKeyBackupVersion is called.
1880
- *
1881
- * @param password - Passphrase string that can be entered by the user
1882
- * when restoring the backup as an alternative to entering the recovery key.
1883
- * Optional.
1884
- *
1885
- * @returns Object that can be passed to createKeyBackupVersion and
1886
- * additionally has a 'recovery_key' member with the user-facing recovery key string.
1887
- *
1888
- * @deprecated Not supported for Rust cryptography. Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
1889
- */
1890
- prepareKeyBackupVersion(password?: string | Uint8Array | null, opts?: IKeyBackupPrepareOpts): Promise<Pick<IPreparedKeyBackupVersion, "algorithm" | "auth_data" | "recovery_key">>;
1891
- /**
1892
- * Check whether the key backup private key is stored in secret storage.
1893
- * @returns map of key name to key info the secret is
1894
- * encrypted with, or null if it is not present or not encrypted with a
1895
- * trusted key
1896
- */
1897
- isKeyBackupKeyStored(): Promise<Record<string, SecretStorageKeyDescription> | null>;
1898
- /**
1899
- * Create a new key backup version and enable it, using the information return
1900
- * from prepareKeyBackupVersion.
1901
- *
1902
- * @param info - Info object from prepareKeyBackupVersion
1903
- * @returns Object with 'version' param indicating the version created
1904
- *
1905
- * @deprecated Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
1906
- */
1907
- createKeyBackupVersion(info: IKeyBackupInfo): Promise<IKeyBackupInfo>;
1908
- /**
1909
- * @deprecated Use {@link Crypto.CryptoApi.deleteKeyBackupVersion | `CryptoApi.deleteKeyBackupVersion`}.
1910
- */
1911
- deleteKeyBackupVersion(version: string): Promise<void>;
1912
- private makeKeyBackupPath;
1913
- /**
1914
- * Back up session keys to the homeserver.
1915
- * @param roomId - ID of the room that the keys are for Optional.
1916
- * @param sessionId - ID of the session that the keys are for Optional.
1917
- * @param version - backup version Optional.
1918
- * @param data - Object keys to send
1919
- * @returns a promise that will resolve when the keys
1920
- * are uploaded
1921
- *
1922
- * @deprecated Not supported for Rust Cryptography.
1923
- */
1924
- sendKeyBackup(roomId: undefined, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
1925
- sendKeyBackup(roomId: string, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
1926
- sendKeyBackup(roomId: string, sessionId: string, version: string | undefined, data: IKeyBackup): Promise<void>;
1927
- /**
1928
- * Marks all group sessions as needing to be backed up and schedules them to
1929
- * upload in the background as soon as possible.
1930
- *
1931
- * @deprecated Not supported for Rust Cryptography. This is done automatically as part of
1932
- * {@link CryptoApi.resetKeyBackup}, so there is probably no need to call this manually.
1933
- */
1934
- scheduleAllGroupSessionsForBackup(): Promise<void>;
1935
- /**
1936
- * Marks all group sessions as needing to be backed up without scheduling
1937
- * them to upload in the background.
1938
- *
1939
- * (This is done automatically as part of {@link CryptoApi.resetKeyBackup},
1940
- * so there is probably no need to call this manually.)
1941
- *
1942
- * @returns Promise which resolves to the number of sessions requiring a backup.
1943
- * @deprecated Not supported for Rust Cryptography.
1944
- */
1945
- flagAllGroupSessionsForBackup(): Promise<number>;
1946
- /**
1947
- * Return true if recovery key is valid.
1948
- * Try to decode the recovery key and check if it's successful.
1949
- * @param recoveryKey
1950
- * @deprecated Use {@link decodeRecoveryKey} directly
1951
- */
1952
- isValidRecoveryKey(recoveryKey: string): boolean;
1953
- /**
1954
- * Get the raw key for a key backup from the password
1955
- * Used when migrating key backups into SSSS
1956
- *
1957
- * The cross-signing API is currently UNSTABLE and may change without notice.
1958
- *
1959
- * @param password - Passphrase
1960
- * @param backupInfo - Backup metadata from `checkKeyBackup`
1961
- * @returns key backup key
1962
- * @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.
1963
- */
1964
- keyBackupKeyFromPassword(password: string, backupInfo: IKeyBackupInfo): Promise<Uint8Array>;
1965
- /**
1966
- * Get the raw key for a key backup from the recovery key
1967
- * Used when migrating key backups into SSSS
1968
- *
1969
- * The cross-signing API is currently UNSTABLE and may change without notice.
1970
- *
1971
- * @param recoveryKey - The recovery key
1972
- * @returns key backup key
1973
- * @deprecated Use {@link decodeRecoveryKey} directly
1974
- */
1975
- keyBackupKeyFromRecoveryKey(recoveryKey: string): Uint8Array;
1976
- /**
1977
- * Restore from an existing key backup via a passphrase.
1978
- *
1979
- * @param password - Passphrase
1980
- * @param targetRoomId - Room ID to target a specific room.
1981
- * Restores all rooms if omitted.
1982
- * @param targetSessionId - Session ID to target a specific session.
1983
- * Restores all sessions if omitted.
1984
- * @param backupInfo - Backup metadata from `getKeyBackupVersion` or `checkKeyBackup`.`backupInfo`
1985
- * @param opts - Optional params such as callbacks
1986
- * @returns Status of restoration with `total` and `imported`
1987
- * key counts.
1988
- *
1989
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
1990
- */
1991
- restoreKeyBackupWithPassword(password: string, targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
1992
- /**
1993
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
1994
- */
1995
- restoreKeyBackupWithPassword(password: string, targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
1996
- /**
1997
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackupWithPassphrase | `CryptoApi.restoreKeyBackupWithPassphrase`}.
1998
- */
1999
- restoreKeyBackupWithPassword(password: string, targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2000
- /**
2001
- * Restore from an existing key backup via a private key stored in secret
2002
- * storage.
2003
- *
2004
- * @param backupInfo - Backup metadata from `checkKeyBackup`
2005
- * @param targetRoomId - Room ID to target a specific room.
2006
- * Restores all rooms if omitted.
2007
- * @param targetSessionId - Session ID to target a specific session.
2008
- * Restores all sessions if omitted.
2009
- * @param opts - Optional params such as callbacks
2010
- * @returns Status of restoration with `total` and `imported`
2011
- * key counts.
2012
- *
2013
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2014
- */
2015
- restoreKeyBackupWithSecretStorage(backupInfo: IKeyBackupInfo, targetRoomId?: string, targetSessionId?: string, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2016
- /**
2017
- * Restore from an existing key backup via an encoded recovery key.
2018
- *
2019
- * @param recoveryKey - Encoded recovery key
2020
- * @param targetRoomId - Room ID to target a specific room.
2021
- * Restores all rooms if omitted.
2022
- * @param targetSessionId - Session ID to target a specific session.
2023
- * Restores all sessions if omitted.
2024
- * @param backupInfo - Backup metadata from `checkKeyBackup`
2025
- * @param opts - Optional params such as callbacks
2026
-
2027
- * @returns Status of restoration with `total` and `imported`
2028
- * key counts.
2029
- *
2030
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2031
- */
2032
- restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2033
- /**
2034
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2035
- */
2036
- restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2037
- /**
2038
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2039
- */
2040
- restoreKeyBackupWithRecoveryKey(recoveryKey: string, targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2041
- /**
2042
- * Restore from an existing key backup via a private key stored locally
2043
- * @param targetRoomId
2044
- * @param targetSessionId
2045
- * @param backupInfo
2046
- * @param opts
2047
- *
2048
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2049
- */
2050
- restoreKeyBackupWithCache(targetRoomId: undefined, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2051
- /**
2052
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2053
- */
2054
- restoreKeyBackupWithCache(targetRoomId: string, targetSessionId: undefined, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2055
- /**
2056
- * @deprecated Prefer {@link CryptoApi.restoreKeyBackup | `CryptoApi.restoreKeyBackup`}.
2057
- */
2058
- restoreKeyBackupWithCache(targetRoomId: string, targetSessionId: string, backupInfo: IKeyBackupInfo, opts?: IKeyBackupRestoreOpts): Promise<IKeyBackupRestoreResult>;
2059
- private restoreKeyBackup;
2060
- /**
2061
- * This method calculates the total number of keys present in the response of a `/room_keys/keys` call.
2062
- *
2063
- * @param res - The response from the server containing the keys to be counted.
2064
- *
2065
- * @returns The total number of keys in the backup.
2066
- */
2067
- private getTotalKeyCount;
2068
- /**
2069
- * This method handles the decryption of a full backup, i.e a call to `/room_keys/keys`.
2070
- * It will decrypt the keys in chunks and call the `block` callback for each chunk.
2071
- *
2072
- * @param res - The response from the server containing the keys to be decrypted.
2073
- * @param backupDecryptor - An instance of the BackupDecryptor class used to decrypt the keys.
2074
- * @param chunkSize - The size of the chunks to be processed at a time.
2075
- * @param block - A callback function that is called for each chunk of keys.
2076
- *
2077
- * @returns A promise that resolves when the decryption is complete.
2078
- */
2079
- private handleDecryptionOfAFullBackup;
2080
- deleteKeysFromBackup(roomId: undefined, sessionId: undefined, version?: string): Promise<void>;
2081
- deleteKeysFromBackup(roomId: string, sessionId: undefined, version?: string): Promise<void>;
2082
- deleteKeysFromBackup(roomId: string, sessionId: string, version?: string): Promise<void>;
2083
983
  /**
2084
984
  * Get the config for the media repository.
2085
985
  * @returns Promise which resolves with an object containing the config.
@@ -2287,13 +1187,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
2287
1187
  * @returns returns a promise which resolves with the result of the delayed send request
2288
1188
  */
2289
1189
  protected encryptAndSendEvent(room: Room | null, event: MatrixEvent, delayOpts: SendDelayedEventRequestOpts): Promise<SendDelayedEventResponse>;
2290
- private encryptEventIfNeeded;
2291
- /**
2292
- * Determine whether a given event should be encrypted when we send it to the given room.
2293
- *
2294
- * This takes into account event type and room configuration.
2295
- */
2296
- private shouldEncryptEventForRoom;
2297
1190
  /**
2298
1191
  * Returns the eventType that should be used taking encryption into account
2299
1192
  * for a given eventType.
@@ -2925,24 +1818,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
2925
1818
  * we have on record matches.
2926
1819
  */
2927
1820
  private fixupRoomNotifications;
2928
- /**
2929
- * @returns Promise which resolves: ITurnServerResponse object
2930
- * @returns Rejects: with an error response.
2931
- */
2932
- turnServer(): Promise<ITurnServerResponse>;
2933
- /**
2934
- * Get the TURN servers for this homeserver.
2935
- * @returns The servers or an empty list.
2936
- */
2937
- getTurnServers(): ITurnServer[];
2938
- /**
2939
- * Get the unix timestamp (in milliseconds) at which the current
2940
- * TURN credentials (from getTurnServers) expire
2941
- * @returns The expiry timestamp in milliseconds
2942
- */
2943
- getTurnServersExpiry(): number;
2944
- get pollingTurnServers(): boolean;
2945
- checkTurnServers(): Promise<boolean | undefined>;
2946
1821
  /**
2947
1822
  * Set whether to allow a fallback ICE server should be used for negotiating a
2948
1823
  * WebRTC connection if the homeserver doesn't provide any servers. Defaults to
@@ -3071,13 +1946,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
3071
1946
  nextBatch?: string | null;
3072
1947
  prevBatch?: string | null;
3073
1948
  }>;
3074
- /**
3075
- * The app may wish to see if we have a key cached without
3076
- * triggering a user interaction.
3077
- *
3078
- * @deprecated Not supported for Rust Cryptography.
3079
- */
3080
- getCrossSigningCacheCallbacks(): ICacheCallbacks | undefined;
3081
1949
  /**
3082
1950
  * Generates a random string suitable for use as a client secret. <strong>This
3083
1951
  * method is experimental and may change.</strong>
@@ -3745,47 +2613,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
3745
2613
  body: ISearchRequestBody;
3746
2614
  next_batch?: string;
3747
2615
  }, abortSignal?: AbortSignal): Promise<ISearchResponse>;
3748
- /**
3749
- * Upload keys
3750
- *
3751
- * @param content - body of upload request
3752
- *
3753
- * @param opts - this method no longer takes any opts,
3754
- * used to take opts.device_id but this was not removed from the spec as a redundant parameter
3755
- *
3756
- * @returns Promise which resolves: result object. Rejects: with
3757
- * an error response ({@link MatrixError}).
3758
- */
3759
- uploadKeysRequest(content: IUploadKeysRequest, opts?: void): Promise<IKeysUploadResponse>;
3760
- uploadKeySignatures(content: KeySignatures): Promise<IUploadKeySignaturesResponse>;
3761
- /**
3762
- * Download device keys
3763
- *
3764
- * @param userIds - list of users to get keys for
3765
- *
3766
- * @param token - sync token to pass in the query request, to help
3767
- * the HS give the most recent results
3768
- *
3769
- * @returns Promise which resolves: result object. Rejects: with
3770
- * an error response ({@link MatrixError}).
3771
- */
3772
- downloadKeysForUsers(userIds: string[], { token }?: {
3773
- token?: string;
3774
- }): Promise<IDownloadKeyResult>;
3775
- /**
3776
- * Claim one-time keys
3777
- *
3778
- * @param devices - a list of [userId, deviceId] pairs
3779
- *
3780
- * @param keyAlgorithm - desired key type
3781
- *
3782
- * @param timeout - the time (in milliseconds) to wait for keys from remote
3783
- * servers
3784
- *
3785
- * @returns Promise which resolves: result object. Rejects: with
3786
- * an error response ({@link MatrixError}).
3787
- */
3788
- claimOneTimeKeys(devices: [string, string][], keyAlgorithm?: string, timeout?: number): Promise<IClaimOTKsResult>;
3789
2616
  /**
3790
2617
  * Ask the server for a list of users who have changed their device lists
3791
2618
  * between a pair of sync tokens
@@ -3798,7 +2625,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
3798
2625
  changed: string[];
3799
2626
  left: string[];
3800
2627
  }>;
3801
- uploadDeviceSigningKeys(auth?: AuthDict, keys?: CrossSigningKeys): Promise<{}>;
3802
2628
  /**
3803
2629
  * Register with an identity server using the OpenID token from the user's
3804
2630
  * Homeserver, which can be retrieved via