-
Notifications
You must be signed in to change notification settings - Fork 44
/
messages.pb.h
423 lines (360 loc) · 11.9 KB
/
messages.pb.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
/* Automatically generated nanopb header */
/* Generated by nanopb-0.2.4 at Wed Jan 01 01:23:54 2014. */
#ifndef _PB_MESSAGES_PB_H_
#define _PB_MESSAGES_PB_H_
#include "pb.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Enum definitions */
typedef enum _Algorithm {
Algorithm_BIP32 = 0,
Algorithm_ELECTRUM = 1
} Algorithm;
/* Struct definitions */
typedef struct _ButtonAck {
uint8_t dummy_field;
} ButtonAck;
typedef struct _ButtonCancel {
uint8_t dummy_field;
} ButtonCancel;
typedef struct _ButtonRequest {
uint8_t dummy_field;
} ButtonRequest;
typedef struct _GetDeviceUUID {
uint8_t dummy_field;
} GetDeviceUUID;
typedef struct _GetMasterPublicKey {
uint8_t dummy_field;
} GetMasterPublicKey;
typedef struct _GetNumberOfAddresses {
uint8_t dummy_field;
} GetNumberOfAddresses;
typedef struct _ListWallets {
uint8_t dummy_field;
} ListWallets;
typedef struct _NewAddress {
uint8_t dummy_field;
} NewAddress;
typedef struct _OtpCancel {
uint8_t dummy_field;
} OtpCancel;
typedef struct _OtpRequest {
uint8_t dummy_field;
} OtpRequest;
typedef struct _PinCancel {
uint8_t dummy_field;
} PinCancel;
typedef struct _PinRequest {
uint8_t dummy_field;
} PinRequest;
typedef struct _Success {
uint8_t dummy_field;
} Success;
typedef struct {
size_t size;
uint8_t bytes[65];
} Address_public_key_t;
typedef struct {
size_t size;
uint8_t bytes[20];
} Address_address_t;
typedef struct _Address {
uint32_t address_handle;
Address_public_key_t public_key;
Address_address_t address;
} Address;
typedef struct _BackupWallet {
bool has_is_encrypted;
bool is_encrypted;
bool has_device;
uint32_t device;
} BackupWallet;
typedef struct _ChangeEncryptionKey {
pb_callback_t password;
} ChangeEncryptionKey;
typedef struct {
size_t size;
uint8_t bytes[40];
} ChangeWalletName_wallet_name_t;
typedef struct _ChangeWalletName {
ChangeWalletName_wallet_name_t wallet_name;
} ChangeWalletName;
typedef struct _DeleteWallet {
bool has_wallet_handle;
uint32_t wallet_handle;
} DeleteWallet;
typedef struct {
size_t size;
uint8_t bytes[16];
} DeviceUUID_device_uuid_t;
typedef struct _DeviceUUID {
DeviceUUID_device_uuid_t device_uuid;
} DeviceUUID;
typedef struct _Entropy {
pb_callback_t entropy;
} Entropy;
typedef struct _Failure {
uint32_t error_code;
pb_callback_t error_message;
} Failure;
typedef struct {
size_t size;
uint8_t bytes[64];
} Features_echoed_session_id_t;
typedef struct _Features {
Features_echoed_session_id_t echoed_session_id;
pb_callback_t vendor;
bool has_major_version;
uint32_t major_version;
bool has_minor_version;
uint32_t minor_version;
pb_callback_t config;
bool has_otp;
bool otp;
bool has_pin;
bool pin;
bool has_spv;
bool spv;
size_t algo_count;
Algorithm algo[2];
bool has_debug_link;
bool debug_link;
} Features;
typedef struct {
size_t size;
uint8_t bytes[32];
} FormatWalletArea_initial_entropy_pool_t;
typedef struct _FormatWalletArea {
FormatWalletArea_initial_entropy_pool_t initial_entropy_pool;
} FormatWalletArea;
typedef struct _GetAddressAndPublicKey {
uint32_t address_handle;
} GetAddressAndPublicKey;
typedef struct _GetEntropy {
uint32_t number_of_bytes;
} GetEntropy;
typedef struct {
size_t size;
uint8_t bytes[64];
} Initialize_session_id_t;
typedef struct _Initialize {
Initialize_session_id_t session_id;
} Initialize;
typedef struct _LoadWallet {
bool has_wallet_number;
uint32_t wallet_number;
} LoadWallet;
typedef struct {
size_t size;
uint8_t bytes[65];
} MasterPublicKey_public_key_t;
typedef struct {
size_t size;
uint8_t bytes[32];
} MasterPublicKey_chain_code_t;
typedef struct _MasterPublicKey {
MasterPublicKey_public_key_t public_key;
MasterPublicKey_chain_code_t chain_code;
} MasterPublicKey;
typedef struct {
size_t size;
uint8_t bytes[40];
} NewWallet_wallet_name_t;
typedef struct _NewWallet {
bool has_wallet_number;
uint32_t wallet_number;
pb_callback_t password;
bool has_wallet_name;
NewWallet_wallet_name_t wallet_name;
bool has_is_hidden;
bool is_hidden;
} NewWallet;
typedef struct _NumberOfAddresses {
uint32_t number_of_addresses;
} NumberOfAddresses;
typedef struct _OtpAck {
char otp[16];
} OtpAck;
typedef struct _PinAck {
pb_callback_t password;
} PinAck;
typedef struct _Ping {
bool has_greeting;
char greeting[64];
} Ping;
typedef struct {
size_t size;
uint8_t bytes[64];
} PingResponse_echoed_session_id_t;
typedef struct _PingResponse {
bool has_echoed_greeting;
char echoed_greeting[64];
PingResponse_echoed_session_id_t echoed_session_id;
} PingResponse;
typedef struct _SignTransaction {
uint32_t address_handle;
pb_callback_t transaction_data;
} SignTransaction;
typedef struct {
size_t size;
uint8_t bytes[73];
} Signature_signature_data_t;
typedef struct _Signature {
Signature_signature_data_t signature_data;
} Signature;
typedef struct {
size_t size;
uint8_t bytes[40];
} WalletInfo_wallet_name_t;
typedef struct {
size_t size;
uint8_t bytes[16];
} WalletInfo_wallet_uuid_t;
typedef struct _WalletInfo {
uint32_t wallet_number;
WalletInfo_wallet_name_t wallet_name;
WalletInfo_wallet_uuid_t wallet_uuid;
} WalletInfo;
typedef struct _Wallets {
pb_callback_t wallet_info;
} Wallets;
typedef struct {
size_t size;
uint8_t bytes[64];
} RestoreWallet_seed_t;
typedef struct _RestoreWallet {
NewWallet new_wallet;
RestoreWallet_seed_t seed;
} RestoreWallet;
/* Default values for struct fields */
extern const uint32_t DeleteWallet_wallet_handle_default;
extern const uint32_t NewWallet_wallet_number_default;
extern const bool NewWallet_is_hidden_default;
extern const uint32_t LoadWallet_wallet_number_default;
extern const bool BackupWallet_is_encrypted_default;
extern const uint32_t BackupWallet_device_default;
/* Field tags (for use in manual encoding/decoding) */
#define Address_address_handle_tag 1
#define Address_public_key_tag 2
#define Address_address_tag 3
#define BackupWallet_is_encrypted_tag 1
#define BackupWallet_device_tag 2
#define ChangeEncryptionKey_password_tag 1
#define ChangeWalletName_wallet_name_tag 1
#define DeleteWallet_wallet_handle_tag 1
#define DeviceUUID_device_uuid_tag 1
#define Entropy_entropy_tag 1
#define Failure_error_code_tag 1
#define Failure_error_message_tag 2
#define Features_echoed_session_id_tag 1
#define Features_vendor_tag 2
#define Features_major_version_tag 3
#define Features_minor_version_tag 4
#define Features_config_tag 5
#define Features_otp_tag 6
#define Features_pin_tag 7
#define Features_spv_tag 8
#define Features_algo_tag 9
#define Features_debug_link_tag 10
#define FormatWalletArea_initial_entropy_pool_tag 1
#define GetAddressAndPublicKey_address_handle_tag 1
#define GetEntropy_number_of_bytes_tag 1
#define Initialize_session_id_tag 1
#define LoadWallet_wallet_number_tag 1
#define MasterPublicKey_public_key_tag 1
#define MasterPublicKey_chain_code_tag 2
#define NewWallet_wallet_number_tag 1
#define NewWallet_password_tag 2
#define NewWallet_wallet_name_tag 3
#define NewWallet_is_hidden_tag 4
#define NumberOfAddresses_number_of_addresses_tag 1
#define OtpAck_otp_tag 1
#define PinAck_password_tag 1
#define Ping_greeting_tag 1
#define PingResponse_echoed_greeting_tag 1
#define PingResponse_echoed_session_id_tag 2
#define SignTransaction_address_handle_tag 1
#define SignTransaction_transaction_data_tag 2
#define Signature_signature_data_tag 1
#define WalletInfo_wallet_number_tag 1
#define WalletInfo_wallet_name_tag 2
#define WalletInfo_wallet_uuid_tag 3
#define Wallets_wallet_info_tag 1
#define RestoreWallet_new_wallet_tag 1
#define RestoreWallet_seed_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t Initialize_fields[2];
extern const pb_field_t Features_fields[11];
extern const pb_field_t Ping_fields[2];
extern const pb_field_t PingResponse_fields[3];
extern const pb_field_t Success_fields[1];
extern const pb_field_t Failure_fields[3];
extern const pb_field_t ButtonRequest_fields[1];
extern const pb_field_t ButtonAck_fields[1];
extern const pb_field_t ButtonCancel_fields[1];
extern const pb_field_t PinRequest_fields[1];
extern const pb_field_t PinAck_fields[2];
extern const pb_field_t PinCancel_fields[1];
extern const pb_field_t OtpRequest_fields[1];
extern const pb_field_t OtpAck_fields[2];
extern const pb_field_t OtpCancel_fields[1];
extern const pb_field_t DeleteWallet_fields[2];
extern const pb_field_t NewWallet_fields[5];
extern const pb_field_t NewAddress_fields[1];
extern const pb_field_t Address_fields[4];
extern const pb_field_t GetNumberOfAddresses_fields[1];
extern const pb_field_t NumberOfAddresses_fields[2];
extern const pb_field_t GetAddressAndPublicKey_fields[2];
extern const pb_field_t SignTransaction_fields[3];
extern const pb_field_t Signature_fields[2];
extern const pb_field_t LoadWallet_fields[2];
extern const pb_field_t FormatWalletArea_fields[2];
extern const pb_field_t ChangeEncryptionKey_fields[2];
extern const pb_field_t ChangeWalletName_fields[2];
extern const pb_field_t ListWallets_fields[1];
extern const pb_field_t WalletInfo_fields[4];
extern const pb_field_t Wallets_fields[2];
extern const pb_field_t BackupWallet_fields[3];
extern const pb_field_t RestoreWallet_fields[3];
extern const pb_field_t GetDeviceUUID_fields[1];
extern const pb_field_t DeviceUUID_fields[2];
extern const pb_field_t GetEntropy_fields[2];
extern const pb_field_t Entropy_fields[2];
extern const pb_field_t GetMasterPublicKey_fields[1];
extern const pb_field_t MasterPublicKey_fields[3];
/* Maximum encoded size of messages (where known) */
#define Initialize_size 66
#define Ping_size 66
#define PingResponse_size 132
#define Success_size 0
#define ButtonRequest_size 0
#define ButtonAck_size 0
#define ButtonCancel_size 0
#define PinRequest_size 0
#define PinCancel_size 0
#define OtpRequest_size 0
#define OtpAck_size 18
#define OtpCancel_size 0
#define DeleteWallet_size 6
#define NewAddress_size 0
#define Address_size 95
#define GetNumberOfAddresses_size 0
#define NumberOfAddresses_size 6
#define GetAddressAndPublicKey_size 6
#define Signature_size 75
#define LoadWallet_size 6
#define FormatWalletArea_size 34
#define ChangeWalletName_size 42
#define ListWallets_size 0
#define WalletInfo_size 66
#define BackupWallet_size 8
#define GetDeviceUUID_size 0
#define DeviceUUID_size 18
#define GetEntropy_size 6
#define GetMasterPublicKey_size 0
#define MasterPublicKey_size 101
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif