EventEntity

data class EventEntity(val id: Long, val rawHex: String, val maxId: Long, val blockHeight: Long? = null, val timestamp: Long? = null, val cachedAt: Long = System.currentTimeMillis())

Room entity for caching raw ledger events.

Purpose: Cache raw hex events from indexer locally so we can:

  1. Replay events without re-syncing

  2. Support offline mode

  3. Reduce network traffic

Constructors

Link copied to clipboard
constructor(id: Long, rawHex: String, maxId: Long, blockHeight: Long? = null, timestamp: Long? = null, cachedAt: Long = System.currentTimeMillis())

Properties

Link copied to clipboard
val blockHeight: Long? = null

Block height where event occurred (nullable)

Link copied to clipboard

When this event was cached locally (milliseconds)

Link copied to clipboard
val id: Long

Event ID from indexer (primary key, sequential)

Link copied to clipboard
val maxId: Long

Maximum event ID at time of fetch

Link copied to clipboard

Raw event data as hex string

Link copied to clipboard
val timestamp: Long? = null

Event timestamp in milliseconds (nullable)