Registry / auth-security / bitcoin-utils

bitcoin-utils

JSON →
library0.8.2pypypiunverified

A Python library for Bitcoin utility functions, including key generation, transaction building, and script manipulation. Version 0.8.1 is the latest release. Development and release cadence are intermittent.

pip install bitcoin-utils
INSTALL
IMPORT
SIG · BITCOIN-UTILS
B
bitcoin-utils
auth-securitypythonv0.8.2
Install
6.6s avg
Import
Disk
90MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 79.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.6s · import 0.000s · 80MB
90MB installed
● package 90MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BitcoinAddress
from bitcoinutils.utils import BitcoinAddress
from bitcoinutils.utils import BitcoinAddress
Script
from bitcoinutils.script import Script
from bitcoinutils.script import Script
setup
from bitcoinutils.setup import setup
from bitcoinutils.setup import setup

Demonstrates basic setup, key generation, and P2PKH address creation on regtest.

from bitcoinutils.setup import setup from bitcoinutils.keys import PrivateKey from bitcoinutils.utils import BitcoinAddress from bitcoinutils.script import Script # Setup network setup('regtest') # Generate private key priv = PrivateKey() print('Private key:', priv.to_wif()) # Get public key pub = priv.get_public_key() print('Public key:', pub.to_hex()) # Generate P2PKH address addr = pub.get_address() print('Address:', addr.to_string())
bitcoin-utils --version
Debug
Known issues
breakingNetwork setup must be called before any other operations. Failure to call setup() leads to cryptic errors.
fix
Always call setup('mainnet') or setup('testnet') or setup('regtest') first.
affects: all
gotchaPrivateKey generates new random keys by default. To recover from a WIF, use PrivateKey.from_wif().
fix
Use PrivateKey.from_wif('L...') instead of PrivateKey()
affects: all
Upgrade
Version history
0.8.2latest on PyPI · released May 4, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
25
OpenAI (training)
1
Resources