Skip to content

Commit bee4d82

Browse files
committed
Merge #32: feat(cookbook): PSBTs multiple inputs
81c90e6 test: add glob dir to capture all nested *.md files (Jose Storopoli) e1e6c8e feat(cookbook): PSBTs multiple input signing (Jose Storopoli) Pull request description: Adds examples on how to create, update, sign, and finalize PSBTs version 0 that deals with multiple inputs. Examples are SegWit V0 and Taproot. - [x] updates CI to capture all nested `*.md` files - [x] PSBT introduction - [x] SegWit V0 - [x] Taproot Closes #26. ACKs for top commit: tcharding: ACK 81c90e6 Tree-SHA512: 3ac21dc8d6ce28adae352388303438fa6fed75cc0a94a888abb8c30b0e6af5c8bdc3a722fb99addb73fd21c45dc68d181171dca8df170aaab6b02a7571b0b4c4
2 parents d2b7067 + 81c90e6 commit bee4d82

File tree

6 files changed

+1174
-1
lines changed

6 files changed

+1174
-1
lines changed

cookbook/src/SUMMARY.md

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
- [Constructing and Signing Transactions](tx.md)
77
- [SegWit V0](tx_segwit-v0.md)
88
- [Taproot](tx_taproot.md)
9+
- [Working with PSBTs](psbt.md)
10+
- [Constructing and Signing Multiple Inputs - SegWit V0](psbt/multiple_inputs_segwit-v0.md)
11+
- [Constructing and Signing Multiple Inputs - Taproot](psbt/multiple_inputs_taproot.md)

cookbook/src/intro.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ over the peer-to-peer network, plus fun stuff you can do with miniscript.
2323
1. [Constructing and Signing Transactions](tx.md)
2424
1. [SegWit V0](tx_segwit-v0.md)
2525
1. [Taproot](tx_taproot.md)
26+
1. [Working with PSBTs](psbt.md)
27+
1. Constructing and Signing Multiple Inputs:
28+
1. [SegWit V0](psbt/multiple_inputs_segwit-v0.md)
29+
1. [Taproot](psbt/multiple_inputs_taproot.md)
2630

2731
## License
2832

cookbook/src/psbt.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Working with PSBTs
2+
3+
The Partially Signed Bitcoin Transaction (PSBT) format specifies an encoding for partially signed transactions.
4+
PSBTs are used in the context of multisignature wallets, hardware wallets,
5+
and other use cases where multiple parties need to collaborate to sign a transaction.
6+
7+
PSBT version 0 is defined in [BIP 174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki).
8+
It specifies 6 different roles that a party can play in the PSBT workflow:
9+
10+
- **Creator**: Creates the PSBT and adds inputs and outputs.
11+
- **Updater**: Adds additional information to the PSBT,
12+
such as `redeemScript`, `witnessScript`, and BIP32 derivation paths.
13+
- **Signer**: Signs the PSBT, either all inputs or a subset of them.
14+
- **Combiner**: Combines multiple PSBTs into a single PSBT.
15+
- **Finalizer**: Finalizes the PSBT,
16+
adding any information necessary to complete the transaction.
17+
- **Extractor**: Extracts the finalized transaction from the PSBT.
18+
19+
Note that multiple roles can be handled by a single entity
20+
but each role is specialized in what it should be capable of doing.
21+
22+
We provide the following examples:
23+
24+
- [Constructing and Signing Multiple Inputs - SegWit V0](psbt/multiple_inputs_segwit-v0.md)
25+
- [Constructing and Signing Multiple Inputs - Taproot](psbt/multiple_inputs_taproot.md)
26+
27+
For extra information, see the [Bitcoin Optech article on PSBTs](https://bitcoinops.org/en/topics/psbt/).

0 commit comments

Comments
 (0)