Struct chainhook_types::Amount
source · pub struct Amount {
pub value: u128,
pub currency: Currency,
}Expand description
Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.
Fields§
§value: u128Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.
currency: CurrencyTrait Implementations§
source§impl<'de> Deserialize<'de> for Amount
impl<'de> Deserialize<'de> for Amount
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