Skip to content

new monero_wallet_light implementation - #73

Open
everoddandeven wants to merge 1 commit into
woodser:masterfrom
everoddandeven:light-wallet
Open

everoddandeven wants to merge 1 commit into
woodser:masterfrom
everoddandeven:light-wallet

Conversation

@everoddandeven

@everoddandeven everoddandeven commented Jan 25, 2025 •

Copy link
Copy Markdown
Contributor

Implementation of monero_wallet_light via refactoring and maintenance of the utilities provided by mymonero-core-cpp. Integration tests with monero-lws are available on a dedicated branch of monero-python and can be verified via this PR Add MoneroWalletLight.

@mycomputercrashsalot

Copy link
Copy Markdown
Contributor

found some bugs while building the kotlin lws bindings against this branch, figured they belong here. one is a real money display bug

  1. view-only wallets show spent funds as available. process_txs subtracts candidate spends, but on a view-only wallet is_key_image_ours returns false on the uncached path, so is_spend_real comes back false for every spend, and nothing guards that case. money that already left shows as spendable. fix on my side only subtracts spends the wallet can actually verify (spend key present, or key images cached from import_key_images) and counts the unverifiable rest separately via a new get_unrefined_spend_count() so they can still be surfaced

  2. login parsing only reads start_height. the real monero-lws /login response is {new_address, generated_locally, lookahead} and never has start_height, that comes from get_address_info instead. verified against a live monero-lws (52cf3fe) on regtest monerod, the wallet.yaml spec is stale on this. fix parses lookahead too

  3. m_sender gets derefed without a null check in one path, and server responses that omit it get rejected. it's an lws specific field, spec conformant servers are allowed to leave it out. guarded with a {0,0} fallback

  4. set_daemon_connection is not overridden for light wallets so it silently runs the base implementation against a daemon that doesnt exist. fix overrides it to throw, mirroring the creation time error

all four are a +60/-9 patch across monero_wallet_light and the model files, compiles clean on top of this branch, both libs build with it applied. happy to push a branch or paste the diff inline, whatever is easiest. bugs 2 and 3 only showed up bc i was decoding real captured responses while wiring the client, the mock/spec versions dont hit them

@everoddandeven
everoddandeven force-pushed the light-wallet branch 2 times, most recently from d4d0bc7 to 948f667 Compare October 30, 2026 21:15
@everoddandeven
everoddandeven force-pushed the light-wallet branch 2 times, most recently from af8b436 to c20e2a6 Compare November 16, 2026 00:14

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.

2 participants