Export & Import Your Data
How-To Guide: Export, restore, and import all of your LearnCard data
This guide is a step-by-step recipe for taking all of your LearnCard data with you: your keys, credentials, presentations, consent records, and more. You can save it as a single encrypted file, restore your original account from it, or copy its contents into a brand-new account.
Our commitment to holder continuity
Your data is yours. LearnCard is built so that you can always export everything that defines your identity and move it elsewhere β without asking us for permission and without our servers needing to cooperate. The export is a normal ZIP file built on open standards (W3C Verifiable Credentials, DIDs, JSON), so it stays useful for verification and migration even if LearnCard services are unavailable. Read the full commitment in Holder Continuity.
What's in the export
An export ("bundle") is a single password-protected ZIP file containing:
Your key material (private-key seed, recovery phrase, and JWKs) β encrypted
Your DID and DID document
All of your Verifiable Credentials and Presentations β exactly as issued, with signatures preserved
Your wallet index records (so credentials keep their titles and categories)
Your consent records and transaction history
Status-list snapshots for credential revocation state at export time
A readable
manifest.jsonlisting every file and its SHA-256 hash
Everything sensitive is encrypted per-file using Argon2id + AES-256-GCM. The manifest.json itself stays readable so you can inspect the contents without the password.
Treat your export like a password-vault backup. It contains your full private key (encrypted). Anyone who has both the file and its password can take full control of your account, so store it offline, use a strong unique password, and rotate your account if the file is ever exposed.
Prerequisites
An initialized LearnCard wallet (
@learncard/init)The
@learncard/holder-continuitypackage installed:
1. Export your data
This is the most common task: save everything to an encrypted file.
If you omit the wallet, the CLI exports the default learnCard wallet it created at startup: await exportLearnCardBundle({ out: './learncard-export.zip', password }).
That's it β you now have a portable, encrypted copy of your account at ./learncard-export.zip.
2. Inspect an export (optional)
You can read a bundle back to confirm what it contains. The decrypted entries are plain W3C JSON.
3. Restore your original account
Use restore when you want your original identity back β same key, same DID. This decrypts the exported seed and rebuilds the wallet.
Restore recreates your identity. It does not re-upload your credentials or rebuild your index β for that, use import (next step). Use restore when you want to get back into your original account; use import when you want to copy credentials into a different account.
4. Import into another account
Use import when you want to copy your credentials and presentations into a different, fresh wallet. Import uploads each credential to the target wallet's storage and recreates its index records.
Verify what you import. Set verifyBeforeImport: true to check each credential's and presentation's signatures before they are uploaded. Without it, import only proves the file decrypted correctly β not that the credentials are genuinely signed. Only import bundles from sources you trust.
When to use which
Save a backup of everything
exportLearnCardBundle
See what's inside a backup
readLearnCardBundle
Get my original account back
restoreLearnCardFromBundle
Copy my credentials into a new account
importLearnCardBundle
Related
Holder ContinuityLearnCard CLILast updated
Was this helpful?