harmoniis-wallet
Reference CLI wallet for Harmoniis contracts plus Webcash mining.
Credits
- Webminer architecture/perf direction inspired by
maaku/webminer. - RGB model inspired by
RGB-WG/rgb. - Witness custody/replace flow inspired by Webcash server semantics (replace invalidates old secret).
Key Model (Current)
One root private key is stored in the wallet and deterministically derives separate key material:
RGB identity key(wallet contract identity)Webcash master secretBitcoin deterministic slot key(reserved for Bitcoin rail integration)PGP-style signing identities(multiple, labeled, selectable)
PGP identities are managed with labels:
hrmw identity register signs with the active PGP label by default.
Master key backup / restore:
Deterministic slot map:
pgp[i]fori=0..999(identity scan range)webcash[0]deterministic webcash masterrgb[0]deterministic RGB identity rootbitcoin[0]deterministic Bitcoin slot seed material
This allows reconstruction from only the root key export plus server discovery.
Install
1) Install Rust
Ubuntu/Debian:
|
macOS:
|
Windows (PowerShell):
winget install Rustlang.Rustup
rustup default stable
FreeBSD:
NetBSD:
2) Install harmoniis-wallet
Default Paths
- Main wallet DB:
~/.harmoniis/rgb.db - Webcash DB:
~/.harmoniis/webcash.db - Miner log (daemon):
~/.harmoniis/miner.log - Miner status JSON:
~/.harmoniis/miner_status.json - Pending mined keeps:
~/.harmoniis/miner_pending_keeps.log
Quick Start
# Optional: create/select additional labeled signing keys
RGB Contract Usage
Buyer flow:
Seller/holder flow:
Transfer custody safely:
replace rotates witness state: the old secret is invalid after replacement.
Webcash Usage
Payment Rails
- Active settlement rail today: Webcash (
X-Webcash-Secret). X-Bitcoin-Secretis supported when backend enables Bitcoin mode (HARMONIIS_BITCOIN_PAYMENT_MODE).- In ARK mode,
X-Bitcoin-Secretmust beark:<vtxo_txid>:<amount_sats>. - Client API exposes payment-header abstractions so Bitcoin/ARK can be enabled without breaking existing Webcash flows.
CLI rail flags:
# default (webcash)
# bitcoin header mode (requires explicit secret and backend support)
# or via env
HRMW_BITCOIN_SECRET="<vtxo-or-ark-secret>"
ARK helper commands (Arkade ASP):
Deterministic Bitcoin Wallet (Taproot + SegWit Fallback)
The wallet derives a deterministic Bitcoin slot (bitcoin[0]) from the root key and exposes:
- Taproot (
BIP86) as the primary receive path. - SegWit (
BIP84) as compatibility fallback for payers without Taproot support.
# show descriptors + deterministic address and sync balances
# explicit sync settings
# deterministic taproot address at index N
# deterministic segwit fallback address at index N
Notes:
- This is deterministic reconstruction support (no separate seed file needed).
hrmw bitcoin infoandhrmw bitcoin syncreport both Taproot and SegWit next receive addresses.- On-chain addresses are funding rails; ARK payments are submitted as bearer proofs in
X-Bitcoin-Secret. - Default esplora endpoints are auto-selected by network and can be overridden with
--esplora.
Mining
Foreground (recommended for live logs):
Backend order in auto: CUDA -> Vulkan/wgpu -> CPU.
Examples:
Accepted mined keeps are inserted into wallet with replace semantics (old secret invalidated).
If insert fails after acceptance, pending keeps are stored in miner_pending_keeps.log.
Backup and Restore
Backup the entire wallet directory:
Restore:
Then validate:
If you accidentally pass --wallet .../webcash.db, hrmw now auto-corrects to the sibling rgb.db path.
For deterministic restore on a new machine:
Build and Test