@@ -25,6 +25,15 @@ import { BackupTrustInfo, KeyBackupCheck, KeyBackupInfo } from "./keybackup.ts";
25
25
import { ISignatures } from "../@types/signed.ts" ;
26
26
import { MatrixEvent } from "../models/event.ts" ;
27
27
28
+ /**
29
+ * `matrix-js-sdk/lib/crypto-api`: End-to-end encryption support.
30
+ *
31
+ * The most important type is {@link CryptoApi}, an instance of which can be retrieved via
32
+ * {@link MatrixClient.getCrypto}.
33
+ *
34
+ * @packageDocumentation
35
+ */
36
+
28
37
/**
29
38
* Public interface to the cryptography parts of the js-sdk
30
39
*
@@ -181,7 +190,7 @@ export interface CryptoApi {
181
190
/**
182
191
* Return whether we trust other user's signatures of their devices.
183
192
*
184
- * @see {@link Crypto. CryptoApi# setTrustCrossSignedDevices }
193
+ * @see {@link CryptoApi. setTrustCrossSignedDevices }
185
194
*
186
195
* @returns `true` if we trust cross-signed devices, otherwise `false`.
187
196
*/
@@ -228,7 +237,7 @@ export interface CryptoApi {
228
237
*
229
238
* @throws an error if the device is unknown, or has not published any encryption keys.
230
239
*
231
- * @remarks Fires {@link CryptoEvent# DeviceVerificationChanged}
240
+ * @remarks Fires {@link matrix. CryptoEvent. DeviceVerificationChanged}
232
241
*/
233
242
setDeviceVerified ( userId : string , deviceId : string , verified ?: boolean ) : Promise < void > ;
234
243
@@ -259,7 +268,7 @@ export interface CryptoApi {
259
268
*
260
269
* @returns True if cross-signing is ready to be used on this device
261
270
*
262
- * @throws May throw {@link ClientStoppedError} if the `MatrixClient` is stopped before or during the call.
271
+ * @throws May throw {@link matrix. ClientStoppedError} if the `MatrixClient` is stopped before or during the call.
263
272
*/
264
273
isCrossSigningReady ( ) : Promise < boolean > ;
265
274
@@ -327,7 +336,7 @@ export interface CryptoApi {
327
336
* @returns The current status of cross-signing keys: whether we have public and private keys cached locally, and
328
337
* whether the private keys are in secret storage.
329
338
*
330
- * @throws May throw {@link ClientStoppedError} if the `MatrixClient` is stopped before or during the call.
339
+ * @throws May throw {@link matrix. ClientStoppedError} if the `MatrixClient` is stopped before or during the call.
331
340
*/
332
341
getCrossSigningStatus ( ) : Promise < CrossSigningStatus > ;
333
342
@@ -407,8 +416,8 @@ export interface CryptoApi {
407
416
*
408
417
* If an all-devices verification is already in flight, returns it. Otherwise, initiates a new one.
409
418
*
410
- * To control the methods offered, set {@link ICreateClientOpts.verificationMethods} when creating the
411
- * MatrixClient.
419
+ * To control the methods offered, set {@link matrix. ICreateClientOpts.verificationMethods} when creating the
420
+ * ` MatrixClient` .
412
421
*
413
422
* @returns a VerificationRequest when the request has been sent to the other party.
414
423
*/
@@ -422,8 +431,8 @@ export interface CryptoApi {
422
431
*
423
432
* If a verification for this user/device is already in flight, returns it. Otherwise, initiates a new one.
424
433
*
425
- * To control the methods offered, set {@link ICreateClientOpts.verificationMethods} when creating the
426
- * MatrixClient.
434
+ * To control the methods offered, set {@link matrix. ICreateClientOpts.verificationMethods} when creating the
435
+ * ` MatrixClient` .
427
436
*
428
437
* @param userId - ID of the owner of the device to verify
429
438
* @param deviceId - ID of the device to verify
@@ -480,7 +489,7 @@ export interface CryptoApi {
480
489
/**
481
490
* Determine if a key backup can be trusted.
482
491
*
483
- * @param info - key backup info dict from {@link MatrixClient# getKeyBackupVersion}.
492
+ * @param info - key backup info dict from {@link matrix. MatrixClient. getKeyBackupVersion}.
484
493
*/
485
494
isKeyBackupTrusted ( info : KeyBackupInfo ) : Promise < BackupTrustInfo > ;
486
495
@@ -500,7 +509,7 @@ export interface CryptoApi {
500
509
*
501
510
* If there are existing backups they will be replaced.
502
511
*
503
- * The decryption key will be saved in Secret Storage (the {@link SecretStorageCallbacks.getSecretStorageKey} Crypto
512
+ * The decryption key will be saved in Secret Storage (the {@link matrix.SecretStorage. SecretStorageCallbacks.getSecretStorageKey} Crypto
504
513
* callback will be called)
505
514
* and the backup engine will be started.
506
515
*/
@@ -841,9 +850,9 @@ export class DeviceVerificationStatus {
841
850
* Check if we should consider this device "verified".
842
851
*
843
852
* A device is "verified" if either:
844
- * * it has been manually marked as such via {@link MatrixClient# setDeviceVerified}.
853
+ * * it has been manually marked as such via {@link matrix. MatrixClient. setDeviceVerified}.
845
854
* * it has been cross-signed with a verified signing key, **and** the client has been configured to trust
846
- * cross-signed devices via {@link Crypto. CryptoApi# setTrustCrossSignedDevices}.
855
+ * cross-signed devices via {@link CryptoApi. setTrustCrossSignedDevices}.
847
856
*
848
857
* @returns true if this device is verified via any means.
849
858
*/
0 commit comments