PathResponse

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

Paths represent possible payment routes between assets on the Stellar network. The Horizon API provides two pathfinding endpoints:

  • Strict Send: Find paths given a source asset and amount

  • Strict Receive: Find paths given a destination asset and amount

Each path contains the source and destination assets, amounts, and a list of intermediate assets that the payment would pass through.

See also

Constructors

Link copied to clipboard
constructor(destinationAmount: String, destinationAssetType: String, destinationAssetCode: String? = null, destinationAssetIssuer: String? = null, sourceAmount: String, sourceAssetType: String, sourceAssetCode: String? = null, sourceAssetIssuer: String? = null, path: List<Asset>)

Properties

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

The amount that would be received at the destination

Link copied to clipboard
@SerialName(value = "destination_asset_code")
val destinationAssetCode: String?

The destination asset code (null for native)

Link copied to clipboard
@SerialName(value = "destination_asset_issuer")
val destinationAssetIssuer: String?

The destination asset issuer (null for native)

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

The destination asset type

Link copied to clipboard
@SerialName(value = "path")
val path: List<Asset>

List of intermediate assets in the payment path

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

The amount that would be sent from the source

Link copied to clipboard
@SerialName(value = "source_asset_code")
val sourceAssetCode: String?

The source asset code (null for native)

Link copied to clipboard
@SerialName(value = "source_asset_issuer")
val sourceAssetIssuer: String?

The source asset issuer (null for native)

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

The source asset type

Functions

Link copied to clipboard

Returns the destination asset as an Asset object.

Link copied to clipboard

Returns the source asset as an Asset object.