SEP38Asset class

Information about a supported asset for exchange operations.

Describes an asset that can be bought or sold through the anchor, including available delivery methods and country restrictions. Assets are identified using the Asset Identification Format (e.g., "stellar:USDC:G...", "iso4217:USD").

Example:

SEP38Asset asset = info.assets.first;
print("Asset: ${asset.asset}");
print("Countries: ${asset.countryCodes}");
if (asset.sellDeliveryMethods != null) {
  for (var method in asset.sellDeliveryMethods!) {
    print("Sell via ${method.name}: ${method.description}");
  }
}

Constructors

SEP38Asset(String asset, {List<Sep38SellDeliveryMethod>? sellDeliveryMethods, List<Sep38BuyDeliveryMethod>? buyDeliveryMethods, List<String>? countryCodes})
Creates a SEP38Asset from asset information.
SEP38Asset.fromJson(Map<String, dynamic> json)
Creates a SEP38Asset from JSON response data.
factory

Properties

asset ↔ String
Asset identifier in Asset Identification Format.
getter/setter pair
buyDeliveryMethods ↔ List<Sep38BuyDeliveryMethod>?
Optional delivery methods for buying this asset from the anchor.
getter/setter pair
countryCodes ↔ List<String>?
Optional ISO 3166-1 alpha-2 or ISO 3166-2 country codes where asset is available.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sellDeliveryMethods ↔ List<Sep38SellDeliveryMethod>?
Optional delivery methods for selling this asset to the anchor.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited