#bitcoin #wallet #cryptocurrency #descriptor #miniscript

descriptor-wallet

Library for building descriptor-based bitcoin wallets

23 releases

0.5.2 Jan 8, 2022
0.5.1 Dec 18, 2021
0.5.0 Nov 23, 2021
0.5.0-alpha.5 Aug 31, 2021
0.3.5 Jan 26, 2021

#1030 in Magic Beans

Download history 314/week @ 2021-09-26 237/week @ 2021-10-03 119/week @ 2021-10-10 128/week @ 2021-10-17 187/week @ 2021-10-24 310/week @ 2021-10-31 300/week @ 2021-11-07 543/week @ 2021-11-14 366/week @ 2021-11-21 1028/week @ 2021-11-28 2134/week @ 2021-12-05 2266/week @ 2021-12-12 719/week @ 2021-12-19 735/week @ 2021-12-26 172/week @ 2022-01-02 77/week @ 2022-01-09

1,986 downloads per month
Used in 20 crates (11 directly)

Apache-2.0

47KB
1K SLoC

Descriptor wallet library

Build Tests Lints codecov

crates.io Docs unsafe forbidden Apache2 licensed

Library for building descriptor-based bitcoin wallets. Everything a modern read-only bitcoin wallet needs, but which is not (yet) a part of rust-bitcoin library.

NB: The library does not work with private keys; it is advised that wallets will be designed in a way assuming zero private key access for all of their operations aside from transaction signing; this part must be separated into other repository/library and be strictly controlled.

This library previously was a part of LNP/BP Core Library.

Library components:

  • More efficient manipulations with BIP-32 derivation paths
  • Universal miniscript/classical bitcoin descriptors
  • Script templates allowing embedding extended pubkeys into bitcoin script assembly
  • Lexicographic ordering of transaction & PSBT inputs & oututs
  • Script type system
  • Helper types for working with hash-lock contracts
  • PSBT utility functions (retrieving previous output, computing fee)

Includes separate crate for SLIP-132 functionality in /slip132 subdirectory.

Dependencies

~6MB
~111K SLoC