Files
wallet/CLAUDE.md
T
grenadeandClaude Fable 5.1 257b021066
ci / gate (push) Successful in 4m24s
feat: scaffold the workspace, the tauri shell and the webview
The house shape (architecture/generic.md §1): wallet-entities for the
vocabulary and the IPC wire types, wallet-core for the four ports that are the
architecture (KeyScheme, ChainAdapter, SwapProvider, FiatRamp), wallet-data
for the adapters that will implement them, and wallet-app as a Tauri 2 shell
whose commands are one-line shims. The webview is Vite + React + TypeScript
and reaches Rust only through ui/src/api/wallet.ts, typed by what ts-rs
exports from the entities crate on every `cargo test`.

Amounts are integer base units plus decimals, serialised as strings, because
the webview has no integer wide enough and a wallet that rounds is a wallet
that lies. The webview never receives a secret; readme.md and CLAUDE.md say
why and what will bite.

Two things the scaffold learned: Tauri's `version` field takes a JSON file or
a literal, never Cargo.toml, so the release workflow stamps it; and Prettier
must skip the generated types, which carry ts-rs's own style.

Placeholder icon; the mark comes later. CI targets the rust-gtk3 runner.

Refs #1

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ftBXYuba8ARhQeF74oUgW
2026-09-15 15:42:28 +03:00

2.5 KiB

CLAUDE.md

Guidance for Claude Code working in this repository.

Read readme.md first: it carries the shape, the security model and the reasoning. Conventions are ~/git/architecture (generic.md for the workspace shape and §14 for how epics are executed, gitea-runners.md for runs-on: labels). This file is the things that will bite you.

Work is filed before it is done

Epics (epic label) and their children (child label) live on blackbeard/wallet at git.lair.cafe. The commit that implements a child closes it with Closes #N. When an investigation contradicts an issue, comment on the issue rather than quietly building the right thing; the correction is the valuable half of the history.

The boundary is the security model

  • The webview never receives a secret, a seed, a mnemonic, or a private key, and never decodes a transaction itself. If a command needs to show the user what they are signing, Rust decodes it and returns a summary.
  • Every plugin permission goes into crates/wallet-app/capabilities/*.json deliberately, with a reason in the description. No allow-all.
  • Amounts are wallet_entities::Amount: integer base units plus decimals, serialised as strings. No f64 touches a balance, ever.
  • Ramp providers open in the system browser, never in the wallet's webview.

Things that will bite you

  • Quantus mainnet is spec 152 and verifies extrinsic signatures under the FIPS 204 context QUANTUS_EXTRINSIC (from spec 148). A signature made with the empty context is cryptographically valid and rejected by the chain.
  • The account id is Poseidon2 of the public key, so the signature carries the public key on the wire. ML-DSA-65 is the default for new accounts; ML-DSA-87 must stay decodable because dev-genesis, legacy and MPC accounts use it.
  • Derivation is m/44'/189189'/account'/change'/index', every level hardened. Convention in the other Quantus wallets: index 0' is ML-DSA-87, 1' is ML-DSA-65. Match it or an imported mnemonic shows an empty wallet.
  • The keystore file format is quantus-cli's (Argon2id + AES-256-GCM). It is shared with the CLI and the browser extension; do not invent a second one.
  • cargo test regenerates ui/src/api/generated via ts-rs; commit the result with the entities change or CI fails on drift.

Gates

cargo fmt --check --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
pnpm --dir ui typecheck && pnpm --dir ui lint && pnpm --dir ui build