bitwalkit — Watch-only Bitcoin wallet toolkit
bitwalkit is a standalone, dependency-free Python toolkit for deriving and
monitoring Bitcoin watch-only wallets. It handles public wallet data only: the
library does not accept private extended keys, hold secrets, or sign
transactions.
Its public API covers three tasks:
- Derive single-signature and multisignature addresses from extended public
keys with
AccountandMultisigAccount. - Query address balances, UTXOs, and transaction history through an Electrum
server with
ChainQuery. - Call a Bitcoin Core node over JSON-RPC with
NodeRPC.
The runtime uses only the Python standard library. A small, public-key-only secp256k1 implementation validates compressed public keys, derives non-hardened BIP32 child public keys, and applies the BIP341/BIP86 Taproot output-key tweak. It is not suitable for private-key handling or transaction signing. There are no packages to install at runtime.
Supported wallets
- Single-key P2PKH (BIP44), P2SH-P2WPKH (BIP49), P2WPKH (BIP84), and P2TR (BIP86)
- P2WSH and P2SH-P2WSH multisig (BIP48), with optional BIP67 key sorting
- Mainnet, testnet, and regtest addresses
- BIP32 and SLIP-0132 public prefixes: xpub/tpub, ypub/upub, zpub/vpub, and the corresponding multisig prefixes
Only non-hardened children can be derived from an extended public key. Export an account-level public key from the signing wallet before using this library.
Install
Install the latest release from PyPI:
python -m pip install bitwalkit
For development, clone and install from the repository root:
git clone https://github.com/elmeriniemela/bitwalkit.git
cd bitwalkit
python -m pip install -e '.[dev]'
Usage
import bitwalkit as bw
# The SLIP-0132 prefix selects the default script type.
account = bw.Account("zpub6r...")
first_receive = account.receive_address(0)
first_change = account.change_address(0)
gap_limit = account.addresses(change=0, count=20)
# Pass script_type explicitly when xpub alone is ambiguous, as with BIP86.
taproot = bw.Account("xpub6B...", script_type="p2tr")
# Multisig derives the same change/index path for every cosigner.
multisig = bw.MultisigAccount(
["Zpub...", "Zpub...", "Zpub..."],
m=2,
script_type="p2wsh",
)
# Query public chain state by address.
chain = bw.ChainQuery("electrum.example.com", port=50002, use_ssl=True)
balance = chain.get_balance(first_receive)
utxos = chain.get_utxos(first_receive)
history = chain.get_history(first_receive)
balances = chain.get_balances(gap_limit)
# Optional direct Bitcoin Core RPC access.
node = bw.NodeRPC("http://127.0.0.1:8332", "rpcuser", "rpcpassword")
height = node.getblockcount()
Network access is performed only when calling ChainQuery or NodeRPC.
Address derivation and encoding are fully local.
Tests
python -m pytest
python -m pyright
The suite covers malformed input handling, BIP32 public derivation, address encoding, BIP44/49/84/86 derivation, BIP341 taproot vectors, multisig, Electrum protocol behavior, and Bitcoin Core JSON-RPC response handling.
License
MIT. See COPYING.
Metadata
Release files for bitwalkit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bitwalkit-0.1.0.tar.gz | 40.9 kB | With provenance | Details for bitwalkit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bitwalkit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for bitwalkit-0.1.0-py3-none-any.whl |
Total release size: 64.5 kB
Release files / bitwalkit-0.1.0.tar.gz
| Download URL | bitwalkit-0.1.0.tar.gz |
|---|---|
| Size | 40.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5575f1029ed9747f14e3e1693a9f28d06875498333ecb9a452176d0c35cab032
|
|
BLAKE2b-256 checksum How to use checksums |
ad1dcdecb7ce2ade14246f0a86b02c0df169df987e344b327f8c87641af47dea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / bitwalkit-0.1.0-py3-none-any.whl
| Download URL | bitwalkit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cd62d0879aa36f0c85d66e7389e71fdc9c3fa6d37906cc3b97b8410a1917567
|
|
BLAKE2b-256 checksum How to use checksums |
a4e69e59a9b4498ee2e1b8ee40cb1bd927489183daccc5627adbd5a377fc80c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logSecurity for bitwalkit 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bitwalkit-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.