Skip to content
LogoLogo

Generated — do not edit. Source of truth: crates/terp-rs/tools/hash-market/docs/cashu-mesh.md. Edit there, then rebuild docs.

Cashu off-chain mesh (hash-market)

Fast canonical mint discovery cache + encrypted wallet backup stash for Cashu e-cash on Terp. This is not an “official” mint list and not endorsement.

PlanePathPublic dual-index?
Mint discovery cachedata/cashu/mints/{mint_id}.jsonOptional descriptor only (not proofs)
Encrypted wallet stashdata/cashu/wallets/{wallet_id}/{item_id}.jsonNever public /content SSOT
Headstash notesdata/notes/…Never (separate product)

Schema SSOT

MintDescriptor + mint_id rules:
docs/plans/cashu/CANONICAL-MINT-REGISTRY.md

Sprint design: docs/plans/cashu/SPRINT-CASHU-MESH-2026-07-20.md

HTTP routes

MethodPathAuth
PUT/POST/cashu/mints/{mint_id}notes_auth
GET/cashu/mints/{mint_id}public when public_mint_list (default)
GET/cashu/mintssame; ?status=active|paused|revoked|all
DELETE/cashu/mints/{mint_id}notes_auth
PUT/POST/cashu/wallets/{wallet_id}/{item_id}notes_auth
GET/cashu/wallets/{wallet_id}/{item_id}notes_auth
GET/cashu/wallets/{wallet_id}notes_auth
DELETE/cashu/wallets/{wallet_id}/{item_id}notes_auth

Auth reuses blossom/[notes_auth] (state.blossom.auth.verify), same plane as /notes/*.

Config

[cashu_mesh]
enabled = true
public_mint_list = true   # GET /cashu/mints* without auth
# registry_contract = "terp1…"   # chain SSOT later
# chain_rpc = "http://…"

When the section is omitted, mesh routes stay enabled with public mint list (lab-friendly). Set enabled = false to hide /cashu/*.

Wallet envelope (opaque)

{
  "ciphertext": "<hex>",
  "nonce": "<hex>",
  "scheme": "xchacha20poly1305",
  "cleartext_layout": "CASHU-TOKEN-BACKUP-V0",
  "cleartext_len": 0
}

Server never decrypts. Cleartext is Cashu token/proofs JSON after client decrypt (layout frozen for mesh; CDK serialization later).

Naming

SayDo not say
Canonical mint registry / discovery“Official Cashu mint list”
Cashu mint“the mint” alone (collides with Headstash)
Headstash note mintCashu issuer

Tests

cargo test -p hash-market --lib cashu --features server