Struct chainhook_types::Currency
source · pub struct Currency {
pub symbol: String,
pub decimals: u32,
pub metadata: Option<CurrencyMetadata>,
}Expand description
Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
Fields§
§symbol: StringCanonical symbol associated with a currency.
decimals: u32Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.
metadata: Option<CurrencyMetadata>Any additional information related to the currency itself.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Currency
impl<'de> Deserialize<'de> for Currency
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more