Lean Tor messenger: Arti in-process, identity=pubkey, onion=locator. No XMPP.
  • Rust 71.9%
  • Kotlin 25.6%
  • Shell 2%
  • Python 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lance Walters 2fa3466019
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
tui: peer payment history behind the F9 payments row (key p)
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
.forgejo/workflows fix(ci): drop stale Gradle journal locks on the shared /gradle volume 2026-09-18 22:02:22 -04:00
android fix(android): keep Tor bootstrap alive after the unlock activity dies 2026-09-18 21:46:34 -04:00
crates/onionwire-sdk sdk: expose the on-device Cuprate chain source (choice, lifecycle, node status) 2026-09-18 15:29:55 -04:00
docs tui: peer payment history behind the F9 payments row (key p) 2026-09-18 23:53:10 -04:00
fuzz fuzz: cargo-fuzz harness for the ratchet/qr/dispatch/file parsers 2026-09-17 20:52:44 -04:00
references ratchet: freeze the v1 state/frame wire format with guard tests 2026-09-17 20:43:31 -04:00
scripts android-ci: pass --stacktrace to the release gradle build 2026-09-18 19:53:41 -04:00
src tui: peer payment history behind the F9 payments row (key p) 2026-09-18 23:53:10 -04:00
tests tui: peer payment history behind the F9 payments row (key p) 2026-09-18 23:53:10 -04:00
.gitignore feat(android): wallet screen and SDK payment surface 2026-09-13 15:27:57 -04:00
Cargo.lock wallet: land the in-process Cuprate chain source on main 2026-09-18 13:45:59 -04:00
Cargo.toml wallet: land the in-process Cuprate chain source on main 2026-09-18 13:45:59 -04:00
LICENSE Initial Cargo bin scaffold 2026-09-10 01:02:33 -04:00
README.md Merge pull request 't_2fb507c6: F8 rotate prekey (Node::rotate_prekey + invite re-encode)' (#101) from wt/t_2fb507c6 into main 2026-09-18 01:21:45 +00:00

OnionWire

Lean Tor messenger: one Rust process (ratatui + Noise IK + sqlite + in-process Arti). No hosted server. Identity is a public key; the onion is only a locator.

v0.2.1 — Linux TUI + Android SDK/APK. Two people add each other with an onionwire:v1:… invite string (F2 share / F3 paste). There is no QR graphic. Chat is Noise IK over your own v3 onion, and every chat message is ratcheted inside that session. Unreachable chat peers go to a local outbox (device-only retry queue — no relay); file transfer and payment frames still fail closed. Optional Monero payments: /pay invoices (receive), /tip payments (send), and a full in-app wallet create/import (F6 wallet screen, /wallet create, /wallet import). Arti onion services are still experimental. The whole store is encrypted at rest with SQLCipher; message bodies add a row-bound AEAD layer on top.

You do not install a tor daemon, torrc, Prosody, or XMPP. OnionWire embeds Arti and publishes its own v3 onion.

Docs (protocol first, then claims): PROTOCOL.md · threat model · audit notes (in-house, not a third-party audit). Index: docs/README.md.

Install

Pick one: a CI-built binary (fastest), or build from source.

Requirements

Need Notes
Linux x86_64 or aarch64. TUI needs a real terminal (not a pipe).
Network First run bootstraps Tor via Arti. Offline start will fail closed.
Not needed tor package, torrc, Prosody, an XMPP account, a DHT.

Arti onion services are still experimental. If the hidden service cannot come up, OnionWire exits — it does not fall back to C-tor.

Option A — download a release binary

CI (.forgejo/workflows/release.yml) does not release on a merge. Releases are manual and batched: a maintainer runs the workflow at a stopping point (Actions → release → Run workflow, dry_run=true first), which tags the next v*.*.* version and publishes both Linux binaries — aarch64 on the Pi runner, x86_64 on the amd64 runner — to one Forgejo release, with the Android APK + AAR attached to that same tag. Policy and inputs: docs/RELEASING.md. scripts/build-release-local.sh remains the offline x86_64 fallback. This Forgejo does not serve /releases/latest/download/… (404); pin the tag.

x86_64 (most PCs / VMs):

curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/v0.2.1/onionwire-x86_64-unknown-linux-gnu
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/v0.2.1/onionwire-x86_64-unknown-linux-gnu.sha256
sha256sum -c onionwire-x86_64-unknown-linux-gnu.sha256
chmod +x onionwire-x86_64-unknown-linux-gnu
./onionwire-x86_64-unknown-linux-gnu --version

aarch64 (Raspberry Pi, ARM servers):

curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/v0.2.1/onionwire-aarch64-unknown-linux-gnu
curl -fL -O https://forgejo.siriusdevops.com/sirius/onionwire/releases/download/v0.2.1/onionwire-aarch64-unknown-linux-gnu.sha256
sha256sum -c onionwire-aarch64-unknown-linux-gnu.sha256
chmod +x onionwire-aarch64-unknown-linux-gnu
./onionwire-aarch64-unknown-linux-gnu --version

Install onto PATH if you want onionwire as a command (keep the asset filename until after sha256sum -c):

mkdir -p ~/.local/bin
install -m 755 onionwire-x86_64-unknown-linux-gnu ~/.local/bin/onionwire
# ensure ~/.local/bin is on PATH, then:
onionwire

The binary is dynamically linked against glibc (Ubuntu 24.04 builders). If ./onionwire dies with GLIBC_… not found, use Option B on that machine.

Checksum files are sha256sum format (<hash> onionwire-<target>). Download both files with curl -O so the names match, then sha256sum -c.

Option B — build from source

Needs Rust 1.91+ (edition = "2024"; the pinned Arti 0.46 crates require rustc 1.91). A distro rustc is fine if rustc --version reports 1.91 or newer. Do not install tor for this app.

# rustup (if you do not already have cargo)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustc --version   # must be 1.91 or newer
git clone https://forgejo.siriusdevops.com/sirius/onionwire.git
cd onionwire
cargo test --locked
cargo clippy --locked -- -D warnings
cargo build --release --locked
./target/release/onionwire --version
./target/release/onionwire

Install the binary:

cargo install --path . --locked --force
# lands in ~/.cargo/bin/onionwire

Build needs a C toolchain plus perl and make: SQLCipher is compiled from vendored OpenSSL sources (rusqlite feature bundled-sqlcipher-vendored-openssl). No system OpenSSL headers or pkg-config are required — Arti's TLS backend is rustls, and the binaries carry no dynamic libssl dependency.

Two instances on one machine

Each process needs its own data dir (identity + onion + sqlite):

ONIONWIRE_HOME=/tmp/ow-a ./onionwire
ONIONWIRE_HOME=/tmp/ow-b ./onionwire

Then F2 on A (invite string), F3-paste on B (and the other way around). No QR.

First run

onionwire

or cargo run --release.

On start you are prompted for a store passphrase (echo off, like other CLI passwords) or set ONIONWIRE_STORE_PASSPHRASE. Empty passphrase is rejected; a wrong passphrase does not open chat. Then you should see onionwire: bootstrapping Arti… on stderr. Directory bootstrap is usually under a minute; the onion is ready once a probe connect works (combined Arti status may still say Bootstrapping). Fail closed at 360s. Data lives in ONIONWIRE_HOME if set, otherwise ~/.local/share/onionwire/ (onionwire.db + Arti state, mode 0700). First open creates an ed25519 identity key. That key is you.

Then F2 to share your invite, F3 to paste a friend's. Mouse-select the onionwire:v1:… line to copy. Highlight them in the roster, type in the composer, Enter to send. Chat rows show delivery state from the local outbox (✓ delivered, ◷ queued (try n/8, retry …), » sending, ✗ failed: …); the footer shows {n} queued while anything is outstanding. If their onion is down the message stays on this device and the retry worker re-dials with backoff — nothing is handed to a third party. File transfer and payments are still one-shot (both sides online).

Friends are keys

A friend is an ed25519 pubkey (UNIQUE(pubkey)). The .onion on that row is only where they are reachable right now. Pasting the same k updates the locator; it never creates a second person.

Keys (TUI)

Focus starts on the composer so typing works immediately. Tab cycles panes; j/k and arrows only move the focused pane (roster or chat). 1/2/3 switch focus when you are not typing in the composer. ? opens help from every screen except paste (so a payload can contain ?).

Key Action
Tab / Shift-Tab Cycle focus: roster → chat → composer
1 / 2 / 3 Focus roster / chat / composer (when not typing)
j k / ↑ ↓ Move or scroll the focused pane
g / G Jump to top / bottom of the focused pane
? Keybinding help (Esc closes)
F2 Share invite (onionwire:v1:…)
F3 Paste a friend's invite
F4 Rotate onion (locator only)
F5 Selected friend's profile (/who)
F6 Wallet screen (receive QR, balance, transfers)
F8 Rotate prekey (hard cut: every friend re-pastes the invite)
Enter Send chat to the selected friend, or run a /command
Esc Close overlay / back to Main / clear composer
Ctrl-Q Quit: type CLEAR+Enter to wipe history, QUIT+Enter to leave it, Esc to stay

F2 / F3 invite

There is no QR. F2 opens (o) invite with truncated fingerprint, current onion, and the full payload (wrapped, mouse-select to copy):

onionwire:v1:k=…:o=…:spk=…:sig=…

Give that string to a friend. They F3 paste it ((o) paste invite). Unknown k asks for approval. Same k already in the roster updates onion only.

F4 rotate onion

F4 is a locator change, not a new identity. Confirm by typing ROTATE (Enter alone does nothing).

  • Your identity fingerprint stays the same.
  • A new onion is published; the old one is hard-cut (no dual-host grace).
  • Online friends get a signed loc frame.
  • Offline friends cannot find you until they F3-paste the new invite. There is no directory.

Local outbox (chat) and fail closed

Chat to an unreachable onion is written to a local outbox row next to its messages row and retried in-process while the app runs (exponential backoff, cap 30 min between attempts, stop after 8 attempts or a terminal failure). There is no server-side queue and no store-and-forward relay — a queued message never leaves the device, and it dies with the device. Two consequences are real and are accepted:

  • Device seizure. A pending (never-delivered) message sits in the same SQLCipher store as the rest of the history, under the same per-row AEAD and the same passphrase-derived key — no weaker, but also no shorter-lived. Seizure with the passphrase reveals messages that were never actually sent, including ones the sender may have moved on from; seizure without it reveals nothing in this store. /wipe clears outbox rows with the rest of chat history; /wipe-all removes them with the data dir. Neither is a forensic erase — SSD wear-leveling can keep copies. Roster and identity stay.
  • Retry cadence is a local traffic-analysis surface. A queued send re-dials the peer's onion on a backoff schedule while the app runs. An observer of your Tor client (or the network in front of it) sees a repeating connection attempt to one onion on a predictable cadence — it does not learn the plaintext or the recipient identity, but it can infer that you have an undelivered message for someone, and roughly when you composed it. The backoff is per-row, capped at one attempt per 30 min per message, and stops after 8 attempts or on a terminal failure.

Delivery markers in the TUI and Android chat UI are the store's own statuses:

Row state Marker
delivered you: ping ✓
queued (2nd attempt, 45s out) you: pong ◷ queued (try 2/8, retry 45s)
sending you: pong » sending
failed you: pong ✗ failed: connection timed out
inbound them: pong (no marker)

The footer shows {n} queued while any row is outstanding. try {n}/{8} is the outbox attempt count; retry {s}s / retry {m}m / retry now comes from the stored absolute next_attempt_at. Failed reasons are sanitized, cut to the tail of the a: b: c chain, and capped at 24 cells.

Still fail closed (no queue, no retry):

  • file transfer (/file) and payment frames (inv / rcp / tip)
  • fingerprint mismatch vs the pinned key
  • Arti cannot publish the onion (no C-tor fallback)
  • no DHT, no name server, no hosted chat server

Chat ratchet (per friend, on device)

Chat is ratcheted on top of the Noise session: each chat send is Double-Ratchet encrypted first, and the resulting rat frame is what the one-shot Noise session carries. Forward secrecy is per chain, and a snapshot of one side's state stops reading the conversation at the next DH ratchet step. The wire format and the honest limits are in docs/PROTOCOL.md and docs/THREAT_MODEL.md.

  • Per-friend state lives in the encrypted store (ratchet_sessions, one row per friend). Nothing about it is transmitted, so the "no relay, no server queue" rule is unchanged.
  • Message numbers, ratchet keys and chain state ride inside the Noise ciphertext; there is nothing new to observe on the wire.
  • Only chat is ratcheted. loc, prf, inv, rcp, tip and file chunks keep the one-shot Noise shape.
  • Out-of-order delivery works (bounded skipped keys: 2000 per chain jump, 2000 stored, oldest-first eviction; a used key is deleted, so a replay fails closed). A queued chat message re-sends the same rat frame, so an outbox retry never burns a second chain key.
  • /wipe clears chat, payments and outbox rows but keeps the ratchet state (roster and identity stay), so chat continues on the same epoch. /wipe-all removes the data dir and the state with it.
  • Session reset. There is no /reset command and no in-band reset in v0.2.1. The state is dropped automatically when the friend's prekey changes — i.e. when you F3-paste a refreshed invite — and the next chat frame bootstraps a fresh epoch. That re-paste is the only recovery path today.
  • Desync today is quiet. An inbound rat frame that does not authenticate is logged as rat dropped (<reason>) on stderr and dropped: no chat row, no TUI marker, nothing stored. A send-side failure surfaces as the usual send failed: … status note. There is no in-app "ratchet desynced" banner yet, so a desync is diagnosed from the terminal the app was started in.

File transfer

/file /path sends a local file to the selected friend. Both must be online. Cap 1 MiB on send and receive. Fail closed: a bad chunk or hash mismatch deletes the partial (never overwrite). Files land in $ONIONWIRE_HOME/inbox/<fingerprint>/. Chat shows [file] name (N bytes), never raw frames. File transfer is not covered by the chat outbox — no resume, no images in the TUI.

Profile

/profile edits your friend-visible display name, bio, and optional Monero address (64 / 512 byte limits, no images). Enter saves and one-shot sends a signed prf frame to the selected friend. F5 or /who shows their last signed profile. There is no directory: unknown pubkeys are ignored.

Monero (opt-in)

Chat does not need a wallet. Spend is opt-in at wallet create/restore; default is no spend key, no seed on the device. Optional JSON-RPC to monero-wallet-rpc on loopback (you run it, or the app spawns it). Chain source is your choice: a spawned local monerod, or a daemon address you supply. The wallet must use --rpc-login; OnionWire refuses an open RPC (HTTP 200 without a Digest challenge) and refuses URLs with no credentials.

# monero-wallet-rpc --rpc-bind-ip 127.0.0.1 --rpc-bind-port 18083 --rpc-login onionwire:secret
export ONIONWIRE_WALLET_RPC=http://onionwire:[email protected]:18083
# or keep the password out of the URL:
export ONIONWIRE_WALLET_RPC=http://127.0.0.1:18083
export ONIONWIRE_WALLET_RPC_LOGIN=onionwire:secret

Loopback only, HTTP Digest (RFC 2617, matching --rpc-login), 5s timeout, 1 MiB response cap. .onion RPC URLs are rejected (no Arti dial; do not point this at a remote wallet). Unset → chat still works; /pay, /tip, and F6 say so. Do not log the RPC password.

Prefer a view-only wallet. OnionWire only needs invoices and receipt checks (create_address / get_transfers); it does not need spend authority. Set ONIONWIRE_WALLET_NO_SPEND=1 (or true / yes / on) to refuse /tip locally before any RPC dial — /pay and receipt verification keep working. Details: docs/WALLET.md.

Payment frame summary:

Command Wire frame What it does
/pay <xmr> [memo] inv Invoice to receive. We want to be paid. Uses a wallet subaddress if RPC is up, else the profile xmr_addr.
/tip <xmr> [memo] rcp + tip Pay the selected friend. Sends a Monero transfer, then a signed receipt claim and a tip frame. Disabled under ONIONWIRE_WALLET_NO_SPEND.
  • /pay sends a signed inv frame one-shot (both sides must be online).
  • /tip does the chain transfer first, then sends a signed rcp frame and a tip frame — both one-shot. Peer onion down → fails after the transfer. Not queued.

In-app wallet (create / import)

/wallet create (F6 then c) generates a new spend-capable wallet on the RPC (create_wallet), then shows the 25-word seed once for backup (query_key mnemonic). Type SPEND to accept the spend-authority warning, set a wallet passphrase, write the seed down, type SEEN. The seed is never pasted into the composer or chat history — collect it on the dedicated screen.

/wallet import (F6 then i) restores from an existing 25-word seed via restore_deterministic_wallet. This is the only path that takes a user-supplied secret. The seed is collected on its own screen.

Both paths require the wallet RPC to be started with --wallet-dir (not only --wallet-file); the in-app filename is onionwire.

Spend-authority warning — unavoidable at create/restore:

An OnionWire instance pointed at a spend-capable monero-wallet-rpc is a local spend authority. Any process that can read the RPC credentials (env var, /proc/<pid>/environ, shell history, a stored URL) can spend the wallet's balance, and /tip gives a chat peer a supported path to ask for a transfer. Prefer a view-only wallet or a separate low-balance hot wallet for spend.

The wallet screen (F6) shows a receive address (fresh subaddress when the wallet is up, else the profile xmr_addr), the current balance, and up to 8 recent transfers. Press r (or Enter) to toggle a QR code of the receive address. Esc returns to the chat.

Backup / restore

Losing identity_sk loses every friend relationship.

  • /backup /path — type BACKUP, passphrase twice. Writes owbak1 (Argon2id + ChaCha20-Poly1305). Onion is not in the file (locator is disposable; F4 after restore if needed).
  • /restore /path — type RESTORE, passphrase. Overwrites self keys. Does not rewrite the roster — you may become a different person talking to old friends.

Treat the backup file like the sqlite db.

Mixed versions

0.1.2 peers store unknown plaintext as chat. A 0.2 sender of prf / inv / rcp / tip / fil will leave a garbage line on an un-upgraded peer. Upgrade both sides. The Noise handshake is unchanged.

Wipe

Composer (bottom of the roster screen):

  • /wipe — confirm by typing WIPE. Chat and payments history gone (overwrite message bodies, drop payments, VACUUM, WAL checkpoint). Identity key and friends stay. Not a forensic erase (SSD wear-leveling). /wipe-all is the identity burn.
  • /wipe-all — confirm by typing WIPEALL. Deletes the data dir. Next start is a new person (new identity key). Same disk caveat. Esc cancels. Nothing is wiped without confirm.

Uninstall

# binary (whichever you used)
rm -f ~/.local/bin/onionwire ~/.cargo/bin/onionwire

# optional: destroy identity, friends, and message log
# (same as /wipe-all — you become a new person next run)
rm -rf ~/.local/share/onionwire

If you set ONIONWIRE_HOME, delete that directory instead.

Seized laptop

The whole sqlite file is SQLCipher (rusqlite feature bundled-sqlcipher-vendored-openssl). A 32-byte key is derived from the store passphrase with Argon2id over a per-install 16-byte salt in store_salt (mode 0600, in ONIONWIRE_HOME) and handed to SQLCipher as a raw key (PRAGMA key = "x'…'") as the first statement after open. The file header, schema, self.identity_sk, friend public keys, locators, profiles and payment rows are all ciphertext on disk, so a disk grep of onionwire.db must not yield the message log, your identity key or your roster. A wrong or empty passphrase fails closed before any write; an encrypted store whose store_salt is missing refuses to open instead of guessing. v0.2.1 plaintext installs upgrade in place on the first open with the right passphrase; a wrong one leaves the plaintext file untouched.

Chat bodies carry a second, row-bound layer: ChaCha20-Poly1305 (nonce || ciphertext in messages.plaintext) with AAD owmsg1 || friend_id_le64 || dir || 0x00 || row_id_le64, plus a random 32-byte data key in store_meta wrapped with Argon2id from the same passphrase. Whole-file encryption does not stop someone who can write the file from moving one row's ciphertext into another row; the row-bound AAD does, and it stays. Unlock is fail-closed: wrong or empty passphrase does not open chat. Empty-AAD v0.2 blobs are rewrapped once on unlock; list_messages never falls back to empty AAD.

At-rest encryption is not a defense against a live compromise: while OnionWire runs, the passphrase, the db key and decrypted rows are in process memory, and SQLCipher's page cache holds decrypted pages. Secret material (Noise/Ed25519/X25519 ephemerals, store key copies, TUI passphrase buffer) is zeroized with the zeroize crate when dropped; that shrinks the window, it does not close it. It also does not stop an attacker who has your passphrase. Pending outbox rows live in the same encrypted store as delivered chat — seizure with the passphrase can reveal messages that never left the device. /wipe deletes chat, payments and outbox history; it is not a forensic erase — SSD wear-leveling can keep copies. /wipe-all deletes the data dir (new identity). Ctrl-Q can clear history on the way out (CLEAR) without becoming a new person.

Threat model: docs/THREAT_MODEL.md.

Android (SDK + APK)

Same repository, same protocol, separate product from the Linux TUI. An Android peer and a Linux peer that exchange invites interoperate — one protocol, not two.

  • SDK — onionwire-sdk-<version>.aar. UniFFI Kotlin bindings over the same Rust crate the TUI runs on, plus libonionwire_sdk.so for arm64-v8a. Wire.send() returns SendState.Sent | SendState.Queued; chat rows carry delivery and id; Wire.outbox(pubkey) exposes attempt count and next attempt time so the UI can render queued (try n/8, retry 45s) without inventing a countdown. Explicit Tor lifecycle bindings (shutdown/flush/torState) stop, flush, and report observable Tor state. Another Android app can depend on the AAR directly.
    • Payment surface — sendInvoice(pubkey, amountXmr, memo) for /pay-style invoices, sendTip(pubkey, amountXmr, memo) for /tip-style payments (chain transfer + signed rcp + tip), walletBalance(), walletReceiveAddress(), walletRecentTransfers(cap), createWallet(password) (returns the 25-word seed once), importWallet(password, seed), and spendAuthorityWarning(). All payments are one-shot; none are queued. See crates/onionwire-sdk/README.md.
  • APK — onionwire-<version>-android-arm64-v8a.apk. Kotlin + Jetpack Compose + Material 3 messenger that depends on :sdk and nothing else. Per-row delivery markers and a chat-level outbox footer match the TUI vocabulary. A foreground keep-alive service (ongoing notification) keeps the in-process Arti onion published and the outbox retry worker alive through Doze while the user wants the node reachable. The store passphrase can be remembered as an AES-256-GCM blob wrapped by the Android Keystore (StrongBox first, TEE/software fallback, labelled honestly). A Compose wallet route (receive QR, balance, transfers, create/import) and roster bottom actions are wired without dropping wipe-chat.

It is not a WebView, and src/tui.rs is untouched. The APK build itself is amd64-only — the Pi runner is aarch64 Linux and cannot produce an APK. .forgejo/workflows/android-release.yml is dispatch-only on this Forgejo (a CI-created tag does not wake it): after the Linux release workflow finishes, dispatch android-release with that tag so the amd64 job builds the APK/AAR and the Pi job attaches them (+ .sha256) to the same Forgejo release. If that tag's release already exists and is missing the APK, the workflow joins it instead of minting patch+1. Publish does not run from amd64 dind: POST /releases from that egress returns 422 with an empty body.

# one-time: sdkmanager platform 36 / build-tools 36.0.0 / ndk 28.2.13676358,
#           rustup target add aarch64-linux-android, cargo install cargo-ndk
scripts/build-android-local.sh                       # -> dist/, with .sha256 files
PUBLISH_TAG=v0.2.1 scripts/build-android-local.sh    # + upload to that release

Every asset has a matching .sha256 so sha256sum -c works. CI signs with the repo-owned release keystore. A local run without those env vars still debug-signs for sideload, not Play. Full build notes, the minSdk 26 rationale, the 16 KB page-size check and the signing story are in android/README.md.

Releases (maintainers)

Releases are manual and batched: no merge publishes anything, and neither does a tag push. Cut one when a batch of work has reached a stopping point — CI green on main, the feature set landed, no half-merged stack. Full policy and procedure: docs/RELEASING.md — it is two dispatches, release (tag + Linux binaries) then android-release with that tag (APK + AAR): on this Forgejo neither a tag push nor workflow_call can wake the Android job.

Actions → release → Run workflow:

Input Meaning
dry_run build + checksum both Linux binaries, no tag, no publish. Run this first.
bump patch / minor / major off the newest v*.*.* tag. Default minor.
version explicit X.Y.Z (or vX.Y.Z) — overrides bump.
tag rebuild / re-publish an existing tag instead of minting one.

Pass tag or version, not both; an unparseable version is rejected rather than guessed at. The workflow computes the version, creates the tag over the API (refusing to move an existing tag), builds aarch64 on the Pi runner and x86_64 on the amd64 runner, and publishes all four assets (onionwire-<target>

  • .sha256) to one release. Then dispatch android-release with that tag to attach the APK + AAR to the same release (it has no automatic trigger on this Forgejo — see docs/RELEASING.md). If a build or the publish fails, the core run deletes the tag it created. Do not push tags by hand — release.yml has no tag-push trigger, so a hand-pushed tag would build nothing.
# optional: keep Cargo.toml in sync with the tag the workflow will mint
# (the workflow does not edit Cargo.toml)

# offline x86_64 fallback (idempotent — safe to re-run)
FORGEJO_TOKEN=<pat> scripts/build-release-local.sh v0.2.1

Workflows (Forgejo Actions, .forgejo/workflows/):

  • .forgejo/workflows/ci.yml — two jobs on the Pi runner (docker label), serialized by onionwire-ci-pi. test: cargo test --locked + cargo clippy --all-targets -- -D warnings at the repo root. sdk: the same for crates/onionwire-sdk (separate cargo workspace — own Cargo.lock, root crate by path, so a root signature change cannot silently break the Android SDK). Both run on main and PRs when src/, crates/, tests/, Cargo.toml, Cargo.lock, or this workflow change (ignored Tor-live tests are not run). workflow_dispatch always runs the suite.
  • .forgejo/workflows/android-ci.yml — the android side of CI, on the docker-amd64 runner: builds :sdk:assembleRelease + :app:assembleRelease with the same script the release uses (scripts/build-android-local.sh, Rust for aarch64-linux-android via cargo-ndk + UniFFI bindings) and verifies the packaged libonionwire_sdk.so, checksums and APK badging. Debug keystore, no publish, no tag. Runs on main and PRs when android/, src/, crates/, Cargo.toml, Cargo.lock or scripts/build-android-local.sh change. Same concurrency group and the same runner volumes as android-release.yml, so a PR build never fights a release build over the SDK/NDK, cargo and Gradle caches.
  • .forgejo/workflows/release.yml — manual, batched release (workflow_dispatch only: dry_run, bump, version, tag): next tag, aarch64 (docker) + x86_64 (docker-amd64), one release, fail-closed tag delete on failure. Dispatch android-release.yml with that tag to add the APK + AAR (no automatic trigger fires on this Forgejo; it is workflow_dispatch only). Concurrency group onionwire-ci-pi (same as ci.yml, cancel-in-progress: false) so cargo jobs do not overlap on the Pi. Amd64 dind is serialized by runner capacity=1.
  • .forgejo/workflows/android-release.yml — amd64-only Android build (dispatch-only on this Forgejo; wakes from an explicit tag= input, not a tag push).

Scripts:

Do not run cargo publish; publish = false. CI needs the repo secret FORGEJO_TOKEN (an instance user PAT with repo write) to publish releases.

Troubleshooting

Symptom What to do
GLIBC_… not found Binary is newer than your libc. Build from source (Option B).
sha256sum: FAILED Re-download both the binary and .sha256; run the check in the same directory.
Hang on bootstrapping Arti… / hs status: Bootstrapping Outbound network required. Combined Arti status can stay Bootstrapping through a 5 min HsDir upload round; OnionWire probes the onion and proceeds once a connect works. Still fail closed after 360s if neither a probe nor DegradedReachable/Running — no C-tor fallback.
onionwire: unknown argument No subcommands. Flags are --version / --help only, then the TUI.
Blank / broken TUI Run in a real terminal emulator, not nohup / systemd without a TTY.
Two chats, same laptop Separate ONIONWIRE_HOME per process.
Friend cannot find you after F4 Expected if they were offline. They must F3-paste the new invite. Same k updates the row.

Not in v1

Prosody, XMPP, s2s, MAM, carbons, a server-side outbox / store-and-forward relay, multi-device, DHT / name server, QR codes, A/V. The local chat retry queue is in; it never leaves the device. Protocol lock: docs/PROTOCOL.md.

License

MIT