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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};

/*
{
		"_address": "bc1qhz06s94etnd2q47qwkxuq4qv3y7exngu5m5vkp",
		"chain": "BTC",
		"chainLpActionsPaused": false,
		"chainTradingPaused": false,
		"dustThreshold": "10000",
		"gasRate": "21",
		"gasRateUnits": "satsperbyte",
		"globalTradingPaused": false,
		"halted": false,
		"outboundFee": "6476",
		"outboundTxSize": "1000",
		"pubKey": "thorpub1addwnpepqvgm96hrjudgklqslm855dkfy4r005ve0rc33xtvccemr4pyd8s5vegmrjt",
		"verified": true,
		"verifiedAt": 1715804720329,
		"accessedAt": -1
}
*/

#[allow(clippy::struct_excessive_bools)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InboundAddress {
	#[serde(rename = "_address")]
	address: String,

	chain: String,

	#[serde(rename = "chainLpActionsPaused")]
	chain_lp_actions_paused: bool,

	#[serde(rename = "chainTradingPaused")]
	chain_trading_paused: bool,

	#[serde(rename = "dustThreshold", with = "rust_decimal::serde::str")]
	dust_threshold: Decimal,

	#[serde(rename = "gasRate", with = "rust_decimal::serde::str")]
	gas_rate: Decimal,

	#[serde(rename = "gasRateUnits")]
	gas_rate_units: String,

	#[serde(rename = "globalTradingPaused")]
	global_trading_paused: bool,

	halted: bool,

	#[serde(rename = "outboundFee", with = "rust_decimal::serde::str")]
	outbound_fee: Decimal,

	#[serde(rename = "outboundTxSize", with = "rust_decimal::serde::str")]
	outbound_tx_size: Decimal,

	#[serde(rename = "pubKey")]
	pub_key: String,

	verified: bool,

	#[serde(rename = "verifiedAt", serialize_with = "rust_decimal::serde::str::serialize")]
	verified_at: Decimal,

	#[serde(rename = "accessedAt", serialize_with = "rust_decimal::serde::str::serialize")]
	accessed_at: Decimal,
}

impl InboundAddress {
	#[must_use]
	pub const fn get_address(&self) -> &String {
		&self.address
	}

	#[must_use]
	pub const fn get_chain(&self) -> &String {
		&self.chain
	}

	#[must_use]
	pub const fn get_chain_lp_actions_paused(&self) -> &bool {
		&self.chain_lp_actions_paused
	}

	#[must_use]
	pub const fn get_chain_trading_paused(&self) -> &bool {
		&self.chain_trading_paused
	}

	#[must_use]
	pub const fn get_dust_threshold(&self) -> &Decimal {
		&self.dust_threshold
	}

	#[must_use]
	pub const fn get_gas_rate(&self) -> &Decimal {
		&self.gas_rate
	}

	#[must_use]
	pub const fn get_gas_rate_units(&self) -> &String {
		&self.gas_rate_units
	}

	#[must_use]
	pub const fn get_global_trading_paused(&self) -> &bool {
		&self.global_trading_paused
	}

	#[must_use]
	pub const fn get_halted(&self) -> &bool {
		&self.halted
	}

	#[must_use]
	pub const fn get_outbound_fee(&self) -> &Decimal {
		&self.outbound_fee
	}

	#[must_use]
	pub const fn get_outbound_tx_size(&self) -> &Decimal {
		&self.outbound_tx_size
	}

	#[must_use]
	pub const fn get_pub_key(&self) -> &String {
		&self.pub_key
	}

	#[must_use]
	pub const fn get_verified(&self) -> &bool {
		&self.verified
	}

	#[must_use]
	pub const fn get_verified_at(&self) -> &Decimal {
		&self.verified_at
	}

	#[must_use]
	pub const fn get_accessed_at(&self) -> &Decimal {
		&self.accessed_at
	}
}