Moved funds sweep Bitcoin transaction #3790
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#Closes #3737.
This PR introduces the creation of Bitcoin moved funds sweep transaction which allows the target wallet to merge funds moved from the source wallet with the target wallet's main UTXO.
The creation of the Bitcoin moved funds sweep transaction is the responsibility of movedFundsSweepAction which is executed after the moved funds sweep proposal has been prepared.
Executing the movedFundsSweepAction consists of several steps:
initial validation of the moved funds sweep proposal against the Ethereum network
assembling the moved funds sweep Bitcoin transaction
signing the moved funds sweep Bitcoin transaction
broadcasting the moved funds sweep Bitcoin transaction
The moved funds sweep Bitcoin transaction always consists of one input (the UTXO moved from the source wallet) and optionally the second input (wallet's main UTXO). There is always one output which transfers the funds back to the wallet and becomes the wallet's new main UTXO.