sdk: expose wallet_child_refresh — a live wallet-child probe over UniFFI
All checks were successful
ci / test (pull_request) Successful in 5m16s
ci / sdk (pull_request) Successful in 1m17s
android-ci / android (pull_request) Successful in 13m18s
ci / fuzz (pull_request) Successful in 18m36s

Wire::wallet_status() is the cheap cached read (no dial); only
Node::wallet_child_refresh() writes state/height/target_height, and it was
reachable over UniFFI from exactly one place — start_wallet_child. An Android
refresh loop polling wallet_status() therefore shows a frozen sync line.

Add the additive export, reusing the existing child_status mapper so the record
is the same shape as wallet_status(), and the core probe as the only probe
path. Docs: one sentence in docs/WALLET.md, which enumerates the SDK
wallet-child surface.

Tests: SDK-level (a Wire cannot be built offline in this crate — open_wire
bootstraps Arti): the unprobed child maps to the same 'off' record both reads
report, pinned with an exhaustive record literal; and the probe on a stopped
handle is a typed WireError.Stopped.
This commit is contained in:
rust-dev 2026-09-20 00:20:32 -04:00
commit db12f4838b
No known key found for this signature in database
2 changed files with 95 additions and 2 deletions

View file

@ -371,8 +371,11 @@ credentials live*), so they survive a restart:
`Node::start_wallet_child` / `stop_wallet_child` / `wallet_child_status` /
`wallet_child_refresh`.
- Android (UniFFI): `set_chain_source(ChainConfig)` / `chain_source()`,
`start_wallet_child()`, `stop_wallet_child()`, `wallet_status()`. Pass
absolute paths for `wallet_rpc_bin` / `arti_bin` (`nativeLibraryDir`); the
`start_wallet_child()`, `stop_wallet_child()`, `wallet_status()` (the cached
read: no dial, for first paint) and `wallet_child_refresh()` (a live probe of
the same record — it dials the loopback wallet RPC, and the local daemon's
`get_info` when that RPC does not answer, so poll it on the order of
seconds). Pass absolute paths for `wallet_rpc_bin` / `arti_bin` (`nativeLibraryDir`); the
core never resolves a binary the caller named explicitly. `ChainChoice` has a
fourth variant, `InProcessCuprate`, for the in-process daemon: no binary path
and, with an empty `monerod_datadir`, the SDK resolves the chain directory to