LedgerResponse

@Serializable
data class LedgerResponse(val id: String, val pagingToken: String, val hash: String, val prevHash: String? = null, val sequence: Long, val successfulTransactionCount: Int? = null, val failedTransactionCount: Int? = null, val operationCount: Int? = null, val txSetOperationCount: Int? = null, val closedAt: String, val totalCoins: String, val feePool: String, val baseFeeInStroops: String, val baseReserveInStroops: String, val maxTxSetSize: Int? = null, val protocolVersion: Int? = null, val headerXdr: String? = null, val links: LedgerResponse.Links) : Response, Pageable

Represents a ledger response from the Horizon API.

A ledger represents the state of the Stellar network at a particular point in time. Ledgers are created approximately every 5 seconds and contain all the changes (transactions) that have occurred in the network since the previous ledger.

See also

Constructors

Link copied to clipboard
constructor(id: String, pagingToken: String, hash: String, prevHash: String? = null, sequence: Long, successfulTransactionCount: Int? = null, failedTransactionCount: Int? = null, operationCount: Int? = null, txSetOperationCount: Int? = null, closedAt: String, totalCoins: String, feePool: String, baseFeeInStroops: String, baseReserveInStroops: String, maxTxSetSize: Int? = null, protocolVersion: Int? = null, headerXdr: String? = null, links: LedgerResponse.Links)

Types

Link copied to clipboard
@Serializable
data class Links(val self: Link, val transactions: Link, val operations: Link, val payments: Link, val effects: Link)

HAL links connected to this ledger.

Properties

Link copied to clipboard
@SerialName(value = "base_fee_in_stroops")
val baseFeeInStroops: String

The fee (in stroops) the network charges per operation in a transaction

Link copied to clipboard
@SerialName(value = "base_reserve_in_stroops")
val baseReserveInStroops: String

The reserve (in stroops) the network requires an account to retain as a minimum balance

Link copied to clipboard
@SerialName(value = "closed_at")
val closedAt: String

An ISO 8601 formatted string of when this ledger was closed

Link copied to clipboard
@SerialName(value = "failed_transaction_count")
val failedTransactionCount: Int?

The number of failed transactions in this ledger

Link copied to clipboard
@SerialName(value = "fee_pool")
val feePool: String

The sum of all transaction fees (in stroops) since the network started

Link copied to clipboard
@SerialName(value = "hash")
val hash: String

A hex-encoded SHA-256 hash of the ledger's XDR-encoded form

Link copied to clipboard
@SerialName(value = "header_xdr")
val headerXdr: String?

A base64 encoded string of the raw LedgerHeader xdr struct for this ledger

Link copied to clipboard
@SerialName(value = "id")
val id: String

Unique identifier for this ledger

Link copied to clipboard
@SerialName(value = "_links")
val links: LedgerResponse.Links

HAL links related to this ledger

Link copied to clipboard
@SerialName(value = "max_tx_set_size")
val maxTxSetSize: Int?

The maximum number of operations validators have agreed to process in a given ledger

Link copied to clipboard
@SerialName(value = "operation_count")
val operationCount: Int?

The number of operations applied in this ledger

Link copied to clipboard
@SerialName(value = "paging_token")
open override val pagingToken: String

A cursor value for use in pagination

Link copied to clipboard
@SerialName(value = "prev_hash")
val prevHash: String?

The hash of the ledger that immediately precedes this ledger

Link copied to clipboard
@SerialName(value = "protocol_version")
val protocolVersion: Int?

The protocol version that the Stellar network was running when this ledger was committed

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

The sequence number of this ledger

Link copied to clipboard
@SerialName(value = "successful_transaction_count")
val successfulTransactionCount: Int?

The number of successful transactions in this ledger

Link copied to clipboard
@SerialName(value = "total_coins")
val totalCoins: String

Total number of lumens in circulation

Link copied to clipboard
@SerialName(value = "tx_set_operation_count")
val txSetOperationCount: Int?

The number of operations in the transaction set for this ledger