Skip to main content

helium_api/models/transactions/
poc_receipts_v1.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Serialize, Deserialize, Debug)]
4pub struct PocReceiptsV1 {
5    pub hash: String,
6    pub challenger: String,
7    pub fee: u64,
8    pub onion_key_hash: String,
9    pub path: Vec<PathElement>,
10    pub request_block_hash: String,
11    pub secret: String,
12}
13
14#[derive(Clone, Serialize, Deserialize, Debug)]
15pub struct PathElement {
16    pub challengee: String,
17    pub receipt: Option<Receipt>,
18    pub witnesses: Vec<Witness>,
19}
20
21#[derive(Clone, Serialize, Deserialize, Debug)]
22pub struct Receipt {
23    pub channel: u8,
24    pub data: String,
25    pub datarate: Option<String>,
26    pub frequency: f64,
27    pub gateway: String,
28    pub origin: String,
29    pub signal: i64,
30    pub snr: f64,
31    pub timestamp: u64,
32}
33
34#[derive(Clone, Serialize, Deserialize, Debug)]
35pub struct Witness {
36    pub channel: u8,
37    pub datarate: String,
38    pub frequency: f64,
39    pub gateway: String,
40    pub is_valid: Option<bool>,
41    pub packet_hash: String,
42    pub signal: i64,
43    pub snr: f64,
44    pub timestamp: u64,
45}