ChangeTrustAsset
public class ChangeTrustAsset : Asset, @unchecked Sendable
Asset subclass supporting liquidity pool shares for change trust operations.
-
The first asset in a liquidity pool pair. Nil for non-pool assets.
Declaration
Swift
public let assetA: Asset? -
The second asset in a liquidity pool pair. Nil for non-pool assets.
Declaration
Swift
public let assetB: Asset? -
Creates a liquidity pool asset from two underlying assets in correct lexicographic order.
-
Declaration
Swift
public override init?(type: Int32, code: String? = nil, issuer: KeyPair? = nil) -
Returns the canonical string representation of this asset. For pool share assets, returns the format “poolId:lp” where poolId is the hex-encoded liquidity pool ID. For other asset types, delegates to the parent class implementation.
Declaration
Swift
public override func toCanonicalForm() -> String -
Generates ChangeTrustAssetXDR object for change trust operations.
Declaration
Swift
public func toChangeTrustAssetXDR() throws -> ChangeTrustAssetXDR -
Generates ChangeTrustAsset object from its XDR representation.
Declaration
Swift
public static func fromXDR(assetXDR: ChangeTrustAssetXDR) throws -> ChangeTrustAsset
View on GitHub
Install in Dash