Skip to content

Conversation

@JAGADISHSUNILPEDNEKAR
Copy link
Contributor

@JAGADISHSUNILPEDNEKAR JAGADISHSUNILPEDNEKAR commented Mar 22, 2025

Add PSBT (BIP-174) Support

Overview

This PR implements Partially Signed Bitcoin Transaction (PSBT) functionality as defined in BIP-174. After careful study of the specification, I've created a focused implementation that integrates with the existing codebase while maintaining its structure and style.

Changes

  • Added core PSBT implementation in bitcoinutils/psbt.py
  • Created five example files demonstrating PSBT usage:
    • create_psbt.py: Creating new PSBTs
    • sign_psbt.py: Signing inputs with private keys
    • combine_psbt.py: Combining partially signed PSBTs
    • finalize_psbt.py: Finalizing PSBTs for broadcast
    • psbt_multisig_wallet.py: Using PSBTs with multisig wallets
  • Added four targeted test files following existing patterns:
    • test_psbt.py: Core PSBT creation and parsing
    • test_psbt_sign.py: PSBT signing functionality
    • test_psbt_combine.py: Combining multiple PSBTs
    • test_psbt_finalize.py: Finalizing and extracting transactions

Implementation Notes

  • All functionality follows BIP-174 specification
  • Made minimal changes to existing files
  • Tests use the current testing framework with no additional dependencies
  • Each component is thoroughly tested and documented

Testing

All tests are passing

This PR focuses exclusively on PSBT functionality without introducing unrelated changes or dependencies.

@JAGADISHSUNILPEDNEKAR JAGADISHSUNILPEDNEKAR changed the title expt Add PSBT (Partially Signed Bitcoin Transaction) Support Mar 24, 2025
@JAGADISHSUNILPEDNEKAR
Copy link
Contributor Author

Hi @karask
Last time,I had not implemented the things which you mentioned. I am extremely sorry that I disappointed you with my work but this time I took your feedback to my heart and have hopefully made all the changes which you had asked me to implement

I would highly love to listen to your feedback on this PR
Let me know if you need any further changes in this
I would try to implement this asap!!

@JAGADISHSUNILPEDNEKAR
Copy link
Contributor Author

All the tests are passing
Screenshot 2025-03-24 at 2 25 26 PM

@JAGADISHSUNILPEDNEKAR
Copy link
Contributor Author

Only the necessary files related to PSBT implementation are present
Kept the codebase clean
Screenshot 2025-03-24 at 3 58 47 PM
Screenshot 2025-03-24 at 3 58 58 PM

@JAGADISHSUNILPEDNEKAR JAGADISHSUNILPEDNEKAR changed the title Add PSBT (Partially Signed Bitcoin Transaction) Support Add PSBT (Partially Signed Bitcoin Transaction) Support - BIP 174 Mar 26, 2025
@karask
Copy link
Owner

karask commented Apr 1, 2025

Hi @JAGADISHSUNILPEDNEKAR I will not check PSBT code (from anyone) anymore, until the proposals come in. In the proposals I expect to see the design, rationale, how you intend to implement it, etc.

@JAGADISHSUNILPEDNEKAR
Copy link
Contributor Author

JAGADISHSUNILPEDNEKAR commented Apr 2, 2025

Okay I will keep this in mind and work on some other issues
I have already started to implement some TODOs
Would love your feedback :)

@karask
Copy link
Owner

karask commented May 8, 2025

Closing since we are working on the design / implementation from scratch.

@karask karask closed this May 8, 2025
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.

2 participants