Test scripts for the Bitcoin Wallet RPC service. Each script targets a specific endpoint.
-
Start the server:
uvicorn main:app --host 127.0.0.1 --port 8000
-
The base URL is hardcoded as
http://127.0.0.1:8000in each script.
Verifies the /health endpoint is responding correctly. No configuration needed.
Tests the /history endpoint — fetches transaction history for wallet addresses.
Setup: Add your Bitcoin addresses (one per line) to addrs.txt in this directory. Lines starting with # are ignored.
Tests the /transactions endpoint — fetches verbose details for transaction hashes.
Setup: Add transaction hashes (one per line, 64-char hex) to tx_hashes.txt in this directory.
Tests the /derive endpoint — derives wallet addresses from a BIP84 master private key.
Setup: Edit the script and set your master private key (XPRV, prefix ttpv.../xprv...), ACCOUNT_INDEX, and ADDRESS_INDEX.
../env12/bin/python test_health.py
../env12/bin/python test_history.py
../env12/bin/python test_transactions.py
../env12/bin/python test_derive.py