toAsset

fun toAsset(): Asset

Returns the underlying Asset instance.

Use this method when you need to pass the asset to SDK methods that accept Asset parameters, such as transaction building or Horizon queries.

Return

The underlying Asset (AssetTypeCreditAlphaNum4 or AssetTypeCreditAlphaNum12)