#bitcoin #wallet #cryptocurrency #psbt #taproot

psbt

Partially signed bitcoin transaction v0-2 library (bip174, bip370, bip371)

28 releases

0.9.0 Jan 25, 2023
0.9.0-rc.1 Dec 25, 2022
0.9.0-alpha.2 Nov 17, 2022
0.8.5 Jul 30, 2022
0.5.0 Nov 23, 2021

#623 in Magic Beans

Download history 202/week @ 2022-11-28 139/week @ 2022-12-05 206/week @ 2022-12-12 298/week @ 2022-12-19 673/week @ 2022-12-26 257/week @ 2023-01-02 239/week @ 2023-01-09 372/week @ 2023-01-16 437/week @ 2023-01-23 464/week @ 2023-01-30 327/week @ 2023-02-06 219/week @ 2023-02-13 345/week @ 2023-02-20 363/week @ 2023-02-27 443/week @ 2023-03-06 286/week @ 2023-03-13

1,472 downloads per month
Used in 29 crates (9 directly)

Apache-2.0

280KB
5.5K SLoC

PSBT implementation

Implements both v0 (BIP-174) and v2 (BIP-370) versions of PSBT specification.

Based on bitcoin PSBT implementation, but wraps it into new type system supporting v2 features and providing convenient functions to iterate over sets of transaction inputs/outputs and corresponding PSBT key maps.


lib.rs:

PSBT bitcoin library, providing all PSBT functionality from [bitcoin] library, plus

  • constructor, supporting miniscript-based descriptors, input descriptors, all sighash types, spendings from P2C, S2C-tweaked inputs ([construct]);
  • advanced signer, supporting pre-segwit, bare and nested segwit v0, taproot key and path spendings, different forms of tweaks & commitments, all sighash types ([sign]);
  • commitment-related features: managing tapret-, P2C and S2C-related proprietary keys;
  • utility methods for fee computing, lexicographic reordering etc;
  • command-line utility for editing PSBT data (WIP).

Dependencies

~11MB
~162K SLoC