Skip to content

Complete PSBT Workflow Implementation Including Multisig Support and Script Enhancements #172

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

JAGADISHSUNILPEDNEKAR
Copy link
Contributor

@JAGADISHSUNILPEDNEKAR JAGADISHSUNILPEDNEKAR commented Jul 1, 2025

This pull request introduces a complete suite of Python scripts that collectively implement an end-to-end Partially Signed Bitcoin Transaction (PSBT) workflow using a 2-of-3 multisig setup on Bitcoin Testnet. The contributions include:

Key Additions:

  1. create_psbt_multisig.py

    • Generates a 2-of-3 P2WSH multisig address.
    • Creates an unsigned transaction using real testnet UTXOs.
    • Produces a base64-encoded PSBT ready for signing.
  2. sign_psbt.py

    • Allows signing of a specific PSBT input using a private key in WIF format.
    • Supports custom sighash types.
  3. combine_psbt.py

    • Combines multiple partially signed PSBTs into a single PSBT.
  4. finalize_psbt.py

    • Finalizes a PSBT and optionally validates the resulting transaction.
    • Prints hex-encoded signed transaction ready for broadcast.
  5. psbt.py

    • Core implementation of the PSBT class
    • Logic for signing, combining, finalizing, and analyzing PSBT contents.
  6. Modified Script Class

    • Extended Script class to enhance parsing, formatting, and identification of script types (e.g., P2WPKH, P2WSH, multisig).
    • Provides serialization, deserialization, and address generation from witness scripts.

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.

1 participant