Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement advanced wallet option: multiple xpubs, mixed script types, and similar (maybe with output script descriptors) #6016

Open
SomberNight opened this issue Mar 4, 2020 · 1 comment
Labels
enhancement ✨ topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
Milestone

Comments

@SomberNight
Copy link
Member

SomberNight commented Mar 4, 2020

Currently HD wallets created by Electrum are severely limited:

  • there is a single bip32 xpub/xprv and from that a specific simple tree structure is used to derive keys:
    • keys used to derive receive addresses are at path m/0/i, and
    • keys used to derive change addresses are at path m/1/j.
  • no mixed script types; all the addresses use the same (as it is encoded in the xpub/xprv)

I think it would be really nice if there was an option to create an advanced wallet; a power user feature.
This wallet could not be restored from seed.

It would allow importing xprvs/xpubs: so the user could have multiple of these. Importing could even be allowed for existing wallets (not just in wizard at creation time). These could have differing script types associated with them.

I think even single privkeys/addresses could be allowed to be imported.

Perhaps the user could mark certain paths to be preferred to be given out as receive addresses, and others as preferred change.

Maybe this would be best implemented after support for output script descriptors (#5694), as those seem useful for creating this advanced wallet; and actually the other direction too: output script descriptors seem a lot more useful if such an advanced wallet can be created.


The wallet could just be a list of output script descriptors, maybe even allowing mixing single addresses and HD descriptors, and optionally "attaching" hardware devices to these descriptors.
No more distinction between imported/deterministic wallets: everything could be a list of descriptors - just one wallet type.
Well, maybe except for seeded wallet: which would maybe be a subclass of descriptor wallet.

@jonjonez
Copy link

jonjonez commented Feb 9, 2024

Certainly, if this release occurs with all these features mentioned, it would be great. I hope you take into consideration what I mentioned in #8879 , and adding:

For a newbie, the easiest and safest thing to do is to sweep the private key.
As an advanced user, you can create an imported wallet, and use pay-to-multi (batched payment) where you directly pay whatever amount you want to whomever and also send the rest to a change address in your other (HD) wallet.

Sweeping a private key is not viable in times of congested mempool, in addition, the user may have several reasons for just wanting to import instead of sweep. Please take this into consideration.

I know about pay-to-multi, but doing this manually is not viable, it would be nice if this was automatic in the wallet (considering if the private key was imported into the existing keypair).

Currently I can import private keys by creating a new file just for imported keys, there is a change address option to select, then the wallet sends the remaining balance to the next address added as change, but this is not satisfactory, because in an imported wallet I I can only add private keys, that is, if I want to add only addresses to this file without revealing the private key to use it as change I can't, I have to import the private key, and this address of mine can be used as cold storage, but then it will no longer be cold storage because I'd have to reveal the private key, this is insecure and exposes me to risk without any need.

Wouldn't it be easier or no longer distinguish between private keys and watch-only addresses when creating a new file just to import new addresses and/or private keys than one just for private keys and the other just for watch-only, do you understand my point?

Or import directly into the existing keypair of an HD wallet, and if you find this insecure due to the possibility of an inexperienced user losing funds by deleting either the imported private key or the HD wallet, then consider adding a command in the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
Projects
None yet
Development

No branches or pull requests

2 participants