Skip to main content

blockfrost_openapi/models/
address_content_extended_amount_inner.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// AddressContentExtendedAmountInner : The sum of all the UTXO per asset
5#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct AddressContentExtendedAmountInner {
7    /// The unit of the value
8    #[serde(rename = "unit")]
9    pub unit: String,
10    /// The quantity of the unit
11    #[serde(rename = "quantity")]
12    pub quantity: String,
13    /// Number of decimal places of the asset unit. Primary data source is CIP68 reference NFT with a fallback to off-chain metadata.
14    #[serde(rename = "decimals", deserialize_with = "Option::deserialize")]
15    pub decimals: Option<i32>,
16    /// True if the latest minting transaction includes metadata (best-effort)
17    #[serde(rename = "has_nft_onchain_metadata")]
18    pub has_nft_onchain_metadata: bool,
19}
20
21impl AddressContentExtendedAmountInner {
22    /// The sum of all the UTXO per asset
23    pub fn new(unit: String, quantity: String, decimals: Option<i32>, has_nft_onchain_metadata: bool) -> AddressContentExtendedAmountInner {
24        AddressContentExtendedAmountInner {
25            unit,
26            quantity,
27            decimals,
28            has_nft_onchain_metadata,
29        }
30    }
31}
32