Summary
Create a lightweight Electrum-style wallet for Bitmark, implemented in stages to allow incremental development and testing.
Motivation
Currently Bitmark users must run a full node to manage their funds. An Electrum-style wallet would provide:
- Lightweight client (no full blockchain download)
- Fast synchronization
- Hardware wallet support (future)
- Cross-platform desktop application
Technical Approach
Base Fork
- Electrum 3.3.x - Proven base used by Electrum-LTC, Electron Cash
- Python-based, well-documented, active maintenance
Bitmark Network Parameters
# Mainnet
ADDRTYPE_P2PKH = 0x55 # 85 - addresses start with 'b'
ADDRTYPE_P2SH = 0x05 # 5
WIF_PREFIX = 0xD5 # 213
GENESIS_HASH = "c1fb746e87e89ae75bdec2ef0639a1f6786744639ce3d0ece1dcf979b79137cb"
DEFAULT_PORT = 9265
RPC_PORT = 9266
# BIP32 Extended Keys
XPUB_HEADER = 0x0488B21E
XPRV_HEADER = 0x0488ADE4
Key Files to Modify
| File |
Purpose |
electrum/constants.py |
Network params, genesis, prefixes |
electrum/network.py |
Server connection handling |
electrum/util.py |
Config directory (.electrum-bitmark) |
setup.py |
Package metadata |
Staged Implementation
Stage 1: Proof of Concept (RPC Backend)
Goal: Working wallet connected directly to bitmarkd RPC
Deliverable: Desktop wallet requiring local bitmarkd node
Stage 2: ElectrumX Integration
Goal: Proper Electrum protocol with dedicated server
Deliverable: Self-hosted ElectrumX + compatible wallet
Stage 3: Production Infrastructure
Goal: Public servers for end users
Deliverable: Production-ready lightweight wallet
Reference Implementations
Considerations
Multi-Algorithm PoW
Bitmark supports 8 PoW algorithms. For Stage 1 (RPC), this is handled by bitmarkd. For Stage 2+, ElectrumX needs to either:
- Implement header validation for all algorithms, OR
- Trust the connected bitmarkd for validation
No SegWit
Bitmark does not support SegWit, simplifying the implementation (no bech32 addresses needed).
Repository Structure
Propose creating new repos under project-bitmark:
electrum-bitmark - Wallet client
electrumx-bitmark - Server (Stage 2+)
Labels: enhancement, wallet, infrastructure
Summary
Create a lightweight Electrum-style wallet for Bitmark, implemented in stages to allow incremental development and testing.
Motivation
Currently Bitmark users must run a full node to manage their funds. An Electrum-style wallet would provide:
Technical Approach
Base Fork
Bitmark Network Parameters
Key Files to Modify
electrum/constants.pyelectrum/network.pyelectrum/util.py.electrum-bitmark)setup.pyStaged Implementation
Stage 1: Proof of Concept (RPC Backend)
Goal: Working wallet connected directly to bitmarkd RPC
Deliverable: Desktop wallet requiring local bitmarkd node
Stage 2: ElectrumX Integration
Goal: Proper Electrum protocol with dedicated server
Deliverable: Self-hosted ElectrumX + compatible wallet
Stage 3: Production Infrastructure
Goal: Public servers for end users
Deliverable: Production-ready lightweight wallet
Reference Implementations
Considerations
Multi-Algorithm PoW
Bitmark supports 8 PoW algorithms. For Stage 1 (RPC), this is handled by bitmarkd. For Stage 2+, ElectrumX needs to either:
No SegWit
Bitmark does not support SegWit, simplifying the implementation (no bech32 addresses needed).
Repository Structure
Propose creating new repos under
project-bitmark:electrum-bitmark- Wallet clientelectrumx-bitmark- Server (Stage 2+)Labels: enhancement, wallet, infrastructure