matrix-js-sdk 34.5.0 → 34.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/git-revision.txt +1 -1
- package/lib/client.d.ts +141 -20
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +287 -67
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/key-passphrase.d.ts +14 -0
- package/lib/common-crypto/key-passphrase.d.ts.map +1 -0
- package/lib/common-crypto/key-passphrase.js +33 -0
- package/lib/common-crypto/key-passphrase.js.map +1 -0
- package/lib/crypto/DeviceList.js +1 -1
- package/lib/crypto/aes.d.ts +15 -8
- package/lib/crypto/aes.d.ts.map +1 -1
- package/lib/crypto/aes.js +15 -8
- package/lib/crypto/aes.js.map +1 -1
- package/lib/crypto/algorithms/megolm.js +3 -3
- package/lib/crypto/backup.d.ts.map +1 -1
- package/lib/crypto/backup.js +1 -1
- package/lib/crypto/backup.js.map +1 -1
- package/lib/crypto/index.d.ts +5 -1
- package/lib/crypto/index.d.ts.map +1 -1
- package/lib/crypto/index.js +9 -3
- package/lib/crypto/index.js.map +1 -1
- package/lib/crypto/key_passphrase.d.ts +8 -9
- package/lib/crypto/key_passphrase.d.ts.map +1 -1
- package/lib/crypto/key_passphrase.js +11 -36
- package/lib/crypto/key_passphrase.js.map +1 -1
- package/lib/crypto/recoverykey.d.ts +1 -2
- package/lib/crypto/recoverykey.d.ts.map +1 -1
- package/lib/crypto/recoverykey.js +2 -38
- package/lib/crypto/recoverykey.js.map +1 -1
- package/lib/crypto-api/index.d.ts +52 -0
- package/lib/crypto-api/index.d.ts.map +1 -1
- package/lib/crypto-api/index.js +16 -0
- package/lib/crypto-api/index.js.map +1 -1
- package/lib/crypto-api/key-passphrase.d.ts +11 -0
- package/lib/crypto-api/key-passphrase.d.ts.map +1 -0
- package/lib/crypto-api/key-passphrase.js +51 -0
- package/lib/crypto-api/key-passphrase.js.map +1 -0
- package/lib/crypto-api/recovery-key.d.ts +11 -0
- package/lib/crypto-api/recovery-key.d.ts.map +1 -0
- package/lib/crypto-api/recovery-key.js +65 -0
- package/lib/crypto-api/recovery-key.js.map +1 -0
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +11 -3
- package/lib/embedded.js.map +1 -1
- package/lib/feature.d.ts +1 -2
- package/lib/feature.d.ts.map +1 -1
- package/lib/feature.js +0 -4
- package/lib/feature.js.map +1 -1
- package/lib/matrix.d.ts +1 -0
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +1 -0
- package/lib/matrix.js.map +1 -1
- package/lib/matrixrtc/CallMembership.d.ts +1 -0
- package/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/lib/matrixrtc/CallMembership.js +3 -0
- package/lib/matrixrtc/CallMembership.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts +24 -0
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.js +93 -47
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/lib/matrixrtc/types.d.ts +1 -0
- package/lib/matrixrtc/types.d.ts.map +1 -1
- package/lib/matrixrtc/types.js.map +1 -1
- package/lib/models/MSC3089TreeSpace.js +1 -1
- package/lib/models/MSC3089TreeSpace.js.map +1 -1
- package/lib/models/profile-keys.d.ts +8 -0
- package/lib/models/profile-keys.d.ts.map +1 -0
- package/lib/models/profile-keys.js +8 -0
- package/lib/models/profile-keys.js.map +1 -0
- package/lib/models/room.js +1 -1
- package/lib/models/thread.js +1 -1
- package/lib/rust-crypto/CrossSigningIdentity.js +2 -2
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +1 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +2 -2
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
- package/lib/rust-crypto/RoomEncryptor.js +3 -3
- package/lib/rust-crypto/RoomEncryptor.js.map +1 -1
- package/lib/rust-crypto/rust-crypto.d.ts +10 -1
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/lib/rust-crypto/rust-crypto.js +169 -125
- package/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/lib/rust-crypto/verification.js +3 -3
- package/lib/rust-crypto/verification.js.map +1 -1
- package/lib/serverCapabilities.d.ts +3 -0
- package/lib/serverCapabilities.d.ts.map +1 -1
- package/lib/serverCapabilities.js.map +1 -1
- package/lib/sliding-sync.js +2 -2
- package/lib/store/indexeddb-local-backend.js +1 -1
- package/lib/store/indexeddb-local-backend.js.map +1 -1
- package/lib/sync.js +2 -2
- package/lib/webrtc/groupCall.js +1 -1
- package/lib/webrtc/groupCall.js.map +1 -1
- package/package.json +4 -3
- package/src/client.ts +258 -36
- package/src/common-crypto/key-passphrase.ts +43 -0
- package/src/crypto/aes.ts +15 -8
- package/src/crypto/backup.ts +1 -1
- package/src/crypto/index.ts +10 -1
- package/src/crypto/key_passphrase.ts +10 -56
- package/src/crypto/recoverykey.ts +2 -45
- package/src/crypto-api/index.ts +59 -0
- package/src/crypto-api/key-passphrase.ts +58 -0
- package/src/crypto-api/recovery-key.ts +69 -0
- package/src/embedded.ts +8 -2
- package/src/feature.ts +0 -4
- package/src/matrix.ts +1 -0
- package/src/matrixrtc/CallMembership.ts +4 -0
- package/src/matrixrtc/MatrixRTCSession.ts +66 -16
- package/src/matrixrtc/types.ts +1 -0
- package/src/models/profile-keys.ts +7 -0
- package/src/rust-crypto/CrossSigningIdentity.ts +3 -3
- package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +2 -3
- package/src/rust-crypto/RoomEncryptor.ts +2 -2
- package/src/rust-crypto/rust-crypto.ts +80 -16
- package/src/serverCapabilities.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
Changes in [34.6.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v34.6.0) (2024-09-24)
|
|
2
|
+
==================================================================================================
|
|
3
|
+
## 🦖 Deprecations
|
|
4
|
+
|
|
5
|
+
* Element-R: Mark unsupported MatrixClient methods as deprecated ([#4389](https://github.com/matrix-org/matrix-js-sdk/pull/4389)). Contributed by @richvdh.
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
* Add crypto mode setting for invisible crypto, and apply it to decrypting events ([#4407](https://github.com/matrix-org/matrix-js-sdk/pull/4407)). Contributed by @uhoreg.
|
|
10
|
+
* Don't share full key history for RTC per-participant encryption ([#4406](https://github.com/matrix-org/matrix-js-sdk/pull/4406)). Contributed by @hughns.
|
|
11
|
+
* Export membership types ([#4405](https://github.com/matrix-org/matrix-js-sdk/pull/4405)). Contributed by @Johennes.
|
|
12
|
+
* Fix sending redacts in embedded (widget) mode ([#4398](https://github.com/matrix-org/matrix-js-sdk/pull/4398)). Contributed by @toger5.
|
|
13
|
+
* Expose the event ID of a call membership ([#4395](https://github.com/matrix-org/matrix-js-sdk/pull/4395)). Contributed by @robintown.
|
|
14
|
+
* MSC4133 - Extended profiles ([#4391](https://github.com/matrix-org/matrix-js-sdk/pull/4391)). Contributed by @Half-Shot.
|
|
15
|
+
|
|
16
|
+
|
|
1
17
|
Changes in [34.5.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v34.5.0) (2024-09-10)
|
|
2
18
|
==================================================================================================
|
|
3
19
|
## 🦖 Deprecations
|
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
82e9eefce60349fe7de792ce2fbb7c4e55a283cb
|
package/lib/client.d.ts
CHANGED
|
@@ -321,6 +321,7 @@ export declare const UNSTABLE_MSC2666_SHARED_ROOMS = "uk.half-shot.msc2666";
|
|
|
321
321
|
export declare const UNSTABLE_MSC2666_MUTUAL_ROOMS = "uk.half-shot.msc2666.mutual_rooms";
|
|
322
322
|
export declare const UNSTABLE_MSC2666_QUERY_MUTUAL_ROOMS = "uk.half-shot.msc2666.query_mutual_rooms";
|
|
323
323
|
export declare const UNSTABLE_MSC4140_DELAYED_EVENTS = "org.matrix.msc4140";
|
|
324
|
+
export declare const UNSTABLE_MSC4133_EXTENDED_PROFILES = "uk.tcpip.msc4133";
|
|
324
325
|
declare enum CrossSigningKeyType {
|
|
325
326
|
MasterKey = "master_key",
|
|
326
327
|
SelfSigningKey = "self_signing_key",
|
|
@@ -945,6 +946,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
945
946
|
* @returns Promise which resolves to undefined if a device could not be dehydrated, or
|
|
946
947
|
* to the new device ID if the dehydration was successful.
|
|
947
948
|
* @returns Rejects: with an error response.
|
|
949
|
+
*
|
|
950
|
+
* @deprecated MSC2697 device dehydration is not supported for rust cryptography.
|
|
948
951
|
*/
|
|
949
952
|
rehydrateDevice(): Promise<string | undefined>;
|
|
950
953
|
/**
|
|
@@ -962,18 +965,23 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
962
965
|
* @param deviceDisplayName - The device display name for the
|
|
963
966
|
* dehydrated device.
|
|
964
967
|
* @returns A promise that resolves when the dehydrated device is stored.
|
|
968
|
+
*
|
|
969
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
965
970
|
*/
|
|
966
971
|
setDehydrationKey(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<void>;
|
|
967
972
|
/**
|
|
968
|
-
* Creates a new dehydrated device (without queuing periodic dehydration)
|
|
973
|
+
* Creates a new MSC2967 dehydrated device (without queuing periodic dehydration)
|
|
969
974
|
* @param key - the dehydration key
|
|
970
975
|
* @param keyInfo - Information about the key. Primarily for
|
|
971
976
|
* information about how to generate the key from a passphrase.
|
|
972
977
|
* @param deviceDisplayName - The device display name for the
|
|
973
978
|
* dehydrated device.
|
|
974
979
|
* @returns the device id of the newly created dehydrated device
|
|
980
|
+
*
|
|
981
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.startDehydration}.
|
|
975
982
|
*/
|
|
976
983
|
createDehydratedDevice(key: Uint8Array, keyInfo: IDehydratedDeviceKeyInfo, deviceDisplayName?: string): Promise<string | undefined>;
|
|
984
|
+
/** @deprecated Not supported for Rust Cryptography. */
|
|
977
985
|
exportDevice(): Promise<IExportedDevice | undefined>;
|
|
978
986
|
/**
|
|
979
987
|
* Clear any data out of the persistent stores used by the client.
|
|
@@ -1161,6 +1169,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1161
1169
|
*
|
|
1162
1170
|
* It will return a Promise which will resolve when the crypto layer has been
|
|
1163
1171
|
* successfully initialised.
|
|
1172
|
+
*
|
|
1173
|
+
* @deprecated libolm is deprecated. Prefer {@link initRustCrypto}.
|
|
1164
1174
|
*/
|
|
1165
1175
|
initCrypto(): Promise<void>;
|
|
1166
1176
|
/**
|
|
@@ -1207,7 +1217,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1207
1217
|
* @returns base64-encoded ed25519 key. Null if crypto is
|
|
1208
1218
|
* disabled.
|
|
1209
1219
|
*
|
|
1210
|
-
* @deprecated Prefer {@link CryptoApi.getOwnDeviceKeys}
|
|
1220
|
+
* @deprecated Not supported for Rust Cryptography.Prefer {@link CryptoApi.getOwnDeviceKeys}
|
|
1211
1221
|
*/
|
|
1212
1222
|
getDeviceEd25519Key(): string | null;
|
|
1213
1223
|
/**
|
|
@@ -1216,7 +1226,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1216
1226
|
* @returns base64-encoded curve25519 key. Null if crypto is
|
|
1217
1227
|
* disabled.
|
|
1218
1228
|
*
|
|
1219
|
-
* @deprecated Use {@link CryptoApi.getOwnDeviceKeys}
|
|
1229
|
+
* @deprecated Not supported for Rust Cryptography. Use {@link CryptoApi.getOwnDeviceKeys}
|
|
1220
1230
|
*/
|
|
1221
1231
|
getDeviceCurve25519Key(): string | null;
|
|
1222
1232
|
/**
|
|
@@ -1231,7 +1241,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1231
1241
|
*
|
|
1232
1242
|
* @returns A promise which resolves to a map userId-\>deviceId-\>`DeviceInfo`
|
|
1233
1243
|
*
|
|
1234
|
-
* @deprecated Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1244
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1235
1245
|
*/
|
|
1236
1246
|
downloadKeys(userIds: string[], forceDownload?: boolean): Promise<DeviceInfoMap>;
|
|
1237
1247
|
/**
|
|
@@ -1240,7 +1250,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1240
1250
|
* @param userId - the user to list keys for.
|
|
1241
1251
|
*
|
|
1242
1252
|
* @returns list of devices
|
|
1243
|
-
* @deprecated Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1253
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1244
1254
|
*/
|
|
1245
1255
|
getStoredDevicesForUser(userId: string): DeviceInfo[];
|
|
1246
1256
|
/**
|
|
@@ -1250,7 +1260,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1250
1260
|
* @param deviceId - unique identifier for the device
|
|
1251
1261
|
*
|
|
1252
1262
|
* @returns device or null
|
|
1253
|
-
* @deprecated Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1263
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getUserDeviceInfo}
|
|
1254
1264
|
*/
|
|
1255
1265
|
getStoredDevice(userId: string, deviceId: string): DeviceInfo | null;
|
|
1256
1266
|
/**
|
|
@@ -1283,6 +1293,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1283
1293
|
*
|
|
1284
1294
|
* @remarks
|
|
1285
1295
|
* Fires {@link CryptoEvent.DeviceVerificationChanged}
|
|
1296
|
+
*
|
|
1297
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1286
1298
|
*/
|
|
1287
1299
|
setDeviceBlocked(userId: string, deviceId: string, blocked?: boolean): Promise<void>;
|
|
1288
1300
|
/**
|
|
@@ -1299,6 +1311,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1299
1311
|
*
|
|
1300
1312
|
* @remarks
|
|
1301
1313
|
* Fires {@link CryptoEvent#DeviceVerificationChanged}
|
|
1314
|
+
*
|
|
1315
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1302
1316
|
*/
|
|
1303
1317
|
setDeviceKnown(userId: string, deviceId: string, known?: boolean): Promise<void>;
|
|
1304
1318
|
private setDeviceVerification;
|
|
@@ -1311,7 +1325,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1311
1325
|
* @returns resolves to a VerificationRequest
|
|
1312
1326
|
* when the request has been sent to the other party.
|
|
1313
1327
|
*
|
|
1314
|
-
* @deprecated Prefer {@link CryptoApi.requestVerificationDM}.
|
|
1328
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.requestVerificationDM}.
|
|
1315
1329
|
*/
|
|
1316
1330
|
requestVerificationDM(userId: string, roomId: string): Promise<VerificationRequest>;
|
|
1317
1331
|
/**
|
|
@@ -1320,7 +1334,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1320
1334
|
* @param roomId - the room to use for verification
|
|
1321
1335
|
*
|
|
1322
1336
|
* @returns the VerificationRequest that is in progress, if any
|
|
1323
|
-
* @deprecated Prefer {@link CryptoApi.findVerificationRequestDMInProgress}.
|
|
1337
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.findVerificationRequestDMInProgress}.
|
|
1324
1338
|
*/
|
|
1325
1339
|
findVerificationRequestDMInProgress(roomId: string): VerificationRequest | undefined;
|
|
1326
1340
|
/**
|
|
@@ -1329,7 +1343,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1329
1343
|
* @param userId - the ID of the user to query
|
|
1330
1344
|
*
|
|
1331
1345
|
* @returns the VerificationRequests that are in progress
|
|
1332
|
-
* @deprecated Prefer {@link CryptoApi.getVerificationRequestsToDeviceInProgress}.
|
|
1346
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.getVerificationRequestsToDeviceInProgress}.
|
|
1333
1347
|
*/
|
|
1334
1348
|
getVerificationRequestsToDeviceInProgress(userId: string): VerificationRequest[];
|
|
1335
1349
|
/**
|
|
@@ -1342,7 +1356,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1342
1356
|
* @returns resolves to a VerificationRequest
|
|
1343
1357
|
* when the request has been sent to the other party.
|
|
1344
1358
|
*
|
|
1345
|
-
* @deprecated Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
|
|
1359
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
|
|
1346
1360
|
*/
|
|
1347
1361
|
requestVerification(userId: string, devices?: string[]): Promise<VerificationRequest>;
|
|
1348
1362
|
/**
|
|
@@ -1353,7 +1367,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1353
1367
|
* @param deviceId - the device to verify
|
|
1354
1368
|
*
|
|
1355
1369
|
* @returns a verification object
|
|
1356
|
-
* @deprecated
|
|
1370
|
+
* @deprecated Prefer {@link CryptoApi#requestOwnUserVerification} or {@link CryptoApi#requestDeviceVerification}.
|
|
1357
1371
|
*/
|
|
1358
1372
|
beginKeyVerification(method: string, userId: string, deviceId: string): Verification<any, any>;
|
|
1359
1373
|
/**
|
|
@@ -1414,7 +1428,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1414
1428
|
* "master", "self_signing", or "user_signing". Defaults to "master".
|
|
1415
1429
|
*
|
|
1416
1430
|
* @returns the key ID
|
|
1417
|
-
* @deprecated prefer {@link Crypto.CryptoApi#getCrossSigningKeyId}
|
|
1431
|
+
* @deprecated Not supported for Rust Cryptography. prefer {@link Crypto.CryptoApi#getCrossSigningKeyId}
|
|
1418
1432
|
*/
|
|
1419
1433
|
getCrossSigningId(type?: CrossSigningKey | string): string | null;
|
|
1420
1434
|
/**
|
|
@@ -1425,7 +1439,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1425
1439
|
* @param userId - the user ID to get the cross-signing info for.
|
|
1426
1440
|
*
|
|
1427
1441
|
* @returns the cross signing information for the user.
|
|
1428
|
-
* @deprecated Prefer {@link CryptoApi#userHasCrossSigningKeys}
|
|
1442
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#userHasCrossSigningKeys}
|
|
1429
1443
|
*/
|
|
1430
1444
|
getStoredCrossSigningForUser(userId: string): CrossSigningInfo | null;
|
|
1431
1445
|
/**
|
|
@@ -1456,6 +1470,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1456
1470
|
* @param deviceId - The ID of the device to check
|
|
1457
1471
|
*
|
|
1458
1472
|
* @returns true if the device is cross-signed
|
|
1473
|
+
*
|
|
1474
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1459
1475
|
*/
|
|
1460
1476
|
checkIfOwnDeviceCrossSigned(deviceId: string): boolean;
|
|
1461
1477
|
/**
|
|
@@ -1473,8 +1489,13 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1473
1489
|
* @param privateKey - The private key
|
|
1474
1490
|
* @param expectedPublicKey - The public key
|
|
1475
1491
|
* @returns true if the key matches, otherwise false
|
|
1492
|
+
*
|
|
1493
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1476
1494
|
*/
|
|
1477
1495
|
checkCrossSigningPrivateKey(privateKey: Uint8Array, expectedPublicKey: string): boolean;
|
|
1496
|
+
/**
|
|
1497
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi#requestDeviceVerification}.
|
|
1498
|
+
*/
|
|
1478
1499
|
legacyDeviceVerification(userId: string, deviceId: string, method: string): Promise<VerificationRequest>;
|
|
1479
1500
|
/**
|
|
1480
1501
|
* Perform any background tasks that can be done before a message is ready to
|
|
@@ -1549,6 +1570,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1549
1570
|
/**
|
|
1550
1571
|
* Counts the number of end to end session keys that are waiting to be backed up
|
|
1551
1572
|
* @returns Promise which resolves to the number of sessions requiring backup
|
|
1573
|
+
*
|
|
1574
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1552
1575
|
*/
|
|
1553
1576
|
countSessionsNeedingBackup(): Promise<number>;
|
|
1554
1577
|
/**
|
|
@@ -1684,6 +1707,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1684
1707
|
* @param devices - the devices to request the secret from
|
|
1685
1708
|
*
|
|
1686
1709
|
* @returns the secret request object
|
|
1710
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1687
1711
|
*/
|
|
1688
1712
|
requestSecret(name: string, devices: string[]): ISecretRequest;
|
|
1689
1713
|
/**
|
|
@@ -1725,6 +1749,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1725
1749
|
* Get e2e information on the device that sent an event
|
|
1726
1750
|
*
|
|
1727
1751
|
* @param event - event to be checked
|
|
1752
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1728
1753
|
*/
|
|
1729
1754
|
getEventSenderDeviceInfo(event: MatrixEvent): Promise<DeviceInfo | null>;
|
|
1730
1755
|
/**
|
|
@@ -1741,6 +1766,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1741
1766
|
* @param event - The event to check for
|
|
1742
1767
|
*
|
|
1743
1768
|
* @returns A room key request, or null if there is none
|
|
1769
|
+
*
|
|
1770
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1744
1771
|
*/
|
|
1745
1772
|
getOutgoingRoomKeyRequest(event: MatrixEvent): Promise<OutgoingRoomKeyRequest | null>;
|
|
1746
1773
|
/**
|
|
@@ -1749,6 +1776,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1749
1776
|
* @param event - event of which to cancel and resend the room
|
|
1750
1777
|
* key request.
|
|
1751
1778
|
* @returns A promise that will resolve when the key request is queued
|
|
1779
|
+
*
|
|
1780
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1752
1781
|
*/
|
|
1753
1782
|
cancelAndResendEventRoomKeyRequest(event: MatrixEvent): Promise<void>;
|
|
1754
1783
|
/**
|
|
@@ -1783,6 +1812,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1783
1812
|
* resolves once the message has been encrypted and sent to the given
|
|
1784
1813
|
* userDeviceMap, and returns the `{ contentMap, deviceInfoByDeviceId }`
|
|
1785
1814
|
* of the successfully sent messages.
|
|
1815
|
+
*
|
|
1816
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1786
1817
|
*/
|
|
1787
1818
|
encryptAndSendToDevices(userDeviceInfoArr: IOlmDevice<DeviceInfo>[], payload: object): Promise<void>;
|
|
1788
1819
|
/**
|
|
@@ -1792,7 +1823,6 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1792
1823
|
* @param roomId - The ID of the room to discard the session for
|
|
1793
1824
|
*
|
|
1794
1825
|
* @deprecated Prefer {@link CryptoApi.forceDiscardSession | `CryptoApi.forceDiscardSession`}:
|
|
1795
|
-
*
|
|
1796
1826
|
*/
|
|
1797
1827
|
forceDiscardSession(roomId: string): void;
|
|
1798
1828
|
/**
|
|
@@ -1849,7 +1879,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1849
1879
|
/**
|
|
1850
1880
|
* @param info - key backup info dict from getKeyBackupVersion()
|
|
1851
1881
|
*
|
|
1852
|
-
* @deprecated Prefer {@link CryptoApi.isKeyBackupTrusted | `CryptoApi.isKeyBackupTrusted`}.
|
|
1882
|
+
* @deprecated Not supported for Rust Cryptography. Prefer {@link CryptoApi.isKeyBackupTrusted | `CryptoApi.isKeyBackupTrusted`}.
|
|
1853
1883
|
*/
|
|
1854
1884
|
isKeyBackupTrusted(info: IKeyBackupInfo): Promise<TrustInfo>;
|
|
1855
1885
|
/**
|
|
@@ -1857,7 +1887,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1857
1887
|
* the server, otherwise false. If we haven't completed a successful check
|
|
1858
1888
|
* of key backup status yet, returns null.
|
|
1859
1889
|
*
|
|
1860
|
-
* @deprecated Prefer direct access to {@link Crypto.CryptoApi.getActiveSessionBackupVersion}:
|
|
1890
|
+
* @deprecated Not supported for Rust Cryptography. Prefer direct access to {@link Crypto.CryptoApi.getActiveSessionBackupVersion}:
|
|
1861
1891
|
*
|
|
1862
1892
|
* ```javascript
|
|
1863
1893
|
* let enabled = (await client.getCrypto().getActiveSessionBackupVersion()) !== null;
|
|
@@ -1877,7 +1907,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1877
1907
|
/**
|
|
1878
1908
|
* Disable backing up of keys.
|
|
1879
1909
|
*
|
|
1880
|
-
* @deprecated It should be unnecessary to disable key backup.
|
|
1910
|
+
* @deprecated Not supported for Rust Cryptography. It should be unnecessary to disable key backup.
|
|
1881
1911
|
*/
|
|
1882
1912
|
disableKeyBackup(): void;
|
|
1883
1913
|
/**
|
|
@@ -1891,7 +1921,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1891
1921
|
* @returns Object that can be passed to createKeyBackupVersion and
|
|
1892
1922
|
* additionally has a 'recovery_key' member with the user-facing recovery key string.
|
|
1893
1923
|
*
|
|
1894
|
-
* @deprecated Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
|
|
1924
|
+
* @deprecated Not supported for Rust cryptography. Use {@link Crypto.CryptoApi.resetKeyBackup | `CryptoApi.resetKeyBackup`}.
|
|
1895
1925
|
*/
|
|
1896
1926
|
prepareKeyBackupVersion(password?: string | Uint8Array | null, opts?: IKeyBackupPrepareOpts): Promise<Pick<IPreparedKeyBackupVersion, "algorithm" | "auth_data" | "recovery_key">>;
|
|
1897
1927
|
/**
|
|
@@ -1924,6 +1954,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1924
1954
|
* @param data - Object keys to send
|
|
1925
1955
|
* @returns a promise that will resolve when the keys
|
|
1926
1956
|
* are uploaded
|
|
1957
|
+
*
|
|
1958
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1927
1959
|
*/
|
|
1928
1960
|
sendKeyBackup(roomId: undefined, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
|
|
1929
1961
|
sendKeyBackup(roomId: string, sessionId: undefined, version: string | undefined, data: IKeyBackup): Promise<void>;
|
|
@@ -1932,8 +1964,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1932
1964
|
* Marks all group sessions as needing to be backed up and schedules them to
|
|
1933
1965
|
* upload in the background as soon as possible.
|
|
1934
1966
|
*
|
|
1935
|
-
*
|
|
1936
|
-
* so there is probably no need to call this manually.
|
|
1967
|
+
* @deprecated Not supported for Rust Cryptography. This is done automatically as part of
|
|
1968
|
+
* {@link CryptoApi.resetKeyBackup}, so there is probably no need to call this manually.
|
|
1937
1969
|
*/
|
|
1938
1970
|
scheduleAllGroupSessionsForBackup(): Promise<void>;
|
|
1939
1971
|
/**
|
|
@@ -1944,8 +1976,15 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1944
1976
|
* so there is probably no need to call this manually.)
|
|
1945
1977
|
*
|
|
1946
1978
|
* @returns Promise which resolves to the number of sessions requiring a backup.
|
|
1979
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
1947
1980
|
*/
|
|
1948
1981
|
flagAllGroupSessionsForBackup(): Promise<number>;
|
|
1982
|
+
/**
|
|
1983
|
+
* Return true if recovery key is valid.
|
|
1984
|
+
* Try to decode the recovery key and check if it's successful.
|
|
1985
|
+
* @param recoveryKey
|
|
1986
|
+
* @deprecated Use {@link decodeRecoveryKey} directly
|
|
1987
|
+
*/
|
|
1949
1988
|
isValidRecoveryKey(recoveryKey: string): boolean;
|
|
1950
1989
|
/**
|
|
1951
1990
|
* Get the raw key for a key backup from the password
|
|
@@ -1956,6 +1995,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1956
1995
|
* @param password - Passphrase
|
|
1957
1996
|
* @param backupInfo - Backup metadata from `checkKeyBackup`
|
|
1958
1997
|
* @returns key backup key
|
|
1998
|
+
* @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.
|
|
1959
1999
|
*/
|
|
1960
2000
|
keyBackupKeyFromPassword(password: string, backupInfo: IKeyBackupInfo): Promise<Uint8Array>;
|
|
1961
2001
|
/**
|
|
@@ -1966,6 +2006,7 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
1966
2006
|
*
|
|
1967
2007
|
* @param recoveryKey - The recovery key
|
|
1968
2008
|
* @returns key backup key
|
|
2009
|
+
* @deprecated Use {@link decodeRecoveryKey} directly
|
|
1969
2010
|
*/
|
|
1970
2011
|
keyBackupKeyFromRecoveryKey(recoveryKey: string): Uint8Array;
|
|
1971
2012
|
/**
|
|
@@ -2048,6 +2089,9 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
2048
2089
|
* @param roomId - the room for which keys should be shared.
|
|
2049
2090
|
* @param userIds - a list of users to share with. The keys will be sent to
|
|
2050
2091
|
* all of the user's current devices.
|
|
2092
|
+
*
|
|
2093
|
+
* @deprecated Do not use this method. It does not work with the Rust crypto stack, and even with the legacy
|
|
2094
|
+
* stack it introduces a security vulnerability.
|
|
2051
2095
|
*/
|
|
2052
2096
|
sendSharedHistoryKeys(roomId: string, userIds: string[]): Promise<void>;
|
|
2053
2097
|
/**
|
|
@@ -3046,6 +3090,8 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
3046
3090
|
/**
|
|
3047
3091
|
* The app may wish to see if we have a key cached without
|
|
3048
3092
|
* triggering a user interaction.
|
|
3093
|
+
*
|
|
3094
|
+
* @deprecated Not supported for Rust Cryptography.
|
|
3049
3095
|
*/
|
|
3050
3096
|
getCrossSigningCacheCallbacks(): ICacheCallbacks | undefined;
|
|
3051
3097
|
/**
|
|
@@ -3457,6 +3503,81 @@ export declare class MatrixClient extends TypedEventEmitter<EmittedEvents, Clien
|
|
|
3457
3503
|
avatar_url?: string;
|
|
3458
3504
|
displayname?: string;
|
|
3459
3505
|
}>;
|
|
3506
|
+
/**
|
|
3507
|
+
* Determine if the server supports extended profiles, as described by MSC4133.
|
|
3508
|
+
*
|
|
3509
|
+
* @returns `true` if supported, otherwise `false`
|
|
3510
|
+
*/
|
|
3511
|
+
doesServerSupportExtendedProfiles(): Promise<boolean>;
|
|
3512
|
+
/**
|
|
3513
|
+
* Get the prefix used for extended profile requests.
|
|
3514
|
+
*
|
|
3515
|
+
* @returns The prefix for use with `authedRequest`
|
|
3516
|
+
*/
|
|
3517
|
+
private getExtendedProfileRequestPrefix;
|
|
3518
|
+
/**
|
|
3519
|
+
* Fetch a user's *extended* profile, which may include additonal keys.
|
|
3520
|
+
*
|
|
3521
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3522
|
+
* @param userId The user ID to fetch the profile of.
|
|
3523
|
+
* @returns A set of keys to property values.
|
|
3524
|
+
*
|
|
3525
|
+
* @throws An error if the server does not support MSC4133.
|
|
3526
|
+
* @throws A M_NOT_FOUND error if the profile could not be found.
|
|
3527
|
+
*/
|
|
3528
|
+
getExtendedProfile(userId: string): Promise<Record<string, unknown>>;
|
|
3529
|
+
/**
|
|
3530
|
+
* Fetch a specific key from the user's *extended* profile.
|
|
3531
|
+
*
|
|
3532
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3533
|
+
* @param userId The user ID to fetch the profile of.
|
|
3534
|
+
* @param key The key of the property to fetch.
|
|
3535
|
+
* @returns The property value.
|
|
3536
|
+
*
|
|
3537
|
+
* @throws An error if the server does not support MSC4133.
|
|
3538
|
+
* @throws A M_NOT_FOUND error if the key was not set OR the profile could not be found.
|
|
3539
|
+
*/
|
|
3540
|
+
getExtendedProfileProperty(userId: string, key: string): Promise<unknown>;
|
|
3541
|
+
/**
|
|
3542
|
+
* Set a property on your *extended* profile.
|
|
3543
|
+
*
|
|
3544
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3545
|
+
* @param key The key of the property to set.
|
|
3546
|
+
* @param value The value to set on the propety.
|
|
3547
|
+
*
|
|
3548
|
+
* @throws An error if the server does not support MSC4133 OR the server disallows editing the user profile.
|
|
3549
|
+
*/
|
|
3550
|
+
setExtendedProfileProperty(key: string, value: unknown): Promise<void>;
|
|
3551
|
+
/**
|
|
3552
|
+
* Delete a property on your *extended* profile.
|
|
3553
|
+
*
|
|
3554
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3555
|
+
* @param key The key of the property to delete.
|
|
3556
|
+
*
|
|
3557
|
+
* @throws An error if the server does not support MSC4133 OR the server disallows editing the user profile.
|
|
3558
|
+
*/
|
|
3559
|
+
deleteExtendedProfileProperty(key: string): Promise<void>;
|
|
3560
|
+
/**
|
|
3561
|
+
* Update multiple properties on your *extended* profile. This will
|
|
3562
|
+
* merge with any existing keys.
|
|
3563
|
+
*
|
|
3564
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3565
|
+
* @param profile The profile object to merge with the existing profile.
|
|
3566
|
+
* @returns The newly merged profile.
|
|
3567
|
+
*
|
|
3568
|
+
* @throws An error if the server does not support MSC4133 OR the server disallows editing the user profile.
|
|
3569
|
+
*/
|
|
3570
|
+
patchExtendedProfile(profile: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3571
|
+
/**
|
|
3572
|
+
* Set multiple properties on your *extended* profile. This will completely
|
|
3573
|
+
* replace the existing profile, removing any unspecified keys.
|
|
3574
|
+
*
|
|
3575
|
+
* @see https://github.com/tcpipuk/matrix-spec-proposals/blob/main/proposals/4133-extended-profiles.md
|
|
3576
|
+
* @param profile The profile object to set.
|
|
3577
|
+
*
|
|
3578
|
+
* @throws An error if the server does not support MSC4133 OR the server disallows editing the user profile.
|
|
3579
|
+
*/
|
|
3580
|
+
setExtendedProfile(profile: Record<string, unknown>): Promise<void>;
|
|
3460
3581
|
/**
|
|
3461
3582
|
* @returns Promise which resolves to a list of the user's threepids.
|
|
3462
3583
|
* @returns Rejects: with an error response.
|