2026-09-10 01:02:33 -04:00
|
|
|
[package]
|
|
|
|
|
name = "onionwire"
|
2026-09-10 20:52:24 -04:00
|
|
|
version = "0.2.1"
|
2026-09-10 01:02:33 -04:00
|
|
|
edition = "2024"
|
deps(tor): arti-client / tor-* 0.46 -> 0.49, safelog 0.9 -> 0.10
Arti publishes the whole tor-* family in lockstep, so arti-client,
tor-cell, tor-hsservice and tor-rtcompat move together in both
workspaces (root crate and crates/onionwire-sdk, which pins the feature
set for Android).
Arti 0.49 depends on safelog 0.10. OnionWire names safelog directly for
`DisplayRedacted` on HsId, so leaving the direct dep at 0.9 puts two
safelog versions in the graph and two incompatible DisplayRedacted
traits, and src/hs.rs stops compiling. Bumped to 0.10; the trait's
method surface (display_redacted / display_unredacted) is unchanged.
Arti 0.49's own MSRV is 1.92, still below the 1.98 floor the default
cuprate-daemon graph sets (tapes needs VecDeque::pop_front_if, 1.93),
so no toolchain or CI image change. The hs.rs workarounds are still
correct in 0.49: tor-hsservice 0.49's OVERALL_UPLOAD_TIMEOUT is still
5 min (PUBLISH_WAIT 360s covers it), the default predicted exit ports
are still 80/443 (we override to empty), and the status State variants
hs_is_ready matches on are unchanged.
Closes #209
2026-12-02 02:04:00 -05:00
|
|
|
# 1.98, not 1.92. Arti 0.49 builds on 1.92, but the default feature set includes
|
2026-10-08 17:41:22 -04:00
|
|
|
# `cuprate-daemon`, and `tapes` (a Cuprate dep this repo cannot patch) calls
|
|
|
|
|
# `VecDeque::pop_front_if`, stable only from 1.93. 1.98 is the release CI and
|
|
|
|
|
# the Android workflows actually build that graph with. `--no-default-features`
|
|
|
|
|
# does not need it; `cargo` checks `rust-version` before features, so the
|
|
|
|
|
# declared floor is the default build's floor.
|
|
|
|
|
rust-version = "1.98"
|
2026-09-10 01:02:33 -04:00
|
|
|
description = "Lean Tor messenger: Arti in-process, identity=pubkey, onion=locator. No XMPP."
|
|
|
|
|
license = "MIT"
|
|
|
|
|
publish = false
|
release: reproducible builds, and sign every asset
"The source is public" is not a check anyone can run, and against a Tor +
Monero tool the surviving objection is that the released binary might not be
that source. This makes the build checkable instead of trusted.
- scripts/reproducible-build.sh is the single definition of a release build:
digest-pinned builder image, fixed in-container paths, SOURCE_DATE_EPOCH
from the released commit, --locked, its own apt build deps, and RUSTFLAGS
replaced rather than extended. The fixed paths are load-bearing: rustc's
--remap-path-prefix cannot reach absolute paths compiled in by a C
toolchain, and this graph always has one (rusqlite compiles OpenSSL from
vendored sources; the default cuprate-daemon adds RandomX and cmake). It
also records toolchain versions in build-info, because the apt build deps
are not digest-pinned the way the image is.
- release.yml pins the image by digest, resolves SOURCE_DATE_EPOCH from the
tag's commit, runs that recipe, and uploads build-info-<target>.txt beside
the binary. The cargo target volume is created per run and removed, so the
published artifact cannot come out of a cache that a verifier does not have.
- scripts/verify-reproducible.sh rebuilds a tag in the same pinned image and
compares bytes against the release asset. Two fresh builds of the same tree
in that image produce identical sha256.
- scripts/sign-release.sh signs with minisign and verifies its own signature
against the committed public key. The publish job signs BEFORE publishing
and fails closed without MINISIGN_SECRET_KEY, so nothing unsigned reaches
the release page: an unsigned release is indistinguishable from a signed
one to anyone who is not checking. Checked: signature accepted by an
independent minisign -V, a tampered file rejected, a missing key refused,
a missing public key refused.
- build-release-local.sh runs the same container and the same recipe. A host
cargo build would publish a hash nobody could reproduce, which is worse
than having no fallback at all.
- docs/VERIFY.md is the verifier-facing walkthrough: the dependency graph and
where its HTTP actually comes from, the wallet's real seed-read exposure,
the rebuild check, the signature check, and an explicit list of what none
of it proves.
- Cargo.toml repository: point at the Forgejo instance that hosts this and
builds its releases.
Needs a MINISIGN_SECRET_KEY secret before the next release; without it the
publish job stops by design. docs/RELEASING.md has the keygen procedure.
2026-10-11 12:20:08 -04:00
|
|
|
repository = "https://forgejo.siriusdevops.com/sirius/onionwire"
|
2026-09-10 01:02:33 -04:00
|
|
|
|
2026-09-17 20:48:05 -04:00
|
|
|
# TLS backend: `rustls` by default, `native-tls` (OpenSSL) opt-in.
|
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.
SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).
android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.
Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.
Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00
|
|
|
#
|
2026-09-17 20:48:05 -04:00
|
|
|
# Arti marks these two backends non-additive, so exactly one may be selected per
|
|
|
|
|
# build graph — hence exposing them as crate features. rustls is the default
|
|
|
|
|
# because Android has no OpenSSL in the NDK and the Linux TUI/release build does
|
|
|
|
|
# not need a system OpenSSL for TLS either. (OpenSSL is still *compiled* into
|
|
|
|
|
# every build by rusqlite's `bundled-sqlcipher-vendored-openssl`, vendored and
|
|
|
|
|
# static: that is the SQLCipher layer, not Arti's TLS.)
|
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.
SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).
android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.
Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.
Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00
|
|
|
[features]
|
2026-10-08 10:59:45 -04:00
|
|
|
default = ["rustls", "cuprate-daemon"]
|
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.
SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).
android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.
Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.
Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00
|
|
|
native-tls = ["arti-client/native-tls"]
|
|
|
|
|
rustls = ["arti-client/rustls"]
|
wallet: land the in-process Cuprate chain source on main
`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
|
|
|
# In-process Monero chain daemon (Cuprate) as the local chain source, instead of
|
2026-10-08 10:59:45 -04:00
|
|
|
# spawning `monerod`. ON in the Linux TUI/release binary (this default). A build
|
|
|
|
|
# with `--no-default-features` does not include it. `cuprated` is pre-1.0 and is
|
|
|
|
|
# not published to crates.io (every Cuprate crate there is a `0.0.0-placeholder`
|
|
|
|
|
# name reservation), so this pins a git revision and pulls a large tree (RandomX,
|
wallet: land the in-process Cuprate chain source on main
`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
|
|
|
# fjall, axum/hyper, rayon). See `docs/WALLET.md`, "The in-process chain daemon".
|
|
|
|
|
#
|
|
|
|
|
# Cuprate's own `arti` feature stays OFF (and is off in its default feature set,
|
|
|
|
|
# which is why `default-features = false` is load-bearing): it would link a
|
|
|
|
|
# second, older Tor stack (arti-client 0.44, which cannot unify with this
|
deps(tor): arti-client / tor-* 0.46 -> 0.49, safelog 0.9 -> 0.10
Arti publishes the whole tor-* family in lockstep, so arti-client,
tor-cell, tor-hsservice and tor-rtcompat move together in both
workspaces (root crate and crates/onionwire-sdk, which pins the feature
set for Android).
Arti 0.49 depends on safelog 0.10. OnionWire names safelog directly for
`DisplayRedacted` on HsId, so leaving the direct dep at 0.9 puts two
safelog versions in the graph and two incompatible DisplayRedacted
traits, and src/hs.rs stops compiling. Bumped to 0.10; the trait's
method surface (display_redacted / display_unredacted) is unchanged.
Arti 0.49's own MSRV is 1.92, still below the 1.98 floor the default
cuprate-daemon graph sets (tapes needs VecDeque::pop_front_if, 1.93),
so no toolchain or CI image change. The hs.rs workarounds are still
correct in 0.49: tor-hsservice 0.49's OVERALL_UPLOAD_TIMEOUT is still
5 min (PUBLISH_WAIT 360s covers it), the default predicted exit ports
are still 80/443 (we override to empty), and the status State variants
hs_is_ready matches on are unchanged.
Closes #209
2026-12-02 02:04:00 -05:00
|
|
|
# crate's 0.49) next to OnionWire's. The in-process daemon runs clearnet-only;
|
wallet: land the in-process Cuprate chain source on main
`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
|
|
|
# OnionWire's Arti is the only Tor in the process.
|
|
|
|
|
cuprate-daemon = ["dep:cuprated", "dep:toml"]
|
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.
SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).
android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.
Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.
Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00
|
|
|
|
2026-09-10 01:02:33 -04:00
|
|
|
[dependencies]
|
deps(tor): arti-client / tor-* 0.46 -> 0.49, safelog 0.9 -> 0.10
Arti publishes the whole tor-* family in lockstep, so arti-client,
tor-cell, tor-hsservice and tor-rtcompat move together in both
workspaces (root crate and crates/onionwire-sdk, which pins the feature
set for Android).
Arti 0.49 depends on safelog 0.10. OnionWire names safelog directly for
`DisplayRedacted` on HsId, so leaving the direct dep at 0.9 puts two
safelog versions in the graph and two incompatible DisplayRedacted
traits, and src/hs.rs stops compiling. Bumped to 0.10; the trait's
method surface (display_redacted / display_unredacted) is unchanged.
Arti 0.49's own MSRV is 1.92, still below the 1.98 floor the default
cuprate-daemon graph sets (tapes needs VecDeque::pop_front_if, 1.93),
so no toolchain or CI image change. The hs.rs workarounds are still
correct in 0.49: tor-hsservice 0.49's OVERALL_UPLOAD_TIMEOUT is still
5 min (PUBLISH_WAIT 360s covers it), the default predicted exit ports
are still 80/443 (we override to empty), and the status State variants
hs_is_ready matches on are unchanged.
Closes #209
2026-12-02 02:04:00 -05:00
|
|
|
arti-client = { version = "0.49", default-features = false, features = [
|
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.
SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).
android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.
Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.
Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00
|
|
|
"tokio",
|
|
|
|
|
"onion-service-client",
|
|
|
|
|
"onion-service-service",
|
|
|
|
|
"compression",
|
|
|
|
|
] }
|
2026-09-10 01:18:28 -04:00
|
|
|
futures = "0.3"
|
deps(tor): arti-client / tor-* 0.46 -> 0.49, safelog 0.9 -> 0.10
Arti publishes the whole tor-* family in lockstep, so arti-client,
tor-cell, tor-hsservice and tor-rtcompat move together in both
workspaces (root crate and crates/onionwire-sdk, which pins the feature
set for Android).
Arti 0.49 depends on safelog 0.10. OnionWire names safelog directly for
`DisplayRedacted` on HsId, so leaving the direct dep at 0.9 puts two
safelog versions in the graph and two incompatible DisplayRedacted
traits, and src/hs.rs stops compiling. Bumped to 0.10; the trait's
method surface (display_redacted / display_unredacted) is unchanged.
Arti 0.49's own MSRV is 1.92, still below the 1.98 floor the default
cuprate-daemon graph sets (tapes needs VecDeque::pop_front_if, 1.93),
so no toolchain or CI image change. The hs.rs workarounds are still
correct in 0.49: tor-hsservice 0.49's OVERALL_UPLOAD_TIMEOUT is still
5 min (PUBLISH_WAIT 360s covers it), the default predicted exit ports
are still 80/443 (we override to empty), and the status State variants
hs_is_ready matches on are unchanged.
Closes #209
2026-12-02 02:04:00 -05:00
|
|
|
safelog = "0.10"
|
2026-09-10 01:43:02 -04:00
|
|
|
ed25519-dalek = { version = "2", features = ["rand_core"] }
|
|
|
|
|
rand = "0.8"
|
2026-09-12 13:00:18 -04:00
|
|
|
rusqlite = { version = "0.36", features = ["bundled-sqlcipher-vendored-openssl"] }
|
2026-09-10 14:37:43 -04:00
|
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "time", "net"] }
|
deps(tor): arti-client / tor-* 0.46 -> 0.49, safelog 0.9 -> 0.10
Arti publishes the whole tor-* family in lockstep, so arti-client,
tor-cell, tor-hsservice and tor-rtcompat move together in both
workspaces (root crate and crates/onionwire-sdk, which pins the feature
set for Android).
Arti 0.49 depends on safelog 0.10. OnionWire names safelog directly for
`DisplayRedacted` on HsId, so leaving the direct dep at 0.9 puts two
safelog versions in the graph and two incompatible DisplayRedacted
traits, and src/hs.rs stops compiling. Bumped to 0.10; the trait's
method surface (display_redacted / display_unredacted) is unchanged.
Arti 0.49's own MSRV is 1.92, still below the 1.98 floor the default
cuprate-daemon graph sets (tapes needs VecDeque::pop_front_if, 1.93),
so no toolchain or CI image change. The hs.rs workarounds are still
correct in 0.49: tor-hsservice 0.49's OVERALL_UPLOAD_TIMEOUT is still
5 min (PUBLISH_WAIT 360s covers it), the default predicted exit ports
are still 80/443 (we override to empty), and the status State variants
hs_is_ready matches on are unchanged.
Closes #209
2026-12-02 02:04:00 -05:00
|
|
|
tor-cell = "0.49"
|
|
|
|
|
tor-hsservice = "0.49"
|
|
|
|
|
tor-rtcompat = { version = "0.49", features = ["tokio"] }
|
2026-09-17 20:48:05 -04:00
|
|
|
# Direct dependency only to select rustls's crypto provider: Arti pulls rustls in
|
|
|
|
|
# through `tor-rtcompat` with `default-features = false`, and rustls 0.23
|
|
|
|
|
# resolves its provider from its OWN `ring`/`aws-lc-rs` features, so without this
|
|
|
|
|
# line the rustls backend compiles with no provider at all and the first TLS
|
|
|
|
|
# config fails. Same reasoning (and pin) as `crates/onionwire-sdk/Cargo.toml`.
|
|
|
|
|
rustls = { version = "0.23", default-features = false, features = ["ring"] }
|
2026-09-10 01:54:19 -04:00
|
|
|
ratatui = { version = "0.30.2", default-features = false, features = ["crossterm"] }
|
2026-09-10 02:07:40 -04:00
|
|
|
x25519-dalek = { version = "2", features = ["static_secrets"] }
|
|
|
|
|
snow = "0.10"
|
2026-09-10 14:37:43 -04:00
|
|
|
serde_json = "1"
|
2026-09-16 18:05:39 -04:00
|
|
|
hkdf = "0.12"
|
|
|
|
|
hmac = "0.12"
|
2026-09-10 14:50:01 -04:00
|
|
|
argon2 = "0.5"
|
|
|
|
|
chacha20poly1305 = "0.10"
|
2026-09-10 20:01:45 -04:00
|
|
|
sha3 = "0.10"
|
2026-09-10 23:32:06 -04:00
|
|
|
sha2 = "0.10"
|
2026-09-10 20:17:25 -04:00
|
|
|
md-5 = "0.10"
|
2026-09-10 21:10:50 -04:00
|
|
|
rpassword = "7"
|
2026-09-12 13:36:21 -04:00
|
|
|
zeroize = { version = "1", features = ["derive"] }
|
transport: ML-KEM-768 hybrid prelude and onionwire:v2 invites
Adds an ML-KEM-768 install key beside the ed25519 identity and x25519
prekey. A friend added from a v2 invite always gets a version-2 PQ
prelude before Noise msg 1, and both sides bind (ct, ss_kem) into the
Noise prologue (onionwire-v2 \0 ct \0 ss_kem). The row decides: a
kem_pk friend without a prelude is rejected with 'prelude required',
a prelude for a classical row with 'unexpected prelude'.
Invites are now onionwire:v2 with kem=<base64url pk>; decode still
accepts v1 (no kem) and yields a classical friend. F8 rotates the
KEM key with the prekey and hard-cuts stored ratchet state. The TUI
labels a legacy friend 'classical'.
Docs: PROTOCOL (keys, framing, prologues, no-downgrade, invite v2),
THREAT_MODEL (what PQ transport does and does not buy; epoch 0 stays
classical), README (invite size, F8, legacy caveat). SDK exposes pq on
InviteInfo/FriendInfo and gains a v2 decode round-trip test.
2026-10-20 11:15:46 -04:00
|
|
|
# ML-KEM-768 (FIPS 203). `zeroize` wipes the decapsulation key; `getrandom`
|
|
|
|
|
# is how 0.3's `generate_keypair` / `encapsulate` reach the OS RNG. This
|
|
|
|
|
# crate's `rand` 0.8 cannot: ml-kem speaks `rand_core` 0.10.
|
|
|
|
|
ml-kem = { version = "0.3", features = ["zeroize", "getrandom"] }
|
2026-09-12 22:53:58 -04:00
|
|
|
qrcode = { version = "0.14", default-features = false }
|
wallet: land the in-process Cuprate chain source on main
`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
|
|
|
cuprated = { git = "https://github.com/Cuprate/cuprate", rev = "4f8fcd1bf468f566fcd89c460d50de4adb6825bf", default-features = false, optional = true }
|
|
|
|
|
# `cuprated::config::Config` is deserialized, not built field by field: the
|
|
|
|
|
# struct's nested types move with the pinned revision, a TOML document does not.
|
|
|
|
|
# Cuprate has `deny_unknown_fields` on every config struct, so a stale key is a
|
|
|
|
|
# parse error instead of a silently ignored setting.
|
|
|
|
|
toml = { version = "0.8", features = ["parse", "display"], optional = true }
|
2026-09-10 01:18:28 -04:00
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
tempfile = "3"
|
|
|
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|