ZswapLocalState

Kotlin wrapper for Midnight's ZswapLocalState (shielded coin tracking).

Manages shielded coin state via Rust FFI. Mirrors DustLocalState pattern.

Lifecycle:

Thread Safety: NOT thread-safe. Use one instance per coroutine scope.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
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
fun replayEvents(seed: ByteArray, eventsHex: String): ZswapLocalState?

Replay blockchain events to discover shielded coins.

Link copied to clipboard

Serialize state to hex string for persistence.