AccountResponse

@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.

See also

Constructors

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

Types

Link copied to clipboard
@Serializable
data class Balance(val assetType: String, val assetCode: String? = null, val assetIssuer: String? = null, val liquidityPoolId: String? = null, val limit: String? = null, val balance: String, val buyingLiabilities: String? = null, val sellingLiabilities: String? = null, val isAuthorized: Boolean? = null, val isAuthorizedToMaintainLiabilities: Boolean? = null, val isClawbackEnabled: Boolean? = null, val lastModifiedLedger: Int? = null, val sponsor: String? = null)

Represents an account balance (native or trustline).

Link copied to clipboard
@Serializable
data class Flags(val authRequired: Boolean, val authRevocable: Boolean, val authImmutable: Boolean, val authClawbackEnabled: Boolean)

Represents account authorization flags.

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

HAL links connected to the account.

Link copied to clipboard
@Serializable
data class Signer(val key: String, val type: String, val weight: Int, val sponsor: String? = null)

Represents an account signer.

Link copied to clipboard
@Serializable
data class Thresholds(val lowThreshold: Int, val medThreshold: Int, val highThreshold: Int)

Represents account thresholds for different operation weights.

Properties

Link copied to clipboard
@SerialName(value = "account_id")
val accountId: String
Link copied to clipboard
@SerialName(value = "balances")
val balances: List<AccountResponse.Balance>
Link copied to clipboard
@SerialName(value = "data")
val data: Map<String, String>
Link copied to clipboard
@SerialName(value = "flags")
val flags: AccountResponse.Flags
Link copied to clipboard
@SerialName(value = "home_domain")
val homeDomain: String?
Link copied to clipboard
@SerialName(value = "id")
val id: String
Link copied to clipboard
@SerialName(value = "inflation_destination")
val inflationDestination: String?
Link copied to clipboard
@SerialName(value = "last_modified_ledger")
val lastModifiedLedger: Int
Link copied to clipboard
@SerialName(value = "last_modified_time")
val lastModifiedTime: String
Link copied to clipboard
@SerialName(value = "_links")
val links: AccountResponse.Links
Link copied to clipboard
@SerialName(value = "num_sponsored")
val numSponsored: Int?
Link copied to clipboard
@SerialName(value = "num_sponsoring")
val numSponsoring: Int?
Link copied to clipboard
@SerialName(value = "paging_token")
open override val pagingToken: String

Returns the paging token (cursor) for this response. This token can be used to fetch the next page of results or resume streaming.

Link copied to clipboard
@SerialName(value = "sequence_ledger")
val sequenceLedger: Long?
Link copied to clipboard
@SerialName(value = "sequence")
val sequenceNumber: Long
Link copied to clipboard
@SerialName(value = "sequence_time")
val sequenceTime: Long?
Link copied to clipboard
@SerialName(value = "signers")
val signers: List<AccountResponse.Signer>
Link copied to clipboard
@SerialName(value = "sponsor")
val sponsor: String?
Link copied to clipboard
@SerialName(value = "subentry_count")
val subentryCount: Int
Link copied to clipboard
@SerialName(value = "thresholds")
val thresholds: AccountResponse.Thresholds

Functions

Link copied to clipboard

Gets the incremented sequence number (current sequence + 1). This is the sequence number that should be used for the next transaction.