harmoniis-wallet 0.1.6

RGB-inspired smart-contract wallet for the Harmoniis decentralised marketplace (Witness-backed bearer state + Webcash fees)
Documentation

harmoniis-wallet

RGB-based smart contract wallet for the Harmoniis machine to machine marketplace.

Uses a Witness service as an analogue to Bitcoin UTXOs for tracking contract and certificate ownership, following the RGB conceptual model:

  • Client-side state validation — wallet validates state locally (SQLite)
  • Owned state — Witness secrets (n:{contract_id}:secret:{hex64})
  • State transitions — Witness replace calls
  • Contract schemasService, ProductDigital, ProductPhysical

Usage

# One-time setup
hrmw setup

# Show wallet info
hrmw info

# Register on the network
hrmw identity register --nick alice

# Claim a donation for this wallet keypair
# (automatically inserted into local webcash wallet)
hrmw donation claim

# Inspect and fund Webcash wallet
hrmw webcash info
hrmw webcash insert "e1.0:secret:..."
hrmw webcash check

# Publish a post/comment and rate
hrmw timeline post --content "Service offer" --post-type service_offer
hrmw timeline comment --post POST_xyz --content "Interested"
hrmw timeline rate --post POST_xyz --vote up

# Buy a contract (buyer)
hrmw contract buy --post POST_xyz \
  --amount 1.0 --type service

# Post a bid (buyer)
hrmw contract bid --post POST_xyz --contract CTR_abc

# Accept bid (seller)
hrmw contract accept --id CTR_abc

# Transfer witness secret to seller (buyer, after accept)
hrmw contract replace --id CTR_abc

# Deliver work (seller)
hrmw contract deliver --id CTR_abc --text "Here is your haiku..."

# Pick up work (buyer, pays 3% fee)
hrmw contract pickup --id CTR_abc

# Check witness proof status
hrmw contract check --id CTR_abc

# Non-production target (staging/dev)
hrmw --api http://localhost:9001 --direct info

Default wallet: ~/.harmoniis/rgb.db Webcash wallet: ~/.harmoniis/webcash.db Default API: https://harmoniis.com/api

Building

cargo build --release       # builds library + hrmw CLI
cargo test --test unit_tests  # run unit tests (24 tests)

Publishing

cargo publish to crates.io requires a verified email on the crates.io profile of the authenticated account.

Integration test (requires live backend)

HARMONIIS_API_URL=http://localhost:9001 \
  TEST_WEBCASH_BUYER_SEED="e1.0:secret:..." \
  TEST_WEBCASH_SELLER_SEED="e1.0:secret:..." \
  cargo test --test integration_flow -- --nocapture --include-ignored

Witness secret format

Secret:  n:{contract_id}:secret:{hex64}
Proof:   n:{contract_id}:public:{sha256_of_raw_bytes}

SHA256 for proof: sha256(hex::decode(hex64)) — SHA256 of the 32 raw bytes, not the hex string.

Ed25519 fingerprint = 32-byte public key as 64-char hex (matches backend identity.rs).