holgern / buidl-python

python3 bitcoin library with no dependencies and extensive test coverage

Home Page:https://pypi.org/project/buidl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

THIS REPOSITORY COMES WITH ZERO GUARANTEES! USE AT YOUR OWN RISK!

buidl is a python3 bitcoin library with no dependencies. It is easy-to-read and has extensive test coverage. Because buidl has no dependencies, it is easy to install on airgapped computers (just copy over this directory).

Installation

Online

$ pip3 install buidl --upgrade

Offline

Download this repo and then run:

$ python3 setup.py install

Multiwallet

multiwallet is a stateless CLI multisig PSBT wallet. Since buidl has no dependencies, you can run multiwallet by just cding to the root directory of this project:

$ python3 multiwallet.py
Welcome to multiwallet...

If you have installed buidl, you can run multiwallet.py from any directory as follows:

$ multiwallet.py
Welcome to multiwallet...

For more information on installing multiwallet, see multiwallet.md.

Tests

Run tests with pytest:

$ git clone https://github.com/buidl-bitcoin/buidl-python.git && cd buidl-python
$ pytest -v

Run black:

$ black . --diff --check

Run flake8:

$ flake8 .

Performance

You can speed this library up ~100x by using C-bindings to bitcoin core's libsecp256k1 library.

OS Installation

On Ubuntu:

$ sudo apt install libsecp256k1-dev

On MacOS (HT cuber):

$ brew tap cuber/homebrew-libsecp256k1 && brew install pkg-config libffi libsecp256k1

Python Installation

$ git clone git@github.com:buidl-bitcoin/buidl-python.git && cd buidl-python && python3 -m pip install -r requirements-libsec.txt && python3 -m pip install --editable . && cd buidl && python libsec_build.py && cd ..

TODO:

  • Add libsec support/instructions to pypi version

About

python3 bitcoin library with no dependencies and extensive test coverage

https://pypi.org/project/buidl/

License:MIT License


Languages

Language:Python 99.4%Language:C 0.3%Language:Shell 0.3%