Install
macOS / Linux / FreeBSD:
|
Windows (PowerShell):
iwr https://harmoniis.com/wallet/install.ps1 -UseB | iex
From source (requires Rust 1.86+):
Quick Start
# alias: hrmw identity claim --nick alice
Upgrade
Uninstall
macOS / Linux / FreeBSD:
|
Windows (PowerShell):
iwr https://github.com/harmoniis/harmoniis-wallet/releases/latest/download/uninstall.ps1 -UseB | iex
Wallet data at ~/.harmoniis/ is never removed by the uninstaller.
Mining
GPU auto-detection: CUDA (NVIDIA, fastest) > Vulkan/DX12/Metal via wgpu (any GPU, including NVIDIA without the CUDA toolkit) > CPU fallback.
NVIDIA CUDA — installing the toolkit on Linux
The CUDA backend compiles its SHA-256 kernel at runtime via NVRTC, so it
needs the CUDA Toolkit (specifically libnvrtc.so) on top of the
NVIDIA driver. The driver alone (what nvidia-smi reports) only ships
the CUDA runtime — not NVRTC. Without the toolkit, hrmw webminer
falls back to wgpu (Vulkan on Linux) and still mines on your GPU, just
without NVRTC-compiled CUDA kernels.
You'll know the toolkit is missing when startup prints:
CUDA detect: driver reports CUDA 13.0
CUDA detect: no NVRTC library found in any scanned directory
CUDA detect: install CUDA 13.x toolkit from https://developer.nvidia.com/cuda-toolkit-archive
Ubuntu 22.04 / 24.04 — install just the NVRTC subpackage that matches your driver's CUDA version (a few hundred MB instead of the full multi-GB toolkit):
# 1. Add NVIDIA's CUDA apt repo (one-time)
distro="" # ubuntu2404, ubuntu2204, ...
arch=
# 2. Install NVRTC matching your driver (use 13-0 for CUDA 13.x drivers,
# 12-6 for CUDA 12.6, etc. — check `nvidia-smi` top-right CUDA Version)
# 3. Verify
|
If you prefer the full toolkit (nvcc, profilers, samples) install
cuda-toolkit-13-0 instead. The detector also accepts NVRTC found via
LD_LIBRARY_PATH, so a manual .run install works too.
Driver/toolkit version mismatches are warned about at startup — the toolkit's NVRTC must be ≤ the driver's CUDA version.
Cloud Mining (Vast.ai)
Mine webcash on rented GPU instances. One command provisions, installs, and starts mining.
Setup:
- Register at cloud.vast.ai
- Add credits: Account → Billing → Add Credit
- Copy API key: Account → API Key (sidebar)
- Run
hrmw setup— it will prompt for the Vast.ai API key (or set later withhrmw webminer cloud set-api-key <KEY>)
Usage:
Per-instance control:
Example session (8x RTX 4080S, $1.07/hr):
$ hrmw webminer cloud start
[1/6] Uploading SSH key to Vast.ai...
[2/6] Searching for best GPU offers...
#1: 8x RTX 4080S ($1.07/hr, 407.0 TFLOPS, 380.5 FLOPS/$)
Selected: 8x RTX 4080S
[3/6] Creating instance...
[4/6] Waiting for instance to start...
[5/6] Installing hrmw...
CUDA: 8/8 device(s) initialized
[6/6] Starting miner...
Mining started. GPU: 8x RTX 4080S, Cost: $1.07/hr
$ hrmw webminer cloud status
Miner: RUNNING
Speed: 36.52 GH/s
Solutions: 25/87
Mined: 90 solutions (16,699 webcash)
$ hrmw webminer cloud stop
Stopping miner... draining pending submissions...
Downloaded miner_pending_solutions.log: 108 entries
Submitting pending solutions locally...
Pending solutions: 60 submitted, 92 already accepted
Recovering mined webcash...
Transferred 58,447 webcash to main wallet.
Main wallet balance: 74,033 webcash
Collecting unclaimed solutions:
Use collect when mined solutions weren't fully reported to the webcash server. This happens when:
- Cloud instance was destroyed before all solutions were submitted (mining finds solutions faster than the server accepts them)
- Network timeout during solution submission
- Local miner was killed abruptly (Ctrl+C during submission)
cloud stopcompleted but background retry was still running
The command reads miner_pending_solutions.log, checks which solutions were already accepted, and submits the rest in parallel (4 threads). Run hrmw webcash recover afterward to pick up the newly accepted webcash.
How it works:
- SSH key derived from wallet vault (deterministic, no key files to manage)
- Cloud miner uses a labeled wallet (
cloudminer_webcash.db) — separate from main cloud stoprecovers mined webcash locally via deterministic secret (no file download needed)- Pending solutions backed up on every
cloud statuscheck (deduplicated) - Graceful shutdown: SIGINT → submitter threads drain → download pending files → background retry
hrmw webminer collectretries any remaining unsubmitted solutions
Contract Usage
Buyer flow:
Seller/holder flow:
Transfer custody safely:
replace rotates witness state: the old secret is invalid after replacement.
Labeled Wallets
Each wallet family (webcash, bitcoin, voucher, rgb) supports multiple labeled sub-wallets derived from the master keychain:
Labeled wallets are deterministic — the same master mnemonic always derives the same labeled wallet. File naming: {label}_{family}.db (e.g. donation_webcash.db).
Migration from v0.1.43: Old wallet files (webcash.db, bitcoin.db, etc.) are automatically renamed to main_webcash.db, main_bitcoin.db on first access. No manual action needed.
Webcash Usage
Voucher Usage
- Voucher outputs are bearer secrets; keep exported voucher secrets if you may need to rebuild the voucher wallet.
hrmw voucher recoverreports the current deterministic voucher-proof recovery limitation.
Payment Rails
- Payment for paid commands is sourced from the local wallet automatically.
- Webcash rail uses
X-Webcash-Secretwithwats. - Voucher rail uses
X-Voucher-Secretwithcredits. - Bitcoin rail uses
X-Bitcoin-Secretwithsats. - In ARK mode,
X-Bitcoin-Secretmust beark:<vtxo_txid>:<amount_sats>. - Backend ARK mode verifies incoming VTXOs via ASP/wallet state before settlement.
- Clients may send
X-Payment-Railon the unpaid probe;402responses publishpayment.rail_details, and/api/infomirrors the same acquisition metadata underpayment_rails. - Rail lock is strict per listing inception rail:
- comments on a post must pay with that post rail,
- ratings on a post must pay with that post rail,
- contract buy must pay with the reference post rail.
- Contract pickup is free and does not take a payment header.
- Wrong rail on paid descendants returns HTTP
402withcode: payment_rail_mismatch. - Client API exposes payment-header abstractions so either rail can be used cleanly.
CLI rail flags:
# default (webcash)
# voucher rail from local wallet
# bitcoin rail from local ARK wallet
ARK helper commands (Arkade ASP):
Command semantics:
deposit: show the ARK deposit address (send on-chain BTC here).boarding: finalize deposited on-chain BTC into ARK offchain balance.settle: settle ARK offchain sats back to this wallet on-chain address.settle-address: settle ARK offchain sats to any on-chain BTC address.
Generic 402 Requests
hrmw can perform custom paid requests against Harmoniis or another HTTP 402 service:
Alias: hrmw 402 ...
Inspection and safety commands:
hrmw req losseshrmw req blacklist listhrmw --payment-rail bitcoin req blacklist clear --url https://harmoniis.com/api --endpoint /timeline --method POST
Deterministic Bitcoin Wallet
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 tokens are settlement inputs and must be backend-verified.
- 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.
Key Model
The wallet stores one BIP39 master mnemonic/entropy pair and derives every slot using hardened BIP32 paths:
RGB identity key(wallet contract identity)Webcash master secretBitcoin deterministic slot keyGeneric vault root slot(for app-scoped vault key derivation)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:
Password manager storage:
# During initial setup
# Change setting on an existing wallet (idempotent — safe to re-run)
Modes:
required(default): fails if no supported password manager is available.best-effort: continue if password-manager storage fails.off: remove credentials from OS store (or skip storage on first run).
Re-running hrmw setup on an existing wallet is safe: it never destroys key material, contracts, or identities. It only updates the password manager setting. To re-import a master key, use hrmw key import --force instead.
After switching to off, back up your master key immediately:
Supported credential stores:
| Platform | Backend |
|---|---|
| macOS | Keychain (with optional iCloud sync) |
| Linux | Secret Service (secret-tool) |
| Windows | Credential Manager (cmdkey) |
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 materialvault[0]deterministic vault root seed material (backward-compatible alias:harmonia-vault[0])
This allows reconstruction from only the master mnemonic (or entropy hex) plus server discovery.
Derived vault material (for any consumer app) is exposed by src/vault.rs:
use ;
let wallet = open
Database model:
master.db— root material metadata, slot registry, PGP identity registrymain_webcash.db— main Webcash balance (waswebcash.dbin v0.1.43 and earlier — auto-migrated)main_bitcoin.db— Bitcoin/ARK wallet persistence (wasbitcoin.db)main_voucher.db— Voucher balance (wasvoucher.db)main_rgb.db— RGB contract/certificate state (wasrgb.db)cloudminer_webcash.db— cloud mining labeled wallet{label}_webcash.db— user-defined labeled wallets
Important:
- RGB contract state is wallet-scoped (
rgb.db), not partitioned by active PGP key label. - PGP identities are signing keys derived from master key slots; switching active PGP label does not switch to a different RGB state database.
Default Paths
All wallet data lives under ~/.harmoniis/:
| File | Purpose |
|---|---|
wallet/master.db |
Root material, slot registry, PGP identities |
wallet/main_webcash.db |
Main webcash balance |
wallet/main_bitcoin.db |
Bitcoin/ARK wallet |
wallet/main_voucher.db |
Voucher balance |
wallet/main_rgb.db |
RGB contract state |
wallet/cloudminer_webcash.db |
Cloud mining webcash (labeled) |
wallet/miner_pending_solutions.log |
Mined solutions awaiting server submission |
wallet/miner_pending_keeps.log |
Accepted keeps awaiting wallet insertion |
cloud/config.toml |
Vast.ai API key and cloud mining config |
cloud/state.toml |
Active cloud instance(s) state |
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 master.db path.
For deterministic restore on a new machine:
Module Structure
src/
lib.rs # public API, re-exports, backward-compat shims
config.rs # WalletConfig (centralized configuration)
wallet/
mod.rs # WalletCore (was RgbWallet)
schema.rs # SQLite schema / migrations
identities.rs # PGP identity management
payments.rs # payment rail logic
contracts.rs # RGB contract operations
snapshots.rs # JSON snapshot import/export
webcash.rs # re-exports from webylib (SecretWebcash, Amount, etc.)
labeled_wallets.rs # labeled sub-wallet management
marketplace/
mod.rs # HarmoniisClient (was client/)
identities.rs # identity registration
posts.rs # timeline posting
storage.rs # marketplace storage helpers
timeline.rs # timeline queries
...
actors/
mod.rs # actix actor infrastructure (behind actix-actors feature)
wallet_actor.rs
webcash_actor.rs
payment_ledger_actor.rs
Backward-compatible re-exports in lib.rs:
pub type RgbWallet = WalletCore-- existing code continues to compile.pub mod client = marketplace-- old import paths still work.
Feature Flags
| Feature | Default | Description |
|---|---|---|
bundled-sqlite |
on | Compile SQLite from source |
gpu |
on | wgpu/Vulkan GPU mining |
cuda |
on | NVIDIA CUDA mining (requires CUDA 12.0+ driver) |
actix-actors |
off | Actix actor wrappers for backend integration |
Configuration
WalletConfig centralizes runtime settings (API base URL, wallet path, network, payment rail preferences) and is threaded through constructors instead of scattered env reads.
Build and Test
Credits
- Webminer architecture/perf direction inspired by
maaku/webminer. - RGB smart-contract model built on
RGB-WG/rgbwith Harmoniis witness-backed bearer state and arbitration service. - Witness custody/replace flow inspired by Webcash server semantics (replace invalidates old secret).