π Cross-SDK Interoperability (v2.0.0)
BRC-100 compliance with cross-SDK interoperability. Compatible with TypeScript SDK and Go SDK (v2.0.0+). Compatible with wallet-toolbox v2.0.0+.
Installation:
pip install bsv-wallet-toolbox
BRC-100 conforming wallet implementation providing production-ready, persistent storage components. Built on top of the official Python SDK, this toolbox helps you assemble scalable wallet-backed applications and services.
- Objective
- Current Status
- Getting Started
- Features
- Architecture
- Compatibility
- Contribution Guidelines
- Support & Contacts
- License
The BSV Wallet Toolbox builds on the BSV SDK for Python and provides:
- Production-Ready Wallet: Full BRC-100 WalletInterface implementation with persistent storage
- Database Persistence: SQLAlchemy-based storage compatible with SQLite, PostgreSQL, and MySQL
- Cross-Language Compatibility: 100% compatible with TypeScript and Go implementations
- Universal Test Vectors: Validated against official BRC-100 test data
- SPV-Friendly Workflows: Privacy-preserving, scalable wallet operations
Version: 2.0.2
| Metric | Status |
|---|---|
| Lint Critical Errors | β 0 |
| Test Suite | β 846 tests |
| Manual Tests | β 29 tests |
| Reference Unification | β 851 locations (TS/Go compliant) |
See CHANGELOG.md for detailed version history.
- Python 3.11 or higher (3.11, 3.12, 3.13)
- pip package manager
- SQLite (included with Python) or PostgreSQL/MySQL (optional)
pip install bsv-wallet-toolboxgit clone https://github.com/bsv-blockchain/py-wallet-toolbox.git
cd py-wallet-toolbox
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or .venv\Scripts\activate on Windows
pip install -e .[dev]import asyncio
from bsv_wallet_toolbox import Wallet
async def main():
wallet = Wallet(chain="main") # or chain="test" for testnet
result = await wallet.get_version({})
print(f"Wallet version: {result['version']}")
if __name__ == "__main__":
asyncio.run(main())from bsv_wallet_toolbox import Wallet, InvalidParameterError
async def example():
wallet = Wallet(chain="main")
try:
result = await wallet.get_version({}, originator="x" * 251)
except InvalidParameterError as e:
print(f"Error: {e}")- β BRC-100 compliant WalletInterface
- β Full type hints with mypy strict mode
- β Async/await with asyncio
- β Cross-platform (Linux, macOS, Windows)
- β pytest-based testing framework
- β³ 28 BRC-100 methods (full WalletInterface)
- β³ SQLAlchemy-based storage (SQLite/PostgreSQL/MySQL)
- β³ Pluggable service layer (ARC, ChainTracker, Overlay)
- β³ Storage synchronization
- β³ JSON-RPC server
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Application Layer β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
BRC-100 WalletInterface
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Wallet Class β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β’ getVersion() β’ createAction() β β
β β β’ getNetwork() β’ signAction() β β
β β β’ ... 24 more methods β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β βΌ βΌ βΌ β
β βββββββββββ ββββββββββββ ββββββββββββ β
β β Storage β β Services β β Monitor β β
β βββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
Database Blockchain Background
(SQLAlchemy) Services Tasks
- Framework Neutral: No web framework dependencies
- Async First: All I/O uses async/await
- Type Safe: Complete type hints for IDE support
- Test Driven: Universal Test Vectors + comprehensive tests
- Cross-Language Compatible: 100% compatible with TypeScript and Go
This Python implementation is 100% compatible with:
| Implementation | Repository | Status |
|---|---|---|
| TypeScript | wallet-toolbox | β API compatible |
| Go | go-wallet-toolbox | β API compatible |
All three implementations share:
- Same BRC-100 WalletInterface API (28 methods)
- Identical behavior and error handling
- Same database schema
- Universal Test Vectors validation
We welcome contributions! See CONTRIBUTING.md for detailed guidelines.
# Setup
pip install -e .[dev]
# Run tests
pytest tests/ -v
# Quality checks
black src/ tests/
ruff check src/ tests/
mypy src/- Reference the TypeScript implementation when porting features
- All methods must pass official BRC-100 test vectors
- All code must pass mypy strict mode
- All docstrings and comments must be in English
Project Owners: Thomas Giacomo and Darren Kellenschwiler
For questions, bug reports, or feature requests:
- Open an issue on GitHub
The license for the code in this repository is the Open BSV License version 4. See license.md for details.