forked from algoduino/algoduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlgoduinoTypes.h
150 lines (139 loc) · 2.32 KB
/
AlgoduinoTypes.h
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
146
147
148
149
150
/**
* AlgoduinoTypes.h - Algorand IoT library for Arduino
* Copyright (c) 2020 Algoduino. All right reserved.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#ifndef AlgoduinoTypes_h
#define AlgoduinoTypes_h
#include "Arduino.h"
/**
* Algorand network enum.
*/
enum Network
{
BETANET = 0,
TESTNET,
MAINNET
};
/**
* AccountInformation struct.
*/
struct AccountInformation
{
long round;
String address;
long long amount;
long long pendingrewards;
long long amountwithoutpendingrewards;
long long rewards;
String status;
struct Participation
{
String partpkb64;
String vrfpkb64;
long votefst;
long votelst;
int votekd;
};
Participation participation;
};
/**
* AssetInformation struct.
*/
struct AssetInformation
{
String creator;
long long total;
int decimals;
bool defaultfrozen;
String unitname;
String assetname;
String url;
String managerkey;
String reserveaddr;
String freezeaddr;
String clawbackaddr;
};
/**
* LedgerSupply struct.
*/
struct LedgerSupply
{
long round;
long long totalMoney;
long long onlineMoney;
};
/**
* Status struct.
*/
struct Status
{
long lastRound;
String lastConsensusVersion;
String nextConsensusVersion;
long nextConsensusVersionRound;
bool nextConsensusVersionSupported;
long long timeSinceLastRound;
int catchupTime;
bool hasSyncedSinceStartup;
bool stoppedAtUnsupportedRound;
};
/**
* TransactionInformation struct.
*/
struct TransactionInformation
{
String type;
String tx;
String from;
int fee;
long first_round;
long last_round;
String noteb64;
long round;
struct Curxfer
{
long id;
int amt;
String snd;
String rcv;
String closeto;
};
Curxfer curxfer;
int fromrewards;
String genesisID;
String genesishashb64;
};
/**
* TransactionParams struct.
*/
struct TransactionParams
{
int fee;
String genesisID;
String genesishashb64;
long lastRound;
String consensusVersion;
int minFee;
};
/**
* Version struct.
*/
struct Version
{
String versions;
String genesis_id;
String genesis_hash_b64;
struct Build
{
int major;
int minor;
int build_number;
String commit_hash;
String branch;
String channel;
};
Build build;
};
#endif