photon_api/models/
account_proof_inputs.rs

1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct AccountProofInputs {
15    #[serde(rename = "hash")]
16    pub hash: String,
17    #[serde(rename = "leafIndex")]
18    pub leaf_index: u64,
19    #[serde(rename = "merkleContext")]
20    pub merkle_context: Box<models::MerkleContextV2>,
21    #[serde(rename = "root")]
22    pub root: String,
23    #[serde(rename = "rootIndex")]
24    pub root_index: Box<models::RootIndex>,
25}
26
27impl AccountProofInputs {
28    pub fn new(
29        hash: String,
30        leaf_index: u64,
31        merkle_context: models::MerkleContextV2,
32        root: String,
33        root_index: models::RootIndex,
34    ) -> AccountProofInputs {
35        AccountProofInputs {
36            hash,
37            leaf_index,
38            merkle_context: Box::new(merkle_context),
39            root,
40            root_index: Box::new(root_index),
41        }
42    }
43}