-
Notifications
You must be signed in to change notification settings - Fork 72
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
Supporting multiple wallet policies in SIGN_PSBT
#219
Comments
SIGN_PSBT
SIGN_PSBT
That would indeed be a great idea and should happen at some point. However, it's quite tricky to generalize the signing flow to work with multiple policies in the same transaction. A wallet policy models an account, so spending from multiple policies makes the flow a lot more complicated, both in terms of signing logic and UX, so it's unlikely we'll have bandwidth to work on this any time soon. For the time being, the suggestion is to suggest that users do not mix different "accounts" (and therefore, different address types) in the same transaction. |
Could you share why it would be tricky from a UX/engineering perspective? Or perhaps what an acceptable implementation of |
You can see the current signing flow (currently for a single wallet policy) in sign_psbt.c. This is a rough summary of what would it take to generalize:
This generalized flow would be challenging to support on Nano S, as it would probably imply a somewhat increased RAM usage, which is a very scarce resource on Nano S. I would also consider #124 a blocker for this issue, as the support for sighash flags is currently quite buggy, and figuring out how to do that correctly for the single-policy case seems wise before attempting a generalization to multiple policies. |
When spending UTXOs with multiple wallet policies, you have to call
SIGN_PSBT
multiple times for each wallet policy. A common use case is that the user has both a Taproot (86) and Segwit (84) address and we're spending UTXOs from both.The text was updated successfully, but these errors were encountered: