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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* photon-indexer
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.50.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
/// AccountContext: This is currently used internally: - Internal (state_updates,..) - GetTransactionWithCompressionInfo (internally) - GetTransactionWithCompressionInfoV2 (internally) All endpoints return AccountV2.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountContext {
#[serde(rename = "inOutputQueue")]
pub in_output_queue: bool,
#[serde(rename = "nullifiedInTree")]
pub nullified_in_tree: bool,
/// A 32-byte hash represented as a base58 string.
#[serde(rename = "nullifier", skip_serializing_if = "Option::is_none")]
pub nullifier: Option<String>,
#[serde(
rename = "nullifierQueueIndex",
skip_serializing_if = "Option::is_none"
)]
pub nullifier_queue_index: Option<u64>,
/// A Solana public key represented as a base58 string.
#[serde(rename = "queue")]
pub queue: String,
#[serde(rename = "spent")]
pub spent: bool,
#[serde(rename = "treeType")]
pub tree_type: u16,
/// A 32-byte hash represented as a base58 string.
#[serde(rename = "txHash", skip_serializing_if = "Option::is_none")]
pub tx_hash: Option<String>,
}
impl AccountContext {
/// This is currently used internally: - Internal (state_updates,..) - GetTransactionWithCompressionInfo (internally) - GetTransactionWithCompressionInfoV2 (internally) All endpoints return AccountV2.
pub fn new(
in_output_queue: bool,
nullified_in_tree: bool,
queue: String,
spent: bool,
tree_type: u16,
) -> AccountContext {
AccountContext {
in_output_queue,
nullified_in_tree,
nullifier: None,
nullifier_queue_index: None,
queue,
spent,
tree_type,
tx_hash: None,
}
}
}