rosetta_types/balance_exemption.rs
1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BalanceExemption : BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation. This typically occurs with staking rewards, vesting balances, and Currencies with a dynamic supply. Currently, it is possible to exempt an account from strict reconciliation by SubAccountIdentifier.Address or by Currency. This means that any account with SubAccountIdentifier.Address would be exempt or any balance of a particular Currency would be exempt, respectively. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier).
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct BalanceExemption {
15 /// SubAccountAddress is the SubAccountIdentifier.Address that the BalanceExemption applies to (regardless of the value of SubAccountIdentifier.Metadata).
16 #[serde(
17 rename = "sub_account_address",
18 skip_serializing_if = "Option::is_none"
19 )]
20 pub sub_account_address: Option<String>,
21 #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
22 pub currency: Option<crate::Currency>,
23 #[serde(rename = "exemption_type", skip_serializing_if = "Option::is_none")]
24 pub exemption_type: Option<crate::ExemptionType>,
25}
26
27impl BalanceExemption {
28 /// BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation. This typically occurs with staking rewards, vesting balances, and Currencies with a dynamic supply. Currently, it is possible to exempt an account from strict reconciliation by SubAccountIdentifier.Address or by Currency. This means that any account with SubAccountIdentifier.Address would be exempt or any balance of a particular Currency would be exempt, respectively. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier).
29 pub fn new() -> BalanceExemption {
30 BalanceExemption {
31 sub_account_address: None,
32 currency: None,
33 exemption_type: None,
34 }
35 }
36}