midgard_rs/types/
action_in.rs

1use serde::{Deserialize, Serialize};
2
3use crate::AssetAmounts;
4
5/*
6
7*** Action In Scheme ***
8{
9		"address": "0x4a23b94bed76c773b32136967661539ae851b6bf",
10		"coins": AssetAmounts,
11		"txID": "B7125A01993899E2981E3232FE37BAD9214B7570DECC85D6A96C6D992059FA84"
12}
13
14*/
15
16#[derive(Debug, Serialize, Deserialize, Clone, Default)]
17pub struct ActionIn {
18	address: String,
19
20	coins: AssetAmounts,
21
22	#[serde(rename = "txID")]
23	tx_id: String,
24}
25
26impl ActionIn {
27	#[must_use]
28	pub const fn get_address(&self) -> &String {
29		&self.address
30	}
31
32	#[must_use]
33	pub const fn get_coins(&self) -> &AssetAmounts {
34		&self.coins
35	}
36
37	#[must_use]
38	pub const fn get_tx_id(&self) -> &String {
39		&self.tx_id
40	}
41}