syncTokensToCache

suspend fun syncTokensToCache(address: String)

Sync dust tokens from DustLocalState to database cache.

When to call:

  • After blockchain events that affect dust (registrations, spends)

  • After deserializing DustLocalState from backup

  • Periodically to ensure cache is fresh

Process:

  1. Load DustLocalState from persistent storage

  2. Get all UTXOs from DustLocalState via FFI

  3. Parse and insert into database

  4. Close DustLocalState

Parameters

address

Wallet address to sync