Skip to main content
Do the steps on this page on SDK 0.4, before you upgrade to SDK 0.5. SDK 0.5 removes the storage adapters, and it also removes migrateWalletRepository and rollbackMigration, which the migration uses.

Migrate from storage adapters

Replace each storage adapter with a repository: To keep the data that an adapter stored, copy it to the new wallet repository with migrateWalletRepository. Give it the addresses to copy: boarding addresses in onchain, and Arkade addresses in offchain. The function does nothing if there is no data to migrate or if the migration is already done. It never deletes the old data.
migrateWalletRepository copies wallet data only. Packages that store their own contract data supply their own migration, for example migrateToSwapRepository in @arkade-os/boltz-swap.

IndexedDB schema upgrade

SDK 0.5 upgrades the IndexedDB database to a new schema the first time it opens it. The upgrade is one way. An older SDK version can’t open the upgraded database: its reads return no data, and its writes fail with VersionError.

Next Steps