Show / Hide Table of Contents

Class Asset

Asset class represents an asset, either the native asset (XLM) or a asset code / issuer account ID pair. An asset code describes an asset code and issuer pair. In the case of the native asset XLM, the issuer will be null.

Inheritance
System.Object
Asset
AssetTypeCreditAlphaNum
AssetTypeNative
Namespace: System.Dynamic.ExpandoObject
Assembly: stellar-dotnet-sdk.dll
Syntax
public abstract class Asset : object

Properties

Type

Returns asset type. Possible types:

  • native See AssetTypeNative for more information.
  • credit_alphanum4 See AssetTypeCreditAlphaNum4 for more information.
  • credit_alphanum12 See AssetTypeCreditAlphaNum12 for more information.
  • liquidity_pool_shares
Declaration
public abstract string Type { get; }
Property Value
System.String

Methods

CanonicalName()

Returns the asset canonical name.

Declaration
public abstract string CanonicalName()
Returns
System.String

CompareTo(Asset)

Declaration
public abstract int CompareTo(Asset asset)
Parameters
Type Name Description
Asset asset
Returns
System.Int32

Create(String, String, String)

Create an asset base on the parameters.

Declaration
public static Asset Create(String type, String code, String issuer)
Parameters
Type Name Description
String type
String code
String issuer
Returns
Asset

Asset

Create(String)

Declaration
public static Asset Create(string canonicalForm)
Parameters
Type Name Description
System.String canonicalForm
Returns
Asset

CreateNonNativeAsset(String, String)

Creates one of AssetTypeCreditAlphaNum4 or AssetTypeCreditAlphaNum12 object based on a code length

Declaration
public static AssetTypeCreditAlphaNum CreateNonNativeAsset(string code, string issuer)
Parameters
Type Name Description
System.String code

Asset code

System.String issuer

Asset issuer

Returns
AssetTypeCreditAlphaNum

FromXdr(Asset)

Generates Asset object from a given XDR object

Declaration
public static Asset FromXdr(Asset thisXdr)
Parameters
Type Name Description
stellar_dotnet_sdk.xdr.Asset thisXdr
Returns
Asset

ToXdr()

Generates XDR object from a given Asset object

Declaration
public abstract Asset ToXdr()
Returns
stellar_dotnet_sdk.xdr.Asset

Extension Methods

AssetExtensions.ToQueryParameterEncodedString(Asset)
Back to top Generated by DocFX