feat(utxo): refactor signing flow and improve MuSig2 support#7671
Merged
OttoAllmendinger merged 7 commits intomasterfrom Dec 2, 2025
Merged
feat(utxo): refactor signing flow and improve MuSig2 support#7671OttoAllmendinger merged 7 commits intomasterfrom
OttoAllmendinger merged 7 commits intomasterfrom
Conversation
Adds configuration option to exclude p2trMusig2 script path inputs from ACID test suites, as they often require special handling. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Rename method to better reflect its actual functionality as a getter for MuSig2 nonces rather than a signing operation. Keep the old method as deprecated to maintain backward compatibility. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Move RootWalletKeys type definition to utxo-lib from abstractUtxoCoin to better organize code structure and eliminate circular dependencies. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Move signTransaction function to standalone module that doesn't depend on AbstractUtxoCoin. Move DecodedTransaction type to types.ts to break dependency cycle. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Include PSBT script type in InputSigningError to improve debugging of transaction signing issues. This provides better visibility into which input types are failing during the signing process. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Update the getMusig2Nonces method to accept a UtxoPsbt object directly instead of a hex string. This improves type safety and reduces unnecessary encoding/decoding. Also add a helper method decodeTransactionAsPsbt to validate and cast decoded transactions to UtxoPsbt. Update dependent functions to use the new method signature and refactor to avoid unnecessary conversion steps. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
Tests the signAndVerifyPsbt function for transaction signing, verifying that it correctly signs PSBTs and validates signatures for different input types. Issue: BTC-2806 Co-authored-by: llm-git <llm-git@ttll.de>
6d0f574 to
cc18fec
Compare
cc18fec to
1eee8fe
Compare
davidkaplanbitgo
approved these changes
Dec 2, 2025
lcovar
approved these changes
Dec 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR includes several key improvements to the UTXO signing architecture:
signPsbttogetMusig2Noncesto better reflect its functionalitygetMusig2Noncesto accept UtxoPsbt objects directly for type safetysignTransactionaway from AbstractUtxoCoin to a standalone moduleThe changes aim to improve code organization, reduce circular dependencies,
and enhance the developer experience when working with MuSig2 and PSBT
signing.
BTC-2806