1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

feat(common): add thp protobuf definitions and modify pb2py

[no changelog]
This commit is contained in:
M1nd3r 2024-12-02 15:37:10 +01:00
parent 4c632e2bec
commit c2fe4eddb0
9 changed files with 4144 additions and 97 deletions

View File

@ -39,6 +39,8 @@ message Failure {
Failure_PinMismatch = 12; Failure_PinMismatch = 12;
Failure_WipeCodeMismatch = 13; Failure_WipeCodeMismatch = 13;
Failure_InvalidSession = 14; Failure_InvalidSession = 14;
Failure_ThpUnallocatedSession=15;
Failure_InvalidProtocol=16;
Failure_FirmwareError = 99; Failure_FirmwareError = 99;
} }
} }

View File

@ -110,6 +110,8 @@ message DebugLinkGetState {
// trezor-core only - wait until current layout changes // trezor-core only - wait until current layout changes
// changed in 2.6.4: multiple wait types instead of true/false. // changed in 2.6.4: multiple wait types instead of true/false.
optional DebugWaitType wait_layout = 3 [default=IMMEDIATE]; optional DebugWaitType wait_layout = 3 [default=IMMEDIATE];
// THP only - it is used to get information from specified channel
optional bytes thp_channel_id=4;
} }
/** /**
@ -130,6 +132,9 @@ message DebugLinkState {
optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow optional uint32 reset_word_pos = 11; // index of mnemonic word the device is expecting during ResetDevice workflow
optional management.BackupType mnemonic_type = 12; // current mnemonic type (BIP-39/SLIP-39) optional management.BackupType mnemonic_type = 12; // current mnemonic type (BIP-39/SLIP-39)
repeated string tokens = 13; // current layout represented as a list of string tokens repeated string tokens = 13; // current layout represented as a list of string tokens
optional uint32 thp_pairing_code_entry_code = 14;
optional bytes thp_pairing_code_qr_code = 15;
optional bytes thp_pairing_code_nfc_unidirectional = 16;
} }
/** /**

View File

@ -9,6 +9,218 @@ import "options.proto";
option (include_in_bitcoin_only) = true; option (include_in_bitcoin_only) = true;
/**
* Mapping between Trezor wire identifier (uint) and a Thp protobuf message
*/
enum ThpMessageType {
reserved 0 to 999; // Values reserved by other messages, see messages.proto
ThpMessageType_ThpCreateNewSession = 1000[(bitcoin_only)=true, (channel_in) = true];
ThpMessageType_ThpNewSession = 1001[(bitcoin_only)=true, (channel_out) = true];
ThpMessageType_ThpStartPairingRequest = 1008 [(bitcoin_only) = true, (pairing_in) = true];
ThpMessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true, (pairing_out) = true];
ThpMessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true, (pairing_in) = true];
ThpMessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true, (pairing_out) = true];
ThpMessageType_ThpEndRequest = 1012 [(bitcoin_only) = true, (pairing_in) = true];
ThpMessageType_ThpEndResponse = 1013[(bitcoin_only) = true, (pairing_out) = true];
ThpMessageType_ThpCodeEntryCommitment = 1016[(bitcoin_only)=true, (pairing_out) = true];
ThpMessageType_ThpCodeEntryChallenge = 1017[(bitcoin_only)=true, (pairing_in) = true];
ThpMessageType_ThpCodeEntryCpaceHost = 1018[(bitcoin_only)=true, (pairing_in) = true];
ThpMessageType_ThpCodeEntryCpaceTrezor = 1019[(bitcoin_only)=true, (pairing_out) = true];
ThpMessageType_ThpCodeEntryTag = 1020[(bitcoin_only)=true, (pairing_in) = true];
ThpMessageType_ThpCodeEntrySecret = 1021[(bitcoin_only)=true, (pairing_out) = true];
ThpMessageType_ThpQrCodeTag = 1024[(bitcoin_only)=true, (pairing_in) = true];
ThpMessageType_ThpQrCodeSecret = 1025[(bitcoin_only)=true, (pairing_out) = true];
ThpMessageType_ThpNfcUnidirectionalTag = 1032[(bitcoin_only)=true, (pairing_in) = true];
ThpMessageType_ThpNfcUnidirectionalSecret = 1033[(bitcoin_only)=true, (pairing_in) = true];
reserved 1100 to 2147483647; // Values reserved by other messages, see messages.proto
}
/**
* Numeric identifiers of pairing methods.
* @embed
*/
enum ThpPairingMethod {
NoMethod = 1; // Trust without MITM protection.
CodeEntry = 2; // User types code diplayed on Trezor into the host application.
QrCode = 3; // User scans code displayed on Trezor into host application.
NFC_Unidirectional = 4; // Trezor transmits an authentication key to the host device via NFC.
}
/**
* @embed
*/
message ThpDeviceProperties {
optional string internal_model = 1; // Internal model name e.g. "T2B1".
optional uint32 model_variant = 2; // Encodes the device properties such as color.
optional bool bootloader_mode = 3; // Indicates whether the device is in bootloader or firmware mode.
optional uint32 protocol_version = 4; // The communication protocol version supported by the firmware.
repeated ThpPairingMethod pairing_methods = 5; // The pairing methods supported by the Trezor.
}
/**
* @embed
*/
message ThpHandshakeCompletionReqNoisePayload {
optional bytes host_pairing_credential = 1; // Host's pairing credential
repeated ThpPairingMethod pairing_methods = 2; // The pairing methods chosen by the host
}
/**
* Request: Ask device for a new session with given passphrase.
* @start
* @next ThpNewSession
*/
message ThpCreateNewSession{
optional string passphrase = 1;
optional bool on_device = 2; // User wants to enter passphrase on the device
optional bool derive_cardano = 3; // If True, Cardano keys will be derived. Ignored with BTC-only
}
/**
* Response: Contains session_id of the newly created session.
* @end
*/
message ThpNewSession{
optional uint32 new_session_id = 1;
}
/**
* Request: Start pairing process.
* @start
* @next ThpCodeEntryCommitment
* @next ThpPairingPreparationsFinished
*/
message ThpStartPairingRequest{
optional string host_name = 1; // Human-readable host name
}
/**
* Response: Pairing is ready for user input / OOB communication.
* @next ThpCodeEntryCpace
* @next ThpQrCodeTag
* @next ThpNfcUnidirectionalTag
*/
message ThpPairingPreparationsFinished{
}
/**
* Response: If Code Entry is an allowed pairing option, Trezor responds with a commitment.
* @next ThpCodeEntryChallenge
*/
message ThpCodeEntryCommitment {
optional bytes commitment = 1; // SHA-256 of Trezor's random 32-byte secret
}
/**
* Response: Host responds to Trezor's Code Entry commitment with a challenge.
* @next ThpPairingPreparationsFinished
*/
message ThpCodeEntryChallenge {
optional bytes challenge = 1; // host's random 32-byte challenge
}
/**
* Request: User selected Code Entry option in Host. Host starts CPACE protocol with Trezor.
* @next ThpCodeEntryCpaceTrezor
*/
message ThpCodeEntryCpaceHost {
optional bytes cpace_host_public_key = 1; // Host's ephemeral CPace public key
}
/**
* Response: Trezor continues with the CPACE protocol.
* @next ThpCodeEntryTag
*/
message ThpCodeEntryCpaceTrezor {
optional bytes cpace_trezor_public_key = 1; // Trezor's ephemeral CPace public key
}
/**
* Response: Host continues with the CPACE protocol.
* @next ThpCodeEntrySecret
*/
message ThpCodeEntryTag {
optional bytes tag = 2; // SHA-256 of shared secret
}
/**
* Response: Trezor finishes the CPACE protocol.
* @next ThpCredentialRequest
* @next ThpEndRequest
*/
message ThpCodeEntrySecret {
optional bytes secret = 1; // Trezor's secret
}
/**
* Request: User selected QR Code pairing option. Host sends a QR Tag.
* @next ThpQrCodeSecret
*/
message ThpQrCodeTag {
optional bytes tag = 1; // SHA-256 of shared secret
}
/**
* Response: Trezor sends the QR secret.
* @next ThpCredentialRequest
* @next ThpEndRequest
*/
message ThpQrCodeSecret {
optional bytes secret = 1; // Trezor's secret
}
/**
* Request: User selected Unidirectional NFC pairing option. Host sends an Unidirectional NFC Tag.
* @next ThpNfcUnidirectionalSecret
*/
message ThpNfcUnidirectionalTag {
optional bytes tag = 1; // SHA-256 of shared secret
}
/**
* Response: Trezor sends the Unidirectioal NFC secret.
* @next ThpCredentialRequest
* @next ThpEndRequest
*/
message ThpNfcUnidirectionalSecret {
optional bytes secret = 1; // Trezor's secret
}
/**
* Request: Host requests issuance of a new pairing credential.
* @start
* @next ThpCredentialResponse
*/
message ThpCredentialRequest {
optional bytes host_static_pubkey = 1; // Host's static public key used in the handshake.
}
/**
* Response: Trezor issues a new pairing credential.
* @next ThpCredentialRequest
* @next ThpEndRequest
*/
message ThpCredentialResponse {
optional bytes trezor_static_pubkey = 1; // Trezor's static public key used in the handshake.
optional bytes credential = 2; // The pairing credential issued by the Trezor to the host.
}
/**
* Request: Host requests transition to the encrypted traffic phase.
* @start
* @next ThpEndResponse
*/
message ThpEndRequest {}
/**
* Response: Trezor approves transition to the encrypted traffic phase
* @end
*/
message ThpEndResponse {}
/** /**
* Only for internal use. * Only for internal use.
* @embed * @embed

View File

@ -37,6 +37,10 @@ The convention to achieve this is as follows:
optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode
optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader
optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode
optional bool channel_in = 50009;
optional bool channel_out = 50010;
optional bool pairing_in = 50011;
optional bool pairing_out = 50012;
optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build
// (messages not marked bitcoin_only will be EXCLUDED) // (messages not marked bitcoin_only will be EXCLUDED)

View File

@ -62,6 +62,7 @@ INT_TYPES = (
) )
MESSAGE_TYPE_ENUM = "MessageType" MESSAGE_TYPE_ENUM = "MessageType"
THP_MESSAGE_TYPE_ENUM = "ThpMessageType"
LengthDelimited = c.Struct( LengthDelimited = c.Struct(
"len" / c.VarInt, "len" / c.VarInt,
@ -239,6 +240,9 @@ class ProtoMessage:
@classmethod @classmethod
def from_message(cls, descriptor: "Descriptor", message): def from_message(cls, descriptor: "Descriptor", message):
message_type = find_by_name(descriptor.message_type_enum.value, message.name) message_type = find_by_name(descriptor.message_type_enum.value, message.name)
thp_message_type = None
if not isinstance(descriptor.thp_message_type_enum,tuple):
thp_message_type = find_by_name(descriptor.thp_message_type_enum.value, message.name)
# use extensions set on the message_type entry (if any) # use extensions set on the message_type entry (if any)
extensions = descriptor.get_extensions(message_type) extensions = descriptor.get_extensions(message_type)
# override with extensions set on the message itself # override with extensions set on the message itself
@ -248,6 +252,8 @@ class ProtoMessage:
wire_type = extensions["wire_type"] wire_type = extensions["wire_type"]
elif message_type is not None: elif message_type is not None:
wire_type = message_type.number wire_type = message_type.number
elif thp_message_type is not None:
wire_type = thp_message_type.number
else: else:
wire_type = None wire_type = None
@ -351,10 +357,13 @@ class Descriptor:
] ]
logging.debug(f"found {len(self.files)} bitcoin-only files") logging.debug(f"found {len(self.files)} bitcoin-only files")
# find message_type enum # find message_type and thp_message_type enum
top_level_enums = itertools.chain.from_iterable(f.enum_type for f in self.files) top_level_enums = itertools.chain.from_iterable(f.enum_type for f in self.files)
self.message_type_enum = find_by_name(top_level_enums, MESSAGE_TYPE_ENUM, ()) self.message_type_enum = find_by_name(top_level_enums, MESSAGE_TYPE_ENUM, ())
top_level_enums = itertools.chain.from_iterable(f.enum_type for f in self.files)
self.thp_message_type_enum = find_by_name(top_level_enums, THP_MESSAGE_TYPE_ENUM, ())
self.convert_enum_value_names(self.message_type_enum) self.convert_enum_value_names(self.message_type_enum)
self.convert_enum_value_names(self.thp_message_type_enum)
# find messages and enums # find messages and enums
self.messages = [] self.messages = []
@ -423,6 +432,8 @@ class Descriptor:
self._nested_types_from_message(nested.orig) self._nested_types_from_message(nested.orig)
def convert_enum_value_names(self, enum): def convert_enum_value_names(self, enum):
if isinstance(enum,tuple):
return
for value in enum.value: for value in enum.value:
value.name = strip_enum_prefix(enum.name, value.name) value.name = strip_enum_prefix(enum.name, value.name)
@ -558,6 +569,8 @@ class RustBlobRenderer:
enums = [] enums = []
cursor = 0 cursor = 0
for enum in sorted(self.descriptor.enums, key=lambda e: e.name): for enum in sorted(self.descriptor.enums, key=lambda e: e.name):
if enum.name == "MessageType":
continue
self.enum_map[enum.name] = cursor self.enum_map[enum.name] = cursor
enum_blob = ENUM_ENTRY.build(sorted(v.number for v in enum.value)) enum_blob = ENUM_ENTRY.build(sorted(v.number for v in enum.value))
enums.append(enum_blob) enums.append(enum_blob)

View File

@ -414,6 +414,10 @@ pub mod failure {
Failure_WipeCodeMismatch = 13, Failure_WipeCodeMismatch = 13,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_InvalidSession) // @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_InvalidSession)
Failure_InvalidSession = 14, Failure_InvalidSession = 14,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_ThpUnallocatedSession)
Failure_ThpUnallocatedSession = 15,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_InvalidProtocol)
Failure_InvalidProtocol = 16,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_FirmwareError) // @@protoc_insertion_point(enum_value:hw.trezor.messages.common.Failure.FailureType.Failure_FirmwareError)
Failure_FirmwareError = 99, Failure_FirmwareError = 99,
} }
@ -441,6 +445,8 @@ pub mod failure {
12 => ::std::option::Option::Some(FailureType::Failure_PinMismatch), 12 => ::std::option::Option::Some(FailureType::Failure_PinMismatch),
13 => ::std::option::Option::Some(FailureType::Failure_WipeCodeMismatch), 13 => ::std::option::Option::Some(FailureType::Failure_WipeCodeMismatch),
14 => ::std::option::Option::Some(FailureType::Failure_InvalidSession), 14 => ::std::option::Option::Some(FailureType::Failure_InvalidSession),
15 => ::std::option::Option::Some(FailureType::Failure_ThpUnallocatedSession),
16 => ::std::option::Option::Some(FailureType::Failure_InvalidProtocol),
99 => ::std::option::Option::Some(FailureType::Failure_FirmwareError), 99 => ::std::option::Option::Some(FailureType::Failure_FirmwareError),
_ => ::std::option::Option::None _ => ::std::option::Option::None
} }
@ -462,6 +468,8 @@ pub mod failure {
"Failure_PinMismatch" => ::std::option::Option::Some(FailureType::Failure_PinMismatch), "Failure_PinMismatch" => ::std::option::Option::Some(FailureType::Failure_PinMismatch),
"Failure_WipeCodeMismatch" => ::std::option::Option::Some(FailureType::Failure_WipeCodeMismatch), "Failure_WipeCodeMismatch" => ::std::option::Option::Some(FailureType::Failure_WipeCodeMismatch),
"Failure_InvalidSession" => ::std::option::Option::Some(FailureType::Failure_InvalidSession), "Failure_InvalidSession" => ::std::option::Option::Some(FailureType::Failure_InvalidSession),
"Failure_ThpUnallocatedSession" => ::std::option::Option::Some(FailureType::Failure_ThpUnallocatedSession),
"Failure_InvalidProtocol" => ::std::option::Option::Some(FailureType::Failure_InvalidProtocol),
"Failure_FirmwareError" => ::std::option::Option::Some(FailureType::Failure_FirmwareError), "Failure_FirmwareError" => ::std::option::Option::Some(FailureType::Failure_FirmwareError),
_ => ::std::option::Option::None _ => ::std::option::Option::None
} }
@ -482,6 +490,8 @@ pub mod failure {
FailureType::Failure_PinMismatch, FailureType::Failure_PinMismatch,
FailureType::Failure_WipeCodeMismatch, FailureType::Failure_WipeCodeMismatch,
FailureType::Failure_InvalidSession, FailureType::Failure_InvalidSession,
FailureType::Failure_ThpUnallocatedSession,
FailureType::Failure_InvalidProtocol,
FailureType::Failure_FirmwareError, FailureType::Failure_FirmwareError,
]; ];
} }
@ -508,7 +518,9 @@ pub mod failure {
FailureType::Failure_PinMismatch => 11, FailureType::Failure_PinMismatch => 11,
FailureType::Failure_WipeCodeMismatch => 12, FailureType::Failure_WipeCodeMismatch => 12,
FailureType::Failure_InvalidSession => 13, FailureType::Failure_InvalidSession => 13,
FailureType::Failure_FirmwareError => 14, FailureType::Failure_ThpUnallocatedSession => 14,
FailureType::Failure_InvalidProtocol => 15,
FailureType::Failure_FirmwareError => 16,
}; };
Self::enum_descriptor().value_by_index(index) Self::enum_descriptor().value_by_index(index)
} }
@ -2481,9 +2493,9 @@ impl ::protobuf::reflect::ProtobufValue for HDNodeType {
static file_descriptor_proto_data: &'static [u8] = b"\ static file_descriptor_proto_data: &'static [u8] = b"\
\n\x15messages-common.proto\x12\x19hw.trezor.messages.common\x1a\roption\ \n\x15messages-common.proto\x12\x19hw.trezor.messages.common\x1a\roption\
s.proto\"%\n\x07Success\x12\x1a\n\x07message\x18\x01\x20\x01(\t:\0R\x07m\ s.proto\"%\n\x07Success\x12\x1a\n\x07message\x18\x01\x20\x01(\t:\0R\x07m\
essage\"\x8f\x04\n\x07Failure\x12B\n\x04code\x18\x01\x20\x01(\x0e2..hw.t\ essage\"\xcf\x04\n\x07Failure\x12B\n\x04code\x18\x01\x20\x01(\x0e2..hw.t\
rezor.messages.common.Failure.FailureTypeR\x04code\x12\x18\n\x07message\ rezor.messages.common.Failure.FailureTypeR\x04code\x12\x18\n\x07message\
\x18\x02\x20\x01(\tR\x07message\"\xa5\x03\n\x0bFailureType\x12\x1d\n\x19\ \x18\x02\x20\x01(\tR\x07message\"\xe5\x03\n\x0bFailureType\x12\x1d\n\x19\
Failure_UnexpectedMessage\x10\x01\x12\x1a\n\x16Failure_ButtonExpected\ Failure_UnexpectedMessage\x10\x01\x12\x1a\n\x16Failure_ButtonExpected\
\x10\x02\x12\x15\n\x11Failure_DataError\x10\x03\x12\x1b\n\x17Failure_Act\ \x10\x02\x12\x15\n\x11Failure_DataError\x10\x03\x12\x1b\n\x17Failure_Act\
ionCancelled\x10\x04\x12\x17\n\x13Failure_PinExpected\x10\x05\x12\x18\n\ ionCancelled\x10\x04\x12\x17\n\x13Failure_PinExpected\x10\x05\x12\x18\n\
@ -2492,44 +2504,45 @@ static file_descriptor_proto_data: &'static [u8] = b"\
essError\x10\t\x12\x1a\n\x16Failure_NotEnoughFunds\x10\n\x12\x1a\n\x16Fa\ essError\x10\t\x12\x1a\n\x16Failure_NotEnoughFunds\x10\n\x12\x1a\n\x16Fa\
ilure_NotInitialized\x10\x0b\x12\x17\n\x13Failure_PinMismatch\x10\x0c\ ilure_NotInitialized\x10\x0b\x12\x17\n\x13Failure_PinMismatch\x10\x0c\
\x12\x1c\n\x18Failure_WipeCodeMismatch\x10\r\x12\x1a\n\x16Failure_Invali\ \x12\x1c\n\x18Failure_WipeCodeMismatch\x10\r\x12\x1a\n\x16Failure_Invali\
dSession\x10\x0e\x12\x19\n\x15Failure_FirmwareError\x10c\"\xab\x06\n\rBu\ dSession\x10\x0e\x12!\n\x1dFailure_ThpUnallocatedSession\x10\x0f\x12\x1b\
ttonRequest\x12N\n\x04code\x18\x01\x20\x01(\x0e2:.hw.trezor.messages.com\ \n\x17Failure_InvalidProtocol\x10\x10\x12\x19\n\x15Failure_FirmwareError\
mon.ButtonRequest.ButtonRequestTypeR\x04code\x12\x14\n\x05pages\x18\x02\ \x10c\"\xab\x06\n\rButtonRequest\x12N\n\x04code\x18\x01\x20\x01(\x0e2:.h\
\x20\x01(\rR\x05pages\x12\x12\n\x04name\x18\x04\x20\x01(\tR\x04name\"\ w.trezor.messages.common.ButtonRequest.ButtonRequestTypeR\x04code\x12\
\x99\x05\n\x11ButtonRequestType\x12\x17\n\x13ButtonRequest_Other\x10\x01\ \x14\n\x05pages\x18\x02\x20\x01(\rR\x05pages\x12\x12\n\x04name\x18\x04\
\x12\"\n\x1eButtonRequest_FeeOverThreshold\x10\x02\x12\x1f\n\x1bButtonRe\ \x20\x01(\tR\x04name\"\x99\x05\n\x11ButtonRequestType\x12\x17\n\x13Butto\
quest_ConfirmOutput\x10\x03\x12\x1d\n\x19ButtonRequest_ResetDevice\x10\ nRequest_Other\x10\x01\x12\"\n\x1eButtonRequest_FeeOverThreshold\x10\x02\
\x04\x12\x1d\n\x19ButtonRequest_ConfirmWord\x10\x05\x12\x1c\n\x18ButtonR\ \x12\x1f\n\x1bButtonRequest_ConfirmOutput\x10\x03\x12\x1d\n\x19ButtonReq\
equest_WipeDevice\x10\x06\x12\x1d\n\x19ButtonRequest_ProtectCall\x10\x07\ uest_ResetDevice\x10\x04\x12\x1d\n\x19ButtonRequest_ConfirmWord\x10\x05\
\x12\x18\n\x14ButtonRequest_SignTx\x10\x08\x12\x1f\n\x1bButtonRequest_Fi\ \x12\x1c\n\x18ButtonRequest_WipeDevice\x10\x06\x12\x1d\n\x19ButtonReques\
rmwareCheck\x10\t\x12\x19\n\x15ButtonRequest_Address\x10\n\x12\x1b\n\x17\ t_ProtectCall\x10\x07\x12\x18\n\x14ButtonRequest_SignTx\x10\x08\x12\x1f\
ButtonRequest_PublicKey\x10\x0b\x12#\n\x1fButtonRequest_MnemonicWordCoun\ \n\x1bButtonRequest_FirmwareCheck\x10\t\x12\x19\n\x15ButtonRequest_Addre\
t\x10\x0c\x12\x1f\n\x1bButtonRequest_MnemonicInput\x10\r\x120\n(_Depreca\ ss\x10\n\x12\x1b\n\x17ButtonRequest_PublicKey\x10\x0b\x12#\n\x1fButtonRe\
ted_ButtonRequest_PassphraseType\x10\x0e\x1a\x02\x08\x01\x12'\n#ButtonRe\ quest_MnemonicWordCount\x10\x0c\x12\x1f\n\x1bButtonRequest_MnemonicInput\
quest_UnknownDerivationPath\x10\x0f\x12\"\n\x1eButtonRequest_RecoveryHom\ \x10\r\x120\n(_Deprecated_ButtonRequest_PassphraseType\x10\x0e\x1a\x02\
epage\x10\x10\x12\x19\n\x15ButtonRequest_Success\x10\x11\x12\x19\n\x15Bu\ \x08\x01\x12'\n#ButtonRequest_UnknownDerivationPath\x10\x0f\x12\"\n\x1eB\
ttonRequest_Warning\x10\x12\x12!\n\x1dButtonRequest_PassphraseEntry\x10\ uttonRequest_RecoveryHomepage\x10\x10\x12\x19\n\x15ButtonRequest_Success\
\x13\x12\x1a\n\x16ButtonRequest_PinEntry\x10\x14J\x04\x08\x03\x10\x04\"\ \x10\x11\x12\x19\n\x15ButtonRequest_Warning\x10\x12\x12!\n\x1dButtonRequ\
\x0b\n\tButtonAck\"\xbb\x02\n\x10PinMatrixRequest\x12T\n\x04type\x18\x01\ est_PassphraseEntry\x10\x13\x12\x1a\n\x16ButtonRequest_PinEntry\x10\x14J\
\x20\x01(\x0e2@.hw.trezor.messages.common.PinMatrixRequest.PinMatrixRequ\ \x04\x08\x03\x10\x04\"\x0b\n\tButtonAck\"\xbb\x02\n\x10PinMatrixRequest\
estTypeR\x04type\"\xd0\x01\n\x14PinMatrixRequestType\x12\x20\n\x1cPinMat\ \x12T\n\x04type\x18\x01\x20\x01(\x0e2@.hw.trezor.messages.common.PinMatr\
rixRequestType_Current\x10\x01\x12!\n\x1dPinMatrixRequestType_NewFirst\ ixRequest.PinMatrixRequestTypeR\x04type\"\xd0\x01\n\x14PinMatrixRequestT\
\x10\x02\x12\"\n\x1ePinMatrixRequestType_NewSecond\x10\x03\x12&\n\"PinMa\ ype\x12\x20\n\x1cPinMatrixRequestType_Current\x10\x01\x12!\n\x1dPinMatri\
trixRequestType_WipeCodeFirst\x10\x04\x12'\n#PinMatrixRequestType_WipeCo\ xRequestType_NewFirst\x10\x02\x12\"\n\x1ePinMatrixRequestType_NewSecond\
deSecond\x10\x05\"\x20\n\x0cPinMatrixAck\x12\x10\n\x03pin\x18\x01\x20\ \x10\x03\x12&\n\"PinMatrixRequestType_WipeCodeFirst\x10\x04\x12'\n#PinMa\
\x02(\tR\x03pin\"5\n\x11PassphraseRequest\x12\x20\n\n_on_device\x18\x01\ trixRequestType_WipeCodeSecond\x10\x05\"\x20\n\x0cPinMatrixAck\x12\x10\n\
\x20\x01(\x08R\x08OnDeviceB\x02\x18\x01\"g\n\rPassphraseAck\x12\x1e\n\np\ \x03pin\x18\x01\x20\x02(\tR\x03pin\"5\n\x11PassphraseRequest\x12\x20\n\n\
assphrase\x18\x01\x20\x01(\tR\npassphrase\x12\x19\n\x06_state\x18\x02\ _on_device\x18\x01\x20\x01(\x08R\x08OnDeviceB\x02\x18\x01\"g\n\rPassphra\
\x20\x01(\x0cR\x05StateB\x02\x18\x01\x12\x1b\n\ton_device\x18\x03\x20\ seAck\x12\x1e\n\npassphrase\x18\x01\x20\x01(\tR\npassphrase\x12\x19\n\
\x01(\x08R\x08onDevice\"=\n!Deprecated_PassphraseStateRequest\x12\x14\n\ \x06_state\x18\x02\x20\x01(\x0cR\x05StateB\x02\x18\x01\x12\x1b\n\ton_dev\
\x05state\x18\x01\x20\x01(\x0cR\x05state:\x02\x18\x01\"#\n\x1dDeprecated\ ice\x18\x03\x20\x01(\x08R\x08onDevice\"=\n!Deprecated_PassphraseStateReq\
_PassphraseStateAck:\x02\x18\x01\"\xc0\x01\n\nHDNodeType\x12\x14\n\x05de\ uest\x12\x14\n\x05state\x18\x01\x20\x01(\x0cR\x05state:\x02\x18\x01\"#\n\
pth\x18\x01\x20\x02(\rR\x05depth\x12\x20\n\x0bfingerprint\x18\x02\x20\ \x1dDeprecated_PassphraseStateAck:\x02\x18\x01\"\xc0\x01\n\nHDNodeType\
\x02(\rR\x0bfingerprint\x12\x1b\n\tchild_num\x18\x03\x20\x02(\rR\x08chil\ \x12\x14\n\x05depth\x18\x01\x20\x02(\rR\x05depth\x12\x20\n\x0bfingerprin\
dNum\x12\x1d\n\nchain_code\x18\x04\x20\x02(\x0cR\tchainCode\x12\x1f\n\ t\x18\x02\x20\x02(\rR\x0bfingerprint\x12\x1b\n\tchild_num\x18\x03\x20\
\x0bprivate_key\x18\x05\x20\x01(\x0cR\nprivateKey\x12\x1d\n\npublic_key\ \x02(\rR\x08childNum\x12\x1d\n\nchain_code\x18\x04\x20\x02(\x0cR\tchainC\
\x18\x06\x20\x02(\x0cR\tpublicKeyB>\n#com.satoshilabs.trezor.lib.protobu\ ode\x12\x1f\n\x0bprivate_key\x18\x05\x20\x01(\x0cR\nprivateKey\x12\x1d\n\
fB\x13TrezorMessageCommon\x80\xa6\x1d\x01\ \npublic_key\x18\x06\x20\x02(\x0cR\tpublicKeyB>\n#com.satoshilabs.trezor\
.lib.protobufB\x13TrezorMessageCommon\x80\xa6\x1d\x01\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file

View File

@ -1128,6 +1128,8 @@ pub struct DebugLinkGetState {
pub wait_word_pos: ::std::option::Option<bool>, pub wait_word_pos: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.wait_layout) // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.wait_layout)
pub wait_layout: ::std::option::Option<::protobuf::EnumOrUnknown<debug_link_get_state::DebugWaitType>>, pub wait_layout: ::std::option::Option<::protobuf::EnumOrUnknown<debug_link_get_state::DebugWaitType>>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetState.thp_channel_id)
pub thp_channel_id: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields // special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkGetState.special_fields) // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkGetState.special_fields)
pub special_fields: ::protobuf::SpecialFields, pub special_fields: ::protobuf::SpecialFields,
@ -1204,8 +1206,44 @@ impl DebugLinkGetState {
self.wait_layout = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); self.wait_layout = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
} }
// optional bytes thp_channel_id = 4;
pub fn thp_channel_id(&self) -> &[u8] {
match self.thp_channel_id.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_thp_channel_id(&mut self) {
self.thp_channel_id = ::std::option::Option::None;
}
pub fn has_thp_channel_id(&self) -> bool {
self.thp_channel_id.is_some()
}
// Param is passed by value, moved
pub fn set_thp_channel_id(&mut self, v: ::std::vec::Vec<u8>) {
self.thp_channel_id = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_thp_channel_id(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.thp_channel_id.is_none() {
self.thp_channel_id = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.thp_channel_id.as_mut().unwrap()
}
// Take field
pub fn take_thp_channel_id(&mut self) -> ::std::vec::Vec<u8> {
self.thp_channel_id.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3); let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"wait_word_list", "wait_word_list",
@ -1222,6 +1260,11 @@ impl DebugLinkGetState {
|m: &DebugLinkGetState| { &m.wait_layout }, |m: &DebugLinkGetState| { &m.wait_layout },
|m: &mut DebugLinkGetState| { &mut m.wait_layout }, |m: &mut DebugLinkGetState| { &mut m.wait_layout },
)); ));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"thp_channel_id",
|m: &DebugLinkGetState| { &m.thp_channel_id },
|m: &mut DebugLinkGetState| { &mut m.thp_channel_id },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkGetState>( ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkGetState>(
"DebugLinkGetState", "DebugLinkGetState",
fields, fields,
@ -1249,6 +1292,9 @@ impl ::protobuf::Message for DebugLinkGetState {
24 => { 24 => {
self.wait_layout = ::std::option::Option::Some(is.read_enum_or_unknown()?); self.wait_layout = ::std::option::Option::Some(is.read_enum_or_unknown()?);
}, },
34 => {
self.thp_channel_id = ::std::option::Option::Some(is.read_bytes()?);
},
tag => { tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
}, },
@ -1270,6 +1316,9 @@ impl ::protobuf::Message for DebugLinkGetState {
if let Some(v) = self.wait_layout { if let Some(v) = self.wait_layout {
my_size += ::protobuf::rt::int32_size(3, v.value()); my_size += ::protobuf::rt::int32_size(3, v.value());
} }
if let Some(v) = self.thp_channel_id.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32); self.special_fields.cached_size().set(my_size as u32);
my_size my_size
@ -1285,6 +1334,9 @@ impl ::protobuf::Message for DebugLinkGetState {
if let Some(v) = self.wait_layout { if let Some(v) = self.wait_layout {
os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
} }
if let Some(v) = self.thp_channel_id.as_ref() {
os.write_bytes(4, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?; os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(()) ::std::result::Result::Ok(())
} }
@ -1305,6 +1357,7 @@ impl ::protobuf::Message for DebugLinkGetState {
self.wait_word_list = ::std::option::Option::None; self.wait_word_list = ::std::option::Option::None;
self.wait_word_pos = ::std::option::Option::None; self.wait_word_pos = ::std::option::Option::None;
self.wait_layout = ::std::option::Option::None; self.wait_layout = ::std::option::Option::None;
self.thp_channel_id = ::std::option::Option::None;
self.special_fields.clear(); self.special_fields.clear();
} }
@ -1313,6 +1366,7 @@ impl ::protobuf::Message for DebugLinkGetState {
wait_word_list: ::std::option::Option::None, wait_word_list: ::std::option::Option::None,
wait_word_pos: ::std::option::Option::None, wait_word_pos: ::std::option::Option::None,
wait_layout: ::std::option::Option::None, wait_layout: ::std::option::Option::None,
thp_channel_id: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(), special_fields: ::protobuf::SpecialFields::new(),
}; };
&instance &instance
@ -1436,6 +1490,12 @@ pub struct DebugLinkState {
pub mnemonic_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::messages_management::BackupType>>, pub mnemonic_type: ::std::option::Option<::protobuf::EnumOrUnknown<super::messages_management::BackupType>>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.tokens) // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.tokens)
pub tokens: ::std::vec::Vec<::std::string::String>, pub tokens: ::std::vec::Vec<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.thp_pairing_code_entry_code)
pub thp_pairing_code_entry_code: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.thp_pairing_code_qr_code)
pub thp_pairing_code_qr_code: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkState.thp_pairing_code_nfc_unidirectional)
pub thp_pairing_code_nfc_unidirectional: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields // special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkState.special_fields) // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkState.special_fields)
pub special_fields: ::protobuf::SpecialFields, pub special_fields: ::protobuf::SpecialFields,
@ -1783,8 +1843,99 @@ impl DebugLinkState {
self.mnemonic_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); self.mnemonic_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
} }
// optional uint32 thp_pairing_code_entry_code = 14;
pub fn thp_pairing_code_entry_code(&self) -> u32 {
self.thp_pairing_code_entry_code.unwrap_or(0)
}
pub fn clear_thp_pairing_code_entry_code(&mut self) {
self.thp_pairing_code_entry_code = ::std::option::Option::None;
}
pub fn has_thp_pairing_code_entry_code(&self) -> bool {
self.thp_pairing_code_entry_code.is_some()
}
// Param is passed by value, moved
pub fn set_thp_pairing_code_entry_code(&mut self, v: u32) {
self.thp_pairing_code_entry_code = ::std::option::Option::Some(v);
}
// optional bytes thp_pairing_code_qr_code = 15;
pub fn thp_pairing_code_qr_code(&self) -> &[u8] {
match self.thp_pairing_code_qr_code.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_thp_pairing_code_qr_code(&mut self) {
self.thp_pairing_code_qr_code = ::std::option::Option::None;
}
pub fn has_thp_pairing_code_qr_code(&self) -> bool {
self.thp_pairing_code_qr_code.is_some()
}
// Param is passed by value, moved
pub fn set_thp_pairing_code_qr_code(&mut self, v: ::std::vec::Vec<u8>) {
self.thp_pairing_code_qr_code = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_thp_pairing_code_qr_code(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.thp_pairing_code_qr_code.is_none() {
self.thp_pairing_code_qr_code = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.thp_pairing_code_qr_code.as_mut().unwrap()
}
// Take field
pub fn take_thp_pairing_code_qr_code(&mut self) -> ::std::vec::Vec<u8> {
self.thp_pairing_code_qr_code.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes thp_pairing_code_nfc_unidirectional = 16;
pub fn thp_pairing_code_nfc_unidirectional(&self) -> &[u8] {
match self.thp_pairing_code_nfc_unidirectional.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_thp_pairing_code_nfc_unidirectional(&mut self) {
self.thp_pairing_code_nfc_unidirectional = ::std::option::Option::None;
}
pub fn has_thp_pairing_code_nfc_unidirectional(&self) -> bool {
self.thp_pairing_code_nfc_unidirectional.is_some()
}
// Param is passed by value, moved
pub fn set_thp_pairing_code_nfc_unidirectional(&mut self, v: ::std::vec::Vec<u8>) {
self.thp_pairing_code_nfc_unidirectional = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_thp_pairing_code_nfc_unidirectional(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.thp_pairing_code_nfc_unidirectional.is_none() {
self.thp_pairing_code_nfc_unidirectional = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.thp_pairing_code_nfc_unidirectional.as_mut().unwrap()
}
// Take field
pub fn take_thp_pairing_code_nfc_unidirectional(&mut self) -> ::std::vec::Vec<u8> {
self.thp_pairing_code_nfc_unidirectional.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(13); let mut fields = ::std::vec::Vec::with_capacity(16);
let mut oneofs = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"layout", "layout",
@ -1851,6 +2002,21 @@ impl DebugLinkState {
|m: &DebugLinkState| { &m.tokens }, |m: &DebugLinkState| { &m.tokens },
|m: &mut DebugLinkState| { &mut m.tokens }, |m: &mut DebugLinkState| { &mut m.tokens },
)); ));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"thp_pairing_code_entry_code",
|m: &DebugLinkState| { &m.thp_pairing_code_entry_code },
|m: &mut DebugLinkState| { &mut m.thp_pairing_code_entry_code },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"thp_pairing_code_qr_code",
|m: &DebugLinkState| { &m.thp_pairing_code_qr_code },
|m: &mut DebugLinkState| { &mut m.thp_pairing_code_qr_code },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"thp_pairing_code_nfc_unidirectional",
|m: &DebugLinkState| { &m.thp_pairing_code_nfc_unidirectional },
|m: &mut DebugLinkState| { &mut m.thp_pairing_code_nfc_unidirectional },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkState>( ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkState>(
"DebugLinkState", "DebugLinkState",
fields, fields,
@ -1913,6 +2079,15 @@ impl ::protobuf::Message for DebugLinkState {
106 => { 106 => {
self.tokens.push(is.read_string()?); self.tokens.push(is.read_string()?);
}, },
112 => {
self.thp_pairing_code_entry_code = ::std::option::Option::Some(is.read_uint32()?);
},
122 => {
self.thp_pairing_code_qr_code = ::std::option::Option::Some(is.read_bytes()?);
},
130 => {
self.thp_pairing_code_nfc_unidirectional = ::std::option::Option::Some(is.read_bytes()?);
},
tag => { tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
}, },
@ -1965,6 +2140,15 @@ impl ::protobuf::Message for DebugLinkState {
for value in &self.tokens { for value in &self.tokens {
my_size += ::protobuf::rt::string_size(13, &value); my_size += ::protobuf::rt::string_size(13, &value);
}; };
if let Some(v) = self.thp_pairing_code_entry_code {
my_size += ::protobuf::rt::uint32_size(14, v);
}
if let Some(v) = self.thp_pairing_code_qr_code.as_ref() {
my_size += ::protobuf::rt::bytes_size(15, &v);
}
if let Some(v) = self.thp_pairing_code_nfc_unidirectional.as_ref() {
my_size += ::protobuf::rt::bytes_size(16, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32); self.special_fields.cached_size().set(my_size as u32);
my_size my_size
@ -2010,6 +2194,15 @@ impl ::protobuf::Message for DebugLinkState {
for v in &self.tokens { for v in &self.tokens {
os.write_string(13, &v)?; os.write_string(13, &v)?;
}; };
if let Some(v) = self.thp_pairing_code_entry_code {
os.write_uint32(14, v)?;
}
if let Some(v) = self.thp_pairing_code_qr_code.as_ref() {
os.write_bytes(15, v)?;
}
if let Some(v) = self.thp_pairing_code_nfc_unidirectional.as_ref() {
os.write_bytes(16, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?; os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(()) ::std::result::Result::Ok(())
} }
@ -2040,6 +2233,9 @@ impl ::protobuf::Message for DebugLinkState {
self.reset_word_pos = ::std::option::Option::None; self.reset_word_pos = ::std::option::Option::None;
self.mnemonic_type = ::std::option::Option::None; self.mnemonic_type = ::std::option::Option::None;
self.tokens.clear(); self.tokens.clear();
self.thp_pairing_code_entry_code = ::std::option::Option::None;
self.thp_pairing_code_qr_code = ::std::option::Option::None;
self.thp_pairing_code_nfc_unidirectional = ::std::option::Option::None;
self.special_fields.clear(); self.special_fields.clear();
} }
@ -2058,6 +2254,9 @@ impl ::protobuf::Message for DebugLinkState {
reset_word_pos: ::std::option::Option::None, reset_word_pos: ::std::option::Option::None,
mnemonic_type: ::std::option::Option::None, mnemonic_type: ::std::option::Option::None,
tokens: ::std::vec::Vec::new(), tokens: ::std::vec::Vec::new(),
thp_pairing_code_entry_code: ::std::option::Option::None,
thp_pairing_code_qr_code: ::std::option::Option::None,
thp_pairing_code_nfc_unidirectional: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(), special_fields: ::protobuf::SpecialFields::new(),
}; };
&instance &instance
@ -3650,39 +3849,44 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x01\x20\x03(\tR\x06tokens:\x02\x18\x01\"-\n\x15DebugLinkReseedRandom\ \x01\x20\x03(\tR\x06tokens:\x02\x18\x01\"-\n\x15DebugLinkReseedRandom\
\x12\x14\n\x05value\x18\x01\x20\x01(\rR\x05value\"j\n\x15DebugLinkRecord\ \x12\x14\n\x05value\x18\x01\x20\x01(\rR\x05value\"j\n\x15DebugLinkRecord\
Screen\x12)\n\x10target_directory\x18\x01\x20\x01(\tR\x0ftargetDirectory\ Screen\x12)\n\x10target_directory\x18\x01\x20\x01(\tR\x0ftargetDirectory\
\x12&\n\rrefresh_index\x18\x02\x20\x01(\r:\x010R\x0crefreshIndex\"\x91\ \x12&\n\rrefresh_index\x18\x02\x20\x01(\r:\x010R\x0crefreshIndex\"\xb7\
\x02\n\x11DebugLinkGetState\x12(\n\x0ewait_word_list\x18\x01\x20\x01(\ \x02\n\x11DebugLinkGetState\x12(\n\x0ewait_word_list\x18\x01\x20\x01(\
\x08R\x0cwaitWordListB\x02\x18\x01\x12&\n\rwait_word_pos\x18\x02\x20\x01\ \x08R\x0cwaitWordListB\x02\x18\x01\x12&\n\rwait_word_pos\x18\x02\x20\x01\
(\x08R\x0bwaitWordPosB\x02\x18\x01\x12e\n\x0bwait_layout\x18\x03\x20\x01\ (\x08R\x0bwaitWordPosB\x02\x18\x01\x12e\n\x0bwait_layout\x18\x03\x20\x01\
(\x0e29.hw.trezor.messages.debug.DebugLinkGetState.DebugWaitType:\tIMMED\ (\x0e29.hw.trezor.messages.debug.DebugLinkGetState.DebugWaitType:\tIMMED\
IATER\nwaitLayout\"C\n\rDebugWaitType\x12\r\n\tIMMEDIATE\x10\0\x12\x0f\n\ IATER\nwaitLayout\x12$\n\x0ethp_channel_id\x18\x04\x20\x01(\x0cR\x0cthpC\
\x0bNEXT_LAYOUT\x10\x01\x12\x12\n\x0eCURRENT_LAYOUT\x10\x02\"\x97\x04\n\ hannelId\"C\n\rDebugWaitType\x12\r\n\tIMMEDIATE\x10\0\x12\x0f\n\x0bNEXT_\
\x0eDebugLinkState\x12\x16\n\x06layout\x18\x01\x20\x01(\x0cR\x06layout\ LAYOUT\x10\x01\x12\x12\n\x0eCURRENT_LAYOUT\x10\x02\"\xdb\x05\n\x0eDebugL\
\x12\x10\n\x03pin\x18\x02\x20\x01(\tR\x03pin\x12\x16\n\x06matrix\x18\x03\ inkState\x12\x16\n\x06layout\x18\x01\x20\x01(\x0cR\x06layout\x12\x10\n\
\x20\x01(\tR\x06matrix\x12'\n\x0fmnemonic_secret\x18\x04\x20\x01(\x0cR\ \x03pin\x18\x02\x20\x01(\tR\x03pin\x12\x16\n\x06matrix\x18\x03\x20\x01(\
\x0emnemonicSecret\x129\n\x04node\x18\x05\x20\x01(\x0b2%.hw.trezor.messa\ \tR\x06matrix\x12'\n\x0fmnemonic_secret\x18\x04\x20\x01(\x0cR\x0emnemoni\
ges.common.HDNodeTypeR\x04node\x123\n\x15passphrase_protection\x18\x06\ cSecret\x129\n\x04node\x18\x05\x20\x01(\x0b2%.hw.trezor.messages.common.\
\x20\x01(\x08R\x14passphraseProtection\x12\x1d\n\nreset_word\x18\x07\x20\ HDNodeTypeR\x04node\x123\n\x15passphrase_protection\x18\x06\x20\x01(\x08\
\x01(\tR\tresetWord\x12#\n\rreset_entropy\x18\x08\x20\x01(\x0cR\x0creset\ R\x14passphraseProtection\x12\x1d\n\nreset_word\x18\x07\x20\x01(\tR\tres\
Entropy\x12,\n\x12recovery_fake_word\x18\t\x20\x01(\tR\x10recoveryFakeWo\ etWord\x12#\n\rreset_entropy\x18\x08\x20\x01(\x0cR\x0cresetEntropy\x12,\
rd\x12*\n\x11recovery_word_pos\x18\n\x20\x01(\rR\x0frecoveryWordPos\x12$\ \n\x12recovery_fake_word\x18\t\x20\x01(\tR\x10recoveryFakeWord\x12*\n\
\n\x0ereset_word_pos\x18\x0b\x20\x01(\rR\x0cresetWordPos\x12N\n\rmnemoni\ \x11recovery_word_pos\x18\n\x20\x01(\rR\x0frecoveryWordPos\x12$\n\x0eres\
c_type\x18\x0c\x20\x01(\x0e2).hw.trezor.messages.management.BackupTypeR\ et_word_pos\x18\x0b\x20\x01(\rR\x0cresetWordPos\x12N\n\rmnemonic_type\
\x0cmnemonicType\x12\x16\n\x06tokens\x18\r\x20\x03(\tR\x06tokens\"\x0f\n\ \x18\x0c\x20\x01(\x0e2).hw.trezor.messages.management.BackupTypeR\x0cmne\
\rDebugLinkStop\"P\n\x0cDebugLinkLog\x12\x14\n\x05level\x18\x01\x20\x01(\ monicType\x12\x16\n\x06tokens\x18\r\x20\x03(\tR\x06tokens\x12<\n\x1bthp_\
\rR\x05level\x12\x16\n\x06bucket\x18\x02\x20\x01(\tR\x06bucket\x12\x12\n\ pairing_code_entry_code\x18\x0e\x20\x01(\rR\x17thpPairingCodeEntryCode\
\x04text\x18\x03\x20\x01(\tR\x04text\"G\n\x13DebugLinkMemoryRead\x12\x18\ \x126\n\x18thp_pairing_code_qr_code\x18\x0f\x20\x01(\x0cR\x14thpPairingC\
\n\x07address\x18\x01\x20\x01(\rR\x07address\x12\x16\n\x06length\x18\x02\ odeQrCode\x12L\n#thp_pairing_code_nfc_unidirectional\x18\x10\x20\x01(\
\x20\x01(\rR\x06length\")\n\x0fDebugLinkMemory\x12\x16\n\x06memory\x18\ \x0cR\x1fthpPairingCodeNfcUnidirectional\"\x0f\n\rDebugLinkStop\"P\n\x0c\
\x01\x20\x01(\x0cR\x06memory\"^\n\x14DebugLinkMemoryWrite\x12\x18\n\x07a\ DebugLinkLog\x12\x14\n\x05level\x18\x01\x20\x01(\rR\x05level\x12\x16\n\
ddress\x18\x01\x20\x01(\rR\x07address\x12\x16\n\x06memory\x18\x02\x20\ \x06bucket\x18\x02\x20\x01(\tR\x06bucket\x12\x12\n\x04text\x18\x03\x20\
\x01(\x0cR\x06memory\x12\x14\n\x05flash\x18\x03\x20\x01(\x08R\x05flash\"\ \x01(\tR\x04text\"G\n\x13DebugLinkMemoryRead\x12\x18\n\x07address\x18\
-\n\x13DebugLinkFlashErase\x12\x16\n\x06sector\x18\x01\x20\x01(\rR\x06se\ \x01\x20\x01(\rR\x07address\x12\x16\n\x06length\x18\x02\x20\x01(\rR\x06l\
ctor\".\n\x14DebugLinkEraseSdCard\x12\x16\n\x06format\x18\x01\x20\x01(\ ength\")\n\x0fDebugLinkMemory\x12\x16\n\x06memory\x18\x01\x20\x01(\x0cR\
\x08R\x06format\"0\n\x14DebugLinkWatchLayout\x12\x14\n\x05watch\x18\x01\ \x06memory\"^\n\x14DebugLinkMemoryWrite\x12\x18\n\x07address\x18\x01\x20\
\x20\x01(\x08R\x05watch:\x02\x18\x01\"\x1f\n\x19DebugLinkResetDebugEvent\ \x01(\rR\x07address\x12\x16\n\x06memory\x18\x02\x20\x01(\x0cR\x06memory\
s:\x02\x18\x01\"\x1a\n\x18DebugLinkOptigaSetSecMaxB=\n#com.satoshilabs.t\ \x12\x14\n\x05flash\x18\x03\x20\x01(\x08R\x05flash\"-\n\x13DebugLinkFlas\
rezor.lib.protobufB\x12TrezorMessageDebug\x80\xa6\x1d\x01\ hErase\x12\x16\n\x06sector\x18\x01\x20\x01(\rR\x06sector\".\n\x14DebugLi\
nkEraseSdCard\x12\x16\n\x06format\x18\x01\x20\x01(\x08R\x06format\"0\n\
\x14DebugLinkWatchLayout\x12\x14\n\x05watch\x18\x01\x20\x01(\x08R\x05wat\
ch:\x02\x18\x01\"\x1f\n\x19DebugLinkResetDebugEvents:\x02\x18\x01\"\x1a\
\n\x18DebugLinkOptigaSetSecMaxB=\n#com.satoshilabs.trezor.lib.protobufB\
\x12TrezorMessageDebug\x80\xa6\x1d\x01\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,14 @@ pub mod exts {
pub const wire_no_fsm: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const wire_no_fsm: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const channel_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const channel_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const pairing_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const pairing_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const bitcoin_only: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(60000, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const bitcoin_only: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(60000, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const has_bitcoin_only_values: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(51001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const has_bitcoin_only_values: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(51001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
@ -68,19 +76,25 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\x08wireTiny\ \x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\x08wireTiny\
:L\n\x0fwire_bootloader\x18\xd7\x86\x03\x20\x01(\x08\x12!.google.protobu\ :L\n\x0fwire_bootloader\x18\xd7\x86\x03\x20\x01(\x08\x12!.google.protobu\
f.EnumValueOptionsR\x0ewireBootloader:C\n\x0bwire_no_fsm\x18\xd8\x86\x03\ f.EnumValueOptionsR\x0ewireBootloader:C\n\x0bwire_no_fsm\x18\xd8\x86\x03\
\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:F\n\x0cb\ \x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:B\n\ncha\
itcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueO\ nnel_in\x18\xd9\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptio\
ptionsR\x0bbitcoinOnly:U\n\x17has_bitcoin_only_values\x18\xb9\x8e\x03\ nsR\tchannelIn:D\n\x0bchannel_out\x18\xda\x86\x03\x20\x01(\x08\x12!.goog\
\x20\x01(\x08\x12\x1c.google.protobuf.EnumOptionsR\x14hasBitcoinOnlyValu\ le.protobuf.EnumValueOptionsR\nchannelOut:B\n\npairing_in\x18\xdb\x86\
es:T\n\x14experimental_message\x18\xa1\x96\x03\x20\x01(\x08\x12\x1f.goog\ \x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\tpairingIn:D\n\
le.protobuf.MessageOptionsR\x13experimentalMessage:>\n\twire_type\x18\ \x0bpairing_out\x18\xdc\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumVa\
\xa2\x96\x03\x20\x01(\r\x12\x1f.google.protobuf.MessageOptionsR\x08wireT\ lueOptionsR\npairingOut:F\n\x0cbitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\
ype:F\n\rinternal_only\x18\xa3\x96\x03\x20\x01(\x08\x12\x1f.google.proto\ \x12!.google.protobuf.EnumValueOptionsR\x0bbitcoinOnly:U\n\x17has_bitcoi\
buf.MessageOptionsR\x0cinternalOnly:N\n\x12experimental_field\x18\x89\ n_only_values\x18\xb9\x8e\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumO\
\x9e\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x11experimen\ ptionsR\x14hasBitcoinOnlyValues:T\n\x14experimental_message\x18\xa1\x96\
talField:U\n\x17include_in_bitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12\ \x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x13experimenta\
\x1c.google.protobuf.FileOptionsR\x14includeInBitcoinOnlyB4\n#com.satosh\ lMessage:>\n\twire_type\x18\xa2\x96\x03\x20\x01(\r\x12\x1f.google.protob\
ilabs.trezor.lib.protobufB\rTrezorOptions\ uf.MessageOptionsR\x08wireType:F\n\rinternal_only\x18\xa3\x96\x03\x20\
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cinternalOnly:N\n\
\x12experimental_field\x18\x89\x9e\x03\x20\x01(\x08\x12\x1d.google.proto\
buf.FieldOptionsR\x11experimentalField:U\n\x17include_in_bitcoin_only\
\x18\xe0\xd4\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x14in\
cludeInBitcoinOnlyB4\n#com.satoshilabs.trezor.lib.protobufB\rTrezorOptio\
ns\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file