2014-04-29 12:26:51 +00:00
|
|
|
/* Automatically generated nanopb header */
|
2016-08-29 10:59:29 +00:00
|
|
|
/* Generated by nanopb-0.2.9.3 */
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
#ifndef _PB_MESSAGES_PB_H_
|
|
|
|
#define _PB_MESSAGES_PB_H_
|
2014-04-29 12:26:51 +00:00
|
|
|
#include "pb.h"
|
|
|
|
#include "types.pb.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Enum definitions */
|
|
|
|
typedef enum _MessageType {
|
|
|
|
MessageType_MessageType_Initialize = 0,
|
|
|
|
MessageType_MessageType_Ping = 1,
|
|
|
|
MessageType_MessageType_Success = 2,
|
|
|
|
MessageType_MessageType_Failure = 3,
|
|
|
|
MessageType_MessageType_ChangePin = 4,
|
|
|
|
MessageType_MessageType_WipeDevice = 5,
|
|
|
|
MessageType_MessageType_FirmwareErase = 6,
|
|
|
|
MessageType_MessageType_FirmwareUpload = 7,
|
2017-04-21 10:55:14 +00:00
|
|
|
MessageType_MessageType_FirmwareRequest = 8,
|
2014-04-29 12:26:51 +00:00
|
|
|
MessageType_MessageType_GetEntropy = 9,
|
|
|
|
MessageType_MessageType_Entropy = 10,
|
|
|
|
MessageType_MessageType_GetPublicKey = 11,
|
|
|
|
MessageType_MessageType_PublicKey = 12,
|
|
|
|
MessageType_MessageType_LoadDevice = 13,
|
|
|
|
MessageType_MessageType_ResetDevice = 14,
|
|
|
|
MessageType_MessageType_SignTx = 15,
|
|
|
|
MessageType_MessageType_SimpleSignTx = 16,
|
|
|
|
MessageType_MessageType_Features = 17,
|
|
|
|
MessageType_MessageType_PinMatrixRequest = 18,
|
|
|
|
MessageType_MessageType_PinMatrixAck = 19,
|
|
|
|
MessageType_MessageType_Cancel = 20,
|
|
|
|
MessageType_MessageType_TxRequest = 21,
|
|
|
|
MessageType_MessageType_TxAck = 22,
|
2014-06-06 00:37:58 +00:00
|
|
|
MessageType_MessageType_CipherKeyValue = 23,
|
2014-06-17 14:03:07 +00:00
|
|
|
MessageType_MessageType_ClearSession = 24,
|
2014-04-29 12:26:51 +00:00
|
|
|
MessageType_MessageType_ApplySettings = 25,
|
|
|
|
MessageType_MessageType_ButtonRequest = 26,
|
|
|
|
MessageType_MessageType_ButtonAck = 27,
|
|
|
|
MessageType_MessageType_GetAddress = 29,
|
|
|
|
MessageType_MessageType_Address = 30,
|
|
|
|
MessageType_MessageType_EntropyRequest = 35,
|
|
|
|
MessageType_MessageType_EntropyAck = 36,
|
|
|
|
MessageType_MessageType_SignMessage = 38,
|
|
|
|
MessageType_MessageType_VerifyMessage = 39,
|
|
|
|
MessageType_MessageType_MessageSignature = 40,
|
|
|
|
MessageType_MessageType_PassphraseRequest = 41,
|
|
|
|
MessageType_MessageType_PassphraseAck = 42,
|
|
|
|
MessageType_MessageType_EstimateTxSize = 43,
|
|
|
|
MessageType_MessageType_TxSize = 44,
|
|
|
|
MessageType_MessageType_RecoveryDevice = 45,
|
|
|
|
MessageType_MessageType_WordRequest = 46,
|
|
|
|
MessageType_MessageType_WordAck = 47,
|
2015-02-20 18:01:45 +00:00
|
|
|
MessageType_MessageType_CipheredKeyValue = 48,
|
|
|
|
MessageType_MessageType_EncryptMessage = 49,
|
|
|
|
MessageType_MessageType_EncryptedMessage = 50,
|
|
|
|
MessageType_MessageType_DecryptMessage = 51,
|
|
|
|
MessageType_MessageType_DecryptedMessage = 52,
|
|
|
|
MessageType_MessageType_SignIdentity = 53,
|
|
|
|
MessageType_MessageType_SignedIdentity = 54,
|
2015-03-30 13:47:03 +00:00
|
|
|
MessageType_MessageType_GetFeatures = 55,
|
2016-06-11 19:20:38 +00:00
|
|
|
MessageType_MessageType_EthereumGetAddress = 56,
|
|
|
|
MessageType_MessageType_EthereumAddress = 57,
|
|
|
|
MessageType_MessageType_EthereumSignTx = 58,
|
|
|
|
MessageType_MessageType_EthereumTxRequest = 59,
|
|
|
|
MessageType_MessageType_EthereumTxAck = 60,
|
|
|
|
MessageType_MessageType_GetECDHSessionKey = 61,
|
|
|
|
MessageType_MessageType_ECDHSessionKey = 62,
|
2016-06-12 21:39:28 +00:00
|
|
|
MessageType_MessageType_SetU2FCounter = 63,
|
2014-04-29 12:26:51 +00:00
|
|
|
MessageType_MessageType_DebugLinkDecision = 100,
|
|
|
|
MessageType_MessageType_DebugLinkGetState = 101,
|
|
|
|
MessageType_MessageType_DebugLinkState = 102,
|
|
|
|
MessageType_MessageType_DebugLinkStop = 103,
|
2016-05-26 18:27:40 +00:00
|
|
|
MessageType_MessageType_DebugLinkLog = 104,
|
|
|
|
MessageType_MessageType_DebugLinkMemoryRead = 110,
|
|
|
|
MessageType_MessageType_DebugLinkMemory = 111,
|
|
|
|
MessageType_MessageType_DebugLinkMemoryWrite = 112,
|
|
|
|
MessageType_MessageType_DebugLinkFlashErase = 113
|
2014-04-29 12:26:51 +00:00
|
|
|
} MessageType;
|
|
|
|
|
|
|
|
/* Struct definitions */
|
|
|
|
typedef struct _ButtonAck {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} ButtonAck;
|
|
|
|
|
|
|
|
typedef struct _Cancel {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} Cancel;
|
|
|
|
|
2014-06-17 14:03:07 +00:00
|
|
|
typedef struct _ClearSession {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} ClearSession;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _DebugLinkGetState {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} DebugLinkGetState;
|
|
|
|
|
|
|
|
typedef struct _DebugLinkStop {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} DebugLinkStop;
|
|
|
|
|
|
|
|
typedef struct _EntropyRequest {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} EntropyRequest;
|
|
|
|
|
|
|
|
typedef struct _FirmwareErase {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} FirmwareErase;
|
|
|
|
|
2015-03-30 13:47:03 +00:00
|
|
|
typedef struct _GetFeatures {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} GetFeatures;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _Initialize {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} Initialize;
|
|
|
|
|
|
|
|
typedef struct _PassphraseRequest {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} PassphraseRequest;
|
|
|
|
|
|
|
|
typedef struct _WipeDevice {
|
|
|
|
uint8_t dummy_field;
|
|
|
|
} WipeDevice;
|
|
|
|
|
|
|
|
typedef struct _Address {
|
2016-10-16 00:06:49 +00:00
|
|
|
char address[41];
|
2014-04-29 12:26:51 +00:00
|
|
|
} Address;
|
|
|
|
|
2015-02-04 20:27:07 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} ApplySettings_homescreen_t;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _ApplySettings {
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
2014-12-13 18:29:27 +00:00
|
|
|
bool has_use_passphrase;
|
|
|
|
bool use_passphrase;
|
2015-02-04 20:27:07 +00:00
|
|
|
bool has_homescreen;
|
|
|
|
ApplySettings_homescreen_t homescreen;
|
2014-04-29 12:26:51 +00:00
|
|
|
} ApplySettings;
|
|
|
|
|
|
|
|
typedef struct _ButtonRequest {
|
|
|
|
bool has_code;
|
|
|
|
ButtonRequestType code;
|
|
|
|
bool has_data;
|
|
|
|
char data[256];
|
|
|
|
} ButtonRequest;
|
|
|
|
|
|
|
|
typedef struct _ChangePin {
|
|
|
|
bool has_remove;
|
|
|
|
bool remove;
|
|
|
|
} ChangePin;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} CipherKeyValue_value_t;
|
2014-06-06 00:37:58 +00:00
|
|
|
|
2015-06-29 14:36:50 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[16];
|
|
|
|
} CipherKeyValue_iv_t;
|
|
|
|
|
2014-06-06 00:37:58 +00:00
|
|
|
typedef struct _CipherKeyValue {
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-06-06 00:37:58 +00:00
|
|
|
uint32_t address_n[8];
|
|
|
|
bool has_key;
|
|
|
|
char key[256];
|
|
|
|
bool has_value;
|
|
|
|
CipherKeyValue_value_t value;
|
|
|
|
bool has_encrypt;
|
|
|
|
bool encrypt;
|
|
|
|
bool has_ask_on_encrypt;
|
|
|
|
bool ask_on_encrypt;
|
|
|
|
bool has_ask_on_decrypt;
|
|
|
|
bool ask_on_decrypt;
|
2015-06-29 14:36:50 +00:00
|
|
|
bool has_iv;
|
|
|
|
CipherKeyValue_iv_t iv;
|
2014-06-06 00:37:58 +00:00
|
|
|
} CipherKeyValue;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} CipheredKeyValue_value_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
|
|
|
typedef struct _CipheredKeyValue {
|
|
|
|
bool has_value;
|
|
|
|
CipheredKeyValue_value_t value;
|
|
|
|
} CipheredKeyValue;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _DebugLinkDecision {
|
|
|
|
bool yes_no;
|
|
|
|
} DebugLinkDecision;
|
|
|
|
|
2016-05-26 18:27:40 +00:00
|
|
|
typedef struct _DebugLinkFlashErase {
|
|
|
|
bool has_sector;
|
|
|
|
uint32_t sector;
|
|
|
|
} DebugLinkFlashErase;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _DebugLinkLog {
|
|
|
|
bool has_level;
|
|
|
|
uint32_t level;
|
|
|
|
bool has_bucket;
|
|
|
|
char bucket[33];
|
|
|
|
bool has_text;
|
|
|
|
char text[256];
|
|
|
|
} DebugLinkLog;
|
|
|
|
|
2016-05-26 18:27:40 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} DebugLinkMemory_memory_t;
|
|
|
|
|
|
|
|
typedef struct _DebugLinkMemory {
|
|
|
|
bool has_memory;
|
|
|
|
DebugLinkMemory_memory_t memory;
|
|
|
|
} DebugLinkMemory;
|
|
|
|
|
|
|
|
typedef struct _DebugLinkMemoryRead {
|
|
|
|
bool has_address;
|
|
|
|
uint32_t address;
|
|
|
|
bool has_length;
|
|
|
|
uint32_t length;
|
|
|
|
} DebugLinkMemoryRead;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} DebugLinkMemoryWrite_memory_t;
|
|
|
|
|
|
|
|
typedef struct _DebugLinkMemoryWrite {
|
|
|
|
bool has_address;
|
|
|
|
uint32_t address;
|
|
|
|
bool has_memory;
|
|
|
|
DebugLinkMemoryWrite_memory_t memory;
|
|
|
|
bool has_flash;
|
|
|
|
bool flash;
|
|
|
|
} DebugLinkMemoryWrite;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} DebugLinkState_layout_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[128];
|
|
|
|
} DebugLinkState_reset_entropy_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _DebugLinkState {
|
|
|
|
bool has_layout;
|
|
|
|
DebugLinkState_layout_t layout;
|
|
|
|
bool has_pin;
|
|
|
|
char pin[10];
|
|
|
|
bool has_matrix;
|
|
|
|
char matrix[10];
|
|
|
|
bool has_mnemonic;
|
|
|
|
char mnemonic[241];
|
|
|
|
bool has_node;
|
|
|
|
HDNodeType node;
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_reset_word;
|
|
|
|
char reset_word[12];
|
|
|
|
bool has_reset_entropy;
|
|
|
|
DebugLinkState_reset_entropy_t reset_entropy;
|
|
|
|
bool has_recovery_fake_word;
|
|
|
|
char recovery_fake_word[12];
|
|
|
|
bool has_recovery_word_pos;
|
|
|
|
uint32_t recovery_word_pos;
|
|
|
|
} DebugLinkState;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[33];
|
|
|
|
} DecryptMessage_nonce_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1120];
|
|
|
|
} DecryptMessage_message_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[8];
|
|
|
|
} DecryptMessage_hmac_t;
|
2014-10-22 17:53:25 +00:00
|
|
|
|
2014-06-17 14:03:07 +00:00
|
|
|
typedef struct _DecryptMessage {
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-10-22 17:53:25 +00:00
|
|
|
uint32_t address_n[8];
|
2014-11-12 18:17:14 +00:00
|
|
|
bool has_nonce;
|
|
|
|
DecryptMessage_nonce_t nonce;
|
2014-10-22 17:53:25 +00:00
|
|
|
bool has_message;
|
|
|
|
DecryptMessage_message_t message;
|
2014-11-12 18:17:14 +00:00
|
|
|
bool has_hmac;
|
|
|
|
DecryptMessage_hmac_t hmac;
|
2014-06-17 14:03:07 +00:00
|
|
|
} DecryptMessage;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} DecryptedMessage_message_t;
|
2014-10-22 17:53:25 +00:00
|
|
|
|
2014-11-12 18:17:14 +00:00
|
|
|
typedef struct _DecryptedMessage {
|
|
|
|
bool has_message;
|
|
|
|
DecryptedMessage_message_t message;
|
|
|
|
bool has_address;
|
2016-10-16 00:06:49 +00:00
|
|
|
char address[41];
|
2014-11-12 18:17:14 +00:00
|
|
|
} DecryptedMessage;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[65];
|
|
|
|
} ECDHSessionKey_session_key_t;
|
|
|
|
|
|
|
|
typedef struct _ECDHSessionKey {
|
|
|
|
bool has_session_key;
|
|
|
|
ECDHSessionKey_session_key_t session_key;
|
|
|
|
} ECDHSessionKey;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[33];
|
|
|
|
} EncryptMessage_pubkey_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} EncryptMessage_message_t;
|
2014-10-22 17:53:25 +00:00
|
|
|
|
2014-06-17 14:03:07 +00:00
|
|
|
typedef struct _EncryptMessage {
|
2014-10-22 17:53:25 +00:00
|
|
|
bool has_pubkey;
|
|
|
|
EncryptMessage_pubkey_t pubkey;
|
|
|
|
bool has_message;
|
|
|
|
EncryptMessage_message_t message;
|
2014-06-17 14:03:07 +00:00
|
|
|
bool has_display_only;
|
|
|
|
bool display_only;
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-10-22 17:53:25 +00:00
|
|
|
uint32_t address_n[8];
|
2014-10-29 23:51:28 +00:00
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
2014-06-17 14:03:07 +00:00
|
|
|
} EncryptMessage;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[33];
|
|
|
|
} EncryptedMessage_nonce_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1120];
|
|
|
|
} EncryptedMessage_message_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[8];
|
|
|
|
} EncryptedMessage_hmac_t;
|
2014-11-12 18:17:14 +00:00
|
|
|
|
|
|
|
typedef struct _EncryptedMessage {
|
|
|
|
bool has_nonce;
|
|
|
|
EncryptedMessage_nonce_t nonce;
|
|
|
|
bool has_message;
|
|
|
|
EncryptedMessage_message_t message;
|
|
|
|
bool has_hmac;
|
|
|
|
EncryptedMessage_hmac_t hmac;
|
|
|
|
} EncryptedMessage;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} Entropy_entropy_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _Entropy {
|
|
|
|
Entropy_entropy_t entropy;
|
|
|
|
} Entropy;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[128];
|
|
|
|
} EntropyAck_entropy_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _EntropyAck {
|
|
|
|
bool has_entropy;
|
|
|
|
EntropyAck_entropy_t entropy;
|
|
|
|
} EntropyAck;
|
|
|
|
|
|
|
|
typedef struct _EstimateTxSize {
|
|
|
|
uint32_t outputs_count;
|
|
|
|
uint32_t inputs_count;
|
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
|
|
|
} EstimateTxSize;
|
|
|
|
|
2016-06-12 20:53:28 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[20];
|
|
|
|
} EthereumAddress_address_t;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct _EthereumAddress {
|
2016-06-12 20:53:28 +00:00
|
|
|
EthereumAddress_address_t address;
|
2016-06-11 19:20:38 +00:00
|
|
|
} EthereumAddress;
|
|
|
|
|
|
|
|
typedef struct _EthereumGetAddress {
|
2016-06-12 20:53:28 +00:00
|
|
|
size_t address_n_count;
|
|
|
|
uint32_t address_n[8];
|
2016-06-11 19:20:38 +00:00
|
|
|
bool has_show_display;
|
|
|
|
bool show_display;
|
|
|
|
} EthereumGetAddress;
|
|
|
|
|
2016-06-12 20:53:28 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumSignTx_nonce_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumSignTx_gas_price_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumSignTx_gas_limit_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[20];
|
|
|
|
} EthereumSignTx_to_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumSignTx_value_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} EthereumSignTx_data_initial_chunk_t;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct _EthereumSignTx {
|
2016-06-12 20:53:28 +00:00
|
|
|
size_t address_n_count;
|
|
|
|
uint32_t address_n[8];
|
|
|
|
bool has_nonce;
|
|
|
|
EthereumSignTx_nonce_t nonce;
|
|
|
|
bool has_gas_price;
|
|
|
|
EthereumSignTx_gas_price_t gas_price;
|
|
|
|
bool has_gas_limit;
|
|
|
|
EthereumSignTx_gas_limit_t gas_limit;
|
|
|
|
bool has_to;
|
|
|
|
EthereumSignTx_to_t to;
|
|
|
|
bool has_value;
|
|
|
|
EthereumSignTx_value_t value;
|
|
|
|
bool has_data_initial_chunk;
|
|
|
|
EthereumSignTx_data_initial_chunk_t data_initial_chunk;
|
2016-06-11 19:20:38 +00:00
|
|
|
bool has_data_length;
|
|
|
|
uint32_t data_length;
|
2017-01-22 16:52:33 +00:00
|
|
|
bool has_chain_id;
|
|
|
|
uint32_t chain_id;
|
2016-06-11 19:20:38 +00:00
|
|
|
} EthereumSignTx;
|
|
|
|
|
2016-06-12 20:53:28 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} EthereumTxAck_data_chunk_t;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct _EthereumTxAck {
|
2016-06-12 20:53:28 +00:00
|
|
|
bool has_data_chunk;
|
|
|
|
EthereumTxAck_data_chunk_t data_chunk;
|
2016-06-11 19:20:38 +00:00
|
|
|
} EthereumTxAck;
|
|
|
|
|
2016-06-12 20:53:28 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumTxRequest_signature_r_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} EthereumTxRequest_signature_s_t;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct _EthereumTxRequest {
|
|
|
|
bool has_data_length;
|
|
|
|
uint32_t data_length;
|
|
|
|
bool has_signature_v;
|
|
|
|
uint32_t signature_v;
|
2016-06-12 20:53:28 +00:00
|
|
|
bool has_signature_r;
|
|
|
|
EthereumTxRequest_signature_r_t signature_r;
|
|
|
|
bool has_signature_s;
|
|
|
|
EthereumTxRequest_signature_s_t signature_s;
|
2016-06-11 19:20:38 +00:00
|
|
|
} EthereumTxRequest;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _Failure {
|
|
|
|
bool has_code;
|
|
|
|
FailureType code;
|
|
|
|
bool has_message;
|
|
|
|
char message[256];
|
|
|
|
} Failure;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[20];
|
|
|
|
} Features_revision_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[32];
|
|
|
|
} Features_bootloader_hash_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _Features {
|
|
|
|
bool has_vendor;
|
|
|
|
char vendor[33];
|
|
|
|
bool has_major_version;
|
|
|
|
uint32_t major_version;
|
|
|
|
bool has_minor_version;
|
|
|
|
uint32_t minor_version;
|
|
|
|
bool has_patch_version;
|
|
|
|
uint32_t patch_version;
|
|
|
|
bool has_bootloader_mode;
|
|
|
|
bool bootloader_mode;
|
|
|
|
bool has_device_id;
|
|
|
|
char device_id[25];
|
|
|
|
bool has_pin_protection;
|
|
|
|
bool pin_protection;
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t coins_count;
|
2016-10-09 19:39:35 +00:00
|
|
|
CoinType coins[8];
|
2014-04-29 12:26:51 +00:00
|
|
|
bool has_initialized;
|
|
|
|
bool initialized;
|
|
|
|
bool has_revision;
|
|
|
|
Features_revision_t revision;
|
|
|
|
bool has_bootloader_hash;
|
|
|
|
Features_bootloader_hash_t bootloader_hash;
|
2014-05-25 22:58:17 +00:00
|
|
|
bool has_imported;
|
|
|
|
bool imported;
|
2015-03-30 13:47:03 +00:00
|
|
|
bool has_pin_cached;
|
|
|
|
bool pin_cached;
|
|
|
|
bool has_passphrase_cached;
|
|
|
|
bool passphrase_cached;
|
2016-10-16 00:06:49 +00:00
|
|
|
bool has_firmware_present;
|
|
|
|
bool firmware_present;
|
2014-04-29 12:26:51 +00:00
|
|
|
} Features;
|
|
|
|
|
|
|
|
typedef struct _GetAddress {
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-04-29 12:26:51 +00:00
|
|
|
uint32_t address_n[8];
|
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
2014-08-08 17:09:54 +00:00
|
|
|
bool has_show_display;
|
|
|
|
bool show_display;
|
2014-12-10 14:44:26 +00:00
|
|
|
bool has_multisig;
|
|
|
|
MultisigRedeemScriptType multisig;
|
2016-10-16 00:06:49 +00:00
|
|
|
bool has_script_type;
|
|
|
|
InputScriptType script_type;
|
2014-04-29 12:26:51 +00:00
|
|
|
} GetAddress;
|
|
|
|
|
2016-06-11 19:20:38 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[65];
|
|
|
|
} GetECDHSessionKey_peer_public_key_t;
|
|
|
|
|
|
|
|
typedef struct _GetECDHSessionKey {
|
|
|
|
bool has_identity;
|
|
|
|
IdentityType identity;
|
|
|
|
bool has_peer_public_key;
|
|
|
|
GetECDHSessionKey_peer_public_key_t peer_public_key;
|
|
|
|
bool has_ecdsa_curve_name;
|
|
|
|
char ecdsa_curve_name[32];
|
|
|
|
} GetECDHSessionKey;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _GetEntropy {
|
|
|
|
uint32_t size;
|
|
|
|
} GetEntropy;
|
|
|
|
|
|
|
|
typedef struct _GetPublicKey {
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-04-29 12:26:51 +00:00
|
|
|
uint32_t address_n[8];
|
2015-06-03 19:21:16 +00:00
|
|
|
bool has_ecdsa_curve_name;
|
|
|
|
char ecdsa_curve_name[32];
|
2015-11-19 10:48:26 +00:00
|
|
|
bool has_show_display;
|
|
|
|
bool show_display;
|
2017-04-21 10:51:13 +00:00
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
2014-04-29 12:26:51 +00:00
|
|
|
} GetPublicKey;
|
|
|
|
|
|
|
|
typedef struct _LoadDevice {
|
|
|
|
bool has_mnemonic;
|
|
|
|
char mnemonic[241];
|
|
|
|
bool has_node;
|
|
|
|
HDNodeType node;
|
|
|
|
bool has_pin;
|
|
|
|
char pin[10];
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
|
|
|
bool has_skip_checksum;
|
|
|
|
bool skip_checksum;
|
2016-10-31 15:20:15 +00:00
|
|
|
bool has_u2f_counter;
|
|
|
|
uint32_t u2f_counter;
|
2014-04-29 12:26:51 +00:00
|
|
|
} LoadDevice;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[65];
|
|
|
|
} MessageSignature_signature_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _MessageSignature {
|
|
|
|
bool has_address;
|
2016-10-16 00:06:49 +00:00
|
|
|
char address[41];
|
2014-04-29 12:26:51 +00:00
|
|
|
bool has_signature;
|
|
|
|
MessageSignature_signature_t signature;
|
|
|
|
} MessageSignature;
|
|
|
|
|
|
|
|
typedef struct _PassphraseAck {
|
|
|
|
char passphrase[51];
|
|
|
|
} PassphraseAck;
|
|
|
|
|
|
|
|
typedef struct _PinMatrixAck {
|
|
|
|
char pin[10];
|
|
|
|
} PinMatrixAck;
|
|
|
|
|
|
|
|
typedef struct _PinMatrixRequest {
|
|
|
|
bool has_type;
|
|
|
|
PinMatrixRequestType type;
|
|
|
|
} PinMatrixRequest;
|
|
|
|
|
|
|
|
typedef struct _Ping {
|
|
|
|
bool has_message;
|
|
|
|
char message[256];
|
|
|
|
bool has_button_protection;
|
|
|
|
bool button_protection;
|
|
|
|
bool has_pin_protection;
|
|
|
|
bool pin_protection;
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
} Ping;
|
|
|
|
|
|
|
|
typedef struct _PublicKey {
|
|
|
|
HDNodeType node;
|
2014-08-07 19:53:55 +00:00
|
|
|
bool has_xpub;
|
|
|
|
char xpub[113];
|
2014-04-29 12:26:51 +00:00
|
|
|
} PublicKey;
|
|
|
|
|
|
|
|
typedef struct _RecoveryDevice {
|
|
|
|
bool has_word_count;
|
|
|
|
uint32_t word_count;
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_pin_protection;
|
|
|
|
bool pin_protection;
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
|
|
|
bool has_enforce_wordlist;
|
|
|
|
bool enforce_wordlist;
|
2016-11-23 12:12:15 +00:00
|
|
|
bool has_type;
|
|
|
|
uint32_t type;
|
2016-10-31 15:20:15 +00:00
|
|
|
bool has_u2f_counter;
|
|
|
|
uint32_t u2f_counter;
|
2014-04-29 12:26:51 +00:00
|
|
|
} RecoveryDevice;
|
|
|
|
|
|
|
|
typedef struct _ResetDevice {
|
|
|
|
bool has_display_random;
|
|
|
|
bool display_random;
|
|
|
|
bool has_strength;
|
|
|
|
uint32_t strength;
|
|
|
|
bool has_passphrase_protection;
|
|
|
|
bool passphrase_protection;
|
|
|
|
bool has_pin_protection;
|
|
|
|
bool pin_protection;
|
|
|
|
bool has_language;
|
|
|
|
char language[17];
|
|
|
|
bool has_label;
|
|
|
|
char label[33];
|
2016-10-31 15:20:15 +00:00
|
|
|
bool has_u2f_counter;
|
|
|
|
uint32_t u2f_counter;
|
2014-04-29 12:26:51 +00:00
|
|
|
} ResetDevice;
|
|
|
|
|
2016-06-12 21:39:28 +00:00
|
|
|
typedef struct _SetU2FCounter {
|
|
|
|
bool has_u2f_counter;
|
|
|
|
uint32_t u2f_counter;
|
|
|
|
} SetU2FCounter;
|
|
|
|
|
2015-02-20 18:01:45 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
2015-04-02 15:19:07 +00:00
|
|
|
uint8_t bytes[256];
|
2015-02-20 18:01:45 +00:00
|
|
|
} SignIdentity_challenge_hidden_t;
|
|
|
|
|
|
|
|
typedef struct _SignIdentity {
|
|
|
|
bool has_identity;
|
|
|
|
IdentityType identity;
|
|
|
|
bool has_challenge_hidden;
|
|
|
|
SignIdentity_challenge_hidden_t challenge_hidden;
|
|
|
|
bool has_challenge_visual;
|
2015-04-02 15:19:07 +00:00
|
|
|
char challenge_visual[256];
|
2015-06-03 19:21:16 +00:00
|
|
|
bool has_ecdsa_curve_name;
|
|
|
|
char ecdsa_curve_name[32];
|
2015-02-20 18:01:45 +00:00
|
|
|
} SignIdentity;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} SignMessage_message_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _SignMessage {
|
2014-12-27 13:32:25 +00:00
|
|
|
size_t address_n_count;
|
2014-04-29 12:26:51 +00:00
|
|
|
uint32_t address_n[8];
|
|
|
|
SignMessage_message_t message;
|
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
|
|
|
} SignMessage;
|
|
|
|
|
|
|
|
typedef struct _SignTx {
|
|
|
|
uint32_t outputs_count;
|
|
|
|
uint32_t inputs_count;
|
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
2016-04-16 02:47:09 +00:00
|
|
|
bool has_version;
|
|
|
|
uint32_t version;
|
|
|
|
bool has_lock_time;
|
|
|
|
uint32_t lock_time;
|
2014-04-29 12:26:51 +00:00
|
|
|
} SignTx;
|
|
|
|
|
2015-02-20 18:01:45 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[33];
|
|
|
|
} SignedIdentity_public_key_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[65];
|
|
|
|
} SignedIdentity_signature_t;
|
|
|
|
|
|
|
|
typedef struct _SignedIdentity {
|
|
|
|
bool has_address;
|
2016-10-16 00:06:49 +00:00
|
|
|
char address[41];
|
2015-02-20 18:01:45 +00:00
|
|
|
bool has_public_key;
|
|
|
|
SignedIdentity_public_key_t public_key;
|
|
|
|
bool has_signature;
|
|
|
|
SignedIdentity_signature_t signature;
|
|
|
|
} SignedIdentity;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
typedef struct _Success {
|
|
|
|
bool has_message;
|
|
|
|
char message[256];
|
|
|
|
} Success;
|
|
|
|
|
|
|
|
typedef struct _TxAck {
|
|
|
|
bool has_tx;
|
|
|
|
TransactionType tx;
|
|
|
|
} TxAck;
|
|
|
|
|
|
|
|
typedef struct _TxRequest {
|
|
|
|
bool has_request_type;
|
|
|
|
RequestType request_type;
|
|
|
|
bool has_details;
|
|
|
|
TxRequestDetailsType details;
|
|
|
|
bool has_serialized;
|
|
|
|
TxRequestSerializedType serialized;
|
|
|
|
} TxRequest;
|
|
|
|
|
|
|
|
typedef struct _TxSize {
|
|
|
|
bool has_tx_size;
|
|
|
|
uint32_t tx_size;
|
|
|
|
} TxSize;
|
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[65];
|
|
|
|
} VerifyMessage_signature_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-12-27 13:32:25 +00:00
|
|
|
typedef struct {
|
|
|
|
size_t size;
|
|
|
|
uint8_t bytes[1024];
|
|
|
|
} VerifyMessage_message_t;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
typedef struct _VerifyMessage {
|
|
|
|
bool has_address;
|
2016-10-16 00:06:49 +00:00
|
|
|
char address[41];
|
2014-04-29 12:26:51 +00:00
|
|
|
bool has_signature;
|
|
|
|
VerifyMessage_signature_t signature;
|
|
|
|
bool has_message;
|
|
|
|
VerifyMessage_message_t message;
|
2016-05-17 16:13:08 +00:00
|
|
|
bool has_coin_name;
|
|
|
|
char coin_name[17];
|
2014-04-29 12:26:51 +00:00
|
|
|
} VerifyMessage;
|
|
|
|
|
|
|
|
typedef struct _WordAck {
|
|
|
|
char word[12];
|
|
|
|
} WordAck;
|
|
|
|
|
2016-11-23 12:12:15 +00:00
|
|
|
typedef struct _WordRequest {
|
|
|
|
bool has_type;
|
|
|
|
WordRequestType type;
|
|
|
|
} WordRequest;
|
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
/* Default values for struct fields */
|
2017-04-21 10:51:13 +00:00
|
|
|
extern const char GetPublicKey_coin_name_default[17];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const char GetAddress_coin_name_default[17];
|
2016-10-16 00:06:49 +00:00
|
|
|
extern const InputScriptType GetAddress_script_type_default;
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const char LoadDevice_language_default[17];
|
|
|
|
extern const uint32_t ResetDevice_strength_default;
|
|
|
|
extern const char ResetDevice_language_default[17];
|
|
|
|
extern const char RecoveryDevice_language_default[17];
|
|
|
|
extern const char SignMessage_coin_name_default[17];
|
2016-05-17 16:13:08 +00:00
|
|
|
extern const char VerifyMessage_coin_name_default[17];
|
2014-10-29 23:51:28 +00:00
|
|
|
extern const char EncryptMessage_coin_name_default[17];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const char EstimateTxSize_coin_name_default[17];
|
|
|
|
extern const char SignTx_coin_name_default[17];
|
2016-04-16 02:47:09 +00:00
|
|
|
extern const uint32_t SignTx_version_default;
|
|
|
|
extern const uint32_t SignTx_lock_time_default;
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2014-11-12 18:17:14 +00:00
|
|
|
/* Initializer values for message structs */
|
|
|
|
#define Initialize_init_default {0}
|
2015-03-30 13:47:03 +00:00
|
|
|
#define GetFeatures_init_default {0}
|
2016-10-16 00:06:49 +00:00
|
|
|
#define Features_init_default {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define ClearSession_init_default {0}
|
2015-02-04 20:27:07 +00:00
|
|
|
#define ApplySettings_init_default {false, "", false, "", false, 0, false, {0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define ChangePin_init_default {false, 0}
|
|
|
|
#define Ping_init_default {false, "", false, 0, false, 0, false, 0}
|
|
|
|
#define Success_init_default {false, ""}
|
|
|
|
#define Failure_init_default {false, (FailureType)0, false, ""}
|
|
|
|
#define ButtonRequest_init_default {false, (ButtonRequestType)0, false, ""}
|
|
|
|
#define ButtonAck_init_default {0}
|
|
|
|
#define PinMatrixRequest_init_default {false, (PinMatrixRequestType)0}
|
|
|
|
#define PinMatrixAck_init_default {""}
|
|
|
|
#define Cancel_init_default {0}
|
|
|
|
#define PassphraseRequest_init_default {0}
|
|
|
|
#define PassphraseAck_init_default {""}
|
|
|
|
#define GetEntropy_init_default {0}
|
|
|
|
#define Entropy_init_default {{0, {0}}}
|
2017-04-21 10:51:13 +00:00
|
|
|
#define GetPublicKey_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, "Bitcoin"}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define PublicKey_init_default {HDNodeType_init_default, false, ""}
|
2016-10-16 00:06:49 +00:00
|
|
|
#define GetAddress_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "Bitcoin", false, 0, false, MultisigRedeemScriptType_init_default, false, InputScriptType_SPENDADDRESS}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumGetAddress_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define Address_init_default {""}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumAddress_init_default {{0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define WipeDevice_init_default {0}
|
2016-10-31 15:20:15 +00:00
|
|
|
#define LoadDevice_init_default {false, "", false, HDNodeType_init_default, false, "", false, 0, false, "english", false, "", false, 0, false, 0}
|
|
|
|
#define ResetDevice_init_default {false, 0, false, 256u, false, 0, false, 0, false, "english", false, "", false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define EntropyRequest_init_default {0}
|
|
|
|
#define EntropyAck_init_default {false, {0, {0}}}
|
2016-11-23 12:12:15 +00:00
|
|
|
#define RecoveryDevice_init_default {false, 0, false, 0, false, 0, false, "english", false, "", false, 0, false, 0, false, 0}
|
|
|
|
#define WordRequest_init_default {false, (WordRequestType)0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define WordAck_init_default {""}
|
|
|
|
#define SignMessage_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}, false, "Bitcoin"}
|
2016-05-17 16:13:08 +00:00
|
|
|
#define VerifyMessage_init_default {false, "", false, {0, {0}}, false, {0, {0}}, false, "Bitcoin"}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define MessageSignature_init_default {false, "", false, {0, {0}}}
|
|
|
|
#define EncryptMessage_init_default {false, {0, {0}}, false, {0, {0}}, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "Bitcoin"}
|
|
|
|
#define EncryptedMessage_init_default {false, {0, {0}}, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define DecryptMessage_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define DecryptedMessage_init_default {false, {0, {0}}, false, ""}
|
2015-06-29 14:36:50 +00:00
|
|
|
#define CipherKeyValue_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, {0, {0}}, false, 0, false, 0, false, 0, false, {0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define CipheredKeyValue_init_default {false, {0, {0}}}
|
|
|
|
#define EstimateTxSize_init_default {0, 0, false, "Bitcoin"}
|
|
|
|
#define TxSize_init_default {false, 0}
|
2016-04-16 02:47:09 +00:00
|
|
|
#define SignTx_init_default {0, 0, false, "Bitcoin", false, 1u, false, 0u}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define TxRequest_init_default {false, (RequestType)0, false, TxRequestDetailsType_init_default, false, TxRequestSerializedType_init_default}
|
|
|
|
#define TxAck_init_default {false, TransactionType_init_default}
|
2017-04-30 01:26:57 +00:00
|
|
|
#define EthereumSignTx_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumTxRequest_init_default {false, 0, false, 0, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define EthereumTxAck_init_default {false, {0, {0}}}
|
2015-06-03 19:21:16 +00:00
|
|
|
#define SignIdentity_init_default {false, IdentityType_init_default, false, {0, {0}}, false, "", false, ""}
|
2015-02-20 18:01:45 +00:00
|
|
|
#define SignedIdentity_init_default {false, "", false, {0, {0}}, false, {0, {0}}}
|
2016-06-11 19:20:38 +00:00
|
|
|
#define GetECDHSessionKey_init_default {false, IdentityType_init_default, false, {0, {0}}, false, ""}
|
|
|
|
#define ECDHSessionKey_init_default {false, {0, {0}}}
|
2016-06-12 21:39:28 +00:00
|
|
|
#define SetU2FCounter_init_default {false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define FirmwareErase_init_default {0}
|
|
|
|
#define DebugLinkDecision_init_default {0}
|
|
|
|
#define DebugLinkGetState_init_default {0}
|
|
|
|
#define DebugLinkState_init_default {false, {0, {0}}, false, "", false, "", false, "", false, HDNodeType_init_default, false, 0, false, "", false, {0, {0}}, false, "", false, 0}
|
|
|
|
#define DebugLinkStop_init_default {0}
|
|
|
|
#define DebugLinkLog_init_default {false, 0, false, "", false, ""}
|
2016-05-26 18:27:40 +00:00
|
|
|
#define DebugLinkMemoryRead_init_default {false, 0, false, 0}
|
|
|
|
#define DebugLinkMemory_init_default {false, {0, {0}}}
|
|
|
|
#define DebugLinkMemoryWrite_init_default {false, 0, false, {0, {0}}, false, 0}
|
|
|
|
#define DebugLinkFlashErase_init_default {false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define Initialize_init_zero {0}
|
2015-03-30 13:47:03 +00:00
|
|
|
#define GetFeatures_init_zero {0}
|
2016-10-16 00:06:49 +00:00
|
|
|
#define Features_init_zero {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define ClearSession_init_zero {0}
|
2015-02-04 20:27:07 +00:00
|
|
|
#define ApplySettings_init_zero {false, "", false, "", false, 0, false, {0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define ChangePin_init_zero {false, 0}
|
|
|
|
#define Ping_init_zero {false, "", false, 0, false, 0, false, 0}
|
|
|
|
#define Success_init_zero {false, ""}
|
|
|
|
#define Failure_init_zero {false, (FailureType)0, false, ""}
|
|
|
|
#define ButtonRequest_init_zero {false, (ButtonRequestType)0, false, ""}
|
|
|
|
#define ButtonAck_init_zero {0}
|
|
|
|
#define PinMatrixRequest_init_zero {false, (PinMatrixRequestType)0}
|
|
|
|
#define PinMatrixAck_init_zero {""}
|
|
|
|
#define Cancel_init_zero {0}
|
|
|
|
#define PassphraseRequest_init_zero {0}
|
|
|
|
#define PassphraseAck_init_zero {""}
|
|
|
|
#define GetEntropy_init_zero {0}
|
|
|
|
#define Entropy_init_zero {{0, {0}}}
|
2017-04-21 10:51:13 +00:00
|
|
|
#define GetPublicKey_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, ""}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define PublicKey_init_zero {HDNodeType_init_zero, false, ""}
|
2016-10-16 00:06:49 +00:00
|
|
|
#define GetAddress_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, MultisigRedeemScriptType_init_zero, false, (InputScriptType)0}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumGetAddress_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define Address_init_zero {""}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumAddress_init_zero {{0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define WipeDevice_init_zero {0}
|
2016-10-31 15:20:15 +00:00
|
|
|
#define LoadDevice_init_zero {false, "", false, HDNodeType_init_zero, false, "", false, 0, false, "", false, "", false, 0, false, 0}
|
|
|
|
#define ResetDevice_init_zero {false, 0, false, 0, false, 0, false, 0, false, "", false, "", false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define EntropyRequest_init_zero {0}
|
|
|
|
#define EntropyAck_init_zero {false, {0, {0}}}
|
2016-11-23 12:12:15 +00:00
|
|
|
#define RecoveryDevice_init_zero {false, 0, false, 0, false, 0, false, "", false, "", false, 0, false, 0, false, 0}
|
|
|
|
#define WordRequest_init_zero {false, (WordRequestType)0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define WordAck_init_zero {""}
|
|
|
|
#define SignMessage_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}, false, ""}
|
2016-05-17 16:13:08 +00:00
|
|
|
#define VerifyMessage_init_zero {false, "", false, {0, {0}}, false, {0, {0}}, false, ""}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define MessageSignature_init_zero {false, "", false, {0, {0}}}
|
|
|
|
#define EncryptMessage_init_zero {false, {0, {0}}, false, {0, {0}}, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}, false, ""}
|
|
|
|
#define EncryptedMessage_init_zero {false, {0, {0}}, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define DecryptMessage_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define DecryptedMessage_init_zero {false, {0, {0}}, false, ""}
|
2015-06-29 14:36:50 +00:00
|
|
|
#define CipherKeyValue_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, {0, {0}}, false, 0, false, 0, false, 0, false, {0, {0}}}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define CipheredKeyValue_init_zero {false, {0, {0}}}
|
|
|
|
#define EstimateTxSize_init_zero {0, 0, false, ""}
|
|
|
|
#define TxSize_init_zero {false, 0}
|
2016-04-16 02:47:09 +00:00
|
|
|
#define SignTx_init_zero {0, 0, false, "", false, 0, false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define TxRequest_init_zero {false, (RequestType)0, false, TxRequestDetailsType_init_zero, false, TxRequestSerializedType_init_zero}
|
|
|
|
#define TxAck_init_zero {false, TransactionType_init_zero}
|
2017-04-30 01:26:57 +00:00
|
|
|
#define EthereumSignTx_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0}
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumTxRequest_init_zero {false, 0, false, 0, false, {0, {0}}, false, {0, {0}}}
|
|
|
|
#define EthereumTxAck_init_zero {false, {0, {0}}}
|
2015-06-03 19:21:16 +00:00
|
|
|
#define SignIdentity_init_zero {false, IdentityType_init_zero, false, {0, {0}}, false, "", false, ""}
|
2015-02-20 18:01:45 +00:00
|
|
|
#define SignedIdentity_init_zero {false, "", false, {0, {0}}, false, {0, {0}}}
|
2016-06-11 19:20:38 +00:00
|
|
|
#define GetECDHSessionKey_init_zero {false, IdentityType_init_zero, false, {0, {0}}, false, ""}
|
|
|
|
#define ECDHSessionKey_init_zero {false, {0, {0}}}
|
2016-06-12 21:39:28 +00:00
|
|
|
#define SetU2FCounter_init_zero {false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
#define FirmwareErase_init_zero {0}
|
|
|
|
#define DebugLinkDecision_init_zero {0}
|
|
|
|
#define DebugLinkGetState_init_zero {0}
|
|
|
|
#define DebugLinkState_init_zero {false, {0, {0}}, false, "", false, "", false, "", false, HDNodeType_init_zero, false, 0, false, "", false, {0, {0}}, false, "", false, 0}
|
|
|
|
#define DebugLinkStop_init_zero {0}
|
|
|
|
#define DebugLinkLog_init_zero {false, 0, false, "", false, ""}
|
2016-05-26 18:27:40 +00:00
|
|
|
#define DebugLinkMemoryRead_init_zero {false, 0, false, 0}
|
|
|
|
#define DebugLinkMemory_init_zero {false, {0, {0}}}
|
|
|
|
#define DebugLinkMemoryWrite_init_zero {false, 0, false, {0, {0}}, false, 0}
|
|
|
|
#define DebugLinkFlashErase_init_zero {false, 0}
|
2014-11-12 18:17:14 +00:00
|
|
|
|
2014-04-29 12:26:51 +00:00
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
#define Address_address_tag 1
|
|
|
|
#define ApplySettings_language_tag 1
|
|
|
|
#define ApplySettings_label_tag 2
|
2014-12-13 18:29:27 +00:00
|
|
|
#define ApplySettings_use_passphrase_tag 3
|
2015-02-04 20:27:07 +00:00
|
|
|
#define ApplySettings_homescreen_tag 4
|
2014-04-29 12:26:51 +00:00
|
|
|
#define ButtonRequest_code_tag 1
|
|
|
|
#define ButtonRequest_data_tag 2
|
|
|
|
#define ChangePin_remove_tag 1
|
2014-06-06 00:37:58 +00:00
|
|
|
#define CipherKeyValue_address_n_tag 1
|
|
|
|
#define CipherKeyValue_key_tag 2
|
|
|
|
#define CipherKeyValue_value_tag 3
|
|
|
|
#define CipherKeyValue_encrypt_tag 4
|
|
|
|
#define CipherKeyValue_ask_on_encrypt_tag 5
|
|
|
|
#define CipherKeyValue_ask_on_decrypt_tag 6
|
2015-06-29 14:36:50 +00:00
|
|
|
#define CipherKeyValue_iv_tag 7
|
2014-11-12 18:17:14 +00:00
|
|
|
#define CipheredKeyValue_value_tag 1
|
2014-04-29 12:26:51 +00:00
|
|
|
#define DebugLinkDecision_yes_no_tag 1
|
2016-05-26 18:27:40 +00:00
|
|
|
#define DebugLinkFlashErase_sector_tag 1
|
2014-04-29 12:26:51 +00:00
|
|
|
#define DebugLinkLog_level_tag 1
|
|
|
|
#define DebugLinkLog_bucket_tag 2
|
|
|
|
#define DebugLinkLog_text_tag 3
|
2016-05-26 18:27:40 +00:00
|
|
|
#define DebugLinkMemory_memory_tag 1
|
|
|
|
#define DebugLinkMemoryRead_address_tag 1
|
|
|
|
#define DebugLinkMemoryRead_length_tag 2
|
|
|
|
#define DebugLinkMemoryWrite_address_tag 1
|
|
|
|
#define DebugLinkMemoryWrite_memory_tag 2
|
|
|
|
#define DebugLinkMemoryWrite_flash_tag 3
|
2014-04-29 12:26:51 +00:00
|
|
|
#define DebugLinkState_layout_tag 1
|
|
|
|
#define DebugLinkState_pin_tag 2
|
|
|
|
#define DebugLinkState_matrix_tag 3
|
|
|
|
#define DebugLinkState_mnemonic_tag 4
|
|
|
|
#define DebugLinkState_node_tag 5
|
|
|
|
#define DebugLinkState_passphrase_protection_tag 6
|
|
|
|
#define DebugLinkState_reset_word_tag 7
|
|
|
|
#define DebugLinkState_reset_entropy_tag 8
|
|
|
|
#define DebugLinkState_recovery_fake_word_tag 9
|
|
|
|
#define DebugLinkState_recovery_word_pos_tag 10
|
2014-06-17 14:03:07 +00:00
|
|
|
#define DecryptMessage_address_n_tag 1
|
2014-11-12 18:17:14 +00:00
|
|
|
#define DecryptMessage_nonce_tag 2
|
|
|
|
#define DecryptMessage_message_tag 3
|
|
|
|
#define DecryptMessage_hmac_tag 4
|
|
|
|
#define DecryptedMessage_message_tag 1
|
|
|
|
#define DecryptedMessage_address_tag 2
|
2016-06-11 19:20:38 +00:00
|
|
|
#define ECDHSessionKey_session_key_tag 1
|
2014-06-17 14:03:07 +00:00
|
|
|
#define EncryptMessage_pubkey_tag 1
|
|
|
|
#define EncryptMessage_message_tag 2
|
|
|
|
#define EncryptMessage_display_only_tag 3
|
2014-10-22 17:53:25 +00:00
|
|
|
#define EncryptMessage_address_n_tag 4
|
2014-10-29 23:51:28 +00:00
|
|
|
#define EncryptMessage_coin_name_tag 5
|
2014-11-12 18:17:14 +00:00
|
|
|
#define EncryptedMessage_nonce_tag 1
|
|
|
|
#define EncryptedMessage_message_tag 2
|
|
|
|
#define EncryptedMessage_hmac_tag 3
|
2014-04-29 12:26:51 +00:00
|
|
|
#define Entropy_entropy_tag 1
|
|
|
|
#define EntropyAck_entropy_tag 1
|
|
|
|
#define EstimateTxSize_outputs_count_tag 1
|
|
|
|
#define EstimateTxSize_inputs_count_tag 2
|
|
|
|
#define EstimateTxSize_coin_name_tag 3
|
2016-06-11 19:20:38 +00:00
|
|
|
#define EthereumAddress_address_tag 1
|
|
|
|
#define EthereumGetAddress_address_n_tag 1
|
|
|
|
#define EthereumGetAddress_show_display_tag 2
|
|
|
|
#define EthereumSignTx_address_n_tag 1
|
|
|
|
#define EthereumSignTx_nonce_tag 2
|
|
|
|
#define EthereumSignTx_gas_price_tag 3
|
|
|
|
#define EthereumSignTx_gas_limit_tag 4
|
|
|
|
#define EthereumSignTx_to_tag 5
|
|
|
|
#define EthereumSignTx_value_tag 6
|
|
|
|
#define EthereumSignTx_data_initial_chunk_tag 7
|
|
|
|
#define EthereumSignTx_data_length_tag 8
|
2017-01-22 16:52:33 +00:00
|
|
|
#define EthereumSignTx_chain_id_tag 9
|
2016-06-11 19:20:38 +00:00
|
|
|
#define EthereumTxAck_data_chunk_tag 1
|
|
|
|
#define EthereumTxRequest_data_length_tag 1
|
|
|
|
#define EthereumTxRequest_signature_v_tag 2
|
|
|
|
#define EthereumTxRequest_signature_r_tag 3
|
|
|
|
#define EthereumTxRequest_signature_s_tag 4
|
2014-04-29 12:26:51 +00:00
|
|
|
#define Failure_code_tag 1
|
|
|
|
#define Failure_message_tag 2
|
|
|
|
#define Features_vendor_tag 1
|
|
|
|
#define Features_major_version_tag 2
|
|
|
|
#define Features_minor_version_tag 3
|
|
|
|
#define Features_patch_version_tag 4
|
|
|
|
#define Features_bootloader_mode_tag 5
|
|
|
|
#define Features_device_id_tag 6
|
|
|
|
#define Features_pin_protection_tag 7
|
|
|
|
#define Features_passphrase_protection_tag 8
|
|
|
|
#define Features_language_tag 9
|
|
|
|
#define Features_label_tag 10
|
|
|
|
#define Features_coins_tag 11
|
|
|
|
#define Features_initialized_tag 12
|
|
|
|
#define Features_revision_tag 13
|
|
|
|
#define Features_bootloader_hash_tag 14
|
2014-05-25 22:58:17 +00:00
|
|
|
#define Features_imported_tag 15
|
2015-03-30 13:47:03 +00:00
|
|
|
#define Features_pin_cached_tag 16
|
|
|
|
#define Features_passphrase_cached_tag 17
|
2016-10-16 00:06:49 +00:00
|
|
|
#define Features_firmware_present_tag 18
|
2014-04-29 12:26:51 +00:00
|
|
|
#define GetAddress_address_n_tag 1
|
|
|
|
#define GetAddress_coin_name_tag 2
|
2014-08-08 17:09:54 +00:00
|
|
|
#define GetAddress_show_display_tag 3
|
2014-12-10 14:44:26 +00:00
|
|
|
#define GetAddress_multisig_tag 4
|
2016-10-16 00:06:49 +00:00
|
|
|
#define GetAddress_script_type_tag 5
|
2016-06-11 19:20:38 +00:00
|
|
|
#define GetECDHSessionKey_identity_tag 1
|
|
|
|
#define GetECDHSessionKey_peer_public_key_tag 2
|
|
|
|
#define GetECDHSessionKey_ecdsa_curve_name_tag 3
|
2014-04-29 12:26:51 +00:00
|
|
|
#define GetEntropy_size_tag 1
|
|
|
|
#define GetPublicKey_address_n_tag 1
|
2015-06-03 19:21:16 +00:00
|
|
|
#define GetPublicKey_ecdsa_curve_name_tag 2
|
2015-11-19 10:48:26 +00:00
|
|
|
#define GetPublicKey_show_display_tag 3
|
2017-04-21 10:51:13 +00:00
|
|
|
#define GetPublicKey_coin_name_tag 4
|
2014-04-29 12:26:51 +00:00
|
|
|
#define LoadDevice_mnemonic_tag 1
|
|
|
|
#define LoadDevice_node_tag 2
|
|
|
|
#define LoadDevice_pin_tag 3
|
|
|
|
#define LoadDevice_passphrase_protection_tag 4
|
|
|
|
#define LoadDevice_language_tag 5
|
|
|
|
#define LoadDevice_label_tag 6
|
|
|
|
#define LoadDevice_skip_checksum_tag 7
|
2016-10-31 15:20:15 +00:00
|
|
|
#define LoadDevice_u2f_counter_tag 8
|
2014-04-29 12:26:51 +00:00
|
|
|
#define MessageSignature_address_tag 1
|
|
|
|
#define MessageSignature_signature_tag 2
|
|
|
|
#define PassphraseAck_passphrase_tag 1
|
|
|
|
#define PinMatrixAck_pin_tag 1
|
|
|
|
#define PinMatrixRequest_type_tag 1
|
|
|
|
#define Ping_message_tag 1
|
|
|
|
#define Ping_button_protection_tag 2
|
|
|
|
#define Ping_pin_protection_tag 3
|
|
|
|
#define Ping_passphrase_protection_tag 4
|
|
|
|
#define PublicKey_node_tag 1
|
2014-08-07 19:53:55 +00:00
|
|
|
#define PublicKey_xpub_tag 2
|
2014-04-29 12:26:51 +00:00
|
|
|
#define RecoveryDevice_word_count_tag 1
|
|
|
|
#define RecoveryDevice_passphrase_protection_tag 2
|
|
|
|
#define RecoveryDevice_pin_protection_tag 3
|
|
|
|
#define RecoveryDevice_language_tag 4
|
|
|
|
#define RecoveryDevice_label_tag 5
|
|
|
|
#define RecoveryDevice_enforce_wordlist_tag 6
|
2016-11-23 12:12:15 +00:00
|
|
|
#define RecoveryDevice_type_tag 8
|
|
|
|
#define RecoveryDevice_u2f_counter_tag 9
|
2014-04-29 12:26:51 +00:00
|
|
|
#define ResetDevice_display_random_tag 1
|
|
|
|
#define ResetDevice_strength_tag 2
|
|
|
|
#define ResetDevice_passphrase_protection_tag 3
|
|
|
|
#define ResetDevice_pin_protection_tag 4
|
|
|
|
#define ResetDevice_language_tag 5
|
|
|
|
#define ResetDevice_label_tag 6
|
2016-10-31 15:20:15 +00:00
|
|
|
#define ResetDevice_u2f_counter_tag 7
|
2016-06-12 21:39:28 +00:00
|
|
|
#define SetU2FCounter_u2f_counter_tag 1
|
2015-02-20 18:01:45 +00:00
|
|
|
#define SignIdentity_identity_tag 1
|
|
|
|
#define SignIdentity_challenge_hidden_tag 2
|
|
|
|
#define SignIdentity_challenge_visual_tag 3
|
2015-06-03 19:21:16 +00:00
|
|
|
#define SignIdentity_ecdsa_curve_name_tag 4
|
2014-04-29 12:26:51 +00:00
|
|
|
#define SignMessage_address_n_tag 1
|
|
|
|
#define SignMessage_message_tag 2
|
|
|
|
#define SignMessage_coin_name_tag 3
|
|
|
|
#define SignTx_outputs_count_tag 1
|
|
|
|
#define SignTx_inputs_count_tag 2
|
|
|
|
#define SignTx_coin_name_tag 3
|
2016-04-16 02:47:09 +00:00
|
|
|
#define SignTx_version_tag 4
|
|
|
|
#define SignTx_lock_time_tag 5
|
2015-02-20 18:01:45 +00:00
|
|
|
#define SignedIdentity_address_tag 1
|
|
|
|
#define SignedIdentity_public_key_tag 2
|
|
|
|
#define SignedIdentity_signature_tag 3
|
2014-04-29 12:26:51 +00:00
|
|
|
#define Success_message_tag 1
|
|
|
|
#define TxAck_tx_tag 1
|
|
|
|
#define TxRequest_request_type_tag 1
|
|
|
|
#define TxRequest_details_tag 2
|
|
|
|
#define TxRequest_serialized_tag 3
|
|
|
|
#define TxSize_tx_size_tag 1
|
|
|
|
#define VerifyMessage_address_tag 1
|
|
|
|
#define VerifyMessage_signature_tag 2
|
|
|
|
#define VerifyMessage_message_tag 3
|
2016-05-17 16:13:08 +00:00
|
|
|
#define VerifyMessage_coin_name_tag 4
|
2014-04-29 12:26:51 +00:00
|
|
|
#define WordAck_word_tag 1
|
2016-11-23 12:12:15 +00:00
|
|
|
#define WordRequest_type_tag 1
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
|
|
extern const pb_field_t Initialize_fields[1];
|
2015-03-30 13:47:03 +00:00
|
|
|
extern const pb_field_t GetFeatures_fields[1];
|
2016-10-16 00:06:49 +00:00
|
|
|
extern const pb_field_t Features_fields[19];
|
2014-06-17 14:03:07 +00:00
|
|
|
extern const pb_field_t ClearSession_fields[1];
|
2015-02-04 20:27:07 +00:00
|
|
|
extern const pb_field_t ApplySettings_fields[5];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t ChangePin_fields[2];
|
|
|
|
extern const pb_field_t Ping_fields[5];
|
2014-11-12 18:17:14 +00:00
|
|
|
extern const pb_field_t Success_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t Failure_fields[3];
|
|
|
|
extern const pb_field_t ButtonRequest_fields[3];
|
|
|
|
extern const pb_field_t ButtonAck_fields[1];
|
|
|
|
extern const pb_field_t PinMatrixRequest_fields[2];
|
|
|
|
extern const pb_field_t PinMatrixAck_fields[2];
|
|
|
|
extern const pb_field_t Cancel_fields[1];
|
|
|
|
extern const pb_field_t PassphraseRequest_fields[1];
|
|
|
|
extern const pb_field_t PassphraseAck_fields[2];
|
|
|
|
extern const pb_field_t GetEntropy_fields[2];
|
|
|
|
extern const pb_field_t Entropy_fields[2];
|
2017-04-21 10:51:13 +00:00
|
|
|
extern const pb_field_t GetPublicKey_fields[5];
|
2014-08-07 19:53:55 +00:00
|
|
|
extern const pb_field_t PublicKey_fields[3];
|
2016-10-16 00:06:49 +00:00
|
|
|
extern const pb_field_t GetAddress_fields[6];
|
2016-06-11 19:20:38 +00:00
|
|
|
extern const pb_field_t EthereumGetAddress_fields[3];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t Address_fields[2];
|
2016-06-11 19:20:38 +00:00
|
|
|
extern const pb_field_t EthereumAddress_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t WipeDevice_fields[1];
|
2016-10-31 15:20:15 +00:00
|
|
|
extern const pb_field_t LoadDevice_fields[9];
|
|
|
|
extern const pb_field_t ResetDevice_fields[8];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t EntropyRequest_fields[1];
|
|
|
|
extern const pb_field_t EntropyAck_fields[2];
|
2016-11-23 12:12:15 +00:00
|
|
|
extern const pb_field_t RecoveryDevice_fields[9];
|
|
|
|
extern const pb_field_t WordRequest_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t WordAck_fields[2];
|
|
|
|
extern const pb_field_t SignMessage_fields[4];
|
2016-05-17 16:13:08 +00:00
|
|
|
extern const pb_field_t VerifyMessage_fields[5];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t MessageSignature_fields[3];
|
2014-10-29 23:51:28 +00:00
|
|
|
extern const pb_field_t EncryptMessage_fields[6];
|
2014-11-12 18:17:14 +00:00
|
|
|
extern const pb_field_t EncryptedMessage_fields[4];
|
|
|
|
extern const pb_field_t DecryptMessage_fields[5];
|
|
|
|
extern const pb_field_t DecryptedMessage_fields[3];
|
2015-06-29 14:36:50 +00:00
|
|
|
extern const pb_field_t CipherKeyValue_fields[8];
|
2014-11-12 18:17:14 +00:00
|
|
|
extern const pb_field_t CipheredKeyValue_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t EstimateTxSize_fields[4];
|
|
|
|
extern const pb_field_t TxSize_fields[2];
|
2016-04-16 02:47:09 +00:00
|
|
|
extern const pb_field_t SignTx_fields[6];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t TxRequest_fields[4];
|
|
|
|
extern const pb_field_t TxAck_fields[2];
|
2017-04-30 01:26:57 +00:00
|
|
|
extern const pb_field_t EthereumSignTx_fields[10];
|
2016-06-11 19:20:38 +00:00
|
|
|
extern const pb_field_t EthereumTxRequest_fields[5];
|
|
|
|
extern const pb_field_t EthereumTxAck_fields[2];
|
2015-06-03 19:21:16 +00:00
|
|
|
extern const pb_field_t SignIdentity_fields[5];
|
2015-02-20 18:01:45 +00:00
|
|
|
extern const pb_field_t SignedIdentity_fields[4];
|
2016-06-11 19:20:38 +00:00
|
|
|
extern const pb_field_t GetECDHSessionKey_fields[4];
|
|
|
|
extern const pb_field_t ECDHSessionKey_fields[2];
|
2016-06-12 21:39:28 +00:00
|
|
|
extern const pb_field_t SetU2FCounter_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
extern const pb_field_t FirmwareErase_fields[1];
|
|
|
|
extern const pb_field_t DebugLinkDecision_fields[2];
|
|
|
|
extern const pb_field_t DebugLinkGetState_fields[1];
|
|
|
|
extern const pb_field_t DebugLinkState_fields[11];
|
|
|
|
extern const pb_field_t DebugLinkStop_fields[1];
|
|
|
|
extern const pb_field_t DebugLinkLog_fields[4];
|
2016-05-26 18:27:40 +00:00
|
|
|
extern const pb_field_t DebugLinkMemoryRead_fields[3];
|
|
|
|
extern const pb_field_t DebugLinkMemory_fields[2];
|
|
|
|
extern const pb_field_t DebugLinkMemoryWrite_fields[4];
|
|
|
|
extern const pb_field_t DebugLinkFlashErase_fields[2];
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
|
|
#define Initialize_size 0
|
2015-03-30 13:47:03 +00:00
|
|
|
#define GetFeatures_size 0
|
2016-10-16 00:06:49 +00:00
|
|
|
#define Features_size (257 + 8*CoinType_size)
|
2014-06-17 14:03:07 +00:00
|
|
|
#define ClearSession_size 0
|
2015-02-04 20:27:07 +00:00
|
|
|
#define ApplySettings_size 1083
|
2014-04-29 12:26:51 +00:00
|
|
|
#define ChangePin_size 2
|
|
|
|
#define Ping_size 265
|
2014-11-12 18:17:14 +00:00
|
|
|
#define Success_size 259
|
2014-04-29 12:26:51 +00:00
|
|
|
#define Failure_size 265
|
|
|
|
#define ButtonRequest_size 265
|
|
|
|
#define ButtonAck_size 0
|
|
|
|
#define PinMatrixRequest_size 6
|
|
|
|
#define PinMatrixAck_size 12
|
|
|
|
#define Cancel_size 0
|
|
|
|
#define PassphraseRequest_size 0
|
|
|
|
#define PassphraseAck_size 53
|
|
|
|
#define GetEntropy_size 6
|
|
|
|
#define Entropy_size 1027
|
2017-04-21 10:51:13 +00:00
|
|
|
#define GetPublicKey_size 103
|
2014-08-07 19:53:55 +00:00
|
|
|
#define PublicKey_size (121 + HDNodeType_size)
|
2016-10-16 00:06:49 +00:00
|
|
|
#define GetAddress_size (81 + MultisigRedeemScriptType_size)
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumGetAddress_size 50
|
2016-10-16 00:06:49 +00:00
|
|
|
#define Address_size 43
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumAddress_size 22
|
2014-04-29 12:26:51 +00:00
|
|
|
#define WipeDevice_size 0
|
2016-10-31 15:20:15 +00:00
|
|
|
#define LoadDevice_size (326 + HDNodeType_size)
|
|
|
|
#define ResetDevice_size 72
|
2014-04-29 12:26:51 +00:00
|
|
|
#define EntropyRequest_size 0
|
|
|
|
#define EntropyAck_size 131
|
2016-11-23 12:12:15 +00:00
|
|
|
#define RecoveryDevice_size 78
|
|
|
|
#define WordRequest_size 6
|
2014-04-29 12:26:51 +00:00
|
|
|
#define WordAck_size 14
|
2014-11-12 18:17:14 +00:00
|
|
|
#define SignMessage_size 1094
|
2016-10-16 00:06:49 +00:00
|
|
|
#define VerifyMessage_size 1156
|
|
|
|
#define MessageSignature_size 110
|
2014-12-10 18:50:10 +00:00
|
|
|
#define EncryptMessage_size 1131
|
2014-11-12 18:17:14 +00:00
|
|
|
#define EncryptedMessage_size 1168
|
|
|
|
#define DecryptMessage_size 1216
|
2016-10-16 00:06:49 +00:00
|
|
|
#define DecryptedMessage_size 1070
|
2015-06-29 14:36:50 +00:00
|
|
|
#define CipherKeyValue_size 1358
|
2014-11-12 18:17:14 +00:00
|
|
|
#define CipheredKeyValue_size 1027
|
2014-04-29 12:26:51 +00:00
|
|
|
#define EstimateTxSize_size 31
|
|
|
|
#define TxSize_size 6
|
2016-04-16 02:47:09 +00:00
|
|
|
#define SignTx_size 43
|
2014-04-29 12:26:51 +00:00
|
|
|
#define TxRequest_size (18 + TxRequestDetailsType_size + TxRequestSerializedType_size)
|
|
|
|
#define TxAck_size (6 + TransactionType_size)
|
2017-04-30 01:26:57 +00:00
|
|
|
#define EthereumSignTx_size 1245
|
2016-06-12 20:53:28 +00:00
|
|
|
#define EthereumTxRequest_size 80
|
|
|
|
#define EthereumTxAck_size 1027
|
2015-06-03 19:21:16 +00:00
|
|
|
#define SignIdentity_size (558 + IdentityType_size)
|
2016-10-16 00:06:49 +00:00
|
|
|
#define SignedIdentity_size 145
|
2016-06-11 19:20:38 +00:00
|
|
|
#define GetECDHSessionKey_size (107 + IdentityType_size)
|
|
|
|
#define ECDHSessionKey_size 67
|
2016-06-12 21:39:28 +00:00
|
|
|
#define SetU2FCounter_size 6
|
2014-04-29 12:26:51 +00:00
|
|
|
#define FirmwareErase_size 0
|
|
|
|
#define DebugLinkDecision_size 2
|
|
|
|
#define DebugLinkGetState_size 0
|
|
|
|
#define DebugLinkState_size (1468 + HDNodeType_size)
|
|
|
|
#define DebugLinkStop_size 0
|
|
|
|
#define DebugLinkLog_size 300
|
2016-05-26 18:27:40 +00:00
|
|
|
#define DebugLinkMemoryRead_size 12
|
|
|
|
#define DebugLinkMemory_size 1027
|
|
|
|
#define DebugLinkMemoryWrite_size 1035
|
|
|
|
#define DebugLinkFlashErase_size 6
|
2014-04-29 12:26:51 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|