Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Thanks to #5721 Electrum can now export PSBT files. I tried this with a multi-signature setup (3 imported Vpubs) and inspected it in Bitcoin Core with
There's a case to be made for that. Multisig wallets should commit to the xpubs of their cosigners anyway, so they might as well use relative derivation.
However it would be nice to at least have the option of using the full path and the master key fingerprint. Perhaps this could be achieved by adding two optional fields during wallet setup: root derivation and master key fingerprint.
You are right to notice that the wallet itself currently does not even have the full path (only has derivation suffix) and the root fingerprint -- at least in the case when only given an xpub. This would require changes to the wizard. See #5715
Even if the wallet had this information, one could argue there are cases where it would be better not to include it in the PSBT (better for privacy) -- just like whether the global xpubs fields should be populated. see #5672 (comment)
In some cases, e.g. when doing a coinjoin, it is best to strip almost all the fields (again, for privacy).
I'm not sure how to proceed with this matter in general. I guess #5715 is the blocker.
To be compatible with existing software and hardware. For example with HWI you can ask a device for an xpub at any derivation depth, but you can't give a device an xpub; it won't recognise it. Hardware wallets generally don't store an xpub to deriviation path mapping.
Even multi-sig wallets, they have a security need to store the xpub of their cosigners (most don't atm), but no need to store their own xpub (which they can and probably should derive from the seed each time).