cryptoapis/models/
list_latest_mined_blocks_ribs.rs

1/*
2 * CryptoAPIs
3 *
4 * Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
5 *
6 * The version of the OpenAPI document: 2021-03-20
7 * Contact: developers@cryptoapis.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ListLatestMinedBlocksRibs {
16    /// Represents a specific sub-unit of Zcash. Bits have two-decimal precision
17    #[serde(rename = "bits")]
18    pub bits: String,
19    /// Represents a hexadecimal number of all the hashes necessary to produce the current chain. E.g., when converting 0000000000000000000000000000000000000000000086859f7a841475b236fd to a decimal you get 635262017308958427068157 hashes, or 635262 exahashes.
20    #[serde(rename = "chainwork")]
21    pub chainwork: String,
22    /// Represents a mathematical value of how hard it is to find a valid hash for this block.
23    #[serde(rename = "difficulty")]
24    pub difficulty: String,
25    /// Defines the single and final (root) node of a Merkle tree. It is the combined hash of all transactions' hashes that are part of a blockchain block.
26    #[serde(rename = "merkleRoot")]
27    pub merkle_root: String,
28    /// Represents a random value that can be adjusted to satisfy the proof of work
29    #[serde(rename = "nonce")]
30    pub nonce: String,
31    /// Represents the total size of the block in Bytes.
32    #[serde(rename = "size")]
33    pub size: i32,
34    /// Defines the numeric representation of the block size excluding the witness data.
35    #[serde(rename = "strippedSize")]
36    pub stripped_size: i32,
37    /// Represents the transaction version number.
38    #[serde(rename = "version")]
39    pub version: i32,
40    /// Is the hexadecimal string representation of the block's version.
41    #[serde(rename = "versionHex")]
42    pub version_hex: String,
43    /// Represents a measurement to compare the size of different transactions to each other in proportion to the block size limit.
44    #[serde(rename = "weight")]
45    pub weight: i32,
46    /// Represents any data that can be included by the miner in the block.
47    #[serde(rename = "extraData")]
48    pub extra_data: String,
49    /// Represents the maximum amount of gas allowed in the block in order to determine how many transactions it can fit.
50    #[serde(rename = "gasLimit")]
51    pub gas_limit: i32,
52    /// Defines how much of the gas for the block has been used.
53    #[serde(rename = "gasUsed")]
54    pub gas_used: i32,
55    /// Specifies the amount of time required for the block to be mined in second
56    #[serde(rename = "minedInSeconds")]
57    pub mined_in_seconds: i32,
58    /// Defines the combined hash of all uncles for a given parent.
59    #[serde(rename = "sha3Uncles")]
60    pub sha3_uncles: String,
61    /// Defines the total difficulty of the chain until this block, i.e. how difficult it is for a specific miner to mine a new block
62    #[serde(rename = "totalDifficulty")]
63    pub total_difficulty: String,
64    #[serde(rename = "uncles")]
65    pub uncles: Vec<String>,
66    /// Represents the Directory Service block which contains metadata about the miners who participate in the consensus protocol.
67    #[serde(rename = "dsBlock")]
68    pub ds_block: i32,
69    /// Defines how difficult it is to mine the dsBlocks.
70    #[serde(rename = "dsDifficulty")]
71    pub ds_difficulty: String,
72    /// Represents a part of the DS Committee which leads the consensus protocol for the epoch.
73    #[serde(rename = "dsLeader")]
74    pub ds_leader: String,
75    #[serde(rename = "microBlocks")]
76    pub micro_blocks: Vec<String>,
77    #[serde(rename = "totalCoins", skip_serializing_if = "Option::is_none")]
78    pub total_coins: Option<Box<crate::models::ListLatestMinedBlocksRibsxTotalCoins>>,
79    #[serde(rename = "totalFees")]
80    pub total_fees: Box<crate::models::ListLatestMinedBlocksRibsxTotalFees>,
81}
82
83impl ListLatestMinedBlocksRibs {
84    pub fn new(bits: String, chainwork: String, difficulty: String, merkle_root: String, nonce: String, size: i32, stripped_size: i32, version: i32, version_hex: String, weight: i32, extra_data: String, gas_limit: i32, gas_used: i32, mined_in_seconds: i32, sha3_uncles: String, total_difficulty: String, uncles: Vec<String>, ds_block: i32, ds_difficulty: String, ds_leader: String, micro_blocks: Vec<String>, total_fees: crate::models::ListLatestMinedBlocksRibsxTotalFees) -> ListLatestMinedBlocksRibs {
85        ListLatestMinedBlocksRibs {
86            bits,
87            chainwork,
88            difficulty,
89            merkle_root,
90            nonce,
91            size,
92            stripped_size,
93            version,
94            version_hex,
95            weight,
96            extra_data,
97            gas_limit,
98            gas_used,
99            mined_in_seconds,
100            sha3_uncles,
101            total_difficulty,
102            uncles,
103            ds_block,
104            ds_difficulty,
105            ds_leader,
106            micro_blocks,
107            total_coins: None,
108            total_fees: Box::new(total_fees),
109        }
110    }
111}
112
113