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
/*
* Indexer
*
* Algorand ledger analytics API.
*
* The version of the OpenAPI document: 2.0
*
* Generated by: https://openapi-generator.tech
*/
use algonaut_encoding::Bytes;
/// TransactionHeartbeat : Fields for a heartbeat transaction. Definition: data/transactions/heartbeat.go : HeartbeatTxnFields
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct TransactionHeartbeat {
/// \\[hbad\\] HbAddress is the account this txn is proving onlineness for.
#[serde(rename = "hb-address")]
pub hb_address: String,
/// \\[hbkd\\] HbKeyDilution must match HbAddress account's current KeyDilution.
#[serde(rename = "hb-key-dilution")]
pub hb_key_dilution: u64,
#[serde(rename = "hb-proof")]
pub hb_proof: Box<crate::models::HbProofFields>,
/// \\[hbsd\\] HbSeed must be the block seed for the this transaction's firstValid block.
#[serde(rename = "hb-seed")]
pub hb_seed: Bytes,
/// \\[hbvid\\] HbVoteID must match the HbAddress account's current VoteID.
#[serde(rename = "hb-vote-id")]
pub hb_vote_id: Bytes,
}
impl TransactionHeartbeat {
/// Fields for a heartbeat transaction. Definition: data/transactions/heartbeat.go : HeartbeatTxnFields
pub fn new(
hb_address: String,
hb_key_dilution: u64,
hb_proof: crate::models::HbProofFields,
hb_seed: Bytes,
hb_vote_id: Bytes,
) -> TransactionHeartbeat {
TransactionHeartbeat {
hb_address,
hb_key_dilution,
hb_proof: Box::new(hb_proof),
hb_seed,
hb_vote_id,
}
}
}