Currency

data class Currency(val code: String? = null, val codeTemplate: String? = null, val issuer: String? = null, val contract: String? = null, val status: String? = null, val displayDecimals: Int? = null, val name: String? = null, val desc: String? = null, val conditions: String? = null, val image: String? = null, val fixedNumber: Long? = null, val maxNumber: Long? = null, val isUnlimited: Boolean? = null, val isAssetAnchored: Boolean? = null, val anchorAssetType: String? = null, val anchorAsset: String? = null, val attestationOfReserve: String? = null, val redemptionInstructions: String? = null, val collateralAddresses: List<String>? = null, val collateralAddressMessages: List<String>? = null, val collateralAddressSignatures: List<String>? = null, val regulated: Boolean? = null, val approvalServer: String? = null, val approvalCriteria: String? = null, val toml: String? = null)

Currency documentation from the stellar.toml CURRENCIES list.

Contains information about assets/currencies supported by the organization. One set of fields for each currency supported. Applicable fields should be completed and any that don't apply should be excluded.

See SEP-0001 Specification

Constructors

Link copied to clipboard
constructor(code: String? = null, codeTemplate: String? = null, issuer: String? = null, contract: String? = null, status: String? = null, displayDecimals: Int? = null, name: String? = null, desc: String? = null, conditions: String? = null, image: String? = null, fixedNumber: Long? = null, maxNumber: Long? = null, isUnlimited: Boolean? = null, isAssetAnchored: Boolean? = null, anchorAssetType: String? = null, anchorAsset: String? = null, attestationOfReserve: String? = null, redemptionInstructions: String? = null, collateralAddresses: List<String>? = null, collateralAddressMessages: List<String>? = null, collateralAddressSignatures: List<String>? = null, regulated: Boolean? = null, approvalServer: String? = null, approvalCriteria: String? = null, toml: String? = null)

Properties

Link copied to clipboard

If anchored token, code/symbol for asset that token is anchored to. E.g. USD, BTC, SBUX, Address of real-estate investment property.

Link copied to clipboard

Type of asset anchored. Can be fiat, crypto, nft, stock, bond, commodity, realestate, or other.

Link copied to clipboard

A human readable string that explains the issuer's requirements for approving transactions.

Link copied to clipboard

URL of a SEP-0008 compliant approval service that signs validated transactions.

Link copied to clipboard

URL to attestation or other proof, evidence, or verification of reserves, such as third-party audits.

Link copied to clipboard
val code: String?

Token code.

Link copied to clipboard

A pattern with ? as a single character wildcard. Allows a CURRENCIES entry to apply to multiple assets that share the same info. An example is futures, where the only difference between issues is the date of the contract. E.g. CORN???????? to match codes such as CORN20180604.

Link copied to clipboard

If this is an anchored crypto token, list of one or more public addresses that hold the assets for which you are issuing tokens.

Link copied to clipboard

Messages stating that funds in the collateralAddresses list are reserved to back the issued asset.

Link copied to clipboard

These prove you control the collateralAddresses. For each address you list, sign the entry in collateralAddressMessages with the address's private key and add the resulting string to this list as a base64-encoded raw signature.

Link copied to clipboard

Conditions on token.

Link copied to clipboard

Contract ID of the token contract. The token must be compatible with the SEP-41 Token Interface to be defined here. Required for tokens that are not Stellar Assets. Omitted if the token is a Stellar Asset.

Link copied to clipboard
val desc: String?

Description of token and what it represents.

Link copied to clipboard

Preference for number of decimals to show when a client displays currency balance.

Link copied to clipboard

Fixed number of tokens, if the number of tokens issued will never change.

Link copied to clipboard

URL to a PNG image on a transparent background representing token.

Link copied to clipboard

true if token can be redeemed for underlying asset, otherwise false.

Link copied to clipboard

Token issuer Stellar public key.

Link copied to clipboard

The number of tokens is dilutable at the issuer's discretion.

Link copied to clipboard

Max number of tokens, if there will never be more than maxNumber tokens.

Link copied to clipboard
val name: String?

A short name for the token.

Link copied to clipboard

If anchored token, these are instructions to redeem the underlying asset from tokens.

Link copied to clipboard

Indicates whether or not this is a SEP-0008 regulated asset. If missing, false is assumed.

Link copied to clipboard

Status of token. One of live, dead, test, or private. Allows issuer to mark whether token is dead/for testing/for private use or is live and should be listed in live exchanges.

Link copied to clipboard
val toml: String?

Alternately, stellar.toml can link out to a separate TOML file for each currency by specifying toml="https://DOMAIN/.well-known/CURRENCY.toml" as the currency's only field. In this case only this field is filled. To load the currency data, you can use StellarToml.currencyFromUrl(toml).