1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Adjust secret key adding to consume instead of create

This changes `addKey` for secret storage to consume info about a pre-generated
key, rather than creating the key in middle of the method. This eases UI work
that want to have the public and private keys earlier on in the flow.
This commit is contained in:
J. Ryan Stinnett
2019-12-05 11:00:40 +00:00
parent 65f8556ee9
commit 33f5894547
4 changed files with 13 additions and 23 deletions

View File

@@ -365,8 +365,7 @@ Crypto.prototype.createRecoveryKeyFromPassphrase = async function(password) {
* called to await a secret storage key creation flow.
* Returns:
* {Promise} A promise which resolves to key creation data for
* SecretStorage#addKey: an object with either `passphrase` or `privkey`
* fields.
* SecretStorage#addKey: an object with `passphrase` and/or `pubkey` fields.
*/
Crypto.prototype.bootstrapSecretStorage = async function({
authUploadDeviceSigningKeys,