ChangeTrustAsset

sealed class ChangeTrustAsset

Represents an asset in a change trust operation on the Stellar network.

This class can represent both regular assets (native, credit_alphanum4, credit_alphanum12) and liquidity pool shares for change trustline operations.

Usage

For Regular Assets

val asset = AssetTypeCreditAlphaNum4("USD", issuer)
val changeTrustAsset = ChangeTrustAsset(asset)

For Liquidity Pool Shares

val assetA = AssetTypeCreditAlphaNum4("USD", issuer)
val assetB = AssetTypeCreditAlphaNum4("EUR", issuer)
val pool = LiquidityPool(assetA, assetB)
val changeTrustAsset = ChangeTrustAsset(pool)

See also

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class LiquidityPoolShare(val liquidityPool: LiquidityPool) : ChangeTrustAsset

ChangeTrustAsset for a liquidity pool share.

Link copied to clipboard
data class Wrapper(val asset: Asset) : ChangeTrustAsset

ChangeTrustAsset for a regular asset (native, alphanum4, or alphanum12).

Properties

Link copied to clipboard
abstract val assetType: AssetTypeXdr

The type of the asset

Functions

Link copied to clipboard
abstract fun toXdr(): ChangeTrustAssetXdr

Converts this ChangeTrustAsset to its XDR representation.