You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new migrateFromLegacyCrypto(legacyStore) method to js-sdk/src/rust-crypto, and call it in MatrixClient.initRustCrypto, before calling RustCrypto.initRustCrypto. First, it needs to check if there might be data to migrate:
Call CryptoStore.containsData and skip out if no data.
Call CryptoStore.startup.
Call CryptoStore.getMigrationState and skip any steps below that are done. Otherwise:
Backup version: we'll have to fetch this from the server (and check the key matches the above).
Afterwards, call CryptoStore.setMigrationState to flag that this initial import has been done.
Then, migrate the Olm and Megolm sessions, in batches.
We need to emit some sort of progress indication, so that the app can give feedback. Probably something as simple as a crypto.dataMigrationProgress event, whose payload includes two numbers including a total number of steps, and a number of steps so far. We can wire this into the progress_listener callback of the rust migration functions.
The text was updated successfully, but these errors were encountered:
Part of support for migration to Rust Crypto. Depends on matrix-org/matrix-rust-sdk-crypto-wasm#78 and #3963.
Add a new
migrateFromLegacyCrypto(legacyStore)
method tojs-sdk/src/rust-crypto
, and call it inMatrixClient.initRustCrypto
, before callingRustCrypto.initRustCrypto
. First, it needs to check if there might be data to migrate:CryptoStore.containsData
and skip out if no data.CryptoStore.startup
.CryptoStore.getMigrationState
and skip any steps below that are done. Otherwise:CryptoStore.getSecretStorePrivateKey("master")
etc)CryptoStore.getEndToEndRooms
)CryptoStore.getSecretStorePrivateKey("m.megolm_backup.v1")
)Afterwards, call
CryptoStore.setMigrationState
to flag that this initial import has been done.We need to emit some sort of progress indication, so that the app can give feedback. Probably something as simple as a
crypto.dataMigrationProgress
event, whose payload includes two numbers including a total number of steps, and a number of steps so far. We can wire this into theprogress_listener
callback of the rust migration functions.The text was updated successfully, but these errors were encountered: