Skip to main content

blockfrost_openapi/models/
network_supply.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct NetworkSupply {
6    /// Maximum supply in Lovelaces
7    #[serde(rename = "max")]
8    pub max: String,
9    /// Current total (max supply - reserves) supply in Lovelaces
10    #[serde(rename = "total")]
11    pub total: String,
12    /// Current circulating (UTXOs + withdrawables) supply in Lovelaces
13    #[serde(rename = "circulating")]
14    pub circulating: String,
15    /// Current supply locked by scripts in Lovelaces
16    #[serde(rename = "locked")]
17    pub locked: String,
18    /// Current supply locked in treasury
19    #[serde(rename = "treasury")]
20    pub treasury: String,
21    /// Current supply locked in reserves
22    #[serde(rename = "reserves")]
23    pub reserves: String,
24}
25
26impl NetworkSupply {
27    pub fn new(max: String, total: String, circulating: String, locked: String, treasury: String, reserves: String) -> NetworkSupply {
28        NetworkSupply {
29            max,
30            total,
31            circulating,
32            locked,
33            treasury,
34            reserves,
35        }
36    }
37}
38