github.com/ApeGame/aac@v1.9.7/accounts/usbwallet/trezor/messages.proto (about) 1 // This file originates from the SatoshiLabs Trezor `common` repository at: 2 // https://github.com/trezor/trezor-common/blob/master/protob/messages.proto 3 // dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. 4 5 syntax = "proto2"; 6 package hw.trezor.messages; 7 8 /** 9 * Messages for TREZOR communication 10 */ 11 12 // Sugar for easier handling in Java 13 option java_package = "com.satoshilabs.trezor.lib.protobuf"; 14 option java_outer_classname = "TrezorMessage"; 15 16 import "google/protobuf/descriptor.proto"; 17 18 /** 19 * Options for specifying message direction and type of wire (normal/debug) 20 */ 21 extend google.protobuf.EnumValueOptions { 22 optional bool wire_in = 50002; // message can be transmitted via wire from PC to TREZOR 23 optional bool wire_out = 50003; // message can be transmitted via wire from TREZOR to PC 24 optional bool wire_debug_in = 50004; // message can be transmitted via debug wire from PC to TREZOR 25 optional bool wire_debug_out = 50005; // message can be transmitted via debug wire from TREZOR to PC 26 optional bool wire_tiny = 50006; // message is handled by TREZOR when the USB stack is in tiny mode 27 optional bool wire_bootloader = 50007; // message is only handled by TREZOR Bootloader 28 optional bool wire_no_fsm = 50008; // message is not handled by TREZOR unless the USB stack is in tiny mode 29 } 30 31 /** 32 * Mapping between TREZOR wire identifier (uint) and a protobuf message 33 */ 34 enum MessageType { 35 36 // Management 37 MessageType_Initialize = 0 [(wire_in) = true, (wire_tiny) = true]; 38 MessageType_Ping = 1 [(wire_in) = true]; 39 MessageType_Success = 2 [(wire_out) = true]; 40 MessageType_Failure = 3 [(wire_out) = true]; 41 MessageType_ChangePin = 4 [(wire_in) = true]; 42 MessageType_WipeDevice = 5 [(wire_in) = true]; 43 MessageType_GetEntropy = 9 [(wire_in) = true]; 44 MessageType_Entropy = 10 [(wire_out) = true]; 45 MessageType_LoadDevice = 13 [(wire_in) = true]; 46 MessageType_ResetDevice = 14 [(wire_in) = true]; 47 MessageType_Features = 17 [(wire_out) = true]; 48 MessageType_PinMatrixRequest = 18 [(wire_out) = true]; 49 MessageType_PinMatrixAck = 19 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; 50 MessageType_Cancel = 20 [(wire_in) = true, (wire_tiny) = true]; 51 MessageType_ClearSession = 24 [(wire_in) = true]; 52 MessageType_ApplySettings = 25 [(wire_in) = true]; 53 MessageType_ButtonRequest = 26 [(wire_out) = true]; 54 MessageType_ButtonAck = 27 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; 55 MessageType_ApplyFlags = 28 [(wire_in) = true]; 56 MessageType_BackupDevice = 34 [(wire_in) = true]; 57 MessageType_EntropyRequest = 35 [(wire_out) = true]; 58 MessageType_EntropyAck = 36 [(wire_in) = true]; 59 MessageType_PassphraseRequest = 41 [(wire_out) = true]; 60 MessageType_PassphraseAck = 42 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; 61 MessageType_PassphraseStateRequest = 77 [(wire_out) = true]; 62 MessageType_PassphraseStateAck = 78 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; 63 MessageType_RecoveryDevice = 45 [(wire_in) = true]; 64 MessageType_WordRequest = 46 [(wire_out) = true]; 65 MessageType_WordAck = 47 [(wire_in) = true]; 66 MessageType_GetFeatures = 55 [(wire_in) = true]; 67 MessageType_SetU2FCounter = 63 [(wire_in) = true]; 68 69 // Bootloader 70 MessageType_FirmwareErase = 6 [(wire_in) = true, (wire_bootloader) = true]; 71 MessageType_FirmwareUpload = 7 [(wire_in) = true, (wire_bootloader) = true]; 72 MessageType_FirmwareRequest = 8 [(wire_out) = true, (wire_bootloader) = true]; 73 MessageType_SelfTest = 32 [(wire_in) = true, (wire_bootloader) = true]; 74 75 // Bitcoin 76 MessageType_GetPublicKey = 11 [(wire_in) = true]; 77 MessageType_PublicKey = 12 [(wire_out) = true]; 78 MessageType_SignTx = 15 [(wire_in) = true]; 79 MessageType_TxRequest = 21 [(wire_out) = true]; 80 MessageType_TxAck = 22 [(wire_in) = true]; 81 MessageType_GetAddress = 29 [(wire_in) = true]; 82 MessageType_Address = 30 [(wire_out) = true]; 83 MessageType_SignMessage = 38 [(wire_in) = true]; 84 MessageType_VerifyMessage = 39 [(wire_in) = true]; 85 MessageType_MessageSignature = 40 [(wire_out) = true]; 86 87 // Crypto 88 MessageType_CipherKeyValue = 23 [(wire_in) = true]; 89 MessageType_CipheredKeyValue = 48 [(wire_out) = true]; 90 MessageType_SignIdentity = 53 [(wire_in) = true]; 91 MessageType_SignedIdentity = 54 [(wire_out) = true]; 92 MessageType_GetECDHSessionKey = 61 [(wire_in) = true]; 93 MessageType_ECDHSessionKey = 62 [(wire_out) = true]; 94 MessageType_CosiCommit = 71 [(wire_in) = true]; 95 MessageType_CosiCommitment = 72 [(wire_out) = true]; 96 MessageType_CosiSign = 73 [(wire_in) = true]; 97 MessageType_CosiSignature = 74 [(wire_out) = true]; 98 99 // Debug 100 MessageType_DebugLinkDecision = 100 [(wire_debug_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; 101 MessageType_DebugLinkGetState = 101 [(wire_debug_in) = true, (wire_tiny) = true]; 102 MessageType_DebugLinkState = 102 [(wire_debug_out) = true]; 103 MessageType_DebugLinkStop = 103 [(wire_debug_in) = true]; 104 MessageType_DebugLinkLog = 104 [(wire_debug_out) = true]; 105 MessageType_DebugLinkMemoryRead = 110 [(wire_debug_in) = true]; 106 MessageType_DebugLinkMemory = 111 [(wire_debug_out) = true]; 107 MessageType_DebugLinkMemoryWrite = 112 [(wire_debug_in) = true]; 108 MessageType_DebugLinkFlashErase = 113 [(wire_debug_in) = true]; 109 110 // Ethereum 111 MessageType_EthereumGetPublicKey = 450 [(wire_in) = true]; 112 MessageType_EthereumPublicKey = 451 [(wire_out) = true]; 113 MessageType_EthereumGetAddress = 56 [(wire_in) = true]; 114 MessageType_EthereumAddress = 57 [(wire_out) = true]; 115 MessageType_EthereumSignTx = 58 [(wire_in) = true]; 116 MessageType_EthereumTxRequest = 59 [(wire_out) = true]; 117 MessageType_EthereumTxAck = 60 [(wire_in) = true]; 118 MessageType_EthereumSignMessage = 64 [(wire_in) = true]; 119 MessageType_EthereumVerifyMessage = 65 [(wire_in) = true]; 120 MessageType_EthereumMessageSignature = 66 [(wire_out) = true]; 121 122 // NEM 123 MessageType_NEMGetAddress = 67 [(wire_in) = true]; 124 MessageType_NEMAddress = 68 [(wire_out) = true]; 125 MessageType_NEMSignTx = 69 [(wire_in) = true]; 126 MessageType_NEMSignedTx = 70 [(wire_out) = true]; 127 MessageType_NEMDecryptMessage = 75 [(wire_in) = true]; 128 MessageType_NEMDecryptedMessage = 76 [(wire_out) = true]; 129 130 // Lisk 131 MessageType_LiskGetAddress = 114 [(wire_in) = true]; 132 MessageType_LiskAddress = 115 [(wire_out) = true]; 133 MessageType_LiskSignTx = 116 [(wire_in) = true]; 134 MessageType_LiskSignedTx = 117 [(wire_out) = true]; 135 MessageType_LiskSignMessage = 118 [(wire_in) = true]; 136 MessageType_LiskMessageSignature = 119 [(wire_out) = true]; 137 MessageType_LiskVerifyMessage = 120 [(wire_in) = true]; 138 MessageType_LiskGetPublicKey = 121 [(wire_in) = true]; 139 MessageType_LiskPublicKey = 122 [(wire_out) = true]; 140 141 // Tezos 142 MessageType_TezosGetAddress = 150 [(wire_in) = true]; 143 MessageType_TezosAddress = 151 [(wire_out) = true]; 144 MessageType_TezosSignTx = 152 [(wire_in) = true]; 145 MessageType_TezosSignedTx = 153 [(wire_out) = true]; 146 MessageType_TezosGetPublicKey = 154 [(wire_in) = true]; 147 MessageType_TezosPublicKey = 155 [(wire_out) = true]; 148 149 // Stellar 150 MessageType_StellarSignTx = 202 [(wire_in) = true]; 151 MessageType_StellarTxOpRequest = 203 [(wire_out) = true]; 152 MessageType_StellarGetAddress = 207 [(wire_in) = true]; 153 MessageType_StellarAddress = 208 [(wire_out) = true]; 154 MessageType_StellarCreateAccountOp = 210 [(wire_in) = true]; 155 MessageType_StellarPaymentOp = 211 [(wire_in) = true]; 156 MessageType_StellarPathPaymentOp = 212 [(wire_in) = true]; 157 MessageType_StellarManageOfferOp = 213 [(wire_in) = true]; 158 MessageType_StellarCreatePassiveOfferOp = 214 [(wire_in) = true]; 159 MessageType_StellarSetOptionsOp = 215 [(wire_in) = true]; 160 MessageType_StellarChangeTrustOp = 216 [(wire_in) = true]; 161 MessageType_StellarAllowTrustOp = 217 [(wire_in) = true]; 162 MessageType_StellarAccountMergeOp = 218 [(wire_in) = true]; 163 // omitted: StellarInflationOp is not a supported operation, would be 219 164 MessageType_StellarManageDataOp = 220 [(wire_in) = true]; 165 MessageType_StellarBumpSequenceOp = 221 [(wire_in) = true]; 166 MessageType_StellarSignedTx = 230 [(wire_out) = true]; 167 168 // TRON 169 MessageType_TronGetAddress = 250 [(wire_in) = true]; 170 MessageType_TronAddress = 251 [(wire_out) = true]; 171 MessageType_TronSignTx = 252 [(wire_in) = true]; 172 MessageType_TronSignedTx = 253 [(wire_out) = true]; 173 174 // Cardano 175 // dropped Sign/VerifyMessage ids 300-302 176 MessageType_CardanoSignTx = 303 [(wire_in) = true]; 177 MessageType_CardanoTxRequest = 304 [(wire_out) = true]; 178 MessageType_CardanoGetPublicKey = 305 [(wire_in) = true]; 179 MessageType_CardanoPublicKey = 306 [(wire_out) = true]; 180 MessageType_CardanoGetAddress = 307 [(wire_in) = true]; 181 MessageType_CardanoAddress = 308 [(wire_out) = true]; 182 MessageType_CardanoTxAck = 309 [(wire_in) = true]; 183 MessageType_CardanoSignedTx = 310 [(wire_out) = true]; 184 185 // Ontology 186 MessageType_OntologyGetAddress = 350 [(wire_in) = true]; 187 MessageType_OntologyAddress = 351 [(wire_out) = true]; 188 MessageType_OntologyGetPublicKey = 352 [(wire_in) = true]; 189 MessageType_OntologyPublicKey = 353 [(wire_out) = true]; 190 MessageType_OntologySignTransfer = 354 [(wire_in) = true]; 191 MessageType_OntologySignedTransfer = 355 [(wire_out) = true]; 192 MessageType_OntologySignWithdrawOng = 356 [(wire_in) = true]; 193 MessageType_OntologySignedWithdrawOng = 357 [(wire_out) = true]; 194 MessageType_OntologySignOntIdRegister = 358 [(wire_in) = true]; 195 MessageType_OntologySignedOntIdRegister = 359 [(wire_out) = true]; 196 MessageType_OntologySignOntIdAddAttributes = 360 [(wire_in) = true]; 197 MessageType_OntologySignedOntIdAddAttributes = 361 [(wire_out) = true]; 198 199 // Ripple 200 MessageType_RippleGetAddress = 400 [(wire_in) = true]; 201 MessageType_RippleAddress = 401 [(wire_out) = true]; 202 MessageType_RippleSignTx = 402 [(wire_in) = true]; 203 MessageType_RippleSignedTx = 403 [(wire_in) = true]; 204 205 // Monero 206 MessageType_MoneroTransactionInitRequest = 501 [(wire_out) = true]; 207 MessageType_MoneroTransactionInitAck = 502 [(wire_out) = true]; 208 MessageType_MoneroTransactionSetInputRequest = 503 [(wire_out) = true]; 209 MessageType_MoneroTransactionSetInputAck = 504 [(wire_out) = true]; 210 MessageType_MoneroTransactionInputsPermutationRequest = 505 [(wire_out) = true]; 211 MessageType_MoneroTransactionInputsPermutationAck = 506 [(wire_out) = true]; 212 MessageType_MoneroTransactionInputViniRequest = 507 [(wire_out) = true]; 213 MessageType_MoneroTransactionInputViniAck = 508 [(wire_out) = true]; 214 MessageType_MoneroTransactionAllInputsSetRequest = 509 [(wire_out) = true]; 215 MessageType_MoneroTransactionAllInputsSetAck = 510 [(wire_out) = true]; 216 MessageType_MoneroTransactionSetOutputRequest = 511 [(wire_out) = true]; 217 MessageType_MoneroTransactionSetOutputAck = 512 [(wire_out) = true]; 218 MessageType_MoneroTransactionAllOutSetRequest = 513 [(wire_out) = true]; 219 MessageType_MoneroTransactionAllOutSetAck = 514 [(wire_out) = true]; 220 MessageType_MoneroTransactionSignInputRequest = 515 [(wire_out) = true]; 221 MessageType_MoneroTransactionSignInputAck = 516 [(wire_out) = true]; 222 MessageType_MoneroTransactionFinalRequest = 517 [(wire_out) = true]; 223 MessageType_MoneroTransactionFinalAck = 518 [(wire_out) = true]; 224 MessageType_MoneroKeyImageExportInitRequest = 530 [(wire_out) = true]; 225 MessageType_MoneroKeyImageExportInitAck = 531 [(wire_out) = true]; 226 MessageType_MoneroKeyImageSyncStepRequest = 532 [(wire_out) = true]; 227 MessageType_MoneroKeyImageSyncStepAck = 533 [(wire_out) = true]; 228 MessageType_MoneroKeyImageSyncFinalRequest = 534 [(wire_out) = true]; 229 MessageType_MoneroKeyImageSyncFinalAck = 535 [(wire_out) = true]; 230 MessageType_MoneroGetAddress = 540 [(wire_in) = true]; 231 MessageType_MoneroAddress = 541 [(wire_out) = true]; 232 MessageType_MoneroGetWatchKey = 542 [(wire_in) = true]; 233 MessageType_MoneroWatchKey = 543 [(wire_out) = true]; 234 MessageType_DebugMoneroDiagRequest = 546 [(wire_in) = true]; 235 MessageType_DebugMoneroDiagAck = 547 [(wire_out) = true]; 236 MessageType_MoneroGetTxKeyRequest = 550 [(wire_in) = true]; 237 MessageType_MoneroGetTxKeyAck = 551 [(wire_out) = true]; 238 MessageType_MoneroLiveRefreshStartRequest = 552 [(wire_in) = true]; 239 MessageType_MoneroLiveRefreshStartAck = 553 [(wire_out) = true]; 240 MessageType_MoneroLiveRefreshStepRequest = 554 [(wire_in) = true]; 241 MessageType_MoneroLiveRefreshStepAck = 555 [(wire_out) = true]; 242 MessageType_MoneroLiveRefreshFinalRequest = 556 [(wire_in) = true]; 243 MessageType_MoneroLiveRefreshFinalAck = 557 [(wire_out) = true]; 244 245 // EOS 246 MessageType_EosGetPublicKey = 600 [(wire_in) = true]; 247 MessageType_EosPublicKey = 601 [(wire_out) = true]; 248 MessageType_EosSignTx = 602 [(wire_in) = true]; 249 MessageType_EosTxActionRequest = 603 [(wire_out) = true]; 250 MessageType_EosTxActionAck = 604 [(wire_in) = true]; 251 MessageType_EosSignedTx = 605 [(wire_out) = true]; 252 253 // Binance 254 MessageType_BinanceGetAddress = 700 [(wire_in) = true]; 255 MessageType_BinanceAddress = 701 [(wire_out) = true]; 256 MessageType_BinanceGetPublicKey = 702 [(wire_in) = true]; 257 MessageType_BinancePublicKey = 703 [(wire_out) = true]; 258 MessageType_BinanceSignTx = 704 [(wire_in) = true]; 259 MessageType_BinanceTxRequest = 705 [(wire_out) = true]; 260 MessageType_BinanceTransferMsg = 706 [(wire_in) = true]; 261 MessageType_BinanceOrderMsg = 707 [(wire_in) = true]; 262 MessageType_BinanceCancelMsg = 708 [(wire_in) = true]; 263 MessageType_BinanceSignedTx = 709 [(wire_out) = true]; 264 }