Skip to content

wallet: add the light wallet to the c abi - #26

Open
mycomputercrashsalot wants to merge 1 commit into
libmonero:mainfrom
mycomputercrashsalot:wallet-light-abi
Open

mycomputercrashsalot wants to merge 1 commit into
libmonero:mainfrom
mycomputercrashsalot:wallet-light-abi

Conversation

@mycomputercrashsalot

@mycomputercrashsalot mycomputercrashsalot commented Oct 28, 2026 •

Copy link
Copy Markdown

the light wallet behind the c abi: four functions, and everything else rides the surface the wallet already has

  • monero_wallet_light_create (monero_c_wallet.h:1792): a wallet from a config and the connection of its server, the way monero_wallet_create makes a full wallet
  • monero_wallet_light_open (:1806): the same, for an account the server already has
  • monero_wallet_light_wallet_exists: whether the server has an account for the keys of the config
  • monero_wallet_light_get_unrefined_spend_count: the candidate spends the last sync could not verify, which the light wallet of monero-cpp tracks

the config is the wallet config the other calls take, with the connection of the server as its own argument: a config that carries a server is rejected on all three paths. the outputs are reset before the call, so a failed call leaves no stale value. the config of the create and the open is wiped after the call, the way the factories of the other wallets wipe theirs. the symbols are in the export lists, and the abi is 0.3.0 on top of 0.2.1: four additions and no change, so a binding that asks for 0.2.x keeps working until it asks for the light calls

the submodule points at the fork of monero-cpp with the lookahead fix: the login response of monero-lws carries the lookahead as maj_i and min_i, not a uint, so every c++ login of a light wallet throws on the parse. that fix is a pr of its own to monero-cpp — this pin is the branch to point at until it lands, and it flips back to the woodser pin with it

rebased on main at 9459b31, after the ci restructuring: the changelog carries the 0.3.0 section above the 0.2.1 one, and the version triple and the abi unit test say 0.3.0

the probe (tests/c/integration, the light probe of the kotlin work) runs all four live against a monero-lws on regtest: the create registers the account, the exists flips, the sync reads the balance of five mined blocks, the reopen reads the same, the unrefined count is zero. it also fails the negative configs and proves the reset of the outputs with pre-filled stale values

@codacy-production

codacy-production Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 47 complexity · 6 duplication

Metric Results
Complexity 47
Duplication 6

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mycomputercrashsalot

Copy link
Copy Markdown
Author

rebased onto the new main (the submodule pin conflicted with the ci changes) — the workflows need an approve-and-run after the force push from the fork

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant