use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCompressedAccountProofResponseValueV2 {
#[serde(rename = "hash")]
pub hash: String,
#[serde(rename = "leafIndex")]
pub leaf_index: u32,
#[serde(rename = "proof")]
pub proof: Vec<String>,
#[serde(rename = "proveByIndex")]
pub prove_by_index: bool,
#[serde(rename = "root")]
pub root: String,
#[serde(rename = "rootSeq")]
pub root_seq: u64,
#[serde(rename = "treeContext")]
pub tree_context: Box<models::TreeContextInfo>,
}
impl GetCompressedAccountProofResponseValueV2 {
pub fn new(
hash: String,
leaf_index: u32,
proof: Vec<String>,
prove_by_index: bool,
root: String,
root_seq: u64,
tree_context: models::TreeContextInfo,
) -> GetCompressedAccountProofResponseValueV2 {
GetCompressedAccountProofResponseValueV2 {
hash,
leaf_index,
proof,
prove_by_index,
root,
root_seq,
tree_context: Box::new(tree_context),
}
}
}