Skip to content

Commit

Permalink
Complete restoreKeyBackup* methods documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Nov 6, 2024
1 parent e0f8913 commit fe3ea7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/crypto-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,18 @@ export interface CryptoApi {
deleteKeyBackupVersion(version: string): Promise<void>;

/**
* Download the last key backup from the homeserver (endpoint GET /room_keys/keys/).
* Download and restore the last key backup from the homeserver (endpoint GET /room_keys/keys/).
* The key backup is decrypted and imported by using the decryption key stored locally. The decryption key should be stored locally by using {@link CryptoApi#storeSessionBackupPrivateKey}.
*
* Warning: the full key backup may be quite large, so this operation may take several hours to complete.
* Use of {@link KeyBackupRestoreOpts.progressCallback} is recommended.
* @param opts
*/
restoreKeyBackup(opts?: KeyBackupRestoreOpts): Promise<KeyBackupRestoreResult>;

/**
* Restores a key backup using a passphrase.
* The decoded key (derivated from the passphrase) is store locally by calling {@link CryptoApi#storeSessionBackupPrivateKey}.
* @param passphrase - The passphrase to use to restore the key backup.
* @param opts
*
Expand Down

0 comments on commit fe3ea7c

Please sign in to comment.