AssetTypeCreditAlphaNum

Base class for issued assets (credit assets with an issuer).

This sealed class represents assets that are issued by an account on the Stellar network. All issued assets have:

  • A code (1-12 alphanumeric characters)

  • An issuer (the account that created the asset)

Asset codes must contain only:

  • Uppercase letters (A-Z)

  • Digits (0-9)

The issuer must be a valid ed25519 public key (G... address).

See also

Inheritors

Properties

Link copied to clipboard
abstract val code: String

The asset code (1-12 characters)

Link copied to clipboard
abstract val issuer: String

The issuer's account ID (G... strkey format)

Link copied to clipboard
abstract val type: AssetTypeXdr

Returns the asset type.

Functions

Link copied to clipboard
abstract operator fun compareTo(other: Asset): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
suspend fun getContractId(network: Network): String

Returns the contract ID for this asset on the given network.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Returns a canonical string representation of this asset.

Link copied to clipboard
abstract fun toXdr(): AssetXdr

Converts this asset to its XDR representation.