seraphis-migration / wallet3

Info and discussions about a hypothetical full 'wallet2' rewrite from scratch
MIT License
13 stars 0 forks source link

Idea: Design and implement a "private wallet data transfer file" format #39

Open rbrunner7 opened 2 years ago

rbrunner7 commented 2 years ago

There is a maybe surprisingly large number of things that a wallet stores for you that are bound to the wallet files themselves: Lose those files, lose the data.

I call this private wallet data in the following, as a "working title" - maybe we will find a better term if the idea gains traction.

If you restore the wallet from the blockchain using your seed, you get all the most important info back of course, like the list of transactions, enotes, and amounts, but not the following:

You also lose names and labels you set for various things like accounts, subaddresses or the wallet as a whole, your address book, your settings, and other things, where it's probably a lot less surprising that those won't restore from the blockchain but where it still can be a pain to configure it all again.

Even without losing wallet files outright you may run into problems when switching wallet apps because for some types of apps it's hard and/or complicated to copy wallet files in order to use them with full data intact. I have mostly smartphone apps in mind here.

This finally leads me to the idea: We design a new file format that makes transporting all that "private wallet data" between Monero wallet apps as easy as possible. The "core wallet" supports/implementes the file format to make it as easy as possible for wallet app writers to offer it as a feature in their UI, with the aim to achieve broad support.

I imagine a textual format in Base64 encoding because that's easy to cut and paste. Users could store the data alongside seeds e.g. in password managers.

A wallet app would basically only need a simple screen with one input field to allow users to paste the string to support this feature.

The basic approach is of course nothing new, it's already used for transporting multisig key data , key images, transactions for cold-signing, and similar.

Encrypting the data with any of the available secret keys wouldn't be hard.

If the full data turns out to be too large to handle for larger wallets, maybe offer the user a number of checkboxes when creating the file to specify exactly which data to include to keep the size under control.

hbs commented 2 years ago

This seems a very important thing to have. May I suggest though that this format be designed in a modular way so as to allow the creation of wallet files which may contain only a subset of the infos. This would allow for scenarios where you want to export the list of accounts for example but not the tx private keys, or vice-versa.

It will also be important to be able to load multiple wallet files into a wallet software, for example to consolidate tx keys for transactions which were initiated from different wallets.