1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/*
* Rosetta
*
* Build Once. Integrate Your Blockchain Everywhere.
*
* The version of the OpenAPI document: 1.4.13
*
* Generated by: https://openapi-generator.tech
*/
/// BlockIdentifier : The block_identifier uniquely identifies a block in a particular network.
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct BlockIdentifier {
/// This is also known as the block height.
#[serde(rename = "index")]
pub index: u64,
/// This should be normalized according to the case specified in the block_hash_case network options.
#[serde(rename = "hash")]
pub hash: String,
}
impl BlockIdentifier {
/// The block_identifier uniquely identifies a block in a particular network.
pub fn new(index: u64, hash: String) -> BlockIdentifier {
BlockIdentifier { index, hash }
}
}