Persistent Wallet Transaction Logger
File-backed WalletTransactionLogger that persists events as JSON Lines.
The log file lives under context.noBackupFilesDir/walletsdk/<fileName> — it is not included in Android auto-backup, matching how the wallet DB itself is stored.
Each call to log appends a single JSON-encoded event to the file on the calling thread (guarded by a Java monitor lock). This is intentional: the EUDI transaction decorator can fire logs from Dispatchers.Main.immediate, and the consuming app may call list immediately afterwards — an asynchronous write here would race the next read and silently drop events.
Appends are very small (single JSON line) so the synchronous cost is negligible in practice. list, delete and deleteAll still hop to Dispatchers.IO because they can read or rewrite the whole file.
The consuming app can:
call list to fetch the full history (newest-first),
call delete to remove a single event by id,
call deleteAll to wipe the entire log.
Apps that need a different persistence strategy (encrypted DB, remote shipping, etc.) should implement WalletTransactionLogger directly instead.
Functions
Remove the event with the given WalletTransactionEvent.id.
Read all persisted events, newest-first.
Append an event to the log file synchronously.