/* Automatically generated nanopb header */ /* Generated by nanopb-0.2.9.3 */ #ifndef _PB_MESSAGES_PB_H_ #define _PB_MESSAGES_PB_H_ #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, MessageType_MessageType_FirmwareRequest = 8, 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, MessageType_MessageType_CipherKeyValue = 23, MessageType_MessageType_ClearSession = 24, MessageType_MessageType_ApplySettings = 25, MessageType_MessageType_ButtonRequest = 26, MessageType_MessageType_ButtonAck = 27, MessageType_MessageType_GetAddress = 29, MessageType_MessageType_Address = 30, MessageType_MessageType_SelfTest = 32, MessageType_MessageType_BackupDevice = 34, 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, 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, MessageType_MessageType_GetFeatures = 55, 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, MessageType_MessageType_SetU2FCounter = 63, MessageType_MessageType_EthereumSignMessage = 64, MessageType_MessageType_EthereumVerifyMessage = 65, MessageType_MessageType_EthereumMessageSignature = 66, MessageType_MessageType_DebugLinkDecision = 100, MessageType_MessageType_DebugLinkGetState = 101, MessageType_MessageType_DebugLinkState = 102, MessageType_MessageType_DebugLinkStop = 103, MessageType_MessageType_DebugLinkLog = 104, MessageType_MessageType_DebugLinkMemoryRead = 110, MessageType_MessageType_DebugLinkMemory = 111, MessageType_MessageType_DebugLinkMemoryWrite = 112, MessageType_MessageType_DebugLinkFlashErase = 113 } MessageType; /* Struct definitions */ typedef struct _BackupDevice { uint8_t dummy_field; } BackupDevice; typedef struct _ButtonAck { uint8_t dummy_field; } ButtonAck; typedef struct _Cancel { uint8_t dummy_field; } Cancel; typedef struct _ClearSession { uint8_t dummy_field; } ClearSession; 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 _GetFeatures { uint8_t dummy_field; } GetFeatures; 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 { char address[60]; } Address; typedef struct { size_t size; uint8_t bytes[1024]; } ApplySettings_homescreen_t; typedef struct _ApplySettings { bool has_language; char language[17]; bool has_label; char label[33]; bool has_use_passphrase; bool use_passphrase; bool has_homescreen; ApplySettings_homescreen_t homescreen; } 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; typedef struct { size_t size; uint8_t bytes[1024]; } CipherKeyValue_value_t; typedef struct { size_t size; uint8_t bytes[16]; } CipherKeyValue_iv_t; typedef struct _CipherKeyValue { size_t address_n_count; 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; bool has_iv; CipherKeyValue_iv_t iv; } CipherKeyValue; typedef struct { size_t size; uint8_t bytes[1024]; } CipheredKeyValue_value_t; typedef struct _CipheredKeyValue { bool has_value; CipheredKeyValue_value_t value; } CipheredKeyValue; typedef struct _DebugLinkDecision { bool yes_no; } DebugLinkDecision; typedef struct _DebugLinkFlashErase { bool has_sector; uint32_t sector; } DebugLinkFlashErase; typedef struct _DebugLinkLog { bool has_level; uint32_t level; bool has_bucket; char bucket[33]; bool has_text; char text[256]; } DebugLinkLog; 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; typedef struct { size_t size; uint8_t bytes[1024]; } DebugLinkState_layout_t; typedef struct { size_t size; uint8_t bytes[128]; } DebugLinkState_reset_entropy_t; 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; 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; typedef struct { size_t size; uint8_t bytes[1024]; } Entropy_entropy_t; typedef struct _Entropy { Entropy_entropy_t entropy; } Entropy; typedef struct { size_t size; uint8_t bytes[128]; } EntropyAck_entropy_t; typedef struct _EntropyAck { bool has_entropy; EntropyAck_entropy_t entropy; } EntropyAck; typedef struct { size_t size; uint8_t bytes[20]; } EthereumAddress_address_t; typedef struct _EthereumAddress { EthereumAddress_address_t address; } EthereumAddress; typedef struct _EthereumGetAddress { size_t address_n_count; uint32_t address_n[8]; bool has_show_display; bool show_display; } EthereumGetAddress; typedef struct { size_t size; uint8_t bytes[20]; } EthereumMessageSignature_address_t; typedef struct { size_t size; uint8_t bytes[65]; } EthereumMessageSignature_signature_t; typedef struct _EthereumMessageSignature { bool has_address; EthereumMessageSignature_address_t address; bool has_signature; EthereumMessageSignature_signature_t signature; } EthereumMessageSignature; typedef struct { size_t size; uint8_t bytes[1024]; } EthereumSignMessage_message_t; typedef struct _EthereumSignMessage { size_t address_n_count; uint32_t address_n[8]; EthereumSignMessage_message_t message; } EthereumSignMessage; 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; typedef struct _EthereumSignTx { 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; bool has_data_length; uint32_t data_length; bool has_chain_id; uint32_t chain_id; } EthereumSignTx; typedef struct { size_t size; uint8_t bytes[1024]; } EthereumTxAck_data_chunk_t; typedef struct _EthereumTxAck { bool has_data_chunk; EthereumTxAck_data_chunk_t data_chunk; } EthereumTxAck; 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; typedef struct _EthereumTxRequest { bool has_data_length; uint32_t data_length; bool has_signature_v; uint32_t signature_v; bool has_signature_r; EthereumTxRequest_signature_r_t signature_r; bool has_signature_s; EthereumTxRequest_signature_s_t signature_s; } EthereumTxRequest; typedef struct { size_t size; uint8_t bytes[20]; } EthereumVerifyMessage_address_t; typedef struct { size_t size; uint8_t bytes[65]; } EthereumVerifyMessage_signature_t; typedef struct { size_t size; uint8_t bytes[1024]; } EthereumVerifyMessage_message_t; typedef struct _EthereumVerifyMessage { bool has_address; EthereumVerifyMessage_address_t address; bool has_signature; EthereumVerifyMessage_signature_t signature; bool has_message; EthereumVerifyMessage_message_t message; } EthereumVerifyMessage; typedef struct _Failure { bool has_code; FailureType code; bool has_message; char message[256]; } Failure; typedef struct { size_t size; uint8_t bytes[20]; } Features_revision_t; typedef struct { size_t size; uint8_t bytes[32]; } Features_bootloader_hash_t; 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]; size_t coins_count; CoinType coins[8]; bool has_initialized; bool initialized; bool has_revision; Features_revision_t revision; bool has_bootloader_hash; Features_bootloader_hash_t bootloader_hash; bool has_imported; bool imported; bool has_pin_cached; bool pin_cached; bool has_passphrase_cached; bool passphrase_cached; bool has_firmware_present; bool firmware_present; bool has_needs_backup; bool needs_backup; } Features; typedef struct _GetAddress { size_t address_n_count; uint32_t address_n[8]; bool has_coin_name; char coin_name[17]; bool has_show_display; bool show_display; bool has_multisig; MultisigRedeemScriptType multisig; bool has_script_type; InputScriptType script_type; } GetAddress; 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; typedef struct _GetEntropy { uint32_t size; } GetEntropy; typedef struct _GetPublicKey { size_t address_n_count; uint32_t address_n[8]; bool has_ecdsa_curve_name; char ecdsa_curve_name[32]; bool has_show_display; bool show_display; bool has_coin_name; char coin_name[17]; } 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; bool has_u2f_counter; uint32_t u2f_counter; } LoadDevice; typedef struct { size_t size; uint8_t bytes[65]; } MessageSignature_signature_t; typedef struct _MessageSignature { bool has_address; char address[41]; 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; bool has_xpub; char xpub[113]; } 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; bool has_type; uint32_t type; bool has_u2f_counter; uint32_t u2f_counter; bool has_dry_run; bool dry_run; } 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]; bool has_u2f_counter; uint32_t u2f_counter; bool has_skip_backup; bool skip_backup; } ResetDevice; typedef struct _SetU2FCounter { bool has_u2f_counter; uint32_t u2f_counter; } SetU2FCounter; typedef struct { size_t size; uint8_t bytes[256]; } 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; char challenge_visual[256]; bool has_ecdsa_curve_name; char ecdsa_curve_name[32]; } SignIdentity; typedef struct { size_t size; uint8_t bytes[1024]; } SignMessage_message_t; typedef struct _SignMessage { size_t address_n_count; 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]; bool has_version; uint32_t version; bool has_lock_time; uint32_t lock_time; } SignTx; 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; char address[41]; bool has_public_key; SignedIdentity_public_key_t public_key; bool has_signature; SignedIdentity_signature_t signature; } SignedIdentity; 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 { size_t size; uint8_t bytes[65]; } VerifyMessage_signature_t; typedef struct { size_t size; uint8_t bytes[1024]; } VerifyMessage_message_t; typedef struct _VerifyMessage { bool has_address; char address[41]; bool has_signature; VerifyMessage_signature_t signature; bool has_message; VerifyMessage_message_t message; bool has_coin_name; char coin_name[17]; } VerifyMessage; typedef struct _WordAck { char word[12]; } WordAck; typedef struct _WordRequest { bool has_type; WordRequestType type; } WordRequest; /* Default values for struct fields */ extern const char GetPublicKey_coin_name_default[17]; extern const char GetAddress_coin_name_default[17]; extern const InputScriptType GetAddress_script_type_default; 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]; extern const char VerifyMessage_coin_name_default[17]; extern const char SignTx_coin_name_default[17]; extern const uint32_t SignTx_version_default; extern const uint32_t SignTx_lock_time_default; /* Initializer values for message structs */ #define Initialize_init_default {0} #define GetFeatures_init_default {0} #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, false, 0} #define ClearSession_init_default {0} #define ApplySettings_init_default {false, "", false, "", false, 0, false, {0, {0}}} #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}}} #define GetPublicKey_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, "Bitcoin"} #define PublicKey_init_default {HDNodeType_init_default, false, ""} #define GetAddress_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "Bitcoin", false, 0, false, MultisigRedeemScriptType_init_default, false, InputScriptType_SPENDADDRESS} #define EthereumGetAddress_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, 0} #define Address_init_default {""} #define EthereumAddress_init_default {{0, {0}}} #define WipeDevice_init_default {0} #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, false, 0} #define BackupDevice_init_default {0} #define EntropyRequest_init_default {0} #define EntropyAck_init_default {false, {0, {0}}} #define RecoveryDevice_init_default {false, 0, false, 0, false, 0, false, "english", false, "", false, 0, false, 0, false, 0, false, 0} #define WordRequest_init_default {false, (WordRequestType)0} #define WordAck_init_default {""} #define SignMessage_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}, false, "Bitcoin"} #define VerifyMessage_init_default {false, "", false, {0, {0}}, false, {0, {0}}, false, "Bitcoin"} #define MessageSignature_init_default {false, "", false, {0, {0}}} #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}}} #define CipheredKeyValue_init_default {false, {0, {0}}} #define SignTx_init_default {0, 0, false, "Bitcoin", false, 1u, false, 0u} #define TxRequest_init_default {false, (RequestType)0, false, TxRequestDetailsType_init_default, false, TxRequestSerializedType_init_default} #define TxAck_init_default {false, TransactionType_init_default} #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} #define EthereumTxRequest_init_default {false, 0, false, 0, false, {0, {0}}, false, {0, {0}}} #define EthereumTxAck_init_default {false, {0, {0}}} #define EthereumSignMessage_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}} #define EthereumVerifyMessage_init_default {false, {0, {0}}, false, {0, {0}}, false, {0, {0}}} #define EthereumMessageSignature_init_default {false, {0, {0}}, false, {0, {0}}} #define SignIdentity_init_default {false, IdentityType_init_default, false, {0, {0}}, false, "", false, ""} #define SignedIdentity_init_default {false, "", false, {0, {0}}, false, {0, {0}}} #define GetECDHSessionKey_init_default {false, IdentityType_init_default, false, {0, {0}}, false, ""} #define ECDHSessionKey_init_default {false, {0, {0}}} #define SetU2FCounter_init_default {false, 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, ""} #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} #define Initialize_init_zero {0} #define GetFeatures_init_zero {0} #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, false, 0} #define ClearSession_init_zero {0} #define ApplySettings_init_zero {false, "", false, "", false, 0, false, {0, {0}}} #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}}} #define GetPublicKey_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, ""} #define PublicKey_init_zero {HDNodeType_init_zero, false, ""} #define GetAddress_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, "", false, 0, false, MultisigRedeemScriptType_init_zero, false, (InputScriptType)0} #define EthereumGetAddress_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, false, 0} #define Address_init_zero {""} #define EthereumAddress_init_zero {{0, {0}}} #define WipeDevice_init_zero {0} #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, false, 0} #define BackupDevice_init_zero {0} #define EntropyRequest_init_zero {0} #define EntropyAck_init_zero {false, {0, {0}}} #define RecoveryDevice_init_zero {false, 0, false, 0, false, 0, false, "", false, "", false, 0, false, 0, false, 0, false, 0} #define WordRequest_init_zero {false, (WordRequestType)0} #define WordAck_init_zero {""} #define SignMessage_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}, false, ""} #define VerifyMessage_init_zero {false, "", false, {0, {0}}, false, {0, {0}}, false, ""} #define MessageSignature_init_zero {false, "", false, {0, {0}}} #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}}} #define CipheredKeyValue_init_zero {false, {0, {0}}} #define SignTx_init_zero {0, 0, false, "", false, 0, false, 0} #define TxRequest_init_zero {false, (RequestType)0, false, TxRequestDetailsType_init_zero, false, TxRequestSerializedType_init_zero} #define TxAck_init_zero {false, TransactionType_init_zero} #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} #define EthereumTxRequest_init_zero {false, 0, false, 0, false, {0, {0}}, false, {0, {0}}} #define EthereumTxAck_init_zero {false, {0, {0}}} #define EthereumSignMessage_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, {0, {0}}} #define EthereumVerifyMessage_init_zero {false, {0, {0}}, false, {0, {0}}, false, {0, {0}}} #define EthereumMessageSignature_init_zero {false, {0, {0}}, false, {0, {0}}} #define SignIdentity_init_zero {false, IdentityType_init_zero, false, {0, {0}}, false, "", false, ""} #define SignedIdentity_init_zero {false, "", false, {0, {0}}, false, {0, {0}}} #define GetECDHSessionKey_init_zero {false, IdentityType_init_zero, false, {0, {0}}, false, ""} #define ECDHSessionKey_init_zero {false, {0, {0}}} #define SetU2FCounter_init_zero {false, 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, ""} #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} /* Field tags (for use in manual encoding/decoding) */ #define Address_address_tag 1 #define ApplySettings_language_tag 1 #define ApplySettings_label_tag 2 #define ApplySettings_use_passphrase_tag 3 #define ApplySettings_homescreen_tag 4 #define ButtonRequest_code_tag 1 #define ButtonRequest_data_tag 2 #define ChangePin_remove_tag 1 #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 #define CipherKeyValue_iv_tag 7 #define CipheredKeyValue_value_tag 1 #define DebugLinkDecision_yes_no_tag 1 #define DebugLinkFlashErase_sector_tag 1 #define DebugLinkLog_level_tag 1 #define DebugLinkLog_bucket_tag 2 #define DebugLinkLog_text_tag 3 #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 #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 #define ECDHSessionKey_session_key_tag 1 #define Entropy_entropy_tag 1 #define EntropyAck_entropy_tag 1 #define EthereumAddress_address_tag 1 #define EthereumGetAddress_address_n_tag 1 #define EthereumGetAddress_show_display_tag 2 #define EthereumMessageSignature_address_tag 1 #define EthereumMessageSignature_signature_tag 2 #define EthereumSignMessage_address_n_tag 1 #define EthereumSignMessage_message_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 #define EthereumSignTx_chain_id_tag 9 #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 #define EthereumVerifyMessage_address_tag 1 #define EthereumVerifyMessage_signature_tag 2 #define EthereumVerifyMessage_message_tag 3 #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 #define Features_imported_tag 15 #define Features_pin_cached_tag 16 #define Features_passphrase_cached_tag 17 #define Features_firmware_present_tag 18 #define Features_needs_backup_tag 19 #define GetAddress_address_n_tag 1 #define GetAddress_coin_name_tag 2 #define GetAddress_show_display_tag 3 #define GetAddress_multisig_tag 4 #define GetAddress_script_type_tag 5 #define GetECDHSessionKey_identity_tag 1 #define GetECDHSessionKey_peer_public_key_tag 2 #define GetECDHSessionKey_ecdsa_curve_name_tag 3 #define GetEntropy_size_tag 1 #define GetPublicKey_address_n_tag 1 #define GetPublicKey_ecdsa_curve_name_tag 2 #define GetPublicKey_show_display_tag 3 #define GetPublicKey_coin_name_tag 4 #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 #define LoadDevice_u2f_counter_tag 8 #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 #define PublicKey_xpub_tag 2 #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 #define RecoveryDevice_type_tag 8 #define RecoveryDevice_u2f_counter_tag 9 #define RecoveryDevice_dry_run_tag 10 #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 #define ResetDevice_u2f_counter_tag 7 #define ResetDevice_skip_backup_tag 8 #define SetU2FCounter_u2f_counter_tag 1 #define SignIdentity_identity_tag 1 #define SignIdentity_challenge_hidden_tag 2 #define SignIdentity_challenge_visual_tag 3 #define SignIdentity_ecdsa_curve_name_tag 4 #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 #define SignTx_version_tag 4 #define SignTx_lock_time_tag 5 #define SignedIdentity_address_tag 1 #define SignedIdentity_public_key_tag 2 #define SignedIdentity_signature_tag 3 #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 VerifyMessage_address_tag 1 #define VerifyMessage_signature_tag 2 #define VerifyMessage_message_tag 3 #define VerifyMessage_coin_name_tag 4 #define WordAck_word_tag 1 #define WordRequest_type_tag 1 /* Struct field encoding specification for nanopb */ extern const pb_field_t Initialize_fields[1]; extern const pb_field_t GetFeatures_fields[1]; extern const pb_field_t Features_fields[20]; extern const pb_field_t ClearSession_fields[1]; extern const pb_field_t ApplySettings_fields[5]; extern const pb_field_t ChangePin_fields[2]; extern const pb_field_t Ping_fields[5]; extern const pb_field_t Success_fields[2]; 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]; extern const pb_field_t GetPublicKey_fields[5]; extern const pb_field_t PublicKey_fields[3]; extern const pb_field_t GetAddress_fields[6]; extern const pb_field_t EthereumGetAddress_fields[3]; extern const pb_field_t Address_fields[2]; extern const pb_field_t EthereumAddress_fields[2]; extern const pb_field_t WipeDevice_fields[1]; extern const pb_field_t LoadDevice_fields[9]; extern const pb_field_t ResetDevice_fields[9]; extern const pb_field_t BackupDevice_fields[1]; extern const pb_field_t EntropyRequest_fields[1]; extern const pb_field_t EntropyAck_fields[2]; extern const pb_field_t RecoveryDevice_fields[10]; extern const pb_field_t WordRequest_fields[2]; extern const pb_field_t WordAck_fields[2]; extern const pb_field_t SignMessage_fields[4]; extern const pb_field_t VerifyMessage_fields[5]; extern const pb_field_t MessageSignature_fields[3]; extern const pb_field_t CipherKeyValue_fields[8]; extern const pb_field_t CipheredKeyValue_fields[2]; extern const pb_field_t SignTx_fields[6]; extern const pb_field_t TxRequest_fields[4]; extern const pb_field_t TxAck_fields[2]; extern const pb_field_t EthereumSignTx_fields[10]; extern const pb_field_t EthereumTxRequest_fields[5]; extern const pb_field_t EthereumTxAck_fields[2]; extern const pb_field_t EthereumSignMessage_fields[3]; extern const pb_field_t EthereumVerifyMessage_fields[4]; extern const pb_field_t EthereumMessageSignature_fields[3]; extern const pb_field_t SignIdentity_fields[5]; extern const pb_field_t SignedIdentity_fields[4]; extern const pb_field_t GetECDHSessionKey_fields[4]; extern const pb_field_t ECDHSessionKey_fields[2]; extern const pb_field_t SetU2FCounter_fields[2]; 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]; 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]; /* Maximum encoded size of messages (where known) */ #define Initialize_size 0 #define GetFeatures_size 0 #define Features_size (260 + 8*CoinType_size) #define ClearSession_size 0 #define ApplySettings_size 1083 #define ChangePin_size 2 #define Ping_size 265 #define Success_size 259 #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 #define GetPublicKey_size 103 #define PublicKey_size (121 + HDNodeType_size) #define GetAddress_size (81 + MultisigRedeemScriptType_size) #define EthereumGetAddress_size 50 #define Address_size 62 #define EthereumAddress_size 22 #define WipeDevice_size 0 #define LoadDevice_size (326 + HDNodeType_size) #define ResetDevice_size 74 #define BackupDevice_size 0 #define EntropyRequest_size 0 #define EntropyAck_size 131 #define RecoveryDevice_size 80 #define WordRequest_size 6 #define WordAck_size 14 #define SignMessage_size 1094 #define VerifyMessage_size 1156 #define MessageSignature_size 110 #define CipherKeyValue_size 1358 #define CipheredKeyValue_size 1027 #define SignTx_size 43 #define TxRequest_size (18 + TxRequestDetailsType_size + TxRequestSerializedType_size) #define TxAck_size (6 + TransactionType_size) #define EthereumSignTx_size 1245 #define EthereumTxRequest_size 80 #define EthereumTxAck_size 1027 #define EthereumSignMessage_size 1075 #define EthereumVerifyMessage_size 1116 #define EthereumMessageSignature_size 89 #define SignIdentity_size (558 + IdentityType_size) #define SignedIdentity_size 145 #define GetECDHSessionKey_size (107 + IdentityType_size) #define ECDHSessionKey_size 67 #define SetU2FCounter_size 6 #define DebugLinkDecision_size 2 #define DebugLinkGetState_size 0 #define DebugLinkState_size (1468 + HDNodeType_size) #define DebugLinkStop_size 0 #define DebugLinkLog_size 300 #define DebugLinkMemoryRead_size 12 #define DebugLinkMemory_size 1027 #define DebugLinkMemoryWrite_size 1035 #define DebugLinkFlashErase_size 6 #ifdef __cplusplus } /* extern "C" */ #endif #endif