Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AccountDataResponse(val value: String) : Response

Represents an account data response from the Horizon API.

Link copied to clipboard
@Serializable
data class AccountResponse(val id: String, val accountId: String, val sequenceNumber: Long, val sequenceLedger: Long? = null, val sequenceTime: Long? = null, val subentryCount: Int, val inflationDestination: String? = null, val homeDomain: String? = null, val lastModifiedLedger: Int, val lastModifiedTime: String, val thresholds: AccountResponse.Thresholds, val flags: AccountResponse.Flags, val balances: List<AccountResponse.Balance>, val signers: List<AccountResponse.Signer>, val data: Map<String, String> = emptyMap(), val numSponsoring: Int? = null, val numSponsored: Int? = null, val sponsor: String? = null, val pagingToken: String, val links: AccountResponse.Links) : Response, Pageable

Represents an account response from the Horizon API.

Link copied to clipboard
@Serializable
data class Asset(val assetType: String, val assetCode: String? = null, val assetIssuer: String? = null)

Represents an asset in the Stellar network.

Link copied to clipboard
@Serializable
data class AssetAmount(val asset: String, val amount: String)

Represents an amount of an asset.

Link copied to clipboard
@Serializable
data class AssetResponse(val assetType: String, val assetCode: String, val assetIssuer: String, val pagingToken: String, val contractId: String? = null, val numClaimableBalances: Int? = null, val numLiquidityPools: Int? = null, val numContracts: Int? = null, val accounts: AssetResponse.Accounts, val claimableBalancesAmount: String? = null, val liquidityPoolsAmount: String? = null, val contractsAmount: String? = null, val balances: AssetResponse.Balances, val flags: AssetResponse.Flags, val links: AssetResponse.Links) : Response, Pageable

Represents an asset response from the Horizon API.

Link copied to clipboard
@Serializable
data class ClaimableBalanceResponse(val id: String, val assetString: String, val amount: String, val sponsor: String? = null, val lastModifiedLedger: Long? = null, val lastModifiedTime: String? = null, val claimants: List<Claimant> = emptyList(), val flags: ClaimableBalanceResponse.Flags? = null, val pagingToken: String, val links: ClaimableBalanceResponse.Links) : Response, Pageable

Represents a claimable balance response from the Horizon API.

Link copied to clipboard
@Serializable
data class Claimant(val destination: String, val predicate: Predicate)

Represents an entity who is eligible to claim a claimable balance.

Link copied to clipboard
@Serializable
data class FeeStatsResponse(val lastLedger: Long, val lastLedgerBaseFee: Long, val ledgerCapacityUsage: String, val feeCharged: FeeStatsResponse.FeeDistribution, val maxFee: FeeStatsResponse.FeeDistribution) : Response

Represents fee statistics response from the Horizon API.

Link copied to clipboard
@Serializable
data class HealthResponse(val databaseConnected: Boolean, val coreUp: Boolean, val coreSynced: Boolean) : Response

Represents health response received from the Horizon server.

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
data class Link(val href: String, val templated: Boolean? = null)

Represents a HAL (Hypertext Application Language) link in Horizon API responses.

Link copied to clipboard
@Serializable
data class LiquidityPoolResponse(val id: String, val pagingToken: String, val feeBp: Int? = null, val type: String, val totalTrustlines: Long? = null, val totalShares: String, val reserves: List<LiquidityPoolResponse.Reserve> = emptyList(), val lastModifiedLedger: Long? = null, val lastModifiedTime: String? = null, val links: LiquidityPoolResponse.Links) : Response, Pageable

Represents a liquidity pool response from the Horizon API.

Link copied to clipboard
@Serializable
data class OfferResponse(val id: String, val pagingToken: String, val seller: String, val sellingAsset: Asset, val buyingAsset: Asset, val amount: String, val priceR: Price, val price: String, val lastModifiedLedger: Long? = null, val lastModifiedTime: String? = null, val sponsor: String? = null, val links: OfferResponse.Links) : Response, Pageable

Represents an offer response from the Horizon API.

Link copied to clipboard
@Serializable
data class OrderBookResponse(val baseAsset: Asset, val counterAsset: Asset, val asks: List<OrderBookResponse.Row>, val bids: List<OrderBookResponse.Row>) : Response

Represents an order book response from the Horizon API.

Link copied to clipboard
@Serializable
data class Page<T>(val embedded: Page.Embedded<T>? = null, val links: Page.Links? = null) : Response

Represents a page of objects in a paginated response.

Link copied to clipboard
interface Pageable

Interface for responses that support pagination. Responses implementing this interface contain a paging token that can be used to fetch the next page of results or resume streaming from a specific point.

Link copied to clipboard
@Serializable
data class PathResponse(val destinationAmount: String, val destinationAssetType: String, val destinationAssetCode: String? = null, val destinationAssetIssuer: String? = null, val sourceAmount: String, val sourceAssetType: String, val sourceAssetCode: String? = null, val sourceAssetIssuer: String? = null, val path: List<Asset>) : Response

Represents a path response from the Horizon API.

Link copied to clipboard
@Serializable
data class Predicate(val unconditional: Boolean? = null, val absBefore: String? = null, val relBefore: String? = null, val and: List<Predicate>? = null, val or: List<Predicate>? = null, val not: Predicate? = null)

Represents a claim predicate for claimable balances. This is a simplified representation of the predicate structure.

Link copied to clipboard
@Serializable
data class Price(val numerator: Long, val denominator: Long)

Represents a price in the Stellar network.

Link copied to clipboard
@Serializable
abstract class Response

Base class for all Horizon API responses. This class serves as a common parent for all response types.

Link copied to clipboard
@Serializable
data class RootResponse(val horizonVersion: String, val stellarCoreVersion: String, val ingestLatestLedger: Long? = null, val historyLatestLedger: Long, val historyLatestLedgerClosedAt: String, val historyElderLedger: Long, val coreLatestLedger: Long, val networkPassphrase: String, val currentProtocolVersion: Int, val supportedProtocolVersion: Int, val coreSupportedProtocolVersion: Int, val links: RootResponse.Links) : Response

Represents root endpoint response. This endpoint provides information about the Horizon server and the Stellar network it's connected to.

Link copied to clipboard
@Serializable
data class SubmitTransactionAsyncResponse(val hash: String, val txStatus: SubmitTransactionAsyncResponse.TransactionStatus, val errorResultXdr: String? = null, var httpResponseCode: Int = 0) : Response

Represents the response from the "Submit a Transaction Asynchronously" endpoint of Horizon API.

Link copied to clipboard
@Serializable
data class TradeAggregationResponse(val timestamp: Long, val tradeCount: Int, val baseVolume: String, val counterVolume: String, val avg: String, val high: String, val highR: Price, val low: String, val lowR: Price, val open: String, val openR: Price, val close: String, val closeR: Price) : Response

Represents a trade aggregation response from the Horizon API.

Link copied to clipboard
@Serializable
data class TradeResponse(val id: String, val pagingToken: String, val ledgerCloseTime: String, val tradeType: String, val offerId: Long? = null, val liquidityPoolFeeBP: Int? = null, val baseLiquidityPoolId: String? = null, val baseOfferId: Long? = null, val baseAccount: String? = null, val baseAmount: String, val baseAssetType: String, val baseAssetCode: String? = null, val baseAssetIssuer: String? = null, val counterLiquidityPoolId: String? = null, val counterOfferId: Long? = null, val counterAccount: String? = null, val counterAmount: String, val counterAssetType: String, val counterAssetCode: String? = null, val counterAssetIssuer: String? = null, val baseIsSeller: Boolean? = null, val price: Price? = null, val links: TradeResponse.Links) : Response, Pageable

Represents a trade response from the Horizon API.

Link copied to clipboard
@Serializable
data class TransactionResponse(val id: String, val pagingToken: String, val successful: Boolean, val hash: String, val ledger: Long, val createdAt: String, val sourceAccount: String, val accountMuxed: String? = null, val accountMuxedId: String? = null, val sourceAccountSequence: Long, val feeAccount: String, val feeAccountMuxed: String? = null, val feeAccountMuxedId: String? = null, val feeCharged: Long, val maxFee: Long, val operationCount: Int, val envelopeXdr: String? = null, val resultXdr: String? = null, val resultMetaXdr: String? = null, val feeMetaXdr: String? = null, val signatures: List<String>, val preconditions: TransactionResponse.Preconditions? = null, val feeBumpTransaction: TransactionResponse.FeeBumpTransaction? = null, val innerTransaction: TransactionResponse.InnerTransaction? = null, val memoType: String, val memoBytes: String? = null, val memoValue: String? = null, val links: TransactionResponse.Links) : Response, Pageable

Represents a transaction response from the Horizon API.

Functions

Link copied to clipboard

Converts a Horizon API Asset to an SDK Asset.