1use crate::utils;
2use serde::Deserialize;
3
4#[derive(Deserialize, Debug, Clone)]
5pub struct Pool {
6 pub pool_id_bech32: String,
7 pub ticker: String,
8}
9
10#[derive(Deserialize, Debug, Clone)]
11pub struct RegisteredPools {
12 pub data: Vec<Pool>,
13 pub last_updated: utils::LastUpdated,
14 pub next_cursor: Option<String>,
15}
16
17#[derive(Deserialize, Debug, Clone)]
18pub struct Block {
19 pub abs_slot: i64,
20 pub block_hash: String,
21 pub block_height: i64,
22 pub block_time: i64,
23 pub epoch_no: i64,
24 pub epoch_slot: i64,
25}
26
27#[derive(Deserialize, Debug, Clone)]
28pub struct PoolMintedBlocks {
29 pub data: Vec<Block>,
30 pub last_updated: utils::LastUpdated,
31 pub next_cursor: Option<String>,
32}
33
34#[derive(Deserialize, Debug, Clone)]
35pub struct StakePoolDelegator {
36 pub amount: String,
37 pub latest_delegation_tx_hash: String,
38 pub stake_address: String,
39}
40
41#[derive(Deserialize, Debug, Clone)]
42pub struct StakePoolDelegators {
43 pub data: Vec<StakePoolDelegator>,
44 pub last_updated: utils::LastUpdated,
45 pub next_cursor: Option<String>,
46}
47
48#[derive(Deserialize, Debug, Clone)]
49pub struct StakePoolHistoryData {
50 pub active_stake: i64,
51 pub active_stake_pct: Option<String>,
52 pub block_cnt: i64,
53 pub deleg_rewards: i64,
54 pub delegator_cnt: i64,
55 pub epoch_no: i64,
56 pub epoch_ros: String,
57 pub fixed_cost: i64,
58 pub margin: serde_json::Value,
59 pub pool_fees: i64,
60 pub saturation_pct: serde_json::Value,
61}
62
63#[derive(Deserialize, Debug, Clone)]
64pub struct StakePoolHistory {
65 pub data: Vec<StakePoolHistoryData>,
66 pub last_updated: utils::LastUpdated,
67 pub next_cursor: Option<String>,
68}
69
70#[derive(Deserialize, Debug, Clone)]
71pub struct Relay {
72 pub dns: String,
73 pub ipv4: String,
74 pub ipv6: String,
75 pub port: i64,
76 pub srv: String,
77}
78
79#[derive(Deserialize, Debug, Clone)]
80pub struct StakePoolDetails {
81 pub active_stake: i64,
82 pub block_count: i64,
83 pub fixed_cost: i64,
84 pub live_delegators: i64,
85 pub live_pledge: i64,
86 pub live_saturation: String,
87 pub live_stake: i64,
88 pub margin: i64,
89 pub meta_hash: serde_json::Value,
90 pub meta_json: serde_json::Value,
91 pub meta_url: serde_json::Value,
92 pub op_cert: String,
93 pub op_cert_counter: i64,
94 pub owners: Vec<String>,
95 pub pledge: i64,
96 pub pool_id_bech32: String,
97 pub pool_id_hex: String,
98 pub pool_status: String,
99 pub relays: Vec<Relay>,
100 pub retiring_epoch: serde_json::Value,
101 pub reward_addr: String,
102 pub sigma: String,
103 pub vrf_key_hash: String,
104}
105
106#[derive(Deserialize, Debug, Clone)]
107pub struct StakePoolInformation {
108 pub data: StakePoolDetails,
109 pub last_updated: utils::LastUpdated,
110}
111
112#[derive(Deserialize, Debug, Clone)]
113pub struct Poolmetadata {
114 pub meta_hash: String,
115 pub meta_json: serde_json::Value,
116 pub meta_url: String,
117 pub pool_id_bech32: String,
118}
119
120#[derive(Deserialize, Debug, Clone)]
121pub struct StakePoolMetadata {
122 pub data: Poolmetadata,
123 pub last_updated: utils::LastUpdated,
124}
125
126#[derive(Deserialize, Debug, Clone)]
127pub struct RelaysAndId {
128 pub pool_id_bech32: String,
129 pub relays: Vec<Relay>,
130}
131
132#[derive(Deserialize, Debug, Clone)]
133pub struct StakePoolRelays {
134 pub data: Vec<RelaysAndId>,
135 pub last_updated: utils::LastUpdated,
136}
137
138#[derive(Deserialize, Debug, Clone)]
139pub struct StakePoolUpdates {
140 pub data: Vec<StakePoolDetails>,
141 pub last_updated: utils::LastUpdated,
142}
143
144#[derive(Deserialize, Debug, Clone)]
145pub struct StakePoolDelegatorHistoryData {
146 pub amount: String,
147 pub stake_address: String,
148}
149
150#[derive(Deserialize, Debug, Clone)]
151pub struct StakePoolDelegatorHistory {
152 pub data: Vec<StakePoolDelegatorHistoryData>,
153 pub last_updated: utils::LastUpdated,
154 pub next_cursor: Option<String>,
155}