Commit graph onionwire/docs
Author SHA1 Message Date
agent
7330be1581
docs: where the wallet-rpc binary comes from
All checks were successful
ci / test (pull_request) Successful in 6m50s
ci / sdk (pull_request) Successful in 1m21s
2026-09-28 00:01:58 -04:00
agent
1e3eceabcb
docs: the F7 save gate and the app-owned chain source
All checks were successful
ci / test (pull_request) Successful in 6m49s
ci / sdk (pull_request) Successful in 1m25s
TUI.md: the `last` line's shape when one half of a save is refused, why an
app-owned source saves with an empty `url` while a typed endpoint with no login
is still refused, and the wording the `chain` row carries in a build without
`cuprate-daemon`.

WALLET.md: the same gate from the node's side, and the start contract — a start
that fails part way stops what it spawned and leaves the chain datadir as the
thing a retry reuses.
2026-09-27 23:16:35 -04:00
02f8e4d914 Merge pull request 'tui: F7 becomes the node-setup screen, and F6 goes back to being the wallet' (#169) from onionwire/f7-node-setup into main
All checks were successful
ci / test (push) Successful in 7m8s
ci / sdk (push) Successful in 1m19s
android-ci / android (push) Successful in 13m45s
Reviewed-on: #169
2026-09-28 00:43:14 +00:00
06367b2949 Merge pull request 'ci: skip superseded runs, move fuzz to nightly, trim the android PR trigger' (#168) from ci/trim-redundant-runs into main
Some checks failed
ci / test (push) Failing after 47s
ci / sdk (push) Successful in 10s
android-ci / android (push) Successful in 13m36s
Reviewed-on: #168
2026-09-28 00:42:46 +00:00
agent
5cdfbacf10
tui: F7 becomes the node-setup screen, and F6 goes back to being the wallet
All checks were successful
ci / test (pull_request) Successful in 7m20s
ci / sdk (pull_request) Successful in 1m45s
android-ci / android (pull_request) Successful in 13m36s
ci / fuzz (pull_request) Successful in 5m29s
The chain source was reachable from three places and configured from none of
them properly: `F6`'s inline `1`/`2`/`3` picker wrote only the in-process
choice, the `F9` menu showed the state and named keys that edited it, and
`Node::set_local_monerod` / `set_remote_daemon` / `set_receive_only` — the only
way to point the app at a Monero node — had **no TUI caller at all** (Kotlin
only). `wallet::NOT_CONFIGURED_MSG` told users to "open F7" and there was no F7.

F7 (`WalletSetupConfig`) is now the one screen that sets up the node:

- The `datadir` row is new and editable. `Node::set_local_monerod_at` takes the
  path; `set_local_monerod` delegates with the derived default, so an existing
  install keeps the store it already has. An empty datadir is refused rather
  than silently replaced — a store that moved unasked looks like a vanished
  chain and resyncs somewhere the user did not choose.
- The `network` row is new: it carries the Cuprate mainnet/testnet choice that
  `F6`'s `1`/`2`/`3` used to own, so deleting those keys loses nothing. Mainnet
  reads `unvalidated` before it is picked.
- A `NODE` section shows the live `Node::wallet_child_status` line (state, chain
  source, `sync h/t`, last error) and the last save/test answer. It is the
  node's answer, never the draft above it, and `Ctrl-R` re-reads it.
- `Ctrl-S` saves and starts the child (the daemon, and `monerod` for a local
  source); `Ctrl-X` stops it. Both go through the same `Node::start_wallet_child`
  / `stop_wallet_child` the app's own lifecycle uses, so a start that lands on a
  wallet with no stored passphrase still reaches the unlock prompt.

F6 loses the chain picker and the `s`/`x`/`p` child keys — it is the wallet
again (receive, balance, transfers, create/import) — and its footer points at
`F7 node`. The `F9` menu's `child`/`sync` rows now name `F7 ctrl-s/x` and
`F7 ctrl-r` instead of keys that no longer exist on F6. `set_cuprate_chain` and
the `p` probe handler are deleted rather than left dead.

The node's own keys are named in the body, on the section they act on: at 80
columns the footer has room for one group and the status line already spends
half the width, which is the same reason the login row names `Ctrl-U`.

Tests: six new cases in `src/tui.rs`'s `wallet_setup_config_tests` drive the real
key path and the real node — the typed datadir reaching `ChainSource::Local`, an
empty one being refused with nothing written, the live row on open, `Ctrl-S`
saving then reporting the node's own refusal, the in-process network pick
reaching the store, and F6 no longer owning keys it does not handle.
`tests/tui_spec.rs`'s menu-key check now asserts the F7 keys; the F6 keys it
asserted before no longer work.
2026-09-27 20:06:51 -04:00
agent
a37712f3af
tui: F7 wallet setup — RPC endpoint and chain source on screen
`wallet::NOT_CONFIGURED_MSG` has always said "open F7 to set it up" and there
was no F7. This is that screen.

- `FunctionKey::Setup` on `F7`, live on Main, the settings menu and peer
  payments, same invariant `F9` follows.
- `Screen::WalletSetupConfig` carries `WalletSetupConfigState`: a snapshot of
  plain data taken when the screen opens, never a handle onto `Node`.
- Rows: the wallet RPC endpoint and its login (never rendered back — the row
  says `hidden · set`, `Debug` redacts it), the view-only toggle, and a chain
  picker over all four `ChainSource` cases with their own fields.
- `Node::set_remote_daemon` / `set_local_monerod` / `set_receive_only`, so the
  TUI can reach what only the Android API could, plus `F6`'s in-process source.
- An untouched chain row is not written, so an F7 save cannot silently undo the
  in-process choice; picking a remote daemon says who is trusted in the same
  frame, one line, lowercase.
- `Ctrl-T` tests the endpoint and shows the sanitized `PingResult::line()`.
  Saving never dials. A rejected form writes nothing — the node validates.
- Docs that claimed there is no F7 (`docs/TUI.md`, `docs/WALLET.md`) now
  describe the screen; the settings menu's `endpoint` row names the key.

(cherry picked from commit a48d40bc4e)
2026-09-27 19:23:51 -04:00
agent
404ceea0f8
ci: skip superseded runs, move fuzz to nightly, trim the android PR trigger
All checks were successful
ci / test (pull_request) Successful in 6m33s
ci / sdk (pull_request) Successful in 1m27s
android-ci / android (pull_request) Successful in 12m47s
Three sources of wasted Pi time, measured over a two-week window
(353 workflow runs, 694 job runs): ~78% of CI wall-clock was spent on
work that did not need to happen.

1. Nothing was ever cancelled. Every `concurrency:` block in the repo
   had `cancel-in-progress: false`, and 279 of 353 runs sat in the
   queue behind a newer commit on the same branch. The comment
   justifying it ("shared the container name `onionwire-ci`") was
   stale — the name has been per-run-id for a while — but the real
   constraint is the shared cargo target volume, which two concurrent
   writers corrupt (`Permission denied (os error 13)` on
   /target/debug/deps). So the flag stays false and superseded runs
   instead stand down at a new gate: compare GITHUB_SHA against the
   remote branch tip and skip. Seconds, not minutes, and it cannot
   release the concurrency group into a volume race. Added to
   ci.yml (test, sdk) and android-ci.yml (android).

   Verified against the run history: Forgejo's pull_request GITHUB_SHA
   is the branch head, never a synthetic merge commit (245/245 recorded
   PR runs match a refs/pull/*/head tip), so the gate cannot skip a
   live run. It fails open — an unresolvable ref runs the job. 232 of
   477 historical PR runs would have been skipped.

2. `fuzz` ran on almost every push. A job cannot narrow a
   workflow-level path filter, so `fuzz/**` sat in ci.yml's list
   beside `src/**` and `crates/**`: 80 of 84 recorded runs touched
   nothing in fuzz/, each paying a nightly toolchain install and
   `cargo install cargo-fuzz` for 15 seconds of actual fuzzing. Moved
   to its own workflow, schedule-only (03:30 UTC, off the arti-watch
   slot) plus workflow_dispatch. The build/run single-container fix
   and the PATH export from #106/#107 come along unchanged.

3. android-ci built a full APK for commits that touched no android/
   file — 95 of 143 runs, at ~11 minutes each. The PR trigger now
   covers android/**, crates/onionwire-sdk/**, Cargo.toml, Cargo.lock
   and the build script. The push-to-main trigger keeps src/** and
   crates/**, so every merge still runs the in-APK checks that earn
   their keep (the target_max_memory marker gate, the .so listing, the
   sha256 round-trip) — a Rust-only PR now finds out at merge instead
   of before it, and nothing reaches a release untested.

Also drops `fetch-depth: 0` from android-ci: nothing in the build
reads git history (PUBLISH_TAG comes from the environment).

ci.yml's `push: [main]` trigger is unchanged. It re-tests trees a PR
already tested identically (73 job runs in the window), but branch
protection is empty, so it is not a merge gate — it is the "CI green
on main" signal docs/RELEASING.md's readiness gate reads, and a merge
commit has a different sha so statuses do not carry over. The
staleness gate already removes most of its cost.

docs/RELEASING.md describes all of the above; its android-ci path
list and its fuzz-job account were both wrong after this change.
2026-09-27 15:34:58 -04:00
tui-design
041179eb89
docs: presentation and flow review of the TUI wallet surfaces
Report-only audit of the wallet screens at a1f5c878: rendered frames at
80x24/120x40/200x60 for the first-run frame, the F6 wallet screen, the
F6 -> w wallet list, the create-spend-wallet gate and the F9 menu, plus a
findings table located by function and line.

No source file changed.
2026-09-26 22:07:15 -04:00
agent
f6a7daf892
wallet: optional seed-offset passphrase on import
All checks were successful
ci / test (pull_request) Successful in 6m21s
ci / sdk (pull_request) Successful in 1m28s
android-ci / android (pull_request) Successful in 12m54s
ci / fuzz (pull_request) Successful in 18m31s
Monero's `restore_deterministic_wallet` takes a `seed_offset`: a second
spend secret mixed into the 25 words at restore time, so the same words
with a different offset open a different wallet. It is not the wallet-file
passphrase and must never be sealed, stored, logged or put on an argv.

- `Wallet::restore_wallet` gains `seed_offset: Option<&str>`: None, empty
  or whitespace-only leaves the field out of the JSON entirely; otherwise
  the ends are trimmed and it is sent beside the seed.
- `Node::wallet_restore` passes it through and still seals only the file
  passphrase.
- SDK: `import_wallet` keeps its signature (None) and
  `import_wallet_with_offset` is added (Kotlin `importWalletWithOffset`).
- TUI: a new `ImportOffset` step between the seed and the file passphrase
  (blank Enter skips, a real one is confirmed, a mismatch never dials), and
  `ImportOffsetSeen` after a successful import that used one -- Esc cannot
  leave it, only SEEN, and the offset is not drawn anywhere.
- Docs: WALLET.md, THREAT_MODEL.md, TUI.md, one README sentence.
2026-09-25 00:42:44 -04:00
agent
2f3d5d69c3
docs: start waits for the daemon and wallet RPC listeners
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 8m43s
ci / sdk (pull_request) Successful in 1m16s
ci / fuzz (pull_request) Successful in 5m21s
2026-09-23 20:37:13 -04:00
agent
ed29131a67
wallet: actually open the wallet file, and remember its passphrase
All checks were successful
ci / test (pull_request) Successful in 6m14s
ci / sdk (pull_request) Successful in 1m44s
android-ci / android (pull_request) Successful in 12m56s
ci / fuzz (pull_request) Successful in 5m1s
`monero-wallet-rpc` starts with no wallet open and keeps one only for the
life of its process, so a restart, a Lock/unlock or a wallet re-point left
a live child answering `-13 No wallet file` to every read while the file
sat on disk. The app now opens the configured catalogue file itself
(`Wallet::open_wallet`, over RPC — never `--wallet-file`/`--password` on
argv, which `ps` exposes) after the child is up, and keeps the passphrase
that does it, sealed with the store data key beside the RPC creds under
its own AAD.

- core: `Wallet::open_wallet`, `WalletConfig::wallet_passphrase`
  (+ `with_wallet_passphrase`, redacted Debug, kept out of the endpoint
  config), `Error::is_unreachable` for the one retryable class (the port
  binds a moment after spawn; a timeout is not a start in progress).
- store: `wallet_config.sealed_passphrase` column (additive, AAD
  `onionwire-store-v1:wallet-passphrase`), read-modify-written so the
  endpoint/login survive; `wallet_save_config` keeps the stored one.
- node: `start_wallet_child` opens the file, `open_wallet_with_passphrase`
  opens a file with a passphrase the user just typed and seals it only
  once a live daemon accepted it, `wallet_status` grows `wallet_open` and
  `needs_passphrase`. A child the RPC refuses is stopped rather than left
  inert; an install with no stored passphrase still starts, and says so.
- tui: one-shot prompt (`WalletSetup::UnlockPass`) on a wallet that needs
  it, reachable from the saved-wallet picker and from `s`.
- sdk: `openWalletWithPassphrase`, the two status fields, README flow.
- docs: WALLET/THREAT_MODEL/README — the passphrase is kept, and the
  consequence (the store passphrase is sufficient to spend) is stated
  rather than implied.

Tests: 4 new node tests drive a real child lifecycle against a loopback
wallet RPC (open on restart, no open without a passphrase, refused
passphrase, sealed-on-success), a `tests/wallet.rs` test asserts the bytes
sent (`open_wallet` + filename + password), and `tests/store.rs` covers
the sealed column and the plaintext->encrypted upgrade with it set.
Mutation-checked: stubbing the two open paths fails all four.
2026-09-22 12:52:08 -04:00
sirius
5f19a56be3
sdk: expose the wallet catalogue, the open wallet's keys, and the self profile
Some checks failed
ci / test (pull_request) Successful in 5m59s
ci / sdk (pull_request) Successful in 1m35s
android-ci / android (pull_request) Successful in 12m42s
ci / fuzz (pull_request) Has been cancelled
The Android wallet/profile screens had nothing to call: the core could list
wallets, switch the child onto one, read its keys and read/write the self
profile, but none of it crossed UniFFI.

Core:
- Wallet::keys() -> WalletKeys { view_key, spend_key: Option<String> }: two
  query_key calls against the file the RPC has open. A view-only wallet's -29
  is spend_key: None, not an error. WalletKeys' Debug redacts both halves.
- Node::wallet_keys() mirrors wallet_create/wallet_seed; refuses locally when
  no wallet is configured.
- Node::active_wallet_filename() -> Option<String>: the file the child is
  pointed at, None until wallet-child settings exist, so a client can mark the
  open row.

SDK (UniFFI):
- records WalletRow / WalletKeys / SelfProfile, and Wire::{wallets,
  open_wallet, active_wallet_filename, wallet_keys, self_profile,
  set_self_profile, push_self_profile}.
- The rule the clients must express is in the docs: the seed and the private
  keys come from the OPEN wallet, so there is deliberately no accessor that
  reads another saved wallet's secrets without opening it.

docs/WALLET.md (catalogue + 'secrets belong to the open wallet'),
docs/THREAT_MODEL.md (the new on-demand-display exposure surface) and the SDK
README are updated in the same commit.
2026-09-22 00:25:33 -04:00
agent
8986724848
tui: read the wallet list from the store and load the chosen wallet
All checks were successful
ci / test (pull_request) Successful in 6m14s
android-ci / android (pull_request) Successful in 12m16s
ci / sdk (pull_request) Successful in 1m30s
ci / fuzz (pull_request) Successful in 4m50s
The selection screen shipped as presentation only: `F6 w` opened its
unavailable state, the rows were never read, and Enter on a wallet said
switching was not wired up. The catalogue, the create path and the screen
all existed; nothing joined them.

- `App::open_wallet_select` builds its rows from `Node::list_wallets` at
  the moment the screen opens (never cached from startup), and a failed
  read is the screen's own error state rather than "no saved wallets".
- `App::choose_wallet` resolves `WalletChoice::Open(index)` against the
  catalogue as it is now — the index is a position, and two saved wallets
  may share an identity key — then loads it. `+ create new wallet` still
  starts the existing create flow.
- `Node::open_wallet(filename)` is the load: it refuses a file the
  catalogue does not hold, re-points the sealed wallet-child record with a
  read-modify-write (the generated RPC creds survive), and restarts a
  running child onto the new file. An idle child takes the change on its
  next start.
- `App::new` starts on the selection screen when the catalogue is
  non-empty and on the create flow when it is empty, so a restart lands on
  the wallets it remembers and a first run has no dead empty list.
- The stored identity/locator stay catalogue columns: a locator rotates
  (F4) and identity is the roster key the node already holds, so the live
  header keeps reading them from the node.
- `SELECT_UNAVAILABLE` is gone with the state it described; docs/TUI.md
  now describes the wired behaviour.

Tests (both new): `Node::open_wallet` over an offline node — the chosen
file, the creds kept across the read-modify-write, the choice surviving a
reopen, and a non-catalogue file refused; and the app path in src/tui.rs
over a real store-backed node — start screen both ways, catalogue mapping,
row index over a shared identity, the create row, and a wallet recorded
after startup appearing the next time the list opens.
2026-09-21 11:43:07 -04:00
agent
d96de1d7f0
tui: wallet selection screen (F6 -> w) with create as the last row
Screen::WalletSelect: a table of saved wallets — name, identity prefix,
locator prefix, creation day — the selected row's full identity and locator
under it, and a `+ create new wallet` row as the last item. j/k or arrows
move, Enter takes the choice, Esc back. Empty, failed and in-flight reads
each get their own copy; a wallet with a NULL label, no published locator or
no usable timestamp reads `(unlabelled)` / `-` / `unknown` rather than blank.

Presentation only. Rows are plain display data (WalletRow) built by the
caller; the render path never reads the store, and the selection is by row
index because two records may share an identity key. Loading a chosen record
into the session is the wallet-store integration step, so the F6 `w` entry
opens the screen on its unavailable state until that accessor lands, and the
create row works today either way.

Evidence: tests/tui_select.rs (16 tests) drives the real draw path through
TestBackend at 80x24, 120x40 and 200x60, pins the dumped frame's footer to
status_footer_phased(..., wallet_select_footer_hint()), asserts exactly one
focus marker, a cell-width line budget from 20 to 200 columns, the window
disclosure with the create row always visible, hostile labels (ESC/BEL/C1/
bidi/newline/tab) and the crate-local UTC date formatter.

(cherry picked from commit 99a4ab640e)
2026-09-21 11:15:44 -04:00
sirius
cb411da813
wallet: answer the Digest challenge on the connection that issued it
All checks were successful
ci / test (pull_request) Successful in 5m37s
ci / sdk (pull_request) Successful in 1m21s
ci / fuzz (pull_request) Successful in 4m52s
android-ci / android (pull_request) Successful in 12m15s
monero-wallet-rpc (epee) keeps its Digest nonce per TCP connection: the
`http_server_auth` lives inside `http_custom_handler`, which is created per
connection, so its nonce starts empty and any request without a valid
`Authorization` field mints a fresh one. The client opened a *second* connection
for the authenticated retry, presenting a nonce that socket never issued — so a
real wallet RPC answered 401 forever, however correct the login was. That is the
`wallet RPC HTTP HTTP/1.1 401 Unauthorized` the TUI and Android showed; the
canned mocks replayed the challenge on any socket, so they stayed green.

- `post_digest`/`http_digest`: one `TcpStream` for the challenge and the retry,
  no `Connection: close` on the challenge (epee closes the socket with the 401
  when the request asks for it), `read_one_response` honouring `Content-Length`
  (a keep-alive response never ends in EOF; with no length the body ends at EOF,
  which is what keeps the 1 MiB cap meaningful for an open RPC).
- A 401 after our *own* challenge now reads: the login does not match the
  child's `--rpc-login`.
- Mocks in `tests/wallet.rs` and `src/node.rs` model the per-connection nonce:
  `serve_one_conn`/`serve_rpc_conns`. Two tests pin it — one RPC call uses one
  connection, and a nonce presented on another connection is refused.
- `docs/WALLET.md`: what a 401 means and why it is not the flow.

Verified end-to-end against `monero-wallet-rpc` v0.18.5.1 (`--rpc-login`,
`--offline`, real wallet open): unfixed tree → `wallet RPC HTTP HTTP/1.1 401
Unauthorized`; fixed tree → `connected: true` with the wallet's real address.
2026-09-20 09:17:05 -04:00
agent
f95c1e7ca7
docs: rewrite README and living docs to match the tree
Audit the operator docs against the source: pin downloads to v0.14.0,
document the real CLI/flags/env/F-keys (including F9, no F7), keep 18081
as the app-owned daemon port, describe the local chat outbox vs a
server-side one, and stop implying SECURITY_AUDIT.md is a third-party
audit. Spike reports stay; they get a status header only.
2026-09-20 00:31:07 -04:00
rust-dev
db12f4838b
sdk: expose wallet_child_refresh — a live wallet-child probe over UniFFI
All checks were successful
ci / test (pull_request) Successful in 5m16s
ci / sdk (pull_request) Successful in 1m17s
android-ci / android (pull_request) Successful in 13m18s
ci / fuzz (pull_request) Successful in 18m36s
Wire::wallet_status() is the cheap cached read (no dial); only
Node::wallet_child_refresh() writes state/height/target_height, and it was
reachable over UniFFI from exactly one place — start_wallet_child. An Android
refresh loop polling wallet_status() therefore shows a frozen sync line.

Add the additive export, reusing the existing child_status mapper so the record
is the same shape as wallet_status(), and the core probe as the only probe
path. Docs: one sentence in docs/WALLET.md, which enumerates the SDK
wallet-child surface.

Tests: SDK-level (a Wire cannot be built offline in this crate — open_wire
bootstraps Arti): the unprobed child maps to the same 'off' record both reads
report, pinned with an exhaustive record literal; and the probe on a stopped
handle is a typed WireError.Stopped.
2026-09-20 00:20:32 -04:00
onionwire
0a91744924
wallet: show the chain daemon's sync height and target on the child status
All checks were successful
ci / test (pull_request) Successful in 5m50s
ci / sdk (pull_request) Successful in 1m34s
ci / fuzz (pull_request) Successful in 4m54s
android-ci / android (pull_request) Successful in 12m39s
The user watching an in-process Cuprate node on Android saw only a phase
word (connecting, with 'wallet connect: Connection refused (os error
111)') and asked to see height vs tip.

- WalletChildStatus gains height / target_height, and line() appends
  'sync h/t' when a probe read either number. No percentage is invented
  when the daemon reports no target (h/0 is honest), and an off/exited
  child reports 0/0.
- Node::wallet_child_refresh fills them: one wallet-RPC get_info now
  answers both the readiness gate and the numbers (Wallet::chain_info,
  with chain_ready built on the same parse), and when the wallet RPC is
  down while the chain source is local/in-process, the loopback daemon
  is asked directly (ChildConfig::daemon_probe_addr). A refused daemon
  stays 0/0 — unknown, not caught up. Only refresh dials; the draw path
  reads two atomics.
- UniFFI WalletChildStatus carries the same two u64 fields so Android can
  show them; SDK test covers the round trip.

Tests: cargo test --locked --target x86_64-unknown-linux-gnu (all
green), clippy -D warnings clean; crates/onionwire-sdk cargo test
--locked + clippy clean (separate workspace).
2026-09-19 19:38:52 -04:00
87196e2297 Merge branch 'main' into onionwire/t_af8b509e-onionwire-tui-invite-mouse-copy-must-not
All checks were successful
ci / test (pull_request) Successful in 5m17s
ci / sdk (pull_request) Successful in 1m11s
ci / fuzz (pull_request) Successful in 4m52s
android-ci / android (pull_request) Successful in 12m17s
2026-09-19 14:46:33 +00:00
agent
cbe889024b
Merge origin/main into the peer-payments branch
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 5m44s
ci / sdk (pull_request) Successful in 1m26s
ci / fuzz (pull_request) Successful in 4m45s
main moved under this PR when #120 (clean-look chrome redesign) landed, which
touched the same three files (src/tui.rs, tests/tui_spec.rs, docs/TUI.md) and
left PR #121 unmergeable.

- docs/TUI.md: both sections kept — the peer-payment-history section from this
  branch, then #120's chrome-redesign section.
- tests/tui_spec.rs: #120's `fit_cells` flake relaxation kept (it is a superset
  of the one on this branch: same cut point plus the ellipsis assertion).
- src/tui.rs merged cleanly; `cargo test --locked` 383 passed / 0 failed and
  `cargo clippy --locked --all-targets -- -D warnings` clean afterwards.

The peer-payments frames are byte-identical after the merge, so the dumps in
this PR body still hold.
2026-09-19 00:36:38 -04:00
agent
b8fefe9c18
tui: F9 works on the peer-payments screen, and frames dump the real footer
Some checks failed
ci / test (pull_request) Successful in 6m33s
ci / sdk (pull_request) Successful in 1m31s
ci / fuzz (pull_request) Successful in 4m49s
android-ci / android (pull_request) Has been cancelled
Review round 1 on the F9 `payments` row found two false affordances.

1. `footer_hints(Screen::PeerPayments)` prints `F9 menu`, and docs/TUI.md says
   F9 reopens the menu, but the `KeyCode::F(9)` arm opened it only from
   `Screen::Main`, so pressing F9 on the peer history did nothing.

   The function keys are now routed through one table, `function_key_for(screen,
   code)`, and the F9 arm no longer has the Main-only guard: it opens (or
   reopens) the menu from `Main`, `WalletsSettings` and `PeerPayments`. A screen
   that names a key has to answer it while it is open — that is what the table
   encodes, and `mod function_key_tests` locks it, including a test that reads
   the screen's own hint and asserts every `F<n>` it names is answered there.

2. The PR's frame dumps passed `"Esc back  up/down select  ? help"` to
   `status_footer` by hand, so every dumped frame showed a footer the app never
   renders. `peer_payments_footer_hint()` is now the single source both
   `footer_hints` and the fixture read, and
   `peer_payments_frame_shows_the_shipped_footer` pins the dumped frame's last
   line to the shipped one.

Also restores the rustfmt-only reflow of unrelated tests in `tests/tui_spec.rs`
(`queued_row`, a `failed_row` call, `rgb_tokens_…`, `alert_line_…`), keeping this
card's real edits there.

Presentation only: no wire, store, session, send-path or `Node` change.
2026-09-19 00:31:42 -04:00
agent
c3116eb19e
fix(tui): invite payload gets a chrome-free region so mouse-copy is exact
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
ci / sdk (pull_request) Has been cancelled
ci / fuzz (pull_request) Has been cancelled
Mouse-selecting the invite copied the pane border: draw_share rendered the
payload inside themed_block, which is Borders::ALL, so every wrapped row sat
between a leading and a trailing glyph. OnionWire enables no mouse capture,
so the terminal's own drag-select is the copy path and it picks up chrome.

The payload now has its own region — flush at column 0, full frame width,
no block, no title, no gutter on any row it occupies — with the block
(title, fp, onion, copy hint) above it. Measured in cells, not chars.

Also add C: OSC 52 hand the payload to the terminal clipboard (same
sequence the F9 menu uses), with the key named on the screen and the mouse
selection named as the fallback for terminals that block the sequence.

Regression tests reconstruct the payload out of the rendered frame at
80x24, 120x40, 200x60 and 60x20 (they fail on base: the leading border
column) and assert no payload row carries a border glyph.
2026-09-18 23:54:07 -04:00
Lance Walters
2fa3466019
tui: peer payment history behind the F9 payments row (key p)
All checks were successful
ci / test (pull_request) Successful in 5m47s
ci / sdk (pull_request) Successful in 1m28s
ci / fuzz (pull_request) Successful in 4m51s
android-ci / android (pull_request) Successful in 10m36s
The F9 / `/settings` menu's only payment row showed the wallet's own transfer
list (`Node::wallet_recent_transfers`, F6). The signed `/pay` invoices and
`/tip` receipts a peer sent live in the `payments` table and had no path from
the TUI, so they were invisible. `Node::list_payments` (PR #119) closes that
gap; this wires it into a screen.

- `Screen::PeerPayments { state }` + `PeerPaymentsState` /
  `PeerPaymentRow`, built by `PeerPaymentsState::from_payments` from
  `Node::list_payments`' rows (newest first: the store returns `payments.id`
  ascending, the screen windows the vector).
- Key handler: `p` on the F9 screen opens it (`open_peer_payments`); `up`/`down`
  (or `k`/`j`) move the selection, `Esc` goes back, `F9` reopens the menu.
- Rows carry direction, kind, amount (`pay::atomic_to_xmr_str`, the same
  piconero formatter the chat lines use), memo (sanitized at draw time) and the
  receipt's `verified` / `unverified` word; the focused row is marked with `>`
  and bold. The selected row's txid and address sit under the rows — the
  address wrapped over two lines rather than clipped.
- States: populated, `no payments with {peer}`, `could not read payments`, and
  a menu row that refuses when no friend is selected. An empty history is a
  state, never an error.
- Menu: the wallet's own list is retitled `transfers` (F6, unchanged), and the
  new `payments` row (key `p`) names the peer and the count. Two histories, two
  rows, no ambiguity.
- Widths are measured in cells (`Span::width`); trailing columns are dropped
  before they can wrap, so the body fits 80x24 (20 inner rows of 21) as well as
  120x40 and 200x60.

Tests: new `tests/tui_payments.rs` (11 tests) dumps and asserts the screen at
80x24, 120x40 and 200x60 including the empty history, asserts a memo carrying
ESC/BEL/C1/bidi/newline bytes never reaches the frame buffer, and asserts the
window/column invariants for every width from 20 to 200.

Also relaxes one width assertion in `tests/tui_spec.rs`: `fit_cells` was
asserted to start with `"abcdef"`, which only holds when another test's
in-flight `ONIONWIRE_ASCII` mutation is not visible — the suite mutates env vars
without a global lock, so that test flaked (it also fails on an unmodified tree,
1 run in 2). It now accepts either chrome's cut point, which is what the comment
already claimed.

Docs: `docs/TUI.md` gains the screen's section, the retitled/replaced rows and
the updated row count; the "peer payment history" gap entry is closed.
2026-09-18 23:53:10 -04:00
agent
eefa7e5cc6
tui: clean-look chrome redesign (one accent, honest tor phase, real frames)
All checks were successful
ci / test (pull_request) Successful in 5m42s
ci / sdk (pull_request) Successful in 1m29s
ci / fuzz (pull_request) Successful in 4m41s
android-ci / android (pull_request) Successful in 10m45s
Applies the bitchat-tui clean-look principles to the OnionWire main screen.

- Hierarchy: header, roster + one primary chat pane, one status line, one
  footer hint line. The header gives up the accent (the accent is reserved
  for focus), so it stops competing with the panes.
- Tor phase is a first-class state: Node::tor_state() -> TorPhase (glyph +
  word, header and footer) so connecting / ready / degraded / off are never
  colour-only and never implied. No new data field.
- Footer changes with the focused pane (pane_footer_hints) and the phase; the
  main footer drops the redundant onion (the header already prints it) and
  uses those cells for hints. status_footer keeps its signature and strings.
- Empty roster / empty chat / connecting / degraded / off are designed states
  with their own copy, not blank panes.
- draw_main_chrome + MainView: the real main render path is public and
  Node-free, so tests/tui_frames.rs dumps the actual chrome at 80x24, 120x40
  and 200x60 (12 tests, 5 states, real Message/OutboxEntry rows) instead of a
  reconstructed stand-in.
- Widths in cells everywhere touched: status_footer*, alert_line,
  main_header_line*, draw_text_overlay, roster_row_text. The roster spends its
  budget name-first, so a 22-cell pane reads `bob-the-sta…  stale` instead of
  `…  bbbbbbbb… stale`.
- draw_text_overlay is centered with a one-cell side margin and clears
  underneath; never full-bleed.

Also fixes a pre-existing race in tests/tui_spec.rs (the ellipsis-form
assertion did not tolerate ONIONWIRE_ASCII being set by a parallel test).

Co-Authored-By: Hermes <[email protected]>
2026-09-18 23:18:24 -04:00
agent
0131803f9c
tui: WALLETS and SETTINGS menu (F9 / /settings) over the landed wallet + node features
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / sdk (pull_request) Has been cancelled
ci / fuzz (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
The Monero wallet and the cuprate node shipped behind function keys only, so a
user who did not already know F6 opened the wallet could not find wallet setup,
the child wallet, the chain source or the settings.

F9 (also /settings) now opens one discoverable screen with the two groups the
card fixes: WALLET (endpoint, child, sync, receive, balance, payments, create,
import) then SETTINGS (nickname, profile, identity, colour, backup, restore,
wipe, wipe-all). Every actionable row prints the key or command that fires it,
including the F6 wallet screen's own keys, and those keys stay live on the
screen so no row can name a dead key.

- Screen, not popup: 19 rows at 80x24 against 21 inner rows; 120x40 and 200x60
  hold. The footer is the shared status_footer, so TOR / identity / ? help stay
  put.
- No credentials: WalletMenuState carries booleans, labels and display-ready
  error strings only. rpc_login, secret(), seeds and passphrases have no field
  to travel in.
- Untrusted values are display data: sanitize + newline/tab strip, then
  truncated in cells.
- Cells, not chars: cell_width() measures through ratatui's own Span::width, so
  no unicode-width dependency was added and chars().count() is never a width.
- Copy without a clipboard crate: c writes the receive address as an OSC 52
  sequence; the terminal owns the clipboard and it survives SSH.
- Colour is never the only signal: every state also spells itself out.
- F7 stays free for the endpoint config screen that names it (db208be,
  docs/WALLET.md).

F2/F3/F4/F5/F6/F8 keep working: the function keys are now handled once, for Main
and this screen, instead of inside the Main arm.
2026-09-18 22:26:57 -04:00
agent
e89dd9eaee
sdk: expose the on-device Cuprate chain source (choice, lifecycle, node status)
All checks were successful
ci / test (pull_request) Successful in 5m5s
ci / sdk (pull_request) Successful in 1m4s
android-ci / android (pull_request) Successful in 8m31s
ci / fuzz (pull_request) Successful in 4m47s
ChainChoice gains InProcessCuprate, the SDK passes the core's cuprate-daemon
feature through as its own, and an empty monerod_datadir for that kind resolves
to $ONIONWIRE_HOME/chain so Kotlin never invents a path. wallet_status now
carries chain_in_process / node_available / node_state beside the core's five
state words; no second state machine, no timer, no env var.

start/stop stay the core's pass-through: one call launches the node and the
wallet child, one stops both, both idempotent.

Replayed onto main (25e029e): PR #111 was merged into the core branch
onionwire/t_04975420-cuprate-land-the-in-process-chain-source, not main, so
main had only the core half (from PR #110). This is the same tree change with
no core commits replayed.
2026-09-18 15:29:55 -04:00
agent
ffea4bf9df
wallet: land the in-process Cuprate chain source on main
All checks were successful
ci / test (pull_request) Successful in 5m39s
ci / sdk (pull_request) Successful in 1m22s
android-ci / android (pull_request) Successful in 8m58s
ci / fuzz (pull_request) Successful in 4m45s
`ChainSource::InProcessCuprate { datadir }` is the fourth chain source: P2P,
consensus and RandomX run inside the OnionWire process instead of as a spawned
`monerod`. The wallet layer does not move — the daemon binds the same loopback
unrestricted RPC (`127.0.0.1:18081`) that `WalletChild::daemon_address` already
returns for a local source, so `wallet_rpc_argv`, the RPC client, the payment
frames and the receipt-verification path are untouched.

- Cargo.toml: `cuprated` (git, rev 4f8fcd1b) + `toml`, both optional, behind the
  `cuprate-daemon` feature, OFF by default. `cuprated`'s own `arti` feature is
  disabled (`default-features = false`): its arti-client 0.44 cannot unify with
  this crate's 0.46, and the in-process daemon is clearnet-only. One Tor stack in
  the process. `Cargo.lock` gains the graph; a default build's
  `cargo tree --locked -e normal -i cuprated` still says "did not match any
  packages", and only `arti-client v0.46.0` is in the lock.
- src/cuprate.rs (new): `CuprateNode` builds the cuprated config as TOML
  (testnet, unrestricted RPC on loopback, restricted RPC disabled, inbound P2P
  off), launches it on a runtime it owns, and owns the node. `launch` is
  synchronous on purpose: `WalletChild::start` is sync (the TUI calls it from its
  blocking thread, UniFFI calls it from an async context) and a runtime cannot be
  started from inside a runtime, so the launch runs on a thread of its own and
  the node + its runtime come back over a channel. Dropping the value asks the
  node to shut down and `shutdown_background`s the runtime, which is the only
  exit that cannot panic when the value is dropped inside another runtime.
  The type exists in every build (feature off: `launch` fails with the feature
  name), so the chain-source type, its stored record and its copy do not fork on
  a cargo feature.
- src/wallet.rs: the variant, its label (`in-process node`), and the chain-daemon
  client the wallet line carried (typed `WalletError`, de-chunked HTTP,
  `get_height` over the URI endpoint, an above-the-tip height as one typed
  error). Cuprate answers those three differently from monerod and the
  in-process source is what makes them the *local* case.
- src/wallet_child.rs: launches/holds/stops the node, `chain_datadir` for the
  free-space/ownership question, the honest `chain_copy` line, `kind =
  "cuprate"` in the sealed record, and `ChildConfig::validate` for it.
- src/tui.rs: the wallet screen's chain line carries the testnet caveat when the
  configured source is the in-process one. It computes the line at draw time, so
  `Screen::Wallet`'s shape (which tests construct) does not change.
- docs/WALLET.md, docs/THREAT_MODEL.md, docs/cuprate-android-spike.md: the
  feature flag and how to enable it, where the (fjall) chain store lives, the
  **measured** +11.8 MiB delta, the pre-production/testnet caveat, and the
  in-repo aarch64-linux-android proof with exit codes.

Scope deviations, stated plainly:
- `src/cuprate.rs` and its one `src/lib.rs` module line are not in the card's
  allowed list; the card's own deliverable describes the module's behaviour.
- `crates/onionwire-sdk/src/lib.rs` is forbidden, but adding a variant to a
  `pub enum` that the SDK matches exhaustively breaks the SDK workspace, and the
  root CI `sdk` job runs on every PR. One variant plus two match arms land here
  so the SDK keeps compiling (`cargo test --locked` + clippy clean); the SDK card
  owns the rest — feature passthrough, the config field's semantics, the label
  and its tests, and the Android check.
- `tests/wallet.rs` carries the launch test. `tests/tui_frames.rs` is untouched:
  main has no `ChainChoice` to pin (the chain-source picker is the unmerged F7
  work, and `docs/WALLET.md` says so rather than describing a picker that does
  not exist).

Proof (all on this tree):
- Default build: `cargo test --locked --target x86_64-unknown-linux-gnu` → 345
  passed / 0 failed across 33 suites, exit 0; `cargo clippy --locked
  --all-targets --target x86_64-unknown-linux-gnu -- -D warnings` exit 0.
- Feature on: `cargo test --locked --features cuprate-daemon --target
  x86_64-unknown-linux-gnu` → 347 passed / 0 failed, exit 0; same clippy with
  `--features cuprate-daemon` exit 0. The two extra tests are the real thing:
  `wallet_child::tests::in_process_source_launches_a_daemon_and_stop_shuts_it_down`
  and `tests/wallet.rs::an_in_process_cuprate_node_answers_the_typed_daemon_client`
  — the latter launches the node, drives `get_info` / `get_height` / `get_block`
  through the typed client, checks the above-the-tip 500 maps to
  `DaemonHeightOutOfRange`, checks the chain store is under the chain datadir,
  and checks the listener dies with the node.
- aarch64: `cargo check --locked --release --target aarch64-linux-android
  --features cuprate-daemon` exit 0 (1m 50s), and the full link exit 0
  (`cargo rustc ... --bin onionwire -- <NDK C++ runtime / compiler-rt link
  args>`) producing `ELF 64-bit LSB pie executable, ARM aarch64, for Android 26,
  built by NDK r28c`.
- Size: stripped aarch64 release binary, 24,725,704 bytes without the feature and
  37,053,472 with it — +12,327,768 bytes (≈ +11.8 MiB), the figure
  `docs/WALLET.md` now quotes.
2026-09-18 13:45:59 -04:00
agent
c5af978d14
docs(wallet): describe the child lifecycle that ships here
All checks were successful
ci / test (pull_request) Successful in 5m31s
ci / sdk (pull_request) Successful in 1m22s
android-ci / android (pull_request) Successful in 8m52s
ci / fuzz (pull_request) Successful in 4m37s
The inherited section described an F7 config screen with endpoint entry and
test-connection that is not in this stack (it lives on
feat/wallet-create-import), and called local mode 'not wired yet'. Both are
now wrong: the child is wired, and the stored wallet config is a core API
without a screen. Say which is which.
2026-09-18 09:28:11 -04:00
agent
11a021acb3
chore: wallet child lifecycle + chain source + SOCKS proxy (t_1bcecf90) 2026-09-18 09:28:11 -04:00
rust-dev
db208be05c
wallet: stored config (F7), WalletStatus snapshot, pay/tip readiness guard
The only input path for the wallet was env. Add the same three remote-mode
fields as stored config so the F7 screen can set them and headless runs read
one source of truth:

- `wallet_config` table in the encrypted store (one row; the login is sealed
  with the store data key under `onionwire/wallet-config/v1`, on top of
  SQLCipher). Empty URL clears it. `Store::load_wallet_config` /
  `save_wallet_config`.
- `WalletConfig { rpc_url, rpc_login: Zeroizing<String>, no_spend }` with a
  redacting `Debug`; `Wallet::from_config`, and `Wallet::for_boot` which
  prefers stored config, falls back to env, and refuses to dial a bad stored
  endpoint. Node::start* now reads the store before constructing the wallet.
- `WalletStatus { configured, connected, last_error, balance_line,
  receive_address }`: `connected` only ever comes from a probe
  (`Wallet::status`, get_address + get_balance); config alone leaves it false.
  `Node::wallet_status` is the cheap draw-path read, `wallet_refresh` the
  probe that folds into it.
- One-shot `Wallet::ping(rpc_url, rpc_login) -> PingResult { ok, status,
  error }` for the Test-connection button: same loopback/digest rules, errors
  redacted and capped.
- `readiness(configured, connected, no_spend, is_tip) -> Readiness` plus
  `Node::wallet_readiness` (async, block_on-friendly): not configured →
  NOT_CONFIGURED_MSG; /tip on a no-spend wallet → VIEW_ONLY_MSG before any
  dial; configured but not connected → NOT_CONNECTED_MSG; else ready.
- `Node::wallet_save_config` persists, validates first, then re-reads so the
  live wallet and snapshot follow a Save without a restart.
- `Node::wallet` is now a Mutex<Wallet> (cloned out before each await) so the
  wallet can be re-pointed mid-session.

Local-mode fields stay reserved: the child lifecycle is t_69ce8e46 and is not
wired here. docs/WALLET.md documents the stored config, boot precedence and
the exact guard copy.

Tests: 38 in tests/wallet.rs including exact-refusal-copy, boot precedence,
sealed-on-disk login, ping sanitization and connected-only-after-probe.
2026-09-18 09:28:11 -04:00
agent
bcf7ec31c1
wallet: app-owned child lifecycle + user-chosen ChainSource
The app now owns monero-wallet-rpc (and monerod when the chain source is
local) instead of requiring the user to start them and export
ONIONWIRE_WALLET_RPC.

- ChainSource enum: None / Local { monerod_bin, datadir } / Remote { host,
  port }. No default remote node; Remote is only constructed from explicit
  user input. A .onion Remote is refused without a SOCKS proxy (separate
  card).
- WalletChild in src/wallet_child.rs spawns monero-wallet-rpc with
  --rpc-bind-ip 127.0.0.1, a random free loopback port, generated
  --rpc-login, and --wallet-dir /wallet; monerod too for a
  local source. --trusted-daemon is never passed.
- Generated RPC creds are sealed in the encrypted SQLCipher store
  (wallet_child table, AEAD on top of whole-db encryption), never a
  plaintext file. The Wallet client is built from the generated loopback
  URL, not from_env.
- Readiness predicate: chain_ready() requires synchronized==true, height>0,
  height>=target_height; can_spend() and can_verify_receipts() gate on it.
  Unsynced -> receipts stay verified=0, spend refused with a clear message.
- Backend-aware timeouts: local management calls keep 5s; chain-dependent
  calls (get_info, get_transfers, transfer) get 60s (CHAIN_RPC_TIMEOUT),
  because a first sync or a remote daemon outlasts 5s and a 5s cap there
  is what left receipts permanently unverified.
- node.rs ingest_receipt gates on can_verify_receipts() instead of
  configured() alone.
- docs/WALLET.md rewritten for the child lifecycle + chain source.

Base: feat/wallet-create-import (PR #66). Do not rebase onto main.

Co-Authored-By: Hermes Agent <agent@local>
2026-09-18 09:28:11 -04:00
24b5c93c43 Merge pull request 't_2fb507c6: F8 rotate prekey (Node::rotate_prekey + invite re-encode)' (#101) from wt/t_2fb507c6 into main
Some checks failed
android-ci / android (push) Successful in 8m28s
ci / test (push) Has been cancelled
ci / sdk (push) Has been cancelled
ci / fuzz (push) Has been cancelled
Reviewed-on: #101
2026-09-18 01:21:45 +00:00
049b612169 Merge branch 'main' into wt/t_17e3d3cf-rustls-default
Some checks failed
android-ci / android (pull_request) Successful in 8m17s
ci / test (pull_request) Successful in 4m50s
ci / sdk (pull_request) Successful in 1m6s
ci / fuzz (pull_request) Failing after 58s
2026-09-18 01:05:55 +00:00
rust-dev
6827b87a29
tui: F8 rotate prekey + Node::rotate_prekey (hard cut, drops ratchet state)
All checks were successful
ci / test (pull_request) Successful in 5m0s
ci / sdk (pull_request) Successful in 1m11s
android-ci / android (pull_request) Successful in 8m36s
The signed prekey was set at invite creation and never rotated: a long-lived
static is a long-lived forward-secrecy window. F8 now rotates it.

- Node::rotate_prekey(): new X25519 keypair, written through the existing
  replace_identity_keys prekey columns (no store change needed), live Keys
  updated, new pubkey returned for the invite re-encode. Identity untouched.
- It drops every stored ratchet session: the bootstrap epoch is derived from
  the prekey DH, so each friend has to F3-paste the new invite. Nothing is
  pushed to peers \u2014 there is no in-band prekey update.
- TUI: F8 on Main opens the confirm screen (type ROTATE, same prompt as F4),
  then re-opens the F2 share path with the new invite; help overlay + footer
  hint list it.
- Docs: THREAT_MODEL gains a section on the F8 hard cut and the prekey-bound
  epoch bullet; README key table and PROTOCOL 'Roles and keys' follow.

Tests: node-level rotation test (identity/pk/stored row/ratchet drop/invite),
tests/rotate.rs screen text + prompt, tui_chrome help needs F8.
2026-09-17 20:48:10 -04:00
Hermes rust-dev
69672809ab
tls: default to Arti's rustls backend (drop OpenSSL from TLS)
All checks were successful
ci / test (pull_request) Successful in 6m47s
android-ci / android (pull_request) Successful in 8m21s
ci / sdk (pull_request) Successful in 1m25s
Arti's TLS backends are non-additive; the root crate defaulted to
`native-tls` (OpenSSL). Switch `default = ["rustls"]` and pin the `rustls`
crate with its `ring` feature — `tor-rtcompat` pulls rustls in with
`default-features = false`, so without that pin the backend compiles with no
`CryptoProvider` and the first TLS config fails (same reason already recorded
in crates/onionwire-sdk/Cargo.toml).

`native-tls` stays as an opt-in feature. SQLCipher still builds vendored
OpenSSL (`bundled-sqlcipher-vendored-openssl`); that is unrelated to TLS.

- tests/tls_backend.rs: compile-time pin that the default features select
  rustls, plus a runtime check that rustls resolves a provider with no manual
  install.
- ci.yml: the root `test` job no longer installs pkg-config/libssl-dev (the
  SDK job keeps it).
- docs: README build deps, ARTI_UPGRADE backend table, release-body and the
  SDK README now describe the rustls default; the false "binaries link
  libssl.so.3 dynamically" claim is corrected.
- crates/onionwire-sdk/Cargo.lock: regenerated for the root crate's new
  dependency (separate workspace, --locked would otherwise fail).
2026-09-17 20:48:05 -04:00
agent
dff37fe00e
docs+tui: reachability stance (no sealed mailbox) and peer-unreachable queued footer
Some checks failed
ci / test (pull_request) Has been cancelled
ci / sdk (pull_request) Has been cancelled
android-ci / android (pull_request) Has been cancelled
Add a Reachability section to docs/THREAT_MODEL.md: no sealed mailbox or
server-side message store, the chat outbox is local-device retry only, and
there is no mutual-online indicator — a send is a one-shot Noise IK session
and an unanswered dial queues locally with the retry clock shown.

OutboxSummary now carries the outstanding row's attempt count and soonest
retry, so the footer reads 'peer unreachable, queued (n/8, retry 45s)'
instead of a bare 'n queued'. Tests updated to the real outbox wording; the
Android KDoc note stops claiming the footer copy is mirrored (Android shows
per-row 'queued (try n/8, retry …)' via OutboxDetail).
2026-09-17 20:44:28 -04:00
rust-dev
e0bd4e4218
docs: Cuprate cross-compiles for Android aarch64 (NDK r28c, minSdk 26)
Spike evidence for the Phase 1 Android question: cargo check --release --target
aarch64-linux-android exits 0 and the PoC binary links as an Android 26 aarch64 ELF.
Documents the env recipe, the four link args the C++ RandomX build needs, the
cargo-ndk linker-wrapper bug, and the RANDOMX_DIR/DARCH no-op.
2026-09-16 23:58:25 -04:00
agent
12db06b2ed
docs: Cuprate in-process launch spike A — testnet launch, RPC and sync evidence
Spike A of the Cuprate exploration: Node::launch(config).await runs a real
testnet chain daemon in-process (no monerod, no subprocess). Unrestricted RPC
on 127.0.0.1:18089 answers get_info, /get_height and get_block (heights 0, 1, 2,
1000) with monerod-shaped payloads, and clearnet P2P synced 0 -> 23,758 testnet
blocks in ~120s. Verdict VALIDATED with four parity gaps recorded:
out-of-range get_block returns a bare HTTP 500 with an empty body (monerod
returns a JSON-RPC error object), get_info reports zero peers while syncing,
restricted get_info returns placeholder database_size/version, and the version
label is 0.1.0-preview-release.
2026-09-16 23:39:12 -04:00
agent
c090f16dab
docs: add Cuprate phased integration strategy to payment plan
Adds strategic recommendation: Phase 1 (Cuprate in-process for chain +
monero-wallet-rpc subprocess pointing at it) and Phase 2 (monero-wallet
crate for full in-process wallet). Includes RPC compatibility note,
binary size comparison (+5.6 MB vs ~52 MB monerod), and version
conflict resolution confirmation.

See references/cuprate-integration.md and Obsidian notes for full details.
2026-09-16 23:15:55 -04:00
agent
7ba07f84ea
docs: add Cuprate in-process daemon exploration to payment plan
Adds §7a documenting the alternative approach of embedding Cuprate's
crates directly into the OnionWire binary instead of spawning monerod
as a subprocess. Includes PoC results (cargo check passed with both
arti-client 0.44 and 0.46), the wallet-layer gap, dependency bloat
assessment, and exploration card titles.

Does not change any locks — the subprocess wrapper model remains the
default path. See references/cuprate-integration.md for full test log.
2026-09-16 22:47:17 -04:00
agent
7f3ef8c3fc
docs: ratchet wire spec + forward-secrecy/PCS threat-model claims
PROTOCOL.md gains a 'Ratchet (v1 chat layer)' section written so a second
implementation can interoperate from the text alone: byte-exact frame layout
(rat , 0x01, dh_pub||N||PN as header and AAD, 12-byte nonce,
ChaCha20-Poly1305), the KDF_RK/KDF_CK constructions and the role-separated
epoch rule, the derived bootstrap epoch, the receive and DH-step rules, the
MAX_SKIP/MAX_SKIPPED_KEYS bounds with the replay rule, the SQLCipher
ratchet_sessions row, and what stays unratcheted.

THREAT_MODEL.md gains the corresponding gains (per-chain forward secrecy, PCS
after a DH step, header not on the wire) and honest limits (skipped-key
window, the prekey-bound bootstrap epoch, no deniability, no one-time
prekeys, compromised endpoint out of scope, no metadata gain, the no-server-
outbox lock untouched) plus the amended transport wording.

README.md documents the operator-visible consequence: no reset command yet,
prekey change / invite re-paste is the only recovery, /wipe keeps the state,
and a desync is currently stderr-only.
2026-09-16 19:40:40 -04:00
ef1248e730
ci(android): build the APK+AAR on android/, src/ and crates/ changes
All checks were successful
android-ci / android (pull_request) Successful in 9m30s
An android-only PR ran zero jobs: ci.yml's path allowlist never matches
android/**, and android-release.yml is dispatch-driven. #70 merged on an
empty check list.

android-ci.yml runs the release's gradle targets through the release's own
script (scripts/build-android-local.sh) on the amd64 runner, debug-signed,
publishing nothing. Same concurrency group and runner volumes as
android-release.yml so the build is warm and cannot collide with a release.
2026-09-14 12:16:40 -04:00
Lance Walters
cf0a517cd2
wallet: create/import in-app (no key paste on create) + opt-in spend
All checks were successful
ci / test (pull_request) Successful in 4m15s
ci / sdk (pull_request) Successful in 1m12s
/ wallet create generates a wallet on the RPC and shows the 25-word seed
once for backup; /wallet import is the only path that takes an existing
seed, and it is collected on a dedicated screen so it never reaches the
composer line or chat history.

Threat model now states the real policy: payments are opt-in, default is
no spend key, spend is a local authority at create/restore, and the chain
source is the user's choice (spawned local monerod or a daemon address
they supply). WALLET.md and README follow.

Tests: canned-RPC create/restore, slash parse, help overlay.
2026-09-13 23:25:25 -04:00
agent
7ad3679b51
change app icon 2026-09-13 21:23:27 -04:00
2cf055c1e8
ci(release): android-release is dispatch-only; a CI-created tag cannot wake it
Neither decoupled trigger fires on Forgejo 10.0.3: a tag created by the CI
(API or git push) is an Actions-user push and is not dispatched back into
Actions, and reusable workflows need Forgejo >= 12. The release procedure is
therefore two dispatches: release.yml, then android-release with that tag.
2026-09-12 18:55:58 -04:00
70ae597abc Merge branch 'main' into wt/t_95e0d607 2026-09-12 22:29:07 +00:00
18ccab5464 Merge branch 'main' into feat/tui-msgid-join
All checks were successful
ci / test (pull_request) Successful in 4m10s
2026-09-12 22:10:54 +00:00
6c9fd00b8a
ci(release): manual, batched releases — no release on merge
All checks were successful
ci / test (pull_request) Successful in 3m49s
Drop `push: branches: [main]` from both release workflows. release.yml now
runs only via workflow_dispatch, with bump (default minor), version, tag and
dry_run inputs; contradictory input is rejected instead of guessed at.

android-release.yml keeps the Android assets on the same tag by subscribing to
`push: tags: v*.*.*`: creating a tag over the API sends the same push
notification a git push does, so the core's tag wakes it. No workflow_call —
this Forgejo is 10.0.3, where reusable workflows are not supported.

docs/RELEASING.md is the policy and procedure.
2026-09-12 17:57:15 -04:00
t
d256d3bb8e
docs: describe the SQLCipher store, not the pre-#43 design
The v0.2 banner and the "Seized laptop" section still claimed only chat
bodies were encrypted, that `self.identity_sk` and the roster were
plaintext, and that "sqlcipher is out of v1". That has been false since
#43.

- README banner: whole store is encrypted at rest with SQLCipher, with the
  row-bound AEAD layer kept on top.
- "Seized laptop": whole-file SQLCipher (Argon2id key over the 16-byte
  `store_salt`, raw `PRAGMA key`), identity/friends/locators inside the
  encrypted file, fail-closed unlock and `store_salt`-missing refusal, and
  the in-place v0.2.1 upgrade. Kept the honest caveats: no defense against
  a live compromise or a known passphrase, `/wipe` is not a forensic erase
  (SSD wear-levelling), and THREAT_MODEL.md stays the reference.
- "Not in v1": drop `sqlcipher` (shipped in #43).
- docs/SECURITY_AUDIT.md "Still true" bullet repeated the same plaintext
  claim; restated it as the residual risk that actually remains.

No code change. Evidence: cargo test --test store (21 passed, incl.
whole_store_file_is_encrypted_at_rest) and cargo test --lib -- store::
(6 passed, incl. the plaintext->SQLCipher upgrade and the wrong-passphrase
no-op).

Card: t_f2fc5190
2026-09-12 17:20:56 -04:00
rust-dev
2cbe7d41e5
feat(tui): join outbox rows to chat rows by message id
All checks were successful
ci / test (pull_request) Successful in 4m12s
`chat_with_delivery` matched pending outbox rows to chat rows by body
because `store::Message` carried no id, so an older send that was still
queued showed a delivered mark whenever a newer send of the same text had
already crossed the circuit.

`store::Message` now carries its `messages.id`, and the TUI joins
`OutboxEntry::message_id` == `Message::id`. The body match and its
newest-first fallback are gone.

`list_messages()` keeps its signature; callers that do not need the id
are untouched.
2026-09-12 17:12:30 -04:00