Show / Hide Table of Contents

Class CurrencyExtensions

Inheritance
object
CurrencyExtensions
Namespace: Xrpl.Models.Common
Assembly: Xrpl.dll
Syntax
public static class CurrencyExtensions

Methods

| Edit this page View Source

CurrencyReadableName(string)

get readable token code

Declaration
public static string CurrencyReadableName(this string currencyCode)
Parameters
Type Name Description
string currencyCode

token code

Returns
Type Description
string

readable token code

| Edit this page View Source

GetValue(Currency, int?)

Returns the human-readable value of this currency amount. For XRP, returns the value in XRP (drops / 1,000,000). For tokens, returns the raw numeric value.

Declaration
public static decimal? GetValue(this Currency currency, int? round = null)
Parameters
Type Name Description
Currency currency

The currency to get the value from.

int? round

Optional number of decimal places to round to.

Returns
Type Description
decimal?

The decimal value, or null if the currency is null.

| Edit this page View Source

IsLpToken(string)

Declaration
public static bool IsLpToken(this string currencyCode)
Parameters
Type Name Description
string currencyCode
Returns
Type Description
bool
| Edit this page View Source

IsLpToken(Currency)

Declaration
public static bool IsLpToken(this Currency currency)
Parameters
Type Name Description
Currency currency
Returns
Type Description
bool
| Edit this page View Source

IsLpToken(TrustLine)

Declaration
public static bool IsLpToken(this TrustLine currency)
Parameters
Type Name Description
TrustLine currency
Returns
Type Description
bool
| Edit this page View Source

IsMPTToken(Currency)

Declaration
public static bool IsMPTToken(this Currency currency)
Parameters
Type Name Description
Currency currency
Returns
Type Description
bool
| Edit this page View Source

IsNFT14D(Currency)

check that currency is NFT XLS14D

Declaration
public static bool IsNFT14D(this Currency cur)
Parameters
Type Name Description
Currency cur
Returns
Type Description
bool
| Edit this page View Source

IsXrp(Currency)

Determines whether this currency represents XRP. A currency is XRP if its code (case-insensitive) is "XRP" and it has no issuer.

Declaration
public static bool IsXrp(this Currency currency)
Parameters
Type Name Description
Currency currency

The currency to check.

Returns
Type Description
bool

true if this currency is XRP; otherwise, false.

| Edit this page View Source

NormalCurrency(string)

Declaration
public static bool NormalCurrency(this string currencyCode)
Parameters
Type Name Description
string currencyCode
Returns
Type Description
bool
| Edit this page View Source

NormalizeCurrencyCode(string, int)

Declaration
public static string NormalizeCurrencyCode(this string currencyCode, int maxLength = 20)
Parameters
Type Name Description
string currencyCode
int maxLength
Returns
Type Description
string
| Edit this page View Source

ToIssued(Currency)

Declaration
public static Common.IssuedCurrency ToIssued(this Currency currency)
Parameters
Type Name Description
Currency currency
Returns
Type Description
Common.IssuedCurrency
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX