RawLedgerEvent

@Serializable
data class RawLedgerEvent(val id: Long, val rawHex: String, val maxId: Long, val blockHeight: Long? = null, val timestamp: Long? = null)

Raw ledger event from Midnight indexer GraphQL API.

Contains hex-encoded event data that needs to be deserialized with ledger 7.0.0 WASM (Phase 4B).

Input Validation:

  • id must be non-negative

  • rawHex must be non-empty and valid hex string

  • maxId must be non-negative and >= id

  • blockHeight must be non-negative if provided

  • timestamp must be positive if provided

Throws

if validation fails

Constructors

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

Properties

Link copied to clipboard
val blockHeight: Long? = null

Block height where this event occurred

Link copied to clipboard
val id: Long

Event ID (sequential)

Link copied to clipboard
val maxId: Long

Maximum event ID currently available

Link copied to clipboard

Raw event data as hex string

Link copied to clipboard
val timestamp: Long? = null

Block timestamp (Unix epoch milliseconds)