grenadeandClaude Opus 5.5 5d5baf1c21
ci / gate (push) Failing after 1m33s
fix(wormhole): one paced zk-tree scan for every open wallet, under the node's rate limit
With three phrase wallets open, the Accounts page showed "RPC rate limit
exceeded (-32999)" on every wormhole panel and on the pending reversible
transfers.

The Quantus node limits each connection to 300 calls a minute
(--rpc-rate-limit 300 in lair/quantus). The wallet keeps one WebSocket
per chain, so everything it asks shares those five calls a second. Each
wallet's first wormhole scan reads mainnet's zk-tree 500 leaves a call,
about 950 calls, and the three scans ran at once at full speed.

- The tree is public and the same for every wallet, so one scan now
  matches the wormhole accounts of every open phrase wallet in a single
  pass. It starts from the lowest cursor among them and records each
  wallet's leaves and frontier.
- Scans run one at a time behind a lock; a wallet whose turn comes after
  another's scan finds itself caught up.
- Bulk pages are paced at three a second, leaving room for balance and
  transfer reads on the same connection.
- under_rate_limit retries a call refused with -32999, backing off 1 to
  16 seconds, rather than putting the node's refusal on screen. The scan
  pages, the nullifier bucket reads, the leaf count and the pending
  reversible transfers all go through it.

Checked from an empty cache: the first scan of 481,540 leaves took 396 s,
with no error shown and no backoff needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUx7SPonBnB3ofU4mH41WT
2026-10-09 20:38:20 +03:00

blackbeard wallet

A desktop wallet for post-quantum chains, Quantus first. Linux, Windows and macOS; installable on Fedora with dnf.

Shape

The wallet is a Rust cargo workspace with a Tauri shell and a React webview. That split is the security model, not a convenience: every key, signature, decoded transaction and amount lives on the Rust side, and the webview only renders what a Tauri command hands it. Nothing that could serialise a secret is reachable from JavaScript.

crates/
  wallet-entities/   domain types and the IPC wire protocol; exported to TypeScript
  wallet-core/       wallet logic and the ports it is written against
  wallet-data/       adapters behind those ports: keystore, cache, RPC, provider APIs
  wallet-app/        the Tauri binary; commands are one-line shims into core
ui/                  Vite + React + TypeScript webview

The ports in wallet-core are what make "any post-quantum chain" a profile rather than a rewrite:

  • KeyScheme turns a seed and a path into a signer. ML-DSA-65 and ML-DSA-87 now; whatever the next chain uses later.
  • ChainAdapter knows one chain: balances, building and submitting a transaction, watching it. The Substrate adapter is driven by runtime metadata plus a small per-chain profile (ss58 prefix, decimals, signature enum, transaction extensions, signing-context rule, coin type).
  • SwapProvider is a swap venue. NEAR Intents first.
  • NearRpc is NEAR, the chain under the wallet's intents account, routed to a node that tracks the shard of the account each call is about.
  • FiatRamp builds a provider session through a relay on our infrastructure, which holds the provider secrets, and opens it in the system browser.

The wallet is post-quantum only. Classical chains appear only as transit legs of a swap or ramp; the wallet never derives a secp256k1 or ed25519 key. That includes NEAR: the intents account is a NEAR account whose only key is ML-DSA-65 (NEP-645), derived from the wallet's phrase as NEP-649 specifies. NEAR verifies it under the empty FIPS 204 context, where Quantus requires QUANTUS_EXTRINSIC.

Why these choices

Quantus signs extrinsics with ML-DSA, hashes public keys with Poseidon2 for the account id, and shields mining rewards behind a Plonky2 wormhole whose prover is minutes of native CPU. All of that exists as Rust crates and nothing else, so the core is Rust. Tauri is the house desktop convention (~/git/architecture/generic.md §4) and the only shell that packages rpm, deb, msi and dmg with a Rust-owned IPC boundary out of the box.

QTC reaches NEAR as qtc.omft.near through a bridge with a deposit address per account, and its liquidity is in Ref pools rather than with 1Click's solvers. So swaps run through an intents account the wallet holds (#71), using only calls intents.near authorises by the calling account. Its signed intents (execute_intents) accept classical signatures only, and the wallet never makes one. #72 ran the whole route that way on mainnet.

Building

pnpm --dir ui install
cargo tauri dev --config crates/wallet-app/tauri.conf.json   # from crates/wallet-app: cargo tauri dev
cargo test --workspace                                        # also regenerates ui/src/api/generated

The CI gate is cargo fmt --check, cargo clippy -D warnings, cargo test, and the webview's typecheck, lint and build. Run them before claiming done.

Work

Work is filed before it is done. Epics carry the epic label and an external definition of done; their steps carry child, in dependency order, at https://git.lair.cafe/blackbeard/wallet/issues. A commit that finishes a child closes it (Closes #N); when an investigation contradicts an issue, the correction is a comment on the issue, dated, not a surprise in a diff.

S
Description
Desktop wallet for post-quantum chains, Quantus first: ML-DSA signing in Rust, Tauri shell, NEAR Intents swaps and fiat ramps via transit chains. Linux (rpm/deb), Windows and macOS.
Readme
3.7 MiB
v0.4.1
Latest
2026-10-12 08:37:06 +00:00
Languages
Rust 73.4%
TypeScript 23.3%
CSS 1.6%
Python 1.2%
Shell 0.3%
Other 0.1%