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.
This commit is contained in:
Lance Walters 2026-09-13 23:25:25 -04:00
commit cf0a517cd2
No known key found for this signature in database
12 changed files with 758 additions and 48 deletions

View file

@ -428,4 +428,16 @@ class WireViewModel(app: Application) : AndroidViewModel(app) {
suspend fun sendTip(pubkeyHex: String, amountXmr: String, memo: String = ""): Result<Unit> =
runCatching { requireWire().sendTip(pubkeyHex, amountXmr, memo) }
suspend fun createWallet(password: String): Result<String> =
runCatching { requireWire().createWallet(password) }
suspend fun importWallet(password: String, seed: String): Result<Unit> =
runCatching { requireWire().importWallet(password, seed) }
fun spendAuthorityWarning(): String = runCatching {
requireWire().spendAuthorityWarning()
}.getOrElse {
"this wallet file can spend. anyone with its passphrase or the RPC creds can move the balance. write down the seed."
}
}