Skip to main content

Wrapper around hwi, such that one can sign bdk PSBTs directly

Project description

Wrapper around hwi, such that one can sign bdk PSBTs directly

  • This provides an abstraction layer ontop of hwi, such that only bdk is needed from the outside

  • Currently supported are

    • Coldcard
    • Bitbox02
    • Jade
    • Trezor Safe 5
  • It also provides

    • AddressTypes, which are the commonly used bitcoin output descriptor templates
    • seed_tools.derive_spk_provider to derive xpubs from seeds for all AddressTypes (bdk does not support multisig templates currently https://github.com/bitcoindevkit/bdk/issues/1020)
    • SoftwareSigner which can sign single and multisig PSBTs, this doesn't do any security checks, so only use it on testnet
    • HWIQuick to list the connected devices without the need to unlock them

Demo

Run the demo with

python demo.py

Tests

Run tests

python -m pytest -vvv  --log-cli-level=0

Library Usage

  • For xpub derivation bip_utils is used
  • For signing a psbt python-bitcointx is used

Install package

From pypi

pip install bitcoin_usb

From git

  • Install requirements:
poetry install
  • Automatic commit formatting
pip install pre-commit
pre-commit install
  • Run the precommit manually for debugging
pre-commit run --all-files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitcoin_usb-0.7.2.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitcoin_usb-0.7.2-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file bitcoin_usb-0.7.2.tar.gz.

File metadata

  • Download URL: bitcoin_usb-0.7.2.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.9 Linux/6.8.0-51-generic

File hashes

Hashes for bitcoin_usb-0.7.2.tar.gz
Algorithm Hash digest
SHA256 efc0c43274522852caa782306327c69b4c94fd049942610dfebc58005c0458b5
MD5 17029b3ca27f7a8102801e6cabd986a2
BLAKE2b-256 6701bc882c9e5a29c2166a51db97b006a4592e6abbac5a10da246a0af5107870

See more details on using hashes here.

File details

Details for the file bitcoin_usb-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: bitcoin_usb-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.9 Linux/6.8.0-51-generic

File hashes

Hashes for bitcoin_usb-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3df1387a7622e885f5fc3ba08e4c791d7450c8401bab5139fd6ff1f3b4878b25
MD5 28435381b3a70e2747f855a382011422
BLAKE2b-256 5c3119dfd517e14e19e3e858aa9e71d80423a395746d9cb9586d7610a4db05b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page