MidnightWallet
Embedded wallet that handles transaction balancing and submission on-device.
Implements TransactionBalancer so it can be plugged into com.midnight.kuira.core.compact.MidnightConfig as a drop-in replacement for the remote DAppConnectorClient.
Uses DustSyncManager for session-scoped caching. Handles error 170 (InvalidDustSpendProof) by auto-retrying with a fresh dust sync.
Properties
Functions
Snapshot the current dust checkpoint and hand it to the cloud backup coordinator (e.g. Google Drive) for cross-device recovery. No-op when no coordinator is wired or there's no checkpoint yet. The coordinator hash-guards redundant uploads, so this is cheap to call after every sync.
Current snapshot of every balance the SDK tracks for this wallet — unshielded NIGHT, shielded NIGHT, DUST, and the registration flag.
Observable balance — emits a fresh WalletBalance whenever the wallet's unshielded OR shielded NIGHT changes. Both are driven by background indexer subscriptions, so externally-received funds (an airdrop, an incoming shielded or unshielded transfer) surface automatically without a manual refresh. Each emission also re-reads dust.