Class Currency
The XRP Ledger has two kinds of digital asset: XRP and tokens.
Both types have high precision, although their formats are different
Inheritance
Namespace: Xrpl.Models.Common
Assembly: Xrpl.dll
Syntax
public class Currency : object
Constructors
| Improve this Doc View SourceCurrency()
base constructor.
base currency code = XRP
Declaration
public Currency()
Properties
| Improve this Doc View SourceCurrencyCode
The standard format for currency codes is a three-character string such as USD.
This is intended for use with ISO 4217 Currency Codes
As a 160-bit hexadecimal string, such as "0158415500000000C1F76FF6ECB0BAC600000000".
The following characters are permitted:
all uppercase and lowercase letters, digits, as well as the symbols ? ! @ # $ % ^ * ( ) { } [ ] | and symbols ampersand, less, greater
Currency codes are case-sensitive.
Declaration
public string CurrencyCode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CurrencyValidName
Readable currency name
Declaration
public string CurrencyValidName { get; }
Property Value
Type | Description |
---|---|
System.String |
Issuer
Generally, the account that issues this token.
In special cases, this can refer to the account that holds the token instead.
Declaration
public string Issuer { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Value
Quoted decimal representation of the amount of the token.
This can include scientific notation, such as 1.23e11 meaning 123,000,000,000.
Both e and E may be used.
This can be negative when displaying balances, but negative values are disallowed in other contexts such as specifying how much to send.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ValueAsNumber
decimal currency amount (drops for XRP)
Declaration
public decimal ValueAsNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal |
ValueAsXrp
XRP token amount (non drops value)
Declaration
public decimal? ValueAsXrp { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Decimal> |