Package: buidl
buidlBitcoin Librarybuidlis apython3bitcoin library with 0 dependencies.
It is easy-to-read, has extensive test coverage, simple to install on airgapped computers (just copy over this directory).buidlhas extensive feature support for the bitcoin blockchain:Trust-minimized- easy-to-read cryptography implemented in straightforward/way with no third-party dependenciesPerformant- optionalsecp256k1 library bindingsoffers a ~100x speedup, seeperformance section belowWallet toolsfor various script types (p2pkh,p2sh,p2sh-wrapped-p2wsh,p2wshandp2tr(coming soon) ), compressed/uncompressed pubkeys, address encodings, HD support (BIP32, BIP39, BIP44, seedpicker, etc), PSBT generation/decoding/validation, etcExtensive multisig support/tooling for output descriptors, receive address validation, change address detection, fee verification, blinding xpubs, PSBTs,BCUR v0(v1 coming soon), airgap signing, etcSPV proofs and compact block filters(Neutrino) - build powerful trust-minimized apps without scanning the whole blockchainP2P gossip network- connect directly to the bitcoin networkFootgun protection- from elegantly structured OOP classes toRFC6979deterministic k-values,buidlis designed to be usable for non-cryptographers0 altcoins- for maximum readability/focus. The only other supported coins are bitcoin'stestnetandsignet, which intentionally have no value.This repository comes with zero guarantees, use at your own risk.InstallationOnline$pip3installbuidl--upgradeOfflineDownload this repo and then run:$python3setup.pyinstall(alternatively, becausebuidlhas no dependencies you can justcdinto this root directory and callbuidlwithout installation)Multiwalletmultiwalletis a stateless CLI multisig PSBT wallet.
Sincebuidlhas no dependencies, you can run multiwallet by justcding to the root directory of this project:$python3multiwallet.py
Welcometomultiwallet...If you have installedbuidl, you can runmultiwallet.pyfrom any directory:$multiwallet.py
Welcometomultiwallet...For more information on installing multiwallet, seemultiwallet.mdor check outthis demo.singlesweep.pyworks the same way for sweeping out of paper wallets, but is intentionally undocumented.TestsRun tests withpytest:$gitclonehttps://github.com/buidl-bitcoin/buidl-python.git&&cdbuidl-python
$pytest-v(these will be 1-2 orders of magnitue faster with libsec bindings, seeperformance section below)Runblack:$black.--diff--checkRunflake8:$flake8.PerformanceYou can speed this library up ~100x by using C-bindings tobitcoin core'slibsecp256k1library.libsecp256k1Dependency InstallationEasy (MacOS only)Usebrewto installlibsecp256k1:$ brew tap buidl-bitcoin/homebrew-libsecp256k1
$ brew install pkg-config libffi libsecp256k1Hard (Linux/Mac)Compilelibsecp256k1from scratch with experimental modules enabled to make Schnorr signatures work:$gitclonehttps://github.com/bitcoin-core/secp256k1
$cdsecp256k1
$./autogen.sh
$./configure--enable-module-extrakeys--enable-module-schnorrsig--enable-experimental
$make
$sudomakeinstallbuidlInstallation$gitclonegit@github.com:buidl-bitcoin/buidl-python.git&&cdbuidl-python&&python3-mpipinstall-rrequirements-libsec.txt&&python3-mpipinstall--editable.&&cdbuidl&&python3libsec_build.py&&cd..&&python3-c"from buidl import *; print('success') if is_libsec_enabled() else print('LIBSEC INSTALL FAIL')"