LedgerEntryResult

@Serializable
data class LedgerEntryResult(val key: String, val xdr: String, val lastModifiedLedger: Long, val liveUntilLedger: Long? = null)

Represents a single ledger entry with its current value and metadata.

Ledger entries are stored in XDR format and include various types: accounts, trustlines, offers, contract data, contract code, and more. The XDR-encoded values can be parsed into typed objects for further processing.

Constructors

Link copied to clipboard
constructor(key: String, xdr: String, lastModifiedLedger: Long, liveUntilLedger: Long? = null)

Properties

Link copied to clipboard
val key: String

Base64-encoded XDR of the LedgerKey. This uniquely identifies the type and location of this entry in the ledger. Can be parsed using parseKey.

Link copied to clipboard
@SerialName(value = "lastModifiedLedgerSeq")
val lastModifiedLedger: Long

The ledger sequence number when this entry was last modified. This is useful for tracking changes and implementing caching strategies.

Link copied to clipboard
@SerialName(value = "liveUntilLedgerSeq")
val liveUntilLedger: Long?

The ledger sequence number until which this entry will exist. Only applicable to temporary and persistent Soroban contract storage entries. Null for permanent entries like accounts and trustlines. When the network reaches this ledger number, the entry will be automatically deleted unless its lifetime is extended via a BumpFootprintExpirationOp.

Link copied to clipboard
val xdr: String

Base64-encoded XDR of the LedgerEntry.LedgerEntryData. This contains the actual data stored in this entry. Can be parsed using parseXdr.

Functions

Link copied to clipboard

Parses the key field from base64-encoded XDR string to a typed LedgerKey object.

Link copied to clipboard

Parses the xdr field from base64-encoded XDR string to a typed LedgerEntry.LedgerEntryData object.