startDustSync
Starts dust event synchronization for an address.
Process:
Subscribe to zswap ledger events from indexer
Filter for dust events only
Batch events into groups of EVENT_BATCH_SIZE
Replay batches into DustLocalState
Save state and sync to database cache
Emit progress updates
Resumable: Uses last processed event ID to resume from where it left off. Pass fromEventId to start from specific event (for manual sync).
Error Handling:
Network errors: Automatically retries (handled by IndexerClient)
Deserialization errors: Skips invalid events, logs error
State errors: Emits Error state, stops sync
Return
Flow of sync state updates
Parameters
Wallet address to sync dust for
32-byte seed for deriving DustSecretKey (required for replay)
Start from this event ID (null = last synced or latest)