feat(wallet): mainnet pruned and full on-device chain modes
All checks were successful
ci / test (pull_request) Successful in 5m45s
ci / sdk (pull_request) Successful in 1m34s
ci / fuzz (pull_request) Successful in 4m51s
android-ci / android (pull_request) Successful in 13m2s

Cuprate in-process and TUI keys 1/2/3 pick mainnet pruned, mainnet
full, or experimental testnet. Datadirs are split so a prune store
cannot mix with a full one. Android storage floors scale with the
choice. Cuprate remains pre-production; mainnet is unvalidated.
This commit is contained in:
agent 2026-09-19 12:54:35 -04:00
commit 5080652e3b
No known key found for this signature in database
11 changed files with 397 additions and 77 deletions

View file

@ -724,6 +724,8 @@ class WireViewModel(app: Application) : AndroidViewModel(app) {
// an onion daemon outright while no `arti` is bundled.
artiBin = expectedArtiPath(),
walletFilename = WalletChildBinaries.WALLET_FILENAME,
mainnet = false,
prune = false,
),
)
}
@ -752,6 +754,8 @@ class WireViewModel(app: Application) : AndroidViewModel(app) {
walletRpcBin = bins.walletRpc.orEmpty(),
artiBin = expectedArtiPath(),
walletFilename = WalletChildBinaries.WALLET_FILENAME,
mainnet = false,
prune = false,
),
)
}
@ -767,12 +771,14 @@ class WireViewModel(app: Application) : AndroidViewModel(app) {
* is what launches the node *and* the wallet child (one call in the core).
*
* `monerodDatadir` is left empty on purpose: the SDK resolves that to
* `$ONIONWIRE_HOME/chain`, the same per-identity directory a spawned `monerod`
* would use, so Kotlin never invents an absolute path. `monero-wallet-rpc` is
* still required — Cuprate has no wallet layer, so the subprocess stays, and the
* core rejects a config without it.
* `$ONIONWIRE_HOME/chain/{testnet,mainnet-pruned,mainnet-full}` from
* [mainnet] and [prune], so Kotlin never invents an absolute path.
*/
suspend fun setInProcessCuprate(bins: WalletChildBinaryPaths): Result<Unit> =
suspend fun setInProcessCuprate(
bins: WalletChildBinaryPaths,
mainnet: Boolean,
prune: Boolean,
): Result<Unit> =
withContext(Dispatchers.IO) {
runCatching {
requireWire().setChainSource(
@ -787,6 +793,8 @@ class WireViewModel(app: Application) : AndroidViewModel(app) {
// clearnet, so the core never spawns the SOCKS child.
artiBin = expectedArtiPath(),
walletFilename = WalletChildBinaries.WALLET_FILENAME,
mainnet = mainnet,
prune = prune,
),
)
}