github.com/ethereum/go-ethereum@v1.16.1/accounts/usbwallet/trezor/messages-common.proto (about) 1 // This file originates from the SatoshiLabs Trezor `common` repository at: 2 // https://github.com/trezor/trezor-common/blob/master/protob/messages-common.proto 3 // dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. 4 5 syntax = "proto2"; 6 package hw.trezor.messages.common; 7 8 option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"; 9 10 /** 11 * Response: Success of the previous request 12 * @end 13 */ 14 message Success { 15 optional string message = 1; // human readable description of action or request-specific payload 16 } 17 18 /** 19 * Response: Failure of the previous request 20 * @end 21 */ 22 message Failure { 23 optional FailureType code = 1; // computer-readable definition of the error state 24 optional string message = 2; // human-readable message of the error state 25 enum FailureType { 26 Failure_UnexpectedMessage = 1; 27 Failure_ButtonExpected = 2; 28 Failure_DataError = 3; 29 Failure_ActionCancelled = 4; 30 Failure_PinExpected = 5; 31 Failure_PinCancelled = 6; 32 Failure_PinInvalid = 7; 33 Failure_InvalidSignature = 8; 34 Failure_ProcessError = 9; 35 Failure_NotEnoughFunds = 10; 36 Failure_NotInitialized = 11; 37 Failure_PinMismatch = 12; 38 Failure_FirmwareError = 99; 39 } 40 } 41 42 /** 43 * Response: Device is waiting for HW button press. 44 * @auxstart 45 * @next ButtonAck 46 */ 47 message ButtonRequest { 48 optional ButtonRequestType code = 1; 49 optional string data = 2; 50 /** 51 * Type of button request 52 */ 53 enum ButtonRequestType { 54 ButtonRequest_Other = 1; 55 ButtonRequest_FeeOverThreshold = 2; 56 ButtonRequest_ConfirmOutput = 3; 57 ButtonRequest_ResetDevice = 4; 58 ButtonRequest_ConfirmWord = 5; 59 ButtonRequest_WipeDevice = 6; 60 ButtonRequest_ProtectCall = 7; 61 ButtonRequest_SignTx = 8; 62 ButtonRequest_FirmwareCheck = 9; 63 ButtonRequest_Address = 10; 64 ButtonRequest_PublicKey = 11; 65 ButtonRequest_MnemonicWordCount = 12; 66 ButtonRequest_MnemonicInput = 13; 67 ButtonRequest_PassphraseType = 14; 68 ButtonRequest_UnknownDerivationPath = 15; 69 } 70 } 71 72 /** 73 * Request: Computer agrees to wait for HW button press 74 * @auxend 75 */ 76 message ButtonAck { 77 } 78 79 /** 80 * Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme 81 * @auxstart 82 * @next PinMatrixAck 83 */ 84 message PinMatrixRequest { 85 optional PinMatrixRequestType type = 1; 86 /** 87 * Type of PIN request 88 */ 89 enum PinMatrixRequestType { 90 PinMatrixRequestType_Current = 1; 91 PinMatrixRequestType_NewFirst = 2; 92 PinMatrixRequestType_NewSecond = 3; 93 } 94 } 95 96 /** 97 * Request: Computer responds with encoded PIN 98 * @auxend 99 */ 100 message PinMatrixAck { 101 required string pin = 1; // matrix encoded PIN entered by user 102 } 103 104 /** 105 * Response: Device awaits encryption passphrase 106 * @auxstart 107 * @next PassphraseAck 108 */ 109 message PassphraseRequest { 110 optional bool on_device = 1; // passphrase is being entered on the device 111 } 112 113 /** 114 * Request: Send passphrase back 115 * @next PassphraseStateRequest 116 */ 117 message PassphraseAck { 118 optional string passphrase = 1; 119 optional bytes state = 2; // expected device state 120 } 121 122 /** 123 * Response: Device awaits passphrase state 124 * @next PassphraseStateAck 125 */ 126 message PassphraseStateRequest { 127 optional bytes state = 1; // actual device state 128 } 129 130 /** 131 * Request: Send passphrase state back 132 * @auxend 133 */ 134 message PassphraseStateAck { 135 } 136 137 /** 138 * Structure representing BIP32 (hierarchical deterministic) node 139 * Used for imports of private key into the device and exporting public key out of device 140 * @embed 141 */ 142 message HDNodeType { 143 required uint32 depth = 1; 144 required uint32 fingerprint = 2; 145 required uint32 child_num = 3; 146 required bytes chain_code = 4; 147 optional bytes private_key = 5; 148 optional bytes public_key = 6; 149 }