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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisig/watchonly wallet transaction creation flow proof of concept #5743

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kukks
Copy link
Member

@Kukks Kukks commented Feb 8, 2024

This PR introduces a new concept, "pending transactions" (working title 馃拃). The idea is that if you have a watch only/multsig wallet, if you need to create a transaction, you currently have to

  • Wait until you have access to your (or all) private keys and hope you remember all the details of the transaction
  • Hand over a psbt to various parties manually to sign

With this PR, you can create a transaction as usual, but instead of signing you "create a pending transaction". A pending transaction is essentially a PSBT that fleshes out what coins to spend and where to spend them, and collects signatures as signers provide them. Once there are enough signatures, you can broadcast.

If the coins being spent by a pending transaction are spent elsewhere before the signatures are fully collected, the pending transaction is "invalidated".
If the transaction was signed out of band, using other means, BTCPay Server will detect it and mark it complete anyway.

With this system, a payout processor can create pending transactions out of payouts awaiting payments, and mark them as in progress. We can make the system send emails when a pending transaction is created to alert signing parties to come online and sign. If more payouts are added to the awaiting payment list, and the previous pending transaction did not collect any signatures, we can cancel that pending transaction, and create a fresh pending transaction with all the new payouts too, reducing the number of transactions needed.

Essentially, this system enables functionality that was deemed to be only possible for hot wallets.

There is also an optional expiry so that pending transactions can expire (as the fees are determined at the time of the transaction creation, you do not want the pending transaction to be there for too long and avoid the need of another fee bump transaction).

Currently, pending transactions show at the top of the transactions list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant