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