photon_api/models/
closed_account_v2.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 ClosedAccountV2 {
15    #[serde(rename = "account")]
16    pub account: Box<models::AccountV2>,
17    /// A 32-byte hash represented as a base58 string.
18    #[serde(rename = "nullifier")]
19    pub nullifier: String,
20    /// A 32-byte hash represented as a base58 string.
21    #[serde(rename = "txHash")]
22    pub tx_hash: String,
23}
24
25impl ClosedAccountV2 {
26    pub fn new(account: models::AccountV2, nullifier: String, tx_hash: String) -> ClosedAccountV2 {
27        ClosedAccountV2 {
28            account: Box::new(account),
29            nullifier,
30            tx_hash,
31        }
32    }
33}