ZswapLocalState
Kotlin wrapper for Midnight's ZswapLocalState (shielded coin tracking).
Manages shielded coin state via Rust FFI. Mirrors DustLocalState pattern.
Lifecycle:
Create: create or deserialize
Use: replayEvents, getBalances, getCoinCount
Persist: serialize / deserialize
Clean up: close (ALWAYS call when done)
Thread Safety: NOT thread-safe. Use one instance per coroutine scope.
Functions
Link copied to clipboard
Get shielded balances by token type.
Link copied to clipboard
Number of shielded coins in state.
Link copied to clipboard
Merkle tree index — used for tracking sync position.
Link copied to clipboard
Replay blockchain events to discover shielded coins.
Link copied to clipboard
Replay blockchain events from a file, discovering shielded coins.