This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 632
export legacy wallets in a friendly way for automatic import in cardano-wallet #4278
Open
KtorZ
wants to merge
11
commits into
develop
Choose a base branch
from
KtorZ/export-wallets
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+217
−0
Commits on Mar 17, 2020
-
implement export-wallets for Byron reboot migration
This little command-line tool extract the name and encrypted XPrv of known wallets and spits them back in a user-friendly format on stdout. $ export-wallets --mainnet --wallet-db-path state-wallet-mainnet/wallet-db --keyfile state-wallet-mainnet/secret.key [ { "encrypted_root_private_key": "5da58210e3f6e2b1e24659158554f91bb5970202ba0e0cd2d32767ce3c2893c29515a5469493f6133857c0dc86f127aa70e46d047424e07f7221715357bfb35052aed22cefd53ea7d75b5804add54e653c21e03ffd7c01cb8f6c033f7d383cc127046148d89a1828b76bdb46b56f6fec06d31b5b412dc68ab4b5ffa2418e7e8d", "name": "My Wallet", "passphrase_hash": "31347c387c317c57434478796c7064635a736853367a6d3150766d54456a34667038795a34623145557868627765347a36596645413d3d7c48544739445a456d4f2b79535a6a705a76553145614d795a437170732b43347330704738414562745638773d" } ] The format matches exactly the JSON format expected by the cardano-wallet for restoring legacy wallet from xprv.
Configuration menu - View commit details
-
Copy full SHA for f63761e - Browse repository at this point
Copy the full SHA f63761eView commit details -
Return 'null' for 'passphrase_hash' when there's no passphrase set
$ export-wallets --mainnet --wallet-db-path state-wallet-mainnet/wallet-db --keyfile state-wallet-mainnet/secret.key [ { "encrypted_root_private_key": "b824f5268bdf05d783b0c594936e51c65d6d155021ddcbdb3370bb7a51caba4bedece046fc9d12143ce900d8238e444904e08a85af80299b012e7f12030a2ab6d3d1cf6fc565476c17326baebddcf31c5e3409ba697b9bf04ac588cb59868c22d043e0237a3ba2eb167d1504dd93f788fc4a72503a261cf338ad7e4cf8837aff", "name": "My Wallet", "passphrase_hash": null }, { "encrypted_root_private_key": "5da58210e3f6e2b1e24659158554f91bb5970202ba0e0cd2d32767ce3c2893c29515a5469493f6133857c0dc86f127aa70e46d047424e07f7221715357bfb35052aed22cefd53ea7d75b5804add54e653c21e03ffd7c01cb8f6c033f7d383cc127046148d89a1828b76bdb46b56f6fec06d31b5b412dc68ab4b5ffa2418e7e8d", "name": "My Wallet", "passphrase_hash": "31347c387c317c57434478796c7064635a736853367a6d3150766d54456a34667038795a34623145557868627765347a36596645413d3d7c48544739445a456d4f2b79535a6a705a76553145614d795a437170732b43347330704738414562745638773d" } ]
Configuration menu - View commit details
-
Copy full SHA for 148076e - Browse repository at this point
Copy the full SHA 148076eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 787e72e - Browse repository at this point
Copy the full SHA 787e72eView commit details
Commits on Mar 18, 2020
-
fail when given a non-existing database path
Before that, the script would simply create a new empty database and pretty much fail to export every wallet in the keystore
Configuration menu - View commit details
-
Copy full SHA for da6645c - Browse repository at this point
Copy the full SHA da6645cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b53dc1 - Browse repository at this point
Copy the full SHA 9b53dc1View commit details
Commits on Mar 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1702a9e - Browse repository at this point
Copy the full SHA 1702a9eView commit details
Commits on Apr 8, 2020
-
returns wallets with no metadata if prv key exists
Name is therefore set to null.
Configuration menu - View commit details
-
Copy full SHA for 776a638 - Browse repository at this point
Copy the full SHA 776a638View commit details -
Configuration menu - View commit details
-
Copy full SHA for 996a17f - Browse repository at this point
Copy the full SHA 996a17fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6054e7e - Browse repository at this point
Copy the full SHA 6054e7eView commit details
Commits on Apr 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 13f5729 - Browse repository at this point
Copy the full SHA 13f5729View commit details -
show in the JSON export whether a passphrase is empty or not
```json $ export-wallets --mainnet --keyfile state-wallet-mainnet/secret.key [ { "encrypted_root_private_key": "18b952a968ccbac047f9c227dd05fced84ba85a1f83daf54f0a3c0de3e5664502678b1ba34a0b44ce22a2b54f39830570bdfeeed0a2f8586aa988fa5399987252b81f30b3c1e4c39e1edb16a4c7975eea106fc5d12d3b4fa516b9332f777defba949a42ef709a2d2f5c64057e99987c545b6e014f8cd9502bd5b800ddc6e10b7", "is_passphrase_empty": true, "name": null, "id": "f1aaaf1e1e6db1255ec2d59d50c5db892ff20330", "passphrase_hash": "31347c387c317c5743424875746242496c6a66734d764934314a30727a79663076657375724954796376766a793150554e377452673d3d7c54753434596d6e547957546c5759674a3164494f7974474a7842632b432f7862507657382b5135356a38303d" }, { "encrypted_root_private_key": "6d9e6a5135d373fb62eadaf02bc8f5ecf35148806721c704c6dbfcf818ff958f1fc4a933542c423f5b8621cfe6404c4b208f2c96f6246082dffbc9fb1029a79ed33651377731e0e59e0233425a55257782c5adaa768da0567f43c1c6c0c18766ed0a547bb34eb472c120b170a8640279832ddf18002887f03c15dea59705422d", "is_passphrase_empty": false, "name": null, "id": "05377e480bd68a2da04f00c39ce5886e4746ed1f", "passphrase_hash": "31347c387c317c574342652b796362417576356c2b4258676a344a314c6343675375414c2f5653393661364e576a2b7550766655513d3d7c2f376738486c59723174734e394f6e4e753253302b6a65515a6b5437316b45414941366a515867386539493d" } ] ```
Configuration menu - View commit details
-
Copy full SHA for c1815b7 - Browse repository at this point
Copy the full SHA c1815b7View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.