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"
|
2026-09-10 13:14:55 -04:00
|
|
|
rust-version = "1.91"
|
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
|
2026-09-10 03:04:56 -04:00
|
|
|
repository = "https://github.com/sirius0xdev/onionwire"
|
2026-09-10 01:02:33 -04:00
|
|
|
|
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
|
|
|
# The Linux TUI build is unchanged: `default` keeps Arti's native-tls
|
|
|
|
|
# (OpenSSL) backend exactly as before, and ratatui remains a normal
|
|
|
|
|
# dependency so `src/tui.rs` is untouched.
|
|
|
|
|
#
|
|
|
|
|
# Android has no OpenSSL in the NDK, so the SDK crate depends on this crate
|
|
|
|
|
# with `default-features = false, features = ["rustls"]`. Arti marks these two
|
|
|
|
|
# backends non-additive, so exactly one may be selected per build graph — hence
|
|
|
|
|
# exposing them as crate features.
|
|
|
|
|
[features]
|
|
|
|
|
default = ["native-tls"]
|
|
|
|
|
native-tls = ["arti-client/native-tls"]
|
|
|
|
|
rustls = ["arti-client/rustls"]
|
wallet: in-process Cuprate chain daemon behind the cuprate-daemon feature
Phase 1 of the Cuprate integration strategy: the chain daemon can run inside
the OnionWire process instead of a spawned `monerod`. `monero-wallet-rpc` is
unchanged — it still dials the unrestricted loopback RPC on 127.0.0.1:18081,
which is the address `WalletChild::daemon_address` already returned — so no
wallet-layer code moves.
- Cargo.toml: `cuprated` (git, rev 4f8fcd1b) + `toml`, both optional, behind a
`cuprate-daemon` feature that is OFF by default. Cuprate's own `arti` feature
stays off: its arti-client 0.44 cannot unify with this crate's 0.46, and the
in-process daemon is clearnet-only, so this keeps one Tor stack in the
process. `Cargo.lock` gains the graph; no arti 0.44 appears in it.
- src/cuprate.rs (new): `CuprateNode` builds the cuprated config as TOML
(testnet, unrestricted RPC on loopback, restricted RPC disabled, inbound P2P
off), launches it, and owns it. Dropping the value is the teardown;
`shutdown()` is called before the drop so the services can drain. The type
exists in every build: without the feature `launch` fails with the feature
name instead of silently doing nothing, so the chain-source type, its stored
record and the picker do not fork on a cargo feature.
- src/wallet.rs: `ChainSource::InProcessCuprate { datadir }`.
- src/wallet_child.rs: starts/holds/stops the node, serializes the choice as
`kind = "cuprate"`, and adds `chain_datadir` so the storage gate covers both
local sources. It takes the app's Tokio handle (`with_runtime`): the launch is
async and `start()` runs on the TUI's blocking thread.
- src/node.rs: `wallet_child_start(runtime)`, `default_in_process_chain_source`.
- src/tui.rs: a fourth picker row, its testnet caveat, the chain block copy, and
a stop of the app-owned children on the quit path so they are not orphaned.
- tests/wallet.rs: a `cuprate-daemon`-gated end-to-end test that launches the
node and drives get_info / get_height / get_block through the typed daemon
client, including the above-the-tip 500 and the listener closing on drop.
- docs/WALLET.md: the fourth chain source, the feature flag, the +5.6 MB
stripped overhead, and the two limits (testnet only, no Tor in the chain
path).
Also repaired tests/tui_spec.rs, which the parent commit left un-compilable
(the Phase 2a commit had dropped all but the new imports and four new tests,
1221 lines of body); it is restored from the pre-breakage version, with the
Phase 2a imports and tests re-applied.
2026-09-17 13:17:32 -04:00
|
|
|
# In-process Monero chain daemon (Cuprate) as the local chain source, instead of
|
|
|
|
|
# spawning `monerod`. OFF by default: `cuprated` is a pre-1.0 project that is not
|
|
|
|
|
# published to crates.io, so this pins a git revision and pulls a large tree
|
|
|
|
|
# (randomx, fjall, axum/hyper, rayon). See `docs/WALLET.md`, "In-process chain
|
|
|
|
|
# daemon".
|
|
|
|
|
#
|
|
|
|
|
# Cuprate's own `arti` feature stays OFF: it would link a second, older Tor
|
|
|
|
|
# stack (arti-client 0.44, which cannot unify with this crate's 0.46) next to
|
|
|
|
|
# OnionWire's. The in-process daemon runs clearnet-only; 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]
|
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
|
|
|
arti-client = { version = "0.46", default-features = false, features = [
|
|
|
|
|
"tokio",
|
|
|
|
|
"onion-service-client",
|
|
|
|
|
"onion-service-service",
|
|
|
|
|
"compression",
|
|
|
|
|
] }
|
2026-09-10 01:18:28 -04:00
|
|
|
futures = "0.3"
|
|
|
|
|
safelog = "0.9"
|
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"] }
|
2026-09-10 01:18:28 -04:00
|
|
|
tor-cell = "0.46"
|
|
|
|
|
tor-hsservice = "0.46"
|
|
|
|
|
tor-rtcompat = { version = "0.46", features = ["tokio"] }
|
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-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"] }
|
2026-09-12 22:53:58 -04:00
|
|
|
qrcode = { version = "0.14", default-features = false }
|
wallet: in-process Cuprate chain daemon behind the cuprate-daemon feature
Phase 1 of the Cuprate integration strategy: the chain daemon can run inside
the OnionWire process instead of a spawned `monerod`. `monero-wallet-rpc` is
unchanged — it still dials the unrestricted loopback RPC on 127.0.0.1:18081,
which is the address `WalletChild::daemon_address` already returned — so no
wallet-layer code moves.
- Cargo.toml: `cuprated` (git, rev 4f8fcd1b) + `toml`, both optional, behind a
`cuprate-daemon` feature that is OFF by default. Cuprate's own `arti` feature
stays off: its arti-client 0.44 cannot unify with this crate's 0.46, and the
in-process daemon is clearnet-only, so this keeps one Tor stack in the
process. `Cargo.lock` gains the graph; no arti 0.44 appears in it.
- src/cuprate.rs (new): `CuprateNode` builds the cuprated config as TOML
(testnet, unrestricted RPC on loopback, restricted RPC disabled, inbound P2P
off), launches it, and owns it. Dropping the value is the teardown;
`shutdown()` is called before the drop so the services can drain. The type
exists in every build: without the feature `launch` fails with the feature
name instead of silently doing nothing, so the chain-source type, its stored
record and the picker do not fork on a cargo feature.
- src/wallet.rs: `ChainSource::InProcessCuprate { datadir }`.
- src/wallet_child.rs: starts/holds/stops the node, serializes the choice as
`kind = "cuprate"`, and adds `chain_datadir` so the storage gate covers both
local sources. It takes the app's Tokio handle (`with_runtime`): the launch is
async and `start()` runs on the TUI's blocking thread.
- src/node.rs: `wallet_child_start(runtime)`, `default_in_process_chain_source`.
- src/tui.rs: a fourth picker row, its testnet caveat, the chain block copy, and
a stop of the app-owned children on the quit path so they are not orphaned.
- tests/wallet.rs: a `cuprate-daemon`-gated end-to-end test that launches the
node and drives get_info / get_height / get_block through the typed daemon
client, including the above-the-tip 500 and the listener closing on drop.
- docs/WALLET.md: the fourth chain source, the feature flag, the +5.6 MB
stripped overhead, and the two limits (testnet only, no Tor in the chain
path).
Also repaired tests/tui_spec.rs, which the parent commit left un-compilable
(the Phase 2a commit had dropped all but the new imports and four new tests,
1221 lines of body); it is restored from the pre-breakage version, with the
Phase 2a imports and tests re-applied.
2026-09-17 13:17:32 -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.
|
|
|
|
|
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"] }
|