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
Add joinpsbts
functionality
#76
Conversation
please rebase and check that all new 5 GitHib actions succed |
should be rebased before being merged
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.35%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
add method to merge psbts list expansion in function inputs fix outpoint is not hashable add initial basic test for join_txs test few error cases add minimal test for join_psbts raise proper error messages in case of join failures instead of AssertionError avoid privacy leak from input/output ordering, see: bitcoin/bitcoin#16512 refactor to reduce method complexity fix linting issues and error messages add failure test cases to bring coverage back to 100% 'Refactored by Sourcery' allow to sort inputs and outputs when joining also provide methods to sort psbt_{in|out} inplace [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci cleaned up cleaned up make HdKeyPaths a MutableMapping cleaned up _sort_together, added tests to complete coverage fixed checking of errors fixed error messages
for more information, see https://pre-commit.ci
Bitcoin Core has a function that allows to merge multiple unsigned PSBTs into one which contains the union of inputs and outputs from the input PSBTs. This is relevant for every usecase in which the set of inputs and outputs of a transaction is collaboratively defined by a set of entities that do not necessarily have a coordinator; for instance it is often used in coinjoin/payjoin transactions.
This PR aims to bring a similar functionality to
btclib
, choosing flexibility where possible but striving to keep compliance with bitcoin core as the default behavior.