Open xaur opened 4 years ago
The idea was triggered by a chat discussion about implementing some CSPP usage protections in dcrwallet instead of Decrediton.
One trick that the LN SCB files use that might be considered for this is encrypting the content by using a well-known wallet private key (well-known in that it's a predefined BIP0044 path).
This makes it unnecessary to use a passphrase for encryption (since knowledge of the private key derived from the wallet seed is sufficient to decrypt the blob) and naturally provides protection against trying to apply the file to a different wallet (given that only the correct wallet seed could correctly decrypt the file).
Decred wallets use some data that cannot be generated from the seed:
It would be nice to:
Having that would improve the UX by avoiding the boring steps of (re)configuring new and restored wallets. And perhaps even eliminate some user errors where they forget to save/restore their redeem scripts.
So the idea is to define a standard format for non-seed wallet data that is respected by dcrwallet, Decrediton and the mobile apps. Then, add commands to export and import a bundle of such data to all participating wallets.
The purpose/behavior account tags address the following point by @jrick:
In the future, it may be extended to include an addressbook (name->addr map) and other stuff.
The bundle file should be encrypted with a passphrase by default, but with a way to opt-out and save/load an uncencrypted file.
Possible data structure is presented below. Note that multiple json files like this can store all your wallet setups (cold, desktop, mobile, voting, etc):
When creating a new wallet or restoring from seed in participating wallets, they could have a step that allows to import such file before seed entry.