BlockInfo

@Serializable
data class BlockInfo(val height: Long, val hash: String, val timestamp: Long, val eventCount: Int = 0, val ledgerParameters: String? = null)

Block metadata from Midnight blockchain.

Input Validation:

  • height must be non-negative

  • hash must be non-empty hex string (64 characters for SHA-256)

  • timestamp must be positive

  • eventCount must be non-negative

  • ledgerParameters optional hex string (SCALE-encoded)

Throws

if validation fails

Constructors

Link copied to clipboard
constructor(height: Long, hash: String, timestamp: Long, eventCount: Int = 0, ledgerParameters: String? = null)

Properties

Link copied to clipboard
val eventCount: Int = 0

Number of ledger events in this block

Link copied to clipboard

Block hash (hex string)

Link copied to clipboard

Block height (sequential number)

Link copied to clipboard

Hex-encoded SCALE-serialized ledger parameters (optional)

Link copied to clipboard

Block timestamp (Unix epoch milliseconds)