diff --git a/common/protob/messages-debug.proto b/common/protob/messages-debug.proto index 4841fd4564..7a37b6e345 100644 --- a/common/protob/messages-debug.proto +++ b/common/protob/messages-debug.proto @@ -85,7 +85,7 @@ message DebugLinkRecordScreen { } /** - * Request: Computer asks for device state + * Request: Host asks for device state * @start * @next DebugLinkState */ @@ -134,6 +134,39 @@ message DebugLinkState { repeated string tokens = 13; // current layout represented as a list of string tokens } +/** + * Request: Host asks for device pairing info + * @start + * @next DebugLinkPairingInfo + */ + message DebugLinkGetPairingInfo { + optional bytes channel_id = 1; // ID of the THP channel to get pairing info from + optional bytes handshake_hash = 2; // handshake hash of the THP channel + optional bytes nfc_secret_host = 3; // host's NFC secret (In case of NFC pairing) +} + + /** + * Response: Device pairing info + * @end + */ + message DebugLinkPairingInfo { + optional bytes channel_id = 1; // ID of the THP channel the pairing info is from + optional bytes handshake_hash = 2; // handshake hash of the THP channel + optional uint32 code_entry_code = 3; // CodeEntry pairing code + optional bytes code_qr_code = 4; // QrCode pairing code + optional bytes nfc_secret_trezor = 5; // NFC secret used in NFC pairing +} + +/** + * Request: Disable or enable the pairing dialog for a given THP channel + * @start + * @next Success + */ +message DebugLinkToggleThpPairingDialog{ + optional bytes channel_id = 1; + optional bool show_dialog = 2 [default=false]; +} + /** * Request: Ask device to restart * @start diff --git a/common/protob/messages-thp.proto b/common/protob/messages-thp.proto index c05d9f64d7..646b1d1747 100644 --- a/common/protob/messages-thp.proto +++ b/common/protob/messages-thp.proto @@ -9,6 +9,195 @@ import "options.proto"; option (include_in_bitcoin_only) = true; + +/** + * Numeric identifiers of pairing methods. + * @embed + */ +enum ThpPairingMethod { + SkipPairing = 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 = 4; // Trezor and host application exchange authentication secrets 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 uint32 protocol_version_major = 3; // The major version of the communication protocol used by the firmware. + optional uint32 protocol_version_minor = 4; // The minor version of the communication protocol used 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 +} + +/** + * Request: Ask device for a new session with given passphrase. + * @start + * @next Success + */ +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 +} + + +/** + * Request: Start pairing process. + * @start + * @next ThpPairingRequestApproved + */ +message ThpPairingRequest{ + optional string host_name = 1; // Human-readable host name +} + +/** + * Response: Host is allowed to start pairing process. + * @start + * @next ThpSelectMethod + */ +message ThpPairingRequestApproved{ +} + +/** + * Request: Start pairing using the method selected. + * @start + * @next ThpPairingPreparationsFinished + * @next ThpCodeEntryCommitment + */ +message ThpSelectMethod { + optional ThpPairingMethod selected_pairing_method = 1; +} + +/** + * Response: Pairing is ready for user input / OOB communication. + * @next ThpCodeEntryCpace + * @next ThpQrCodeTag + * @next ThpNfcTagHost + */ +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 ThpCodeEntryCpaceTrezor + */ +message ThpCodeEntryChallenge { + optional bytes challenge = 1; // Host's random 32-byte challenge +} + +/** + * Response: Trezor continues with the CPACE protocol. + * @next ThpCodeEntryCpaceHostTag + */ +message ThpCodeEntryCpaceTrezor { + optional bytes cpace_trezor_public_key = 1; // Trezor's ephemeral CPace public key +} + +/** + * Request: User selected Code Entry option in Host. Host starts CPACE protocol with Trezor. + * @next ThpCodeEntrySecret + */ + message ThpCodeEntryCpaceHostTag { + optional bytes cpace_host_public_key = 1; // Host's ephemeral CPace public key + 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 ThpNfcTagTrezor + */ +message ThpNfcTagHost { + optional bytes tag = 1; // Host's tag +} + +/** + * Response: Trezor sends the Unidirectioal NFC secret. + * @next ThpCredentialRequest + * @next ThpEndRequest + */ +message ThpNfcTagTrezor { + optional bytes tag = 1; // Trezor's tag +} + +/** + * 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 identifying the credential. + optional bool autoconnect = 2; // Whether host wants to autoconnect without user confirmation + optional bytes credential = 3; // Host's previous credential +} + +/** + * 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. * @embed @@ -16,6 +205,7 @@ option (include_in_bitcoin_only) = true; message ThpCredentialMetadata { option (internal_only) = true; optional string host_name = 1; // Human-readable host name + optional bool autoconnect = 2; // Whether host is allowed to autoconnect without user confirmation } /** diff --git a/common/protob/messages.proto b/common/protob/messages.proto index f56013b6ac..9c12e485c6 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -138,6 +138,8 @@ enum MessageType { MessageType_DebugLinkOptigaSetSecMax = 9008 [(bitcoin_only) = true, (wire_debug_in) = true]; MessageType_DebugLinkGetGcInfo = 9009 [(bitcoin_only) = true, (wire_debug_in) = true]; MessageType_DebugLinkGcInfo = 9010 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkGetPairingInfo = 9011 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkPairingInfo = 9012 [(bitcoin_only) = true, (wire_debug_out) = true]; // Ethereum MessageType_EthereumGetPublicKey = 450 [(wire_in) = true]; @@ -317,7 +319,28 @@ enum MessageType { MessageType_SolanaTxSignature = 905 [(wire_out) = true]; // THP - reserved 1000 to 1099; // See messages-thp.proto + MessageType_ThpCreateNewSession = 1000 [(bitcoin_only) = true, (wire_in) = true]; + reserved 1001 to 1005; // never appeared in a release, reserved for future use + MessageType_ThpPairingRequest = 1006 [(bitcoin_only) = true]; + MessageType_ThpPairingRequestApproved = 1007 [(bitcoin_only) = true]; + MessageType_ThpSelectMethod = 1008 [(bitcoin_only) = true]; + MessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true]; + MessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true]; + MessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true]; + MessageType_ThpEndRequest = 1012 [(bitcoin_only) = true]; + MessageType_ThpEndResponse = 1013 [(bitcoin_only) = true]; + reserved 1014 to 1015; + MessageType_ThpCodeEntryCommitment = 1016 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryChallenge = 1017 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryCpaceTrezor = 1018 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryCpaceHostTag = 1019 [(bitcoin_only) = true]; + MessageType_ThpCodeEntrySecret = 1020 [(bitcoin_only) = true]; + reserved 1021 to 1023; + MessageType_ThpQrCodeTag = 1024 [(bitcoin_only) = true]; + MessageType_ThpQrCodeSecret = 1025 [(bitcoin_only) = true]; + reserved 1026 to 1031; + MessageType_ThpNfcTagHost = 1032 [(bitcoin_only) = true]; + MessageType_ThpNfcTagTrezor = 1033 [(bitcoin_only) = true]; // Nostr MessageType_NostrGetPubkey = 2001 [(wire_in) = true]; diff --git a/core/embed/upymod/qstrdefsport.h b/core/embed/upymod/qstrdefsport.h index e751d91c72..52df6091c6 100644 --- a/core/embed/upymod/qstrdefsport.h +++ b/core/embed/upymod/qstrdefsport.h @@ -386,10 +386,12 @@ Q(workflow_handlers) Q(writers) #if USE_THP +Q(ThpPairingMethod) Q(apps.thp) Q(apps.thp.credential_manager) Q(credential_manager) Q(thp) +Q(trezor.enums.ThpPairingMethod) #endif #if !BITCOIN_ONLY diff --git a/core/src/trezor/enums/MessageType.py b/core/src/trezor/enums/MessageType.py index f17ddbd35f..17942b4f35 100644 --- a/core/src/trezor/enums/MessageType.py +++ b/core/src/trezor/enums/MessageType.py @@ -82,6 +82,24 @@ SignIdentity = 53 SignedIdentity = 54 GetECDHSessionKey = 61 ECDHSessionKey = 62 +ThpCreateNewSession = 1000 +ThpPairingRequest = 1006 +ThpPairingRequestApproved = 1007 +ThpSelectMethod = 1008 +ThpPairingPreparationsFinished = 1009 +ThpCredentialRequest = 1010 +ThpCredentialResponse = 1011 +ThpEndRequest = 1012 +ThpEndResponse = 1013 +ThpCodeEntryCommitment = 1016 +ThpCodeEntryChallenge = 1017 +ThpCodeEntryCpaceTrezor = 1018 +ThpCodeEntryCpaceHostTag = 1019 +ThpCodeEntrySecret = 1020 +ThpQrCodeTag = 1024 +ThpQrCodeSecret = 1025 +ThpNfcTagHost = 1032 +ThpNfcTagTrezor = 1033 BenchmarkListNames = 9100 BenchmarkNames = 9101 BenchmarkRun = 9102 @@ -105,6 +123,8 @@ if __debug__: DebugLinkOptigaSetSecMax = 9008 DebugLinkGetGcInfo = 9009 DebugLinkGcInfo = 9010 + DebugLinkGetPairingInfo = 9011 + DebugLinkPairingInfo = 9012 if not utils.BITCOIN_ONLY: SetU2FCounter = 63 GetNextU2FCounter = 80 diff --git a/core/src/trezor/enums/ThpPairingMethod.py b/core/src/trezor/enums/ThpPairingMethod.py new file mode 100644 index 0000000000..0af2487182 --- /dev/null +++ b/core/src/trezor/enums/ThpPairingMethod.py @@ -0,0 +1,8 @@ +# Automatically generated by pb2py +# fmt: off +# isort:skip_file + +SkipPairing = 1 +CodeEntry = 2 +QrCode = 3 +NFC = 4 diff --git a/core/src/trezor/enums/__init__.py b/core/src/trezor/enums/__init__.py index 455b377b55..51a73c5c99 100644 --- a/core/src/trezor/enums/__init__.py +++ b/core/src/trezor/enums/__init__.py @@ -337,6 +337,12 @@ if TYPE_CHECKING: Nay = 1 Pass = 2 + class ThpPairingMethod(IntEnum): + SkipPairing = 1 + CodeEntry = 2 + QrCode = 3 + NFC = 4 + class MessageType(IntEnum): Initialize = 0 Ping = 1 @@ -440,6 +446,8 @@ if TYPE_CHECKING: DebugLinkOptigaSetSecMax = 9008 DebugLinkGetGcInfo = 9009 DebugLinkGcInfo = 9010 + DebugLinkGetPairingInfo = 9011 + DebugLinkPairingInfo = 9012 EthereumGetPublicKey = 450 EthereumPublicKey = 451 EthereumGetAddress = 56 @@ -574,6 +582,24 @@ if TYPE_CHECKING: SolanaAddress = 903 SolanaSignTx = 904 SolanaTxSignature = 905 + ThpCreateNewSession = 1000 + ThpPairingRequest = 1006 + ThpPairingRequestApproved = 1007 + ThpSelectMethod = 1008 + ThpPairingPreparationsFinished = 1009 + ThpCredentialRequest = 1010 + ThpCredentialResponse = 1011 + ThpEndRequest = 1012 + ThpEndResponse = 1013 + ThpCodeEntryCommitment = 1016 + ThpCodeEntryChallenge = 1017 + ThpCodeEntryCpaceTrezor = 1018 + ThpCodeEntryCpaceHostTag = 1019 + ThpCodeEntrySecret = 1020 + ThpQrCodeTag = 1024 + ThpQrCodeSecret = 1025 + ThpNfcTagHost = 1032 + ThpNfcTagTrezor = 1033 NostrGetPubkey = 2001 NostrPubkey = 2002 NostrSignEvent = 2003 diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py index 304156af24..c99bd481b4 100644 --- a/core/src/trezor/messages.py +++ b/core/src/trezor/messages.py @@ -65,6 +65,7 @@ if TYPE_CHECKING: from trezor.enums import StellarSignerType # noqa: F401 from trezor.enums import TezosBallotType # noqa: F401 from trezor.enums import TezosContractType # noqa: F401 + from trezor.enums import ThpPairingMethod # noqa: F401 from trezor.enums import WordRequestType # noqa: F401 class BenchmarkListNames(protobuf.MessageType): @@ -2755,6 +2756,62 @@ if TYPE_CHECKING: def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkState"]: return isinstance(msg, cls) + class DebugLinkGetPairingInfo(protobuf.MessageType): + channel_id: "bytes | None" + handshake_hash: "bytes | None" + nfc_secret_host: "bytes | None" + + def __init__( + self, + *, + channel_id: "bytes | None" = None, + handshake_hash: "bytes | None" = None, + nfc_secret_host: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkGetPairingInfo"]: + return isinstance(msg, cls) + + class DebugLinkPairingInfo(protobuf.MessageType): + channel_id: "bytes | None" + handshake_hash: "bytes | None" + code_entry_code: "int | None" + code_qr_code: "bytes | None" + nfc_secret_trezor: "bytes | None" + + def __init__( + self, + *, + channel_id: "bytes | None" = None, + handshake_hash: "bytes | None" = None, + code_entry_code: "int | None" = None, + code_qr_code: "bytes | None" = None, + nfc_secret_trezor: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkPairingInfo"]: + return isinstance(msg, cls) + + class DebugLinkToggleThpPairingDialog(protobuf.MessageType): + channel_id: "bytes | None" + show_dialog: "bool" + + def __init__( + self, + *, + channel_id: "bytes | None" = None, + show_dialog: "bool | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkToggleThpPairingDialog"]: + return isinstance(msg, cls) + class DebugLinkStop(protobuf.MessageType): @classmethod @@ -6111,7 +6168,61 @@ if TYPE_CHECKING: def is_type_of(cls, msg: Any) -> TypeGuard["TezosManagerTransfer"]: return isinstance(msg, cls) - class ThpCredentialMetadata(protobuf.MessageType): + class ThpDeviceProperties(protobuf.MessageType): + internal_model: "str | None" + model_variant: "int | None" + protocol_version_major: "int | None" + protocol_version_minor: "int | None" + pairing_methods: "list[ThpPairingMethod]" + + def __init__( + self, + *, + pairing_methods: "list[ThpPairingMethod] | None" = None, + internal_model: "str | None" = None, + model_variant: "int | None" = None, + protocol_version_major: "int | None" = None, + protocol_version_minor: "int | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpDeviceProperties"]: + return isinstance(msg, cls) + + class ThpHandshakeCompletionReqNoisePayload(protobuf.MessageType): + host_pairing_credential: "bytes | None" + + def __init__( + self, + *, + host_pairing_credential: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpHandshakeCompletionReqNoisePayload"]: + return isinstance(msg, cls) + + class ThpCreateNewSession(protobuf.MessageType): + passphrase: "str | None" + on_device: "bool | None" + derive_cardano: "bool | None" + + def __init__( + self, + *, + passphrase: "str | None" = None, + on_device: "bool | None" = None, + derive_cardano: "bool | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCreateNewSession"]: + return isinstance(msg, cls) + + class ThpPairingRequest(protobuf.MessageType): host_name: "str | None" def __init__( @@ -6121,6 +6232,222 @@ if TYPE_CHECKING: ) -> None: pass + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpPairingRequest"]: + return isinstance(msg, cls) + + class ThpPairingRequestApproved(protobuf.MessageType): + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpPairingRequestApproved"]: + return isinstance(msg, cls) + + class ThpSelectMethod(protobuf.MessageType): + selected_pairing_method: "ThpPairingMethod | None" + + def __init__( + self, + *, + selected_pairing_method: "ThpPairingMethod | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpSelectMethod"]: + return isinstance(msg, cls) + + class ThpPairingPreparationsFinished(protobuf.MessageType): + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpPairingPreparationsFinished"]: + return isinstance(msg, cls) + + class ThpCodeEntryCommitment(protobuf.MessageType): + commitment: "bytes | None" + + def __init__( + self, + *, + commitment: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCodeEntryCommitment"]: + return isinstance(msg, cls) + + class ThpCodeEntryChallenge(protobuf.MessageType): + challenge: "bytes | None" + + def __init__( + self, + *, + challenge: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCodeEntryChallenge"]: + return isinstance(msg, cls) + + class ThpCodeEntryCpaceTrezor(protobuf.MessageType): + cpace_trezor_public_key: "bytes | None" + + def __init__( + self, + *, + cpace_trezor_public_key: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCodeEntryCpaceTrezor"]: + return isinstance(msg, cls) + + class ThpCodeEntryCpaceHostTag(protobuf.MessageType): + cpace_host_public_key: "bytes | None" + tag: "bytes | None" + + def __init__( + self, + *, + cpace_host_public_key: "bytes | None" = None, + tag: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCodeEntryCpaceHostTag"]: + return isinstance(msg, cls) + + class ThpCodeEntrySecret(protobuf.MessageType): + secret: "bytes | None" + + def __init__( + self, + *, + secret: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCodeEntrySecret"]: + return isinstance(msg, cls) + + class ThpQrCodeTag(protobuf.MessageType): + tag: "bytes | None" + + def __init__( + self, + *, + tag: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpQrCodeTag"]: + return isinstance(msg, cls) + + class ThpQrCodeSecret(protobuf.MessageType): + secret: "bytes | None" + + def __init__( + self, + *, + secret: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpQrCodeSecret"]: + return isinstance(msg, cls) + + class ThpNfcTagHost(protobuf.MessageType): + tag: "bytes | None" + + def __init__( + self, + *, + tag: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpNfcTagHost"]: + return isinstance(msg, cls) + + class ThpNfcTagTrezor(protobuf.MessageType): + tag: "bytes | None" + + def __init__( + self, + *, + tag: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpNfcTagTrezor"]: + return isinstance(msg, cls) + + class ThpCredentialRequest(protobuf.MessageType): + host_static_pubkey: "bytes | None" + autoconnect: "bool | None" + credential: "bytes | None" + + def __init__( + self, + *, + host_static_pubkey: "bytes | None" = None, + autoconnect: "bool | None" = None, + credential: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCredentialRequest"]: + return isinstance(msg, cls) + + class ThpCredentialResponse(protobuf.MessageType): + trezor_static_pubkey: "bytes | None" + credential: "bytes | None" + + def __init__( + self, + *, + trezor_static_pubkey: "bytes | None" = None, + credential: "bytes | None" = None, + ) -> None: + pass + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpCredentialResponse"]: + return isinstance(msg, cls) + + class ThpEndRequest(protobuf.MessageType): + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpEndRequest"]: + return isinstance(msg, cls) + + class ThpEndResponse(protobuf.MessageType): + + @classmethod + def is_type_of(cls, msg: Any) -> TypeGuard["ThpEndResponse"]: + return isinstance(msg, cls) + + class ThpCredentialMetadata(protobuf.MessageType): + host_name: "str | None" + autoconnect: "bool | None" + + def __init__( + self, + *, + host_name: "str | None" = None, + autoconnect: "bool | None" = None, + ) -> None: + pass + @classmethod def is_type_of(cls, msg: Any) -> TypeGuard["ThpCredentialMetadata"]: return isinstance(msg, cls) diff --git a/legacy/firmware/protob/Makefile b/legacy/firmware/protob/Makefile index c732d22dd0..e8265518e1 100644 --- a/legacy/firmware/protob/Makefile +++ b/legacy/firmware/protob/Makefile @@ -3,15 +3,15 @@ Q := @ endif SKIPPED_MESSAGES := Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \ - DebugLinkGetGcInfo DebugLinkGcInfoItem DebugLinkGcInfo \ - DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \ + DebugLinkGetPairingInfo DebugLinkPairingInfo DebugLinkGetGcInfo DebugLinkGcInfoItem \ + DebugLinkGcInfo DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \ DebugLinkLayout DebugLinkResetDebugEvents GetNonce \ TxAckInput TxAckOutput TxAckPrev TxAckPaymentRequest \ EthereumSignTypedData EthereumTypedDataStructRequest EthereumTypedDataStructAck \ EthereumTypedDataValueRequest EthereumTypedDataValueAck ShowDeviceTutorial \ UnlockBootloader AuthenticateDevice AuthenticityProof \ Solana StellarClaimClaimableBalanceOp \ - ChangeLanguage DataChunkRequest DataChunkAck \ + ChangeLanguage DataChunkRequest DataChunkAck Thp \ SetBrightness DebugLinkOptigaSetSecMax \ BenchmarkListNames BenchmarkRun BenchmarkNames BenchmarkResult \ NostrGetPubkey NostrPubkey NostrSignEvent NostrEventSignature \ diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index f788a113d6..7a5d6ba7d9 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -387,6 +387,13 @@ class TezosBallotType(IntEnum): Pass = 2 +class ThpPairingMethod(IntEnum): + SkipPairing = 1 + CodeEntry = 2 + QrCode = 3 + NFC = 4 + + class MessageType(IntEnum): Initialize = 0 Ping = 1 @@ -490,6 +497,8 @@ class MessageType(IntEnum): DebugLinkOptigaSetSecMax = 9008 DebugLinkGetGcInfo = 9009 DebugLinkGcInfo = 9010 + DebugLinkGetPairingInfo = 9011 + DebugLinkPairingInfo = 9012 EthereumGetPublicKey = 450 EthereumPublicKey = 451 EthereumGetAddress = 56 @@ -624,6 +633,24 @@ class MessageType(IntEnum): SolanaAddress = 903 SolanaSignTx = 904 SolanaTxSignature = 905 + ThpCreateNewSession = 1000 + ThpPairingRequest = 1006 + ThpPairingRequestApproved = 1007 + ThpSelectMethod = 1008 + ThpPairingPreparationsFinished = 1009 + ThpCredentialRequest = 1010 + ThpCredentialResponse = 1011 + ThpEndRequest = 1012 + ThpEndResponse = 1013 + ThpCodeEntryCommitment = 1016 + ThpCodeEntryChallenge = 1017 + ThpCodeEntryCpaceTrezor = 1018 + ThpCodeEntryCpaceHostTag = 1019 + ThpCodeEntrySecret = 1020 + ThpQrCodeTag = 1024 + ThpQrCodeSecret = 1025 + ThpNfcTagHost = 1032 + ThpNfcTagTrezor = 1033 NostrGetPubkey = 2001 NostrPubkey = 2002 NostrSignEvent = 2003 @@ -3974,6 +4001,69 @@ class DebugLinkState(protobuf.MessageType): self.mnemonic_type = mnemonic_type +class DebugLinkGetPairingInfo(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 9011 + FIELDS = { + 1: protobuf.Field("channel_id", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("handshake_hash", "bytes", repeated=False, required=False, default=None), + 3: protobuf.Field("nfc_secret_host", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + channel_id: Optional["bytes"] = None, + handshake_hash: Optional["bytes"] = None, + nfc_secret_host: Optional["bytes"] = None, + ) -> None: + self.channel_id = channel_id + self.handshake_hash = handshake_hash + self.nfc_secret_host = nfc_secret_host + + +class DebugLinkPairingInfo(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 9012 + FIELDS = { + 1: protobuf.Field("channel_id", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("handshake_hash", "bytes", repeated=False, required=False, default=None), + 3: protobuf.Field("code_entry_code", "uint32", repeated=False, required=False, default=None), + 4: protobuf.Field("code_qr_code", "bytes", repeated=False, required=False, default=None), + 5: protobuf.Field("nfc_secret_trezor", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + channel_id: Optional["bytes"] = None, + handshake_hash: Optional["bytes"] = None, + code_entry_code: Optional["int"] = None, + code_qr_code: Optional["bytes"] = None, + nfc_secret_trezor: Optional["bytes"] = None, + ) -> None: + self.channel_id = channel_id + self.handshake_hash = handshake_hash + self.code_entry_code = code_entry_code + self.code_qr_code = code_qr_code + self.nfc_secret_trezor = nfc_secret_trezor + + +class DebugLinkToggleThpPairingDialog(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("channel_id", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("show_dialog", "bool", repeated=False, required=False, default=False), + } + + def __init__( + self, + *, + channel_id: Optional["bytes"] = None, + show_dialog: Optional["bool"] = False, + ) -> None: + self.channel_id = channel_id + self.show_dialog = show_dialog + + class DebugLinkStop(protobuf.MessageType): MESSAGE_WIRE_TYPE = 103 @@ -7786,8 +7876,68 @@ class TezosManagerTransfer(protobuf.MessageType): self.amount = amount -class ThpCredentialMetadata(protobuf.MessageType): +class ThpDeviceProperties(protobuf.MessageType): MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("internal_model", "string", repeated=False, required=False, default=None), + 2: protobuf.Field("model_variant", "uint32", repeated=False, required=False, default=None), + 3: protobuf.Field("protocol_version_major", "uint32", repeated=False, required=False, default=None), + 4: protobuf.Field("protocol_version_minor", "uint32", repeated=False, required=False, default=None), + 5: protobuf.Field("pairing_methods", "ThpPairingMethod", repeated=True, required=False, default=None), + } + + def __init__( + self, + *, + pairing_methods: Optional[Sequence["ThpPairingMethod"]] = None, + internal_model: Optional["str"] = None, + model_variant: Optional["int"] = None, + protocol_version_major: Optional["int"] = None, + protocol_version_minor: Optional["int"] = None, + ) -> None: + self.pairing_methods: Sequence["ThpPairingMethod"] = pairing_methods if pairing_methods is not None else [] + self.internal_model = internal_model + self.model_variant = model_variant + self.protocol_version_major = protocol_version_major + self.protocol_version_minor = protocol_version_minor + + +class ThpHandshakeCompletionReqNoisePayload(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("host_pairing_credential", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + host_pairing_credential: Optional["bytes"] = None, + ) -> None: + self.host_pairing_credential = host_pairing_credential + + +class ThpCreateNewSession(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1000 + FIELDS = { + 1: protobuf.Field("passphrase", "string", repeated=False, required=False, default=None), + 2: protobuf.Field("on_device", "bool", repeated=False, required=False, default=None), + 3: protobuf.Field("derive_cardano", "bool", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + passphrase: Optional["str"] = None, + on_device: Optional["bool"] = None, + derive_cardano: Optional["bool"] = None, + ) -> None: + self.passphrase = passphrase + self.on_device = on_device + self.derive_cardano = derive_cardano + + +class ThpPairingRequest(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1006 FIELDS = { 1: protobuf.Field("host_name", "string", repeated=False, required=False, default=None), } @@ -7800,6 +7950,219 @@ class ThpCredentialMetadata(protobuf.MessageType): self.host_name = host_name +class ThpPairingRequestApproved(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1007 + + +class ThpSelectMethod(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1008 + FIELDS = { + 1: protobuf.Field("selected_pairing_method", "ThpPairingMethod", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + selected_pairing_method: Optional["ThpPairingMethod"] = None, + ) -> None: + self.selected_pairing_method = selected_pairing_method + + +class ThpPairingPreparationsFinished(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1009 + + +class ThpCodeEntryCommitment(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1016 + FIELDS = { + 1: protobuf.Field("commitment", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + commitment: Optional["bytes"] = None, + ) -> None: + self.commitment = commitment + + +class ThpCodeEntryChallenge(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1017 + FIELDS = { + 1: protobuf.Field("challenge", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + challenge: Optional["bytes"] = None, + ) -> None: + self.challenge = challenge + + +class ThpCodeEntryCpaceTrezor(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1018 + FIELDS = { + 1: protobuf.Field("cpace_trezor_public_key", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + cpace_trezor_public_key: Optional["bytes"] = None, + ) -> None: + self.cpace_trezor_public_key = cpace_trezor_public_key + + +class ThpCodeEntryCpaceHostTag(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1019 + FIELDS = { + 1: protobuf.Field("cpace_host_public_key", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("tag", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + cpace_host_public_key: Optional["bytes"] = None, + tag: Optional["bytes"] = None, + ) -> None: + self.cpace_host_public_key = cpace_host_public_key + self.tag = tag + + +class ThpCodeEntrySecret(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1020 + FIELDS = { + 1: protobuf.Field("secret", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + secret: Optional["bytes"] = None, + ) -> None: + self.secret = secret + + +class ThpQrCodeTag(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1024 + FIELDS = { + 1: protobuf.Field("tag", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + tag: Optional["bytes"] = None, + ) -> None: + self.tag = tag + + +class ThpQrCodeSecret(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1025 + FIELDS = { + 1: protobuf.Field("secret", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + secret: Optional["bytes"] = None, + ) -> None: + self.secret = secret + + +class ThpNfcTagHost(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1032 + FIELDS = { + 1: protobuf.Field("tag", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + tag: Optional["bytes"] = None, + ) -> None: + self.tag = tag + + +class ThpNfcTagTrezor(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1033 + FIELDS = { + 1: protobuf.Field("tag", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + tag: Optional["bytes"] = None, + ) -> None: + self.tag = tag + + +class ThpCredentialRequest(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1010 + FIELDS = { + 1: protobuf.Field("host_static_pubkey", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("autoconnect", "bool", repeated=False, required=False, default=None), + 3: protobuf.Field("credential", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + host_static_pubkey: Optional["bytes"] = None, + autoconnect: Optional["bool"] = None, + credential: Optional["bytes"] = None, + ) -> None: + self.host_static_pubkey = host_static_pubkey + self.autoconnect = autoconnect + self.credential = credential + + +class ThpCredentialResponse(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1011 + FIELDS = { + 1: protobuf.Field("trezor_static_pubkey", "bytes", repeated=False, required=False, default=None), + 2: protobuf.Field("credential", "bytes", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + trezor_static_pubkey: Optional["bytes"] = None, + credential: Optional["bytes"] = None, + ) -> None: + self.trezor_static_pubkey = trezor_static_pubkey + self.credential = credential + + +class ThpEndRequest(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1012 + + +class ThpEndResponse(protobuf.MessageType): + MESSAGE_WIRE_TYPE = 1013 + + +class ThpCredentialMetadata(protobuf.MessageType): + MESSAGE_WIRE_TYPE = None + FIELDS = { + 1: protobuf.Field("host_name", "string", repeated=False, required=False, default=None), + 2: protobuf.Field("autoconnect", "bool", repeated=False, required=False, default=None), + } + + def __init__( + self, + *, + host_name: Optional["str"] = None, + autoconnect: Optional["bool"] = None, + ) -> None: + self.host_name = host_name + self.autoconnect = autoconnect + + class ThpPairingCredential(protobuf.MessageType): MESSAGE_WIRE_TYPE = None FIELDS = { diff --git a/rust/trezor-client/src/messages/generated.rs b/rust/trezor-client/src/messages/generated.rs index 368f9811f9..24e4b08553 100644 --- a/rust/trezor-client/src/messages/generated.rs +++ b/rust/trezor-client/src/messages/generated.rs @@ -85,6 +85,26 @@ trezor_message_impl! { DebugLinkOptigaSetSecMax => MessageType_DebugLinkOptigaSetSecMax, DebugLinkGetGcInfo => MessageType_DebugLinkGetGcInfo, DebugLinkGcInfo => MessageType_DebugLinkGcInfo, + DebugLinkGetPairingInfo => MessageType_DebugLinkGetPairingInfo, + DebugLinkPairingInfo => MessageType_DebugLinkPairingInfo, + ThpCreateNewSession => MessageType_ThpCreateNewSession, + ThpPairingRequest => MessageType_ThpPairingRequest, + ThpPairingRequestApproved => MessageType_ThpPairingRequestApproved, + ThpSelectMethod => MessageType_ThpSelectMethod, + ThpPairingPreparationsFinished => MessageType_ThpPairingPreparationsFinished, + ThpCredentialRequest => MessageType_ThpCredentialRequest, + ThpCredentialResponse => MessageType_ThpCredentialResponse, + ThpEndRequest => MessageType_ThpEndRequest, + ThpEndResponse => MessageType_ThpEndResponse, + ThpCodeEntryCommitment => MessageType_ThpCodeEntryCommitment, + ThpCodeEntryChallenge => MessageType_ThpCodeEntryChallenge, + ThpCodeEntryCpaceTrezor => MessageType_ThpCodeEntryCpaceTrezor, + ThpCodeEntryCpaceHostTag => MessageType_ThpCodeEntryCpaceHostTag, + ThpCodeEntrySecret => MessageType_ThpCodeEntrySecret, + ThpQrCodeTag => MessageType_ThpQrCodeTag, + ThpQrCodeSecret => MessageType_ThpQrCodeSecret, + ThpNfcTagHost => MessageType_ThpNfcTagHost, + ThpNfcTagTrezor => MessageType_ThpNfcTagTrezor, BenchmarkListNames => MessageType_BenchmarkListNames, BenchmarkNames => MessageType_BenchmarkNames, BenchmarkRun => MessageType_BenchmarkRun, diff --git a/rust/trezor-client/src/protos/generated/messages.rs b/rust/trezor-client/src/protos/generated/messages.rs index 86ac5ed61f..710aa04f2e 100644 --- a/rust/trezor-client/src/protos/generated/messages.rs +++ b/rust/trezor-client/src/protos/generated/messages.rs @@ -231,6 +231,10 @@ pub enum MessageType { MessageType_DebugLinkGetGcInfo = 9009, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkGcInfo) MessageType_DebugLinkGcInfo = 9010, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkGetPairingInfo) + MessageType_DebugLinkGetPairingInfo = 9011, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkPairingInfo) + MessageType_DebugLinkPairingInfo = 9012, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EthereumGetPublicKey) MessageType_EthereumGetPublicKey = 450, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EthereumPublicKey) @@ -499,6 +503,42 @@ pub enum MessageType { MessageType_SolanaSignTx = 904, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_SolanaTxSignature) MessageType_SolanaTxSignature = 905, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCreateNewSession) + MessageType_ThpCreateNewSession = 1000, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpPairingRequest) + MessageType_ThpPairingRequest = 1006, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpPairingRequestApproved) + MessageType_ThpPairingRequestApproved = 1007, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpSelectMethod) + MessageType_ThpSelectMethod = 1008, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpPairingPreparationsFinished) + MessageType_ThpPairingPreparationsFinished = 1009, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCredentialRequest) + MessageType_ThpCredentialRequest = 1010, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCredentialResponse) + MessageType_ThpCredentialResponse = 1011, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpEndRequest) + MessageType_ThpEndRequest = 1012, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpEndResponse) + MessageType_ThpEndResponse = 1013, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCodeEntryCommitment) + MessageType_ThpCodeEntryCommitment = 1016, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCodeEntryChallenge) + MessageType_ThpCodeEntryChallenge = 1017, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCodeEntryCpaceTrezor) + MessageType_ThpCodeEntryCpaceTrezor = 1018, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCodeEntryCpaceHostTag) + MessageType_ThpCodeEntryCpaceHostTag = 1019, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpCodeEntrySecret) + MessageType_ThpCodeEntrySecret = 1020, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpQrCodeTag) + MessageType_ThpQrCodeTag = 1024, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpQrCodeSecret) + MessageType_ThpQrCodeSecret = 1025, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpNfcTagHost) + MessageType_ThpNfcTagHost = 1032, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ThpNfcTagTrezor) + MessageType_ThpNfcTagTrezor = 1033, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NostrGetPubkey) MessageType_NostrGetPubkey = 2001, // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_NostrPubkey) @@ -628,6 +668,8 @@ impl ::protobuf::Enum for MessageType { 9008 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkOptigaSetSecMax), 9009 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetGcInfo), 9010 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGcInfo), + 9011 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetPairingInfo), + 9012 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkPairingInfo), 450 => ::std::option::Option::Some(MessageType::MessageType_EthereumGetPublicKey), 451 => ::std::option::Option::Some(MessageType::MessageType_EthereumPublicKey), 56 => ::std::option::Option::Some(MessageType::MessageType_EthereumGetAddress), @@ -762,6 +804,24 @@ impl ::protobuf::Enum for MessageType { 903 => ::std::option::Option::Some(MessageType::MessageType_SolanaAddress), 904 => ::std::option::Option::Some(MessageType::MessageType_SolanaSignTx), 905 => ::std::option::Option::Some(MessageType::MessageType_SolanaTxSignature), + 1000 => ::std::option::Option::Some(MessageType::MessageType_ThpCreateNewSession), + 1006 => ::std::option::Option::Some(MessageType::MessageType_ThpPairingRequest), + 1007 => ::std::option::Option::Some(MessageType::MessageType_ThpPairingRequestApproved), + 1008 => ::std::option::Option::Some(MessageType::MessageType_ThpSelectMethod), + 1009 => ::std::option::Option::Some(MessageType::MessageType_ThpPairingPreparationsFinished), + 1010 => ::std::option::Option::Some(MessageType::MessageType_ThpCredentialRequest), + 1011 => ::std::option::Option::Some(MessageType::MessageType_ThpCredentialResponse), + 1012 => ::std::option::Option::Some(MessageType::MessageType_ThpEndRequest), + 1013 => ::std::option::Option::Some(MessageType::MessageType_ThpEndResponse), + 1016 => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCommitment), + 1017 => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryChallenge), + 1018 => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCpaceTrezor), + 1019 => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCpaceHostTag), + 1020 => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntrySecret), + 1024 => ::std::option::Option::Some(MessageType::MessageType_ThpQrCodeTag), + 1025 => ::std::option::Option::Some(MessageType::MessageType_ThpQrCodeSecret), + 1032 => ::std::option::Option::Some(MessageType::MessageType_ThpNfcTagHost), + 1033 => ::std::option::Option::Some(MessageType::MessageType_ThpNfcTagTrezor), 2001 => ::std::option::Option::Some(MessageType::MessageType_NostrGetPubkey), 2002 => ::std::option::Option::Some(MessageType::MessageType_NostrPubkey), 2003 => ::std::option::Option::Some(MessageType::MessageType_NostrSignEvent), @@ -878,6 +938,8 @@ impl ::protobuf::Enum for MessageType { "MessageType_DebugLinkOptigaSetSecMax" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkOptigaSetSecMax), "MessageType_DebugLinkGetGcInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetGcInfo), "MessageType_DebugLinkGcInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGcInfo), + "MessageType_DebugLinkGetPairingInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetPairingInfo), + "MessageType_DebugLinkPairingInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkPairingInfo), "MessageType_EthereumGetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EthereumGetPublicKey), "MessageType_EthereumPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EthereumPublicKey), "MessageType_EthereumGetAddress" => ::std::option::Option::Some(MessageType::MessageType_EthereumGetAddress), @@ -1012,6 +1074,24 @@ impl ::protobuf::Enum for MessageType { "MessageType_SolanaAddress" => ::std::option::Option::Some(MessageType::MessageType_SolanaAddress), "MessageType_SolanaSignTx" => ::std::option::Option::Some(MessageType::MessageType_SolanaSignTx), "MessageType_SolanaTxSignature" => ::std::option::Option::Some(MessageType::MessageType_SolanaTxSignature), + "MessageType_ThpCreateNewSession" => ::std::option::Option::Some(MessageType::MessageType_ThpCreateNewSession), + "MessageType_ThpPairingRequest" => ::std::option::Option::Some(MessageType::MessageType_ThpPairingRequest), + "MessageType_ThpPairingRequestApproved" => ::std::option::Option::Some(MessageType::MessageType_ThpPairingRequestApproved), + "MessageType_ThpSelectMethod" => ::std::option::Option::Some(MessageType::MessageType_ThpSelectMethod), + "MessageType_ThpPairingPreparationsFinished" => ::std::option::Option::Some(MessageType::MessageType_ThpPairingPreparationsFinished), + "MessageType_ThpCredentialRequest" => ::std::option::Option::Some(MessageType::MessageType_ThpCredentialRequest), + "MessageType_ThpCredentialResponse" => ::std::option::Option::Some(MessageType::MessageType_ThpCredentialResponse), + "MessageType_ThpEndRequest" => ::std::option::Option::Some(MessageType::MessageType_ThpEndRequest), + "MessageType_ThpEndResponse" => ::std::option::Option::Some(MessageType::MessageType_ThpEndResponse), + "MessageType_ThpCodeEntryCommitment" => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCommitment), + "MessageType_ThpCodeEntryChallenge" => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryChallenge), + "MessageType_ThpCodeEntryCpaceTrezor" => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCpaceTrezor), + "MessageType_ThpCodeEntryCpaceHostTag" => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntryCpaceHostTag), + "MessageType_ThpCodeEntrySecret" => ::std::option::Option::Some(MessageType::MessageType_ThpCodeEntrySecret), + "MessageType_ThpQrCodeTag" => ::std::option::Option::Some(MessageType::MessageType_ThpQrCodeTag), + "MessageType_ThpQrCodeSecret" => ::std::option::Option::Some(MessageType::MessageType_ThpQrCodeSecret), + "MessageType_ThpNfcTagHost" => ::std::option::Option::Some(MessageType::MessageType_ThpNfcTagHost), + "MessageType_ThpNfcTagTrezor" => ::std::option::Option::Some(MessageType::MessageType_ThpNfcTagTrezor), "MessageType_NostrGetPubkey" => ::std::option::Option::Some(MessageType::MessageType_NostrGetPubkey), "MessageType_NostrPubkey" => ::std::option::Option::Some(MessageType::MessageType_NostrPubkey), "MessageType_NostrSignEvent" => ::std::option::Option::Some(MessageType::MessageType_NostrSignEvent), @@ -1127,6 +1207,8 @@ impl ::protobuf::Enum for MessageType { MessageType::MessageType_DebugLinkOptigaSetSecMax, MessageType::MessageType_DebugLinkGetGcInfo, MessageType::MessageType_DebugLinkGcInfo, + MessageType::MessageType_DebugLinkGetPairingInfo, + MessageType::MessageType_DebugLinkPairingInfo, MessageType::MessageType_EthereumGetPublicKey, MessageType::MessageType_EthereumPublicKey, MessageType::MessageType_EthereumGetAddress, @@ -1261,6 +1343,24 @@ impl ::protobuf::Enum for MessageType { MessageType::MessageType_SolanaAddress, MessageType::MessageType_SolanaSignTx, MessageType::MessageType_SolanaTxSignature, + MessageType::MessageType_ThpCreateNewSession, + MessageType::MessageType_ThpPairingRequest, + MessageType::MessageType_ThpPairingRequestApproved, + MessageType::MessageType_ThpSelectMethod, + MessageType::MessageType_ThpPairingPreparationsFinished, + MessageType::MessageType_ThpCredentialRequest, + MessageType::MessageType_ThpCredentialResponse, + MessageType::MessageType_ThpEndRequest, + MessageType::MessageType_ThpEndResponse, + MessageType::MessageType_ThpCodeEntryCommitment, + MessageType::MessageType_ThpCodeEntryChallenge, + MessageType::MessageType_ThpCodeEntryCpaceTrezor, + MessageType::MessageType_ThpCodeEntryCpaceHostTag, + MessageType::MessageType_ThpCodeEntrySecret, + MessageType::MessageType_ThpQrCodeTag, + MessageType::MessageType_ThpQrCodeSecret, + MessageType::MessageType_ThpNfcTagHost, + MessageType::MessageType_ThpNfcTagTrezor, MessageType::MessageType_NostrGetPubkey, MessageType::MessageType_NostrPubkey, MessageType::MessageType_NostrSignEvent, @@ -1382,148 +1482,168 @@ impl ::protobuf::EnumFull for MessageType { MessageType::MessageType_DebugLinkOptigaSetSecMax => 99, MessageType::MessageType_DebugLinkGetGcInfo => 100, MessageType::MessageType_DebugLinkGcInfo => 101, - MessageType::MessageType_EthereumGetPublicKey => 102, - MessageType::MessageType_EthereumPublicKey => 103, - MessageType::MessageType_EthereumGetAddress => 104, - MessageType::MessageType_EthereumAddress => 105, - MessageType::MessageType_EthereumSignTx => 106, - MessageType::MessageType_EthereumSignTxEIP1559 => 107, - MessageType::MessageType_EthereumTxRequest => 108, - MessageType::MessageType_EthereumTxAck => 109, - MessageType::MessageType_EthereumSignMessage => 110, - MessageType::MessageType_EthereumVerifyMessage => 111, - MessageType::MessageType_EthereumMessageSignature => 112, - MessageType::MessageType_EthereumSignTypedData => 113, - MessageType::MessageType_EthereumTypedDataStructRequest => 114, - MessageType::MessageType_EthereumTypedDataStructAck => 115, - MessageType::MessageType_EthereumTypedDataValueRequest => 116, - MessageType::MessageType_EthereumTypedDataValueAck => 117, - MessageType::MessageType_EthereumTypedDataSignature => 118, - MessageType::MessageType_EthereumSignTypedHash => 119, - MessageType::MessageType_NEMGetAddress => 120, - MessageType::MessageType_NEMAddress => 121, - MessageType::MessageType_NEMSignTx => 122, - MessageType::MessageType_NEMSignedTx => 123, - MessageType::MessageType_NEMDecryptMessage => 124, - MessageType::MessageType_NEMDecryptedMessage => 125, - MessageType::MessageType_TezosGetAddress => 126, - MessageType::MessageType_TezosAddress => 127, - MessageType::MessageType_TezosSignTx => 128, - MessageType::MessageType_TezosSignedTx => 129, - MessageType::MessageType_TezosGetPublicKey => 130, - MessageType::MessageType_TezosPublicKey => 131, - MessageType::MessageType_StellarSignTx => 132, - MessageType::MessageType_StellarTxOpRequest => 133, - MessageType::MessageType_StellarGetAddress => 134, - MessageType::MessageType_StellarAddress => 135, - MessageType::MessageType_StellarCreateAccountOp => 136, - MessageType::MessageType_StellarPaymentOp => 137, - MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 138, - MessageType::MessageType_StellarManageSellOfferOp => 139, - MessageType::MessageType_StellarCreatePassiveSellOfferOp => 140, - MessageType::MessageType_StellarSetOptionsOp => 141, - MessageType::MessageType_StellarChangeTrustOp => 142, - MessageType::MessageType_StellarAllowTrustOp => 143, - MessageType::MessageType_StellarAccountMergeOp => 144, - MessageType::MessageType_StellarManageDataOp => 145, - MessageType::MessageType_StellarBumpSequenceOp => 146, - MessageType::MessageType_StellarManageBuyOfferOp => 147, - MessageType::MessageType_StellarPathPaymentStrictSendOp => 148, - MessageType::MessageType_StellarClaimClaimableBalanceOp => 149, - MessageType::MessageType_StellarSignedTx => 150, - MessageType::MessageType_CardanoGetPublicKey => 151, - MessageType::MessageType_CardanoPublicKey => 152, - MessageType::MessageType_CardanoGetAddress => 153, - MessageType::MessageType_CardanoAddress => 154, - MessageType::MessageType_CardanoTxItemAck => 155, - MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 156, - MessageType::MessageType_CardanoTxWitnessRequest => 157, - MessageType::MessageType_CardanoTxWitnessResponse => 158, - MessageType::MessageType_CardanoTxHostAck => 159, - MessageType::MessageType_CardanoTxBodyHash => 160, - MessageType::MessageType_CardanoSignTxFinished => 161, - MessageType::MessageType_CardanoSignTxInit => 162, - MessageType::MessageType_CardanoTxInput => 163, - MessageType::MessageType_CardanoTxOutput => 164, - MessageType::MessageType_CardanoAssetGroup => 165, - MessageType::MessageType_CardanoToken => 166, - MessageType::MessageType_CardanoTxCertificate => 167, - MessageType::MessageType_CardanoTxWithdrawal => 168, - MessageType::MessageType_CardanoTxAuxiliaryData => 169, - MessageType::MessageType_CardanoPoolOwner => 170, - MessageType::MessageType_CardanoPoolRelayParameters => 171, - MessageType::MessageType_CardanoGetNativeScriptHash => 172, - MessageType::MessageType_CardanoNativeScriptHash => 173, - MessageType::MessageType_CardanoTxMint => 174, - MessageType::MessageType_CardanoTxCollateralInput => 175, - MessageType::MessageType_CardanoTxRequiredSigner => 176, - MessageType::MessageType_CardanoTxInlineDatumChunk => 177, - MessageType::MessageType_CardanoTxReferenceScriptChunk => 178, - MessageType::MessageType_CardanoTxReferenceInput => 179, - MessageType::MessageType_RippleGetAddress => 180, - MessageType::MessageType_RippleAddress => 181, - MessageType::MessageType_RippleSignTx => 182, - MessageType::MessageType_RippleSignedTx => 183, - MessageType::MessageType_MoneroTransactionInitRequest => 184, - MessageType::MessageType_MoneroTransactionInitAck => 185, - MessageType::MessageType_MoneroTransactionSetInputRequest => 186, - MessageType::MessageType_MoneroTransactionSetInputAck => 187, - MessageType::MessageType_MoneroTransactionInputViniRequest => 188, - MessageType::MessageType_MoneroTransactionInputViniAck => 189, - MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 190, - MessageType::MessageType_MoneroTransactionAllInputsSetAck => 191, - MessageType::MessageType_MoneroTransactionSetOutputRequest => 192, - MessageType::MessageType_MoneroTransactionSetOutputAck => 193, - MessageType::MessageType_MoneroTransactionAllOutSetRequest => 194, - MessageType::MessageType_MoneroTransactionAllOutSetAck => 195, - MessageType::MessageType_MoneroTransactionSignInputRequest => 196, - MessageType::MessageType_MoneroTransactionSignInputAck => 197, - MessageType::MessageType_MoneroTransactionFinalRequest => 198, - MessageType::MessageType_MoneroTransactionFinalAck => 199, - MessageType::MessageType_MoneroKeyImageExportInitRequest => 200, - MessageType::MessageType_MoneroKeyImageExportInitAck => 201, - MessageType::MessageType_MoneroKeyImageSyncStepRequest => 202, - MessageType::MessageType_MoneroKeyImageSyncStepAck => 203, - MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 204, - MessageType::MessageType_MoneroKeyImageSyncFinalAck => 205, - MessageType::MessageType_MoneroGetAddress => 206, - MessageType::MessageType_MoneroAddress => 207, - MessageType::MessageType_MoneroGetWatchKey => 208, - MessageType::MessageType_MoneroWatchKey => 209, - MessageType::MessageType_DebugMoneroDiagRequest => 210, - MessageType::MessageType_DebugMoneroDiagAck => 211, - MessageType::MessageType_MoneroGetTxKeyRequest => 212, - MessageType::MessageType_MoneroGetTxKeyAck => 213, - MessageType::MessageType_MoneroLiveRefreshStartRequest => 214, - MessageType::MessageType_MoneroLiveRefreshStartAck => 215, - MessageType::MessageType_MoneroLiveRefreshStepRequest => 216, - MessageType::MessageType_MoneroLiveRefreshStepAck => 217, - MessageType::MessageType_MoneroLiveRefreshFinalRequest => 218, - MessageType::MessageType_MoneroLiveRefreshFinalAck => 219, - MessageType::MessageType_EosGetPublicKey => 220, - MessageType::MessageType_EosPublicKey => 221, - MessageType::MessageType_EosSignTx => 222, - MessageType::MessageType_EosTxActionRequest => 223, - MessageType::MessageType_EosTxActionAck => 224, - MessageType::MessageType_EosSignedTx => 225, - MessageType::MessageType_WebAuthnListResidentCredentials => 226, - MessageType::MessageType_WebAuthnCredentials => 227, - MessageType::MessageType_WebAuthnAddResidentCredential => 228, - MessageType::MessageType_WebAuthnRemoveResidentCredential => 229, - MessageType::MessageType_SolanaGetPublicKey => 230, - MessageType::MessageType_SolanaPublicKey => 231, - MessageType::MessageType_SolanaGetAddress => 232, - MessageType::MessageType_SolanaAddress => 233, - MessageType::MessageType_SolanaSignTx => 234, - MessageType::MessageType_SolanaTxSignature => 235, - MessageType::MessageType_NostrGetPubkey => 236, - MessageType::MessageType_NostrPubkey => 237, - MessageType::MessageType_NostrSignEvent => 238, - MessageType::MessageType_NostrEventSignature => 239, - MessageType::MessageType_BenchmarkListNames => 240, - MessageType::MessageType_BenchmarkNames => 241, - MessageType::MessageType_BenchmarkRun => 242, - MessageType::MessageType_BenchmarkResult => 243, + MessageType::MessageType_DebugLinkGetPairingInfo => 102, + MessageType::MessageType_DebugLinkPairingInfo => 103, + MessageType::MessageType_EthereumGetPublicKey => 104, + MessageType::MessageType_EthereumPublicKey => 105, + MessageType::MessageType_EthereumGetAddress => 106, + MessageType::MessageType_EthereumAddress => 107, + MessageType::MessageType_EthereumSignTx => 108, + MessageType::MessageType_EthereumSignTxEIP1559 => 109, + MessageType::MessageType_EthereumTxRequest => 110, + MessageType::MessageType_EthereumTxAck => 111, + MessageType::MessageType_EthereumSignMessage => 112, + MessageType::MessageType_EthereumVerifyMessage => 113, + MessageType::MessageType_EthereumMessageSignature => 114, + MessageType::MessageType_EthereumSignTypedData => 115, + MessageType::MessageType_EthereumTypedDataStructRequest => 116, + MessageType::MessageType_EthereumTypedDataStructAck => 117, + MessageType::MessageType_EthereumTypedDataValueRequest => 118, + MessageType::MessageType_EthereumTypedDataValueAck => 119, + MessageType::MessageType_EthereumTypedDataSignature => 120, + MessageType::MessageType_EthereumSignTypedHash => 121, + MessageType::MessageType_NEMGetAddress => 122, + MessageType::MessageType_NEMAddress => 123, + MessageType::MessageType_NEMSignTx => 124, + MessageType::MessageType_NEMSignedTx => 125, + MessageType::MessageType_NEMDecryptMessage => 126, + MessageType::MessageType_NEMDecryptedMessage => 127, + MessageType::MessageType_TezosGetAddress => 128, + MessageType::MessageType_TezosAddress => 129, + MessageType::MessageType_TezosSignTx => 130, + MessageType::MessageType_TezosSignedTx => 131, + MessageType::MessageType_TezosGetPublicKey => 132, + MessageType::MessageType_TezosPublicKey => 133, + MessageType::MessageType_StellarSignTx => 134, + MessageType::MessageType_StellarTxOpRequest => 135, + MessageType::MessageType_StellarGetAddress => 136, + MessageType::MessageType_StellarAddress => 137, + MessageType::MessageType_StellarCreateAccountOp => 138, + MessageType::MessageType_StellarPaymentOp => 139, + MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 140, + MessageType::MessageType_StellarManageSellOfferOp => 141, + MessageType::MessageType_StellarCreatePassiveSellOfferOp => 142, + MessageType::MessageType_StellarSetOptionsOp => 143, + MessageType::MessageType_StellarChangeTrustOp => 144, + MessageType::MessageType_StellarAllowTrustOp => 145, + MessageType::MessageType_StellarAccountMergeOp => 146, + MessageType::MessageType_StellarManageDataOp => 147, + MessageType::MessageType_StellarBumpSequenceOp => 148, + MessageType::MessageType_StellarManageBuyOfferOp => 149, + MessageType::MessageType_StellarPathPaymentStrictSendOp => 150, + MessageType::MessageType_StellarClaimClaimableBalanceOp => 151, + MessageType::MessageType_StellarSignedTx => 152, + MessageType::MessageType_CardanoGetPublicKey => 153, + MessageType::MessageType_CardanoPublicKey => 154, + MessageType::MessageType_CardanoGetAddress => 155, + MessageType::MessageType_CardanoAddress => 156, + MessageType::MessageType_CardanoTxItemAck => 157, + MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 158, + MessageType::MessageType_CardanoTxWitnessRequest => 159, + MessageType::MessageType_CardanoTxWitnessResponse => 160, + MessageType::MessageType_CardanoTxHostAck => 161, + MessageType::MessageType_CardanoTxBodyHash => 162, + MessageType::MessageType_CardanoSignTxFinished => 163, + MessageType::MessageType_CardanoSignTxInit => 164, + MessageType::MessageType_CardanoTxInput => 165, + MessageType::MessageType_CardanoTxOutput => 166, + MessageType::MessageType_CardanoAssetGroup => 167, + MessageType::MessageType_CardanoToken => 168, + MessageType::MessageType_CardanoTxCertificate => 169, + MessageType::MessageType_CardanoTxWithdrawal => 170, + MessageType::MessageType_CardanoTxAuxiliaryData => 171, + MessageType::MessageType_CardanoPoolOwner => 172, + MessageType::MessageType_CardanoPoolRelayParameters => 173, + MessageType::MessageType_CardanoGetNativeScriptHash => 174, + MessageType::MessageType_CardanoNativeScriptHash => 175, + MessageType::MessageType_CardanoTxMint => 176, + MessageType::MessageType_CardanoTxCollateralInput => 177, + MessageType::MessageType_CardanoTxRequiredSigner => 178, + MessageType::MessageType_CardanoTxInlineDatumChunk => 179, + MessageType::MessageType_CardanoTxReferenceScriptChunk => 180, + MessageType::MessageType_CardanoTxReferenceInput => 181, + MessageType::MessageType_RippleGetAddress => 182, + MessageType::MessageType_RippleAddress => 183, + MessageType::MessageType_RippleSignTx => 184, + MessageType::MessageType_RippleSignedTx => 185, + MessageType::MessageType_MoneroTransactionInitRequest => 186, + MessageType::MessageType_MoneroTransactionInitAck => 187, + MessageType::MessageType_MoneroTransactionSetInputRequest => 188, + MessageType::MessageType_MoneroTransactionSetInputAck => 189, + MessageType::MessageType_MoneroTransactionInputViniRequest => 190, + MessageType::MessageType_MoneroTransactionInputViniAck => 191, + MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 192, + MessageType::MessageType_MoneroTransactionAllInputsSetAck => 193, + MessageType::MessageType_MoneroTransactionSetOutputRequest => 194, + MessageType::MessageType_MoneroTransactionSetOutputAck => 195, + MessageType::MessageType_MoneroTransactionAllOutSetRequest => 196, + MessageType::MessageType_MoneroTransactionAllOutSetAck => 197, + MessageType::MessageType_MoneroTransactionSignInputRequest => 198, + MessageType::MessageType_MoneroTransactionSignInputAck => 199, + MessageType::MessageType_MoneroTransactionFinalRequest => 200, + MessageType::MessageType_MoneroTransactionFinalAck => 201, + MessageType::MessageType_MoneroKeyImageExportInitRequest => 202, + MessageType::MessageType_MoneroKeyImageExportInitAck => 203, + MessageType::MessageType_MoneroKeyImageSyncStepRequest => 204, + MessageType::MessageType_MoneroKeyImageSyncStepAck => 205, + MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 206, + MessageType::MessageType_MoneroKeyImageSyncFinalAck => 207, + MessageType::MessageType_MoneroGetAddress => 208, + MessageType::MessageType_MoneroAddress => 209, + MessageType::MessageType_MoneroGetWatchKey => 210, + MessageType::MessageType_MoneroWatchKey => 211, + MessageType::MessageType_DebugMoneroDiagRequest => 212, + MessageType::MessageType_DebugMoneroDiagAck => 213, + MessageType::MessageType_MoneroGetTxKeyRequest => 214, + MessageType::MessageType_MoneroGetTxKeyAck => 215, + MessageType::MessageType_MoneroLiveRefreshStartRequest => 216, + MessageType::MessageType_MoneroLiveRefreshStartAck => 217, + MessageType::MessageType_MoneroLiveRefreshStepRequest => 218, + MessageType::MessageType_MoneroLiveRefreshStepAck => 219, + MessageType::MessageType_MoneroLiveRefreshFinalRequest => 220, + MessageType::MessageType_MoneroLiveRefreshFinalAck => 221, + MessageType::MessageType_EosGetPublicKey => 222, + MessageType::MessageType_EosPublicKey => 223, + MessageType::MessageType_EosSignTx => 224, + MessageType::MessageType_EosTxActionRequest => 225, + MessageType::MessageType_EosTxActionAck => 226, + MessageType::MessageType_EosSignedTx => 227, + MessageType::MessageType_WebAuthnListResidentCredentials => 228, + MessageType::MessageType_WebAuthnCredentials => 229, + MessageType::MessageType_WebAuthnAddResidentCredential => 230, + MessageType::MessageType_WebAuthnRemoveResidentCredential => 231, + MessageType::MessageType_SolanaGetPublicKey => 232, + MessageType::MessageType_SolanaPublicKey => 233, + MessageType::MessageType_SolanaGetAddress => 234, + MessageType::MessageType_SolanaAddress => 235, + MessageType::MessageType_SolanaSignTx => 236, + MessageType::MessageType_SolanaTxSignature => 237, + MessageType::MessageType_ThpCreateNewSession => 238, + MessageType::MessageType_ThpPairingRequest => 239, + MessageType::MessageType_ThpPairingRequestApproved => 240, + MessageType::MessageType_ThpSelectMethod => 241, + MessageType::MessageType_ThpPairingPreparationsFinished => 242, + MessageType::MessageType_ThpCredentialRequest => 243, + MessageType::MessageType_ThpCredentialResponse => 244, + MessageType::MessageType_ThpEndRequest => 245, + MessageType::MessageType_ThpEndResponse => 246, + MessageType::MessageType_ThpCodeEntryCommitment => 247, + MessageType::MessageType_ThpCodeEntryChallenge => 248, + MessageType::MessageType_ThpCodeEntryCpaceTrezor => 249, + MessageType::MessageType_ThpCodeEntryCpaceHostTag => 250, + MessageType::MessageType_ThpCodeEntrySecret => 251, + MessageType::MessageType_ThpQrCodeTag => 252, + MessageType::MessageType_ThpQrCodeSecret => 253, + MessageType::MessageType_ThpNfcTagHost => 254, + MessageType::MessageType_ThpNfcTagTrezor => 255, + MessageType::MessageType_NostrGetPubkey => 256, + MessageType::MessageType_NostrPubkey => 257, + MessageType::MessageType_NostrSignEvent => 258, + MessageType::MessageType_NostrEventSignature => 259, + MessageType::MessageType_BenchmarkListNames => 260, + MessageType::MessageType_BenchmarkNames => 261, + MessageType::MessageType_BenchmarkRun => 262, + MessageType::MessageType_BenchmarkResult => 263, }; Self::enum_descriptor().value_by_index(index) } @@ -1542,7 +1662,7 @@ impl MessageType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xeaT\ + \n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xfe[\ \n\x0bMessageType\x12(\n\x16MessageType_Initialize\x10\0\x1a\x0c\x80\xa6\ \x1d\x01\xb0\xb5\x18\x01\x90\xb5\x18\x01\x12\x1e\n\x10MessageType_Ping\ \x10\x01\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\x13MessageType_S\ @@ -1665,166 +1785,190 @@ static file_descriptor_proto_data: &'static [u8] = b"\ ugLinkOptigaSetSecMax\x10\xb0F\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\x01\ \x12-\n\x1eMessageType_DebugLinkGetGcInfo\x10\xb1F\x1a\x08\x80\xa6\x1d\ \x01\xa0\xb5\x18\x01\x12*\n\x1bMessageType_DebugLinkGcInfo\x10\xb2F\x1a\ - \x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x12+\n\x20MessageType_EthereumGetPu\ - blicKey\x10\xc2\x03\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_Ethere\ - umPublicKey\x10\xc3\x03\x1a\x04\x98\xb5\x18\x01\x12(\n\x1eMessageType_Et\ - hereumGetAddress\x108\x1a\x04\x90\xb5\x18\x01\x12%\n\x1bMessageType_Ethe\ - reumAddress\x109\x1a\x04\x98\xb5\x18\x01\x12$\n\x1aMessageType_EthereumS\ - ignTx\x10:\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_EthereumSignTxEIP1\ - 559\x10\xc4\x03\x1a\x04\x90\xb5\x18\x01\x12'\n\x1dMessageType_EthereumTx\ - Request\x10;\x1a\x04\x98\xb5\x18\x01\x12#\n\x19MessageType_EthereumTxAck\ - \x10<\x1a\x04\x90\xb5\x18\x01\x12)\n\x1fMessageType_EthereumSignMessage\ - \x10@\x1a\x04\x90\xb5\x18\x01\x12+\n!MessageType_EthereumVerifyMessage\ - \x10A\x1a\x04\x90\xb5\x18\x01\x12.\n$MessageType_EthereumMessageSignatur\ - e\x10B\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_EthereumSignTypedData\ - \x10\xd0\x03\x1a\x04\x90\xb5\x18\x01\x125\n*MessageType_EthereumTypedDat\ - aStructRequest\x10\xd1\x03\x1a\x04\x98\xb5\x18\x01\x121\n&MessageType_Et\ - hereumTypedDataStructAck\x10\xd2\x03\x1a\x04\x90\xb5\x18\x01\x124\n)Mess\ - ageType_EthereumTypedDataValueRequest\x10\xd3\x03\x1a\x04\x98\xb5\x18\ - \x01\x120\n%MessageType_EthereumTypedDataValueAck\x10\xd4\x03\x1a\x04\ - \x90\xb5\x18\x01\x121\n&MessageType_EthereumTypedDataSignature\x10\xd5\ - \x03\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_EthereumSignTypedHash\ - \x10\xd6\x03\x1a\x04\x90\xb5\x18\x01\x12#\n\x19MessageType_NEMGetAddress\ - \x10C\x1a\x04\x90\xb5\x18\x01\x12\x20\n\x16MessageType_NEMAddress\x10D\ - \x1a\x04\x98\xb5\x18\x01\x12\x1f\n\x15MessageType_NEMSignTx\x10E\x1a\x04\ - \x90\xb5\x18\x01\x12!\n\x17MessageType_NEMSignedTx\x10F\x1a\x04\x98\xb5\ - \x18\x01\x12'\n\x1dMessageType_NEMDecryptMessage\x10K\x1a\x04\x90\xb5\ - \x18\x01\x12)\n\x1fMessageType_NEMDecryptedMessage\x10L\x1a\x04\x98\xb5\ - \x18\x01\x12&\n\x1bMessageType_TezosGetAddress\x10\x96\x01\x1a\x04\x90\ - \xb5\x18\x01\x12#\n\x18MessageType_TezosAddress\x10\x97\x01\x1a\x04\x98\ - \xb5\x18\x01\x12\"\n\x17MessageType_TezosSignTx\x10\x98\x01\x1a\x04\x90\ - \xb5\x18\x01\x12$\n\x19MessageType_TezosSignedTx\x10\x99\x01\x1a\x04\x98\ - \xb5\x18\x01\x12(\n\x1dMessageType_TezosGetPublicKey\x10\x9a\x01\x1a\x04\ - \x90\xb5\x18\x01\x12%\n\x1aMessageType_TezosPublicKey\x10\x9b\x01\x1a\ - \x04\x98\xb5\x18\x01\x12$\n\x19MessageType_StellarSignTx\x10\xca\x01\x1a\ - \x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_StellarTxOpRequest\x10\xcb\ - \x01\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_StellarGetAddress\x10\ - \xcf\x01\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_StellarAddress\ - \x10\xd0\x01\x1a\x04\x98\xb5\x18\x01\x12-\n\"MessageType_StellarCreateAc\ - countOp\x10\xd2\x01\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_Stella\ - rPaymentOp\x10\xd3\x01\x1a\x04\x90\xb5\x18\x01\x128\n-MessageType_Stella\ - rPathPaymentStrictReceiveOp\x10\xd4\x01\x1a\x04\x90\xb5\x18\x01\x12/\n$M\ - essageType_StellarManageSellOfferOp\x10\xd5\x01\x1a\x04\x90\xb5\x18\x01\ - \x126\n+MessageType_StellarCreatePassiveSellOfferOp\x10\xd6\x01\x1a\x04\ - \x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarSetOptionsOp\x10\xd7\x01\ - \x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageType_StellarChangeTrustOp\x10\ - \xd8\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarAllowTrust\ - Op\x10\xd9\x01\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_StellarAccount\ - MergeOp\x10\xda\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_Stella\ - rManageDataOp\x10\xdc\x01\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_Ste\ - llarBumpSequenceOp\x10\xdd\x01\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageTyp\ - e_StellarManageBuyOfferOp\x10\xde\x01\x1a\x04\x90\xb5\x18\x01\x125\n*Mes\ - sageType_StellarPathPaymentStrictSendOp\x10\xdf\x01\x1a\x04\x90\xb5\x18\ - \x01\x125\n*MessageType_StellarClaimClaimableBalanceOp\x10\xe1\x01\x1a\ - \x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_StellarSignedTx\x10\xe6\x01\ - \x1a\x04\x98\xb5\x18\x01\x12*\n\x1fMessageType_CardanoGetPublicKey\x10\ - \xb1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_CardanoPublicKey\ - \x10\xb2\x02\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_CardanoGetAdd\ - ress\x10\xb3\x02\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoAd\ - dress\x10\xb4\x02\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_CardanoT\ - xItemAck\x10\xb9\x02\x1a\x04\x98\xb5\x18\x01\x127\n,MessageType_CardanoT\ - xAuxiliaryDataSupplement\x10\xba\x02\x1a\x04\x98\xb5\x18\x01\x12.\n#Mess\ - ageType_CardanoTxWitnessRequest\x10\xbb\x02\x1a\x04\x90\xb5\x18\x01\x12/\ - \n$MessageType_CardanoTxWitnessResponse\x10\xbc\x02\x1a\x04\x98\xb5\x18\ - \x01\x12'\n\x1cMessageType_CardanoTxHostAck\x10\xbd\x02\x1a\x04\x90\xb5\ - \x18\x01\x12(\n\x1dMessageType_CardanoTxBodyHash\x10\xbe\x02\x1a\x04\x98\ - \xb5\x18\x01\x12,\n!MessageType_CardanoSignTxFinished\x10\xbf\x02\x1a\ - \x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_CardanoSignTxInit\x10\xc0\x02\ - \x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoTxInput\x10\xc1\ - \x02\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_CardanoTxOutput\x10\ - \xc2\x02\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_CardanoAssetGroup\ - \x10\xc3\x02\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_CardanoToken\ - \x10\xc4\x02\x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageType_CardanoTxCert\ - ificate\x10\xc5\x02\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_Cardan\ - oTxWithdrawal\x10\xc6\x02\x1a\x04\x90\xb5\x18\x01\x12-\n\"MessageType_Ca\ - rdanoTxAuxiliaryData\x10\xc7\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessa\ - geType_CardanoPoolOwner\x10\xc8\x02\x1a\x04\x90\xb5\x18\x01\x121\n&Messa\ - geType_CardanoPoolRelayParameters\x10\xc9\x02\x1a\x04\x90\xb5\x18\x01\ - \x121\n&MessageType_CardanoGetNativeScriptHash\x10\xca\x02\x1a\x04\x90\ - \xb5\x18\x01\x12.\n#MessageType_CardanoNativeScriptHash\x10\xcb\x02\x1a\ - \x04\x98\xb5\x18\x01\x12$\n\x19MessageType_CardanoTxMint\x10\xcc\x02\x1a\ - \x04\x90\xb5\x18\x01\x12/\n$MessageType_CardanoTxCollateralInput\x10\xcd\ - \x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_CardanoTxRequiredSigner\ - \x10\xce\x02\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_CardanoTxInlineD\ - atumChunk\x10\xcf\x02\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_Cardano\ - TxReferenceScriptChunk\x10\xd0\x02\x1a\x04\x90\xb5\x18\x01\x12.\n#Messag\ - eType_CardanoTxReferenceInput\x10\xd1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\ - \x1cMessageType_RippleGetAddress\x10\x90\x03\x1a\x04\x90\xb5\x18\x01\x12\ - $\n\x19MessageType_RippleAddress\x10\x91\x03\x1a\x04\x98\xb5\x18\x01\x12\ - #\n\x18MessageType_RippleSignTx\x10\x92\x03\x1a\x04\x90\xb5\x18\x01\x12%\ - \n\x1aMessageType_RippleSignedTx\x10\x93\x03\x1a\x04\x90\xb5\x18\x01\x12\ - 3\n(MessageType_MoneroTransactionInitRequest\x10\xf5\x03\x1a\x04\x98\xb5\ - \x18\x01\x12/\n$MessageType_MoneroTransactionInitAck\x10\xf6\x03\x1a\x04\ - \x98\xb5\x18\x01\x127\n,MessageType_MoneroTransactionSetInputRequest\x10\ - \xf7\x03\x1a\x04\x98\xb5\x18\x01\x123\n(MessageType_MoneroTransactionSet\ - InputAck\x10\xf8\x03\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTr\ - ansactionInputViniRequest\x10\xfb\x03\x1a\x04\x98\xb5\x18\x01\x124\n)Mes\ - sageType_MoneroTransactionInputViniAck\x10\xfc\x03\x1a\x04\x98\xb5\x18\ - \x01\x12;\n0MessageType_MoneroTransactionAllInputsSetRequest\x10\xfd\x03\ - \x1a\x04\x98\xb5\x18\x01\x127\n,MessageType_MoneroTransactionAllInputsSe\ - tAck\x10\xfe\x03\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransa\ - ctionSetOutputRequest\x10\xff\x03\x1a\x04\x98\xb5\x18\x01\x124\n)Message\ - Type_MoneroTransactionSetOutputAck\x10\x80\x04\x1a\x04\x98\xb5\x18\x01\ - \x128\n-MessageType_MoneroTransactionAllOutSetRequest\x10\x81\x04\x1a\ - \x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroTransactionAllOutSetAck\ - \x10\x82\x04\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactio\ - nSignInputRequest\x10\x83\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType\ - _MoneroTransactionSignInputAck\x10\x84\x04\x1a\x04\x98\xb5\x18\x01\x124\ - \n)MessageType_MoneroTransactionFinalRequest\x10\x85\x04\x1a\x04\x98\xb5\ - \x18\x01\x120\n%MessageType_MoneroTransactionFinalAck\x10\x86\x04\x1a\ - \x04\x98\xb5\x18\x01\x126\n+MessageType_MoneroKeyImageExportInitRequest\ - \x10\x92\x04\x1a\x04\x98\xb5\x18\x01\x122\n'MessageType_MoneroKeyImageEx\ - portInitAck\x10\x93\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_Moner\ - oKeyImageSyncStepRequest\x10\x94\x04\x1a\x04\x98\xb5\x18\x01\x120\n%Mess\ - ageType_MoneroKeyImageSyncStepAck\x10\x95\x04\x1a\x04\x98\xb5\x18\x01\ - \x125\n*MessageType_MoneroKeyImageSyncFinalRequest\x10\x96\x04\x1a\x04\ - \x98\xb5\x18\x01\x121\n&MessageType_MoneroKeyImageSyncFinalAck\x10\x97\ - \x04\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_MoneroGetAddress\x10\ - \x9c\x04\x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType_MoneroAddress\x10\ - \x9d\x04\x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_MoneroGetWatchKey\ - \x10\x9e\x04\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_MoneroWatchKe\ - y\x10\x9f\x04\x1a\x04\x98\xb5\x18\x01\x12-\n\"MessageType_DebugMoneroDia\ - gRequest\x10\xa2\x04\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_Debug\ - MoneroDiagAck\x10\xa3\x04\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_Mon\ - eroGetTxKeyRequest\x10\xa6\x04\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessage\ - Type_MoneroGetTxKeyAck\x10\xa7\x04\x1a\x04\x98\xb5\x18\x01\x124\n)Messag\ - eType_MoneroLiveRefreshStartRequest\x10\xa8\x04\x1a\x04\x90\xb5\x18\x01\ - \x120\n%MessageType_MoneroLiveRefreshStartAck\x10\xa9\x04\x1a\x04\x98\ - \xb5\x18\x01\x123\n(MessageType_MoneroLiveRefreshStepRequest\x10\xaa\x04\ - \x1a\x04\x90\xb5\x18\x01\x12/\n$MessageType_MoneroLiveRefreshStepAck\x10\ - \xab\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroLiveRefreshFin\ - alRequest\x10\xac\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroL\ - iveRefreshFinalAck\x10\xad\x04\x1a\x04\x98\xb5\x18\x01\x12&\n\x1bMessage\ - Type_EosGetPublicKey\x10\xd8\x04\x1a\x04\x90\xb5\x18\x01\x12#\n\x18Messa\ - geType_EosPublicKey\x10\xd9\x04\x1a\x04\x98\xb5\x18\x01\x12\x20\n\x15Mes\ - sageType_EosSignTx\x10\xda\x04\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessage\ - Type_EosTxActionRequest\x10\xdb\x04\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMe\ - ssageType_EosTxActionAck\x10\xdc\x04\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17\ - MessageType_EosSignedTx\x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x126\n+Messa\ - geType_WebAuthnListResidentCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\ - \x01\x12*\n\x1fMessageType_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\ - \xb5\x18\x01\x124\n)MessageType_WebAuthnAddResidentCredential\x10\xa2\ - \x06\x1a\x04\x90\xb5\x18\x01\x127\n,MessageType_WebAuthnRemoveResidentCr\ - edential\x10\xa3\x06\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_Solan\ - aGetPublicKey\x10\x84\x07\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_\ - SolanaPublicKey\x10\x85\x07\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageTyp\ - e_SolanaGetAddress\x10\x86\x07\x1a\x04\x90\xb5\x18\x01\x12$\n\x19Message\ - Type_SolanaAddress\x10\x87\x07\x1a\x04\x98\xb5\x18\x01\x12#\n\x18Message\ - Type_SolanaSignTx\x10\x88\x07\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageT\ - ype_SolanaTxSignature\x10\x89\x07\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMess\ - ageType_NostrGetPubkey\x10\xd1\x0f\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17Me\ - ssageType_NostrPubkey\x10\xd2\x0f\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMess\ - ageType_NostrSignEvent\x10\xd3\x0f\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMes\ - sageType_NostrEventSignature\x10\xd4\x0f\x1a\x04\x98\xb5\x18\x01\x12)\n\ - \x1eMessageType_BenchmarkListNames\x10\x8cG\x1a\x04\x80\xa6\x1d\x01\x12%\ - \n\x1aMessageType_BenchmarkNames\x10\x8dG\x1a\x04\x80\xa6\x1d\x01\x12#\n\ - \x18MessageType_BenchmarkRun\x10\x8eG\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1b\ - MessageType_BenchmarkResult\x10\x8fG\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\ - \xf3\x18\x01\"\x04\x08Z\x10\\\"\x04\x08G\x10J\"\x04\x08r\x10z\"\x06\x08\ - \xdb\x01\x10\xdb\x01\"\x06\x08\xe0\x01\x10\xe0\x01\"\x06\x08\xac\x02\x10\ - \xb0\x02\"\x06\x08\xb5\x02\x10\xb8\x02\"\x06\x08\xbc\x05\x10\xc5\x05\"\ - \x06\x08\xe8\x07\x10\xcb\x08B8\n#com.satoshilabs.trezor.lib.protobufB\rT\ - rezorMessage\x80\xa6\x1d\x01\ + \x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x122\n#MessageType_DebugLinkGetPair\ + ingInfo\x10\xb3F\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\x01\x12/\n\x20Messa\ + geType_DebugLinkPairingInfo\x10\xb4F\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\ + \x01\x12+\n\x20MessageType_EthereumGetPublicKey\x10\xc2\x03\x1a\x04\x90\ + \xb5\x18\x01\x12(\n\x1dMessageType_EthereumPublicKey\x10\xc3\x03\x1a\x04\ + \x98\xb5\x18\x01\x12(\n\x1eMessageType_EthereumGetAddress\x108\x1a\x04\ + \x90\xb5\x18\x01\x12%\n\x1bMessageType_EthereumAddress\x109\x1a\x04\x98\ + \xb5\x18\x01\x12$\n\x1aMessageType_EthereumSignTx\x10:\x1a\x04\x90\xb5\ + \x18\x01\x12,\n!MessageType_EthereumSignTxEIP1559\x10\xc4\x03\x1a\x04\ + \x90\xb5\x18\x01\x12'\n\x1dMessageType_EthereumTxRequest\x10;\x1a\x04\ + \x98\xb5\x18\x01\x12#\n\x19MessageType_EthereumTxAck\x10<\x1a\x04\x90\ + \xb5\x18\x01\x12)\n\x1fMessageType_EthereumSignMessage\x10@\x1a\x04\x90\ + \xb5\x18\x01\x12+\n!MessageType_EthereumVerifyMessage\x10A\x1a\x04\x90\ + \xb5\x18\x01\x12.\n$MessageType_EthereumMessageSignature\x10B\x1a\x04\ + \x98\xb5\x18\x01\x12,\n!MessageType_EthereumSignTypedData\x10\xd0\x03\ + \x1a\x04\x90\xb5\x18\x01\x125\n*MessageType_EthereumTypedDataStructReque\ + st\x10\xd1\x03\x1a\x04\x98\xb5\x18\x01\x121\n&MessageType_EthereumTypedD\ + ataStructAck\x10\xd2\x03\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_Ethe\ + reumTypedDataValueRequest\x10\xd3\x03\x1a\x04\x98\xb5\x18\x01\x120\n%Mes\ + sageType_EthereumTypedDataValueAck\x10\xd4\x03\x1a\x04\x90\xb5\x18\x01\ + \x121\n&MessageType_EthereumTypedDataSignature\x10\xd5\x03\x1a\x04\x98\ + \xb5\x18\x01\x12,\n!MessageType_EthereumSignTypedHash\x10\xd6\x03\x1a\ + \x04\x90\xb5\x18\x01\x12#\n\x19MessageType_NEMGetAddress\x10C\x1a\x04\ + \x90\xb5\x18\x01\x12\x20\n\x16MessageType_NEMAddress\x10D\x1a\x04\x98\ + \xb5\x18\x01\x12\x1f\n\x15MessageType_NEMSignTx\x10E\x1a\x04\x90\xb5\x18\ + \x01\x12!\n\x17MessageType_NEMSignedTx\x10F\x1a\x04\x98\xb5\x18\x01\x12'\ + \n\x1dMessageType_NEMDecryptMessage\x10K\x1a\x04\x90\xb5\x18\x01\x12)\n\ + \x1fMessageType_NEMDecryptedMessage\x10L\x1a\x04\x98\xb5\x18\x01\x12&\n\ + \x1bMessageType_TezosGetAddress\x10\x96\x01\x1a\x04\x90\xb5\x18\x01\x12#\ + \n\x18MessageType_TezosAddress\x10\x97\x01\x1a\x04\x98\xb5\x18\x01\x12\"\ + \n\x17MessageType_TezosSignTx\x10\x98\x01\x1a\x04\x90\xb5\x18\x01\x12$\n\ + \x19MessageType_TezosSignedTx\x10\x99\x01\x1a\x04\x98\xb5\x18\x01\x12(\n\ + \x1dMessageType_TezosGetPublicKey\x10\x9a\x01\x1a\x04\x90\xb5\x18\x01\ + \x12%\n\x1aMessageType_TezosPublicKey\x10\x9b\x01\x1a\x04\x98\xb5\x18\ + \x01\x12$\n\x19MessageType_StellarSignTx\x10\xca\x01\x1a\x04\x90\xb5\x18\ + \x01\x12)\n\x1eMessageType_StellarTxOpRequest\x10\xcb\x01\x1a\x04\x98\ + \xb5\x18\x01\x12(\n\x1dMessageType_StellarGetAddress\x10\xcf\x01\x1a\x04\ + \x90\xb5\x18\x01\x12%\n\x1aMessageType_StellarAddress\x10\xd0\x01\x1a\ + \x04\x98\xb5\x18\x01\x12-\n\"MessageType_StellarCreateAccountOp\x10\xd2\ + \x01\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_StellarPaymentOp\x10\ + \xd3\x01\x1a\x04\x90\xb5\x18\x01\x128\n-MessageType_StellarPathPaymentSt\ + rictReceiveOp\x10\xd4\x01\x1a\x04\x90\xb5\x18\x01\x12/\n$MessageType_Ste\ + llarManageSellOfferOp\x10\xd5\x01\x1a\x04\x90\xb5\x18\x01\x126\n+Message\ + Type_StellarCreatePassiveSellOfferOp\x10\xd6\x01\x1a\x04\x90\xb5\x18\x01\ + \x12*\n\x1fMessageType_StellarSetOptionsOp\x10\xd7\x01\x1a\x04\x90\xb5\ + \x18\x01\x12+\n\x20MessageType_StellarChangeTrustOp\x10\xd8\x01\x1a\x04\ + \x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarAllowTrustOp\x10\xd9\x01\ + \x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_StellarAccountMergeOp\x10\ + \xda\x01\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_StellarManageData\ + Op\x10\xdc\x01\x1a\x04\x90\xb5\x18\x01\x12,\n!MessageType_StellarBumpSeq\ + uenceOp\x10\xdd\x01\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_StellarMa\ + nageBuyOfferOp\x10\xde\x01\x1a\x04\x90\xb5\x18\x01\x125\n*MessageType_St\ + ellarPathPaymentStrictSendOp\x10\xdf\x01\x1a\x04\x90\xb5\x18\x01\x125\n*\ + MessageType_StellarClaimClaimableBalanceOp\x10\xe1\x01\x1a\x04\x90\xb5\ + \x18\x01\x12&\n\x1bMessageType_StellarSignedTx\x10\xe6\x01\x1a\x04\x98\ + \xb5\x18\x01\x12*\n\x1fMessageType_CardanoGetPublicKey\x10\xb1\x02\x1a\ + \x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_CardanoPublicKey\x10\xb2\x02\ + \x1a\x04\x98\xb5\x18\x01\x12(\n\x1dMessageType_CardanoGetAddress\x10\xb3\ + \x02\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoAddress\x10\ + \xb4\x02\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_CardanoTxItemAck\ + \x10\xb9\x02\x1a\x04\x98\xb5\x18\x01\x127\n,MessageType_CardanoTxAuxilia\ + ryDataSupplement\x10\xba\x02\x1a\x04\x98\xb5\x18\x01\x12.\n#MessageType_\ + CardanoTxWitnessRequest\x10\xbb\x02\x1a\x04\x90\xb5\x18\x01\x12/\n$Messa\ + geType_CardanoTxWitnessResponse\x10\xbc\x02\x1a\x04\x98\xb5\x18\x01\x12'\ + \n\x1cMessageType_CardanoTxHostAck\x10\xbd\x02\x1a\x04\x90\xb5\x18\x01\ + \x12(\n\x1dMessageType_CardanoTxBodyHash\x10\xbe\x02\x1a\x04\x98\xb5\x18\ + \x01\x12,\n!MessageType_CardanoSignTxFinished\x10\xbf\x02\x1a\x04\x98\ + \xb5\x18\x01\x12(\n\x1dMessageType_CardanoSignTxInit\x10\xc0\x02\x1a\x04\ + \x90\xb5\x18\x01\x12%\n\x1aMessageType_CardanoTxInput\x10\xc1\x02\x1a\ + \x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_CardanoTxOutput\x10\xc2\x02\ + \x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_CardanoAssetGroup\x10\xc3\ + \x02\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_CardanoToken\x10\xc4\ + \x02\x1a\x04\x90\xb5\x18\x01\x12+\n\x20MessageType_CardanoTxCertificate\ + \x10\xc5\x02\x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_CardanoTxWith\ + drawal\x10\xc6\x02\x1a\x04\x90\xb5\x18\x01\x12-\n\"MessageType_CardanoTx\ + AuxiliaryData\x10\xc7\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessageType_\ + CardanoPoolOwner\x10\xc8\x02\x1a\x04\x90\xb5\x18\x01\x121\n&MessageType_\ + CardanoPoolRelayParameters\x10\xc9\x02\x1a\x04\x90\xb5\x18\x01\x121\n&Me\ + ssageType_CardanoGetNativeScriptHash\x10\xca\x02\x1a\x04\x90\xb5\x18\x01\ + \x12.\n#MessageType_CardanoNativeScriptHash\x10\xcb\x02\x1a\x04\x98\xb5\ + \x18\x01\x12$\n\x19MessageType_CardanoTxMint\x10\xcc\x02\x1a\x04\x90\xb5\ + \x18\x01\x12/\n$MessageType_CardanoTxCollateralInput\x10\xcd\x02\x1a\x04\ + \x90\xb5\x18\x01\x12.\n#MessageType_CardanoTxRequiredSigner\x10\xce\x02\ + \x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_CardanoTxInlineDatumChunk\ + \x10\xcf\x02\x1a\x04\x90\xb5\x18\x01\x124\n)MessageType_CardanoTxReferen\ + ceScriptChunk\x10\xd0\x02\x1a\x04\x90\xb5\x18\x01\x12.\n#MessageType_Car\ + danoTxReferenceInput\x10\xd1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n\x1cMessa\ + geType_RippleGetAddress\x10\x90\x03\x1a\x04\x90\xb5\x18\x01\x12$\n\x19Me\ + ssageType_RippleAddress\x10\x91\x03\x1a\x04\x98\xb5\x18\x01\x12#\n\x18Me\ + ssageType_RippleSignTx\x10\x92\x03\x1a\x04\x90\xb5\x18\x01\x12%\n\x1aMes\ + sageType_RippleSignedTx\x10\x93\x03\x1a\x04\x90\xb5\x18\x01\x123\n(Messa\ + geType_MoneroTransactionInitRequest\x10\xf5\x03\x1a\x04\x98\xb5\x18\x01\ + \x12/\n$MessageType_MoneroTransactionInitAck\x10\xf6\x03\x1a\x04\x98\xb5\ + \x18\x01\x127\n,MessageType_MoneroTransactionSetInputRequest\x10\xf7\x03\ + \x1a\x04\x98\xb5\x18\x01\x123\n(MessageType_MoneroTransactionSetInputAck\ + \x10\xf8\x03\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactio\ + nInputViniRequest\x10\xfb\x03\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType\ + _MoneroTransactionInputViniAck\x10\xfc\x03\x1a\x04\x98\xb5\x18\x01\x12;\ + \n0MessageType_MoneroTransactionAllInputsSetRequest\x10\xfd\x03\x1a\x04\ + \x98\xb5\x18\x01\x127\n,MessageType_MoneroTransactionAllInputsSetAck\x10\ + \xfe\x03\x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactionSet\ + OutputRequest\x10\xff\x03\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_Mon\ + eroTransactionSetOutputAck\x10\x80\x04\x1a\x04\x98\xb5\x18\x01\x128\n-Me\ + ssageType_MoneroTransactionAllOutSetRequest\x10\x81\x04\x1a\x04\x98\xb5\ + \x18\x01\x124\n)MessageType_MoneroTransactionAllOutSetAck\x10\x82\x04\ + \x1a\x04\x98\xb5\x18\x01\x128\n-MessageType_MoneroTransactionSignInputRe\ + quest\x10\x83\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroTrans\ + actionSignInputAck\x10\x84\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageTyp\ + e_MoneroTransactionFinalRequest\x10\x85\x04\x1a\x04\x98\xb5\x18\x01\x120\ + \n%MessageType_MoneroTransactionFinalAck\x10\x86\x04\x1a\x04\x98\xb5\x18\ + \x01\x126\n+MessageType_MoneroKeyImageExportInitRequest\x10\x92\x04\x1a\ + \x04\x98\xb5\x18\x01\x122\n'MessageType_MoneroKeyImageExportInitAck\x10\ + \x93\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroKeyImageSyncSt\ + epRequest\x10\x94\x04\x1a\x04\x98\xb5\x18\x01\x120\n%MessageType_MoneroK\ + eyImageSyncStepAck\x10\x95\x04\x1a\x04\x98\xb5\x18\x01\x125\n*MessageTyp\ + e_MoneroKeyImageSyncFinalRequest\x10\x96\x04\x1a\x04\x98\xb5\x18\x01\x12\ + 1\n&MessageType_MoneroKeyImageSyncFinalAck\x10\x97\x04\x1a\x04\x98\xb5\ + \x18\x01\x12'\n\x1cMessageType_MoneroGetAddress\x10\x9c\x04\x1a\x04\x90\ + \xb5\x18\x01\x12$\n\x19MessageType_MoneroAddress\x10\x9d\x04\x1a\x04\x98\ + \xb5\x18\x01\x12(\n\x1dMessageType_MoneroGetWatchKey\x10\x9e\x04\x1a\x04\ + \x90\xb5\x18\x01\x12%\n\x1aMessageType_MoneroWatchKey\x10\x9f\x04\x1a\ + \x04\x98\xb5\x18\x01\x12-\n\"MessageType_DebugMoneroDiagRequest\x10\xa2\ + \x04\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_DebugMoneroDiagAck\ + \x10\xa3\x04\x1a\x04\x98\xb5\x18\x01\x12,\n!MessageType_MoneroGetTxKeyRe\ + quest\x10\xa6\x04\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_MoneroGe\ + tTxKeyAck\x10\xa7\x04\x1a\x04\x98\xb5\x18\x01\x124\n)MessageType_MoneroL\ + iveRefreshStartRequest\x10\xa8\x04\x1a\x04\x90\xb5\x18\x01\x120\n%Messag\ + eType_MoneroLiveRefreshStartAck\x10\xa9\x04\x1a\x04\x98\xb5\x18\x01\x123\ + \n(MessageType_MoneroLiveRefreshStepRequest\x10\xaa\x04\x1a\x04\x90\xb5\ + \x18\x01\x12/\n$MessageType_MoneroLiveRefreshStepAck\x10\xab\x04\x1a\x04\ + \x98\xb5\x18\x01\x124\n)MessageType_MoneroLiveRefreshFinalRequest\x10\ + \xac\x04\x1a\x04\x90\xb5\x18\x01\x120\n%MessageType_MoneroLiveRefreshFin\ + alAck\x10\xad\x04\x1a\x04\x98\xb5\x18\x01\x12&\n\x1bMessageType_EosGetPu\ + blicKey\x10\xd8\x04\x1a\x04\x90\xb5\x18\x01\x12#\n\x18MessageType_EosPub\ + licKey\x10\xd9\x04\x1a\x04\x98\xb5\x18\x01\x12\x20\n\x15MessageType_EosS\ + ignTx\x10\xda\x04\x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_EosTxAct\ + ionRequest\x10\xdb\x04\x1a\x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_Eos\ + TxActionAck\x10\xdc\x04\x1a\x04\x90\xb5\x18\x01\x12\"\n\x17MessageType_E\ + osSignedTx\x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x126\n+MessageType_WebAut\ + hnListResidentCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\x01\x12*\n\x1f\ + MessageType_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\ + \n)MessageType_WebAuthnAddResidentCredential\x10\xa2\x06\x1a\x04\x90\xb5\ + \x18\x01\x127\n,MessageType_WebAuthnRemoveResidentCredential\x10\xa3\x06\ + \x1a\x04\x90\xb5\x18\x01\x12)\n\x1eMessageType_SolanaGetPublicKey\x10\ + \x84\x07\x1a\x04\x90\xb5\x18\x01\x12&\n\x1bMessageType_SolanaPublicKey\ + \x10\x85\x07\x1a\x04\x98\xb5\x18\x01\x12'\n\x1cMessageType_SolanaGetAddr\ + ess\x10\x86\x07\x1a\x04\x90\xb5\x18\x01\x12$\n\x19MessageType_SolanaAddr\ + ess\x10\x87\x07\x1a\x04\x98\xb5\x18\x01\x12#\n\x18MessageType_SolanaSign\ + Tx\x10\x88\x07\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_SolanaTxSig\ + nature\x10\x89\x07\x1a\x04\x98\xb5\x18\x01\x12.\n\x1fMessageType_ThpCrea\ + teNewSession\x10\xe8\x07\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\ + \x1dMessageType_ThpPairingRequest\x10\xee\x07\x1a\x04\x80\xa6\x1d\x01\ + \x120\n%MessageType_ThpPairingRequestApproved\x10\xef\x07\x1a\x04\x80\ + \xa6\x1d\x01\x12&\n\x1bMessageType_ThpSelectMethod\x10\xf0\x07\x1a\x04\ + \x80\xa6\x1d\x01\x125\n*MessageType_ThpPairingPreparationsFinished\x10\ + \xf1\x07\x1a\x04\x80\xa6\x1d\x01\x12+\n\x20MessageType_ThpCredentialRequ\ + est\x10\xf2\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!MessageType_ThpCredential\ + Response\x10\xf3\x07\x1a\x04\x80\xa6\x1d\x01\x12$\n\x19MessageType_ThpEn\ + dRequest\x10\xf4\x07\x1a\x04\x80\xa6\x1d\x01\x12%\n\x1aMessageType_ThpEn\ + dResponse\x10\xf5\x07\x1a\x04\x80\xa6\x1d\x01\x12-\n\"MessageType_ThpCod\ + eEntryCommitment\x10\xf8\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!MessageType_\ + ThpCodeEntryChallenge\x10\xf9\x07\x1a\x04\x80\xa6\x1d\x01\x12.\n#Message\ + Type_ThpCodeEntryCpaceTrezor\x10\xfa\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$\ + MessageType_ThpCodeEntryCpaceHostTag\x10\xfb\x07\x1a\x04\x80\xa6\x1d\x01\ + \x12)\n\x1eMessageType_ThpCodeEntrySecret\x10\xfc\x07\x1a\x04\x80\xa6\ + \x1d\x01\x12#\n\x18MessageType_ThpQrCodeTag\x10\x80\x08\x1a\x04\x80\xa6\ + \x1d\x01\x12&\n\x1bMessageType_ThpQrCodeSecret\x10\x81\x08\x1a\x04\x80\ + \xa6\x1d\x01\x12$\n\x19MessageType_ThpNfcTagHost\x10\x88\x08\x1a\x04\x80\ + \xa6\x1d\x01\x12&\n\x1bMessageType_ThpNfcTagTrezor\x10\x89\x08\x1a\x04\ + \x80\xa6\x1d\x01\x12%\n\x1aMessageType_NostrGetPubkey\x10\xd1\x0f\x1a\ + \x04\x90\xb5\x18\x01\x12\"\n\x17MessageType_NostrPubkey\x10\xd2\x0f\x1a\ + \x04\x98\xb5\x18\x01\x12%\n\x1aMessageType_NostrSignEvent\x10\xd3\x0f\ + \x1a\x04\x90\xb5\x18\x01\x12*\n\x1fMessageType_NostrEventSignature\x10\ + \xd4\x0f\x1a\x04\x98\xb5\x18\x01\x12)\n\x1eMessageType_BenchmarkListName\ + s\x10\x8cG\x1a\x04\x80\xa6\x1d\x01\x12%\n\x1aMessageType_BenchmarkNames\ + \x10\x8dG\x1a\x04\x80\xa6\x1d\x01\x12#\n\x18MessageType_BenchmarkRun\x10\ + \x8eG\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bMessageType_BenchmarkResult\x10\ + \x8fG\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\"\x04\x08Z\x10\\\"\ + \x04\x08G\x10J\"\x04\x08r\x10z\"\x06\x08\xdb\x01\x10\xdb\x01\"\x06\x08\ + \xe0\x01\x10\xe0\x01\"\x06\x08\xac\x02\x10\xb0\x02\"\x06\x08\xb5\x02\x10\ + \xb8\x02\"\x06\x08\xbc\x05\x10\xc5\x05\"\x06\x08\xe9\x07\x10\xed\x07\"\ + \x06\x08\xf6\x07\x10\xf7\x07\"\x06\x08\xfd\x07\x10\xff\x07\"\x06\x08\x82\ + \x08\x10\x87\x08B8\n#com.satoshilabs.trezor.lib.protobufB\rTrezorMessage\ + \x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/rust/trezor-client/src/protos/generated/messages_debug.rs b/rust/trezor-client/src/protos/generated/messages_debug.rs index 6e73f9cf43..5e7f8b601e 100644 --- a/rust/trezor-client/src/protos/generated/messages_debug.rs +++ b/rust/trezor-client/src/protos/generated/messages_debug.rs @@ -2117,6 +2117,824 @@ impl ::protobuf::reflect::ProtobufValue for DebugLinkState { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkGetPairingInfo) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DebugLinkGetPairingInfo { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetPairingInfo.channel_id) + pub channel_id: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetPairingInfo.handshake_hash) + pub handshake_hash: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkGetPairingInfo.nfc_secret_host) + pub nfc_secret_host: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkGetPairingInfo.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a DebugLinkGetPairingInfo { + fn default() -> &'a DebugLinkGetPairingInfo { + ::default_instance() + } +} + +impl DebugLinkGetPairingInfo { + pub fn new() -> DebugLinkGetPairingInfo { + ::std::default::Default::default() + } + + // optional bytes channel_id = 1; + + pub fn channel_id(&self) -> &[u8] { + match self.channel_id.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_channel_id(&mut self) { + self.channel_id = ::std::option::Option::None; + } + + pub fn has_channel_id(&self) -> bool { + self.channel_id.is_some() + } + + // Param is passed by value, moved + pub fn set_channel_id(&mut self, v: ::std::vec::Vec) { + self.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_channel_id(&mut self) -> &mut ::std::vec::Vec { + if self.channel_id.is_none() { + self.channel_id = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.channel_id.as_mut().unwrap() + } + + // Take field + pub fn take_channel_id(&mut self) -> ::std::vec::Vec { + self.channel_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes handshake_hash = 2; + + pub fn handshake_hash(&self) -> &[u8] { + match self.handshake_hash.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_handshake_hash(&mut self) { + self.handshake_hash = ::std::option::Option::None; + } + + pub fn has_handshake_hash(&self) -> bool { + self.handshake_hash.is_some() + } + + // Param is passed by value, moved + pub fn set_handshake_hash(&mut self, v: ::std::vec::Vec) { + self.handshake_hash = ::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_handshake_hash(&mut self) -> &mut ::std::vec::Vec { + if self.handshake_hash.is_none() { + self.handshake_hash = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.handshake_hash.as_mut().unwrap() + } + + // Take field + pub fn take_handshake_hash(&mut self) -> ::std::vec::Vec { + self.handshake_hash.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes nfc_secret_host = 3; + + pub fn nfc_secret_host(&self) -> &[u8] { + match self.nfc_secret_host.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_nfc_secret_host(&mut self) { + self.nfc_secret_host = ::std::option::Option::None; + } + + pub fn has_nfc_secret_host(&self) -> bool { + self.nfc_secret_host.is_some() + } + + // Param is passed by value, moved + pub fn set_nfc_secret_host(&mut self, v: ::std::vec::Vec) { + self.nfc_secret_host = ::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_nfc_secret_host(&mut self) -> &mut ::std::vec::Vec { + if self.nfc_secret_host.is_none() { + self.nfc_secret_host = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.nfc_secret_host.as_mut().unwrap() + } + + // Take field + pub fn take_nfc_secret_host(&mut self) -> ::std::vec::Vec { + self.nfc_secret_host.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "channel_id", + |m: &DebugLinkGetPairingInfo| { &m.channel_id }, + |m: &mut DebugLinkGetPairingInfo| { &mut m.channel_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "handshake_hash", + |m: &DebugLinkGetPairingInfo| { &m.handshake_hash }, + |m: &mut DebugLinkGetPairingInfo| { &mut m.handshake_hash }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "nfc_secret_host", + |m: &DebugLinkGetPairingInfo| { &m.nfc_secret_host }, + |m: &mut DebugLinkGetPairingInfo| { &mut m.nfc_secret_host }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DebugLinkGetPairingInfo", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for DebugLinkGetPairingInfo { + const NAME: &'static str = "DebugLinkGetPairingInfo"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.channel_id = ::std::option::Option::Some(is.read_bytes()?); + }, + 18 => { + self.handshake_hash = ::std::option::Option::Some(is.read_bytes()?); + }, + 26 => { + self.nfc_secret_host = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.channel_id.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.handshake_hash.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + if let Some(v) = self.nfc_secret_host.as_ref() { + my_size += ::protobuf::rt::bytes_size(3, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.channel_id.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.handshake_hash.as_ref() { + os.write_bytes(2, v)?; + } + if let Some(v) = self.nfc_secret_host.as_ref() { + os.write_bytes(3, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> DebugLinkGetPairingInfo { + DebugLinkGetPairingInfo::new() + } + + fn clear(&mut self) { + self.channel_id = ::std::option::Option::None; + self.handshake_hash = ::std::option::Option::None; + self.nfc_secret_host = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static DebugLinkGetPairingInfo { + static instance: DebugLinkGetPairingInfo = DebugLinkGetPairingInfo { + channel_id: ::std::option::Option::None, + handshake_hash: ::std::option::Option::None, + nfc_secret_host: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for DebugLinkGetPairingInfo { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkGetPairingInfo").unwrap()).clone() + } +} + +impl ::std::fmt::Display for DebugLinkGetPairingInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DebugLinkGetPairingInfo { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkPairingInfo) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DebugLinkPairingInfo { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkPairingInfo.channel_id) + pub channel_id: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkPairingInfo.handshake_hash) + pub handshake_hash: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkPairingInfo.code_entry_code) + pub code_entry_code: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkPairingInfo.code_qr_code) + pub code_qr_code: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkPairingInfo.nfc_secret_trezor) + pub nfc_secret_trezor: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkPairingInfo.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a DebugLinkPairingInfo { + fn default() -> &'a DebugLinkPairingInfo { + ::default_instance() + } +} + +impl DebugLinkPairingInfo { + pub fn new() -> DebugLinkPairingInfo { + ::std::default::Default::default() + } + + // optional bytes channel_id = 1; + + pub fn channel_id(&self) -> &[u8] { + match self.channel_id.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_channel_id(&mut self) { + self.channel_id = ::std::option::Option::None; + } + + pub fn has_channel_id(&self) -> bool { + self.channel_id.is_some() + } + + // Param is passed by value, moved + pub fn set_channel_id(&mut self, v: ::std::vec::Vec) { + self.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_channel_id(&mut self) -> &mut ::std::vec::Vec { + if self.channel_id.is_none() { + self.channel_id = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.channel_id.as_mut().unwrap() + } + + // Take field + pub fn take_channel_id(&mut self) -> ::std::vec::Vec { + self.channel_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes handshake_hash = 2; + + pub fn handshake_hash(&self) -> &[u8] { + match self.handshake_hash.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_handshake_hash(&mut self) { + self.handshake_hash = ::std::option::Option::None; + } + + pub fn has_handshake_hash(&self) -> bool { + self.handshake_hash.is_some() + } + + // Param is passed by value, moved + pub fn set_handshake_hash(&mut self, v: ::std::vec::Vec) { + self.handshake_hash = ::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_handshake_hash(&mut self) -> &mut ::std::vec::Vec { + if self.handshake_hash.is_none() { + self.handshake_hash = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.handshake_hash.as_mut().unwrap() + } + + // Take field + pub fn take_handshake_hash(&mut self) -> ::std::vec::Vec { + self.handshake_hash.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional uint32 code_entry_code = 3; + + pub fn code_entry_code(&self) -> u32 { + self.code_entry_code.unwrap_or(0) + } + + pub fn clear_code_entry_code(&mut self) { + self.code_entry_code = ::std::option::Option::None; + } + + pub fn has_code_entry_code(&self) -> bool { + self.code_entry_code.is_some() + } + + // Param is passed by value, moved + pub fn set_code_entry_code(&mut self, v: u32) { + self.code_entry_code = ::std::option::Option::Some(v); + } + + // optional bytes code_qr_code = 4; + + pub fn code_qr_code(&self) -> &[u8] { + match self.code_qr_code.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_code_qr_code(&mut self) { + self.code_qr_code = ::std::option::Option::None; + } + + pub fn has_code_qr_code(&self) -> bool { + self.code_qr_code.is_some() + } + + // Param is passed by value, moved + pub fn set_code_qr_code(&mut self, v: ::std::vec::Vec) { + self.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_code_qr_code(&mut self) -> &mut ::std::vec::Vec { + if self.code_qr_code.is_none() { + self.code_qr_code = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.code_qr_code.as_mut().unwrap() + } + + // Take field + pub fn take_code_qr_code(&mut self) -> ::std::vec::Vec { + self.code_qr_code.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes nfc_secret_trezor = 5; + + pub fn nfc_secret_trezor(&self) -> &[u8] { + match self.nfc_secret_trezor.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_nfc_secret_trezor(&mut self) { + self.nfc_secret_trezor = ::std::option::Option::None; + } + + pub fn has_nfc_secret_trezor(&self) -> bool { + self.nfc_secret_trezor.is_some() + } + + // Param is passed by value, moved + pub fn set_nfc_secret_trezor(&mut self, v: ::std::vec::Vec) { + self.nfc_secret_trezor = ::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_nfc_secret_trezor(&mut self) -> &mut ::std::vec::Vec { + if self.nfc_secret_trezor.is_none() { + self.nfc_secret_trezor = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.nfc_secret_trezor.as_mut().unwrap() + } + + // Take field + pub fn take_nfc_secret_trezor(&mut self) -> ::std::vec::Vec { + self.nfc_secret_trezor.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(5); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "channel_id", + |m: &DebugLinkPairingInfo| { &m.channel_id }, + |m: &mut DebugLinkPairingInfo| { &mut m.channel_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "handshake_hash", + |m: &DebugLinkPairingInfo| { &m.handshake_hash }, + |m: &mut DebugLinkPairingInfo| { &mut m.handshake_hash }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "code_entry_code", + |m: &DebugLinkPairingInfo| { &m.code_entry_code }, + |m: &mut DebugLinkPairingInfo| { &mut m.code_entry_code }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "code_qr_code", + |m: &DebugLinkPairingInfo| { &m.code_qr_code }, + |m: &mut DebugLinkPairingInfo| { &mut m.code_qr_code }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "nfc_secret_trezor", + |m: &DebugLinkPairingInfo| { &m.nfc_secret_trezor }, + |m: &mut DebugLinkPairingInfo| { &mut m.nfc_secret_trezor }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DebugLinkPairingInfo", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for DebugLinkPairingInfo { + const NAME: &'static str = "DebugLinkPairingInfo"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.channel_id = ::std::option::Option::Some(is.read_bytes()?); + }, + 18 => { + self.handshake_hash = ::std::option::Option::Some(is.read_bytes()?); + }, + 24 => { + self.code_entry_code = ::std::option::Option::Some(is.read_uint32()?); + }, + 34 => { + self.code_qr_code = ::std::option::Option::Some(is.read_bytes()?); + }, + 42 => { + self.nfc_secret_trezor = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.channel_id.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.handshake_hash.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + if let Some(v) = self.code_entry_code { + my_size += ::protobuf::rt::uint32_size(3, v); + } + if let Some(v) = self.code_qr_code.as_ref() { + my_size += ::protobuf::rt::bytes_size(4, &v); + } + if let Some(v) = self.nfc_secret_trezor.as_ref() { + my_size += ::protobuf::rt::bytes_size(5, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.channel_id.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.handshake_hash.as_ref() { + os.write_bytes(2, v)?; + } + if let Some(v) = self.code_entry_code { + os.write_uint32(3, v)?; + } + if let Some(v) = self.code_qr_code.as_ref() { + os.write_bytes(4, v)?; + } + if let Some(v) = self.nfc_secret_trezor.as_ref() { + os.write_bytes(5, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> DebugLinkPairingInfo { + DebugLinkPairingInfo::new() + } + + fn clear(&mut self) { + self.channel_id = ::std::option::Option::None; + self.handshake_hash = ::std::option::Option::None; + self.code_entry_code = ::std::option::Option::None; + self.code_qr_code = ::std::option::Option::None; + self.nfc_secret_trezor = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static DebugLinkPairingInfo { + static instance: DebugLinkPairingInfo = DebugLinkPairingInfo { + channel_id: ::std::option::Option::None, + handshake_hash: ::std::option::Option::None, + code_entry_code: ::std::option::Option::None, + code_qr_code: ::std::option::Option::None, + nfc_secret_trezor: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for DebugLinkPairingInfo { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkPairingInfo").unwrap()).clone() + } +} + +impl ::std::fmt::Display for DebugLinkPairingInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DebugLinkPairingInfo { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkToggleThpPairingDialog) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DebugLinkToggleThpPairingDialog { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkToggleThpPairingDialog.channel_id) + pub channel_id: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkToggleThpPairingDialog.show_dialog) + pub show_dialog: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkToggleThpPairingDialog.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a DebugLinkToggleThpPairingDialog { + fn default() -> &'a DebugLinkToggleThpPairingDialog { + ::default_instance() + } +} + +impl DebugLinkToggleThpPairingDialog { + pub fn new() -> DebugLinkToggleThpPairingDialog { + ::std::default::Default::default() + } + + // optional bytes channel_id = 1; + + pub fn channel_id(&self) -> &[u8] { + match self.channel_id.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_channel_id(&mut self) { + self.channel_id = ::std::option::Option::None; + } + + pub fn has_channel_id(&self) -> bool { + self.channel_id.is_some() + } + + // Param is passed by value, moved + pub fn set_channel_id(&mut self, v: ::std::vec::Vec) { + self.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_channel_id(&mut self) -> &mut ::std::vec::Vec { + if self.channel_id.is_none() { + self.channel_id = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.channel_id.as_mut().unwrap() + } + + // Take field + pub fn take_channel_id(&mut self) -> ::std::vec::Vec { + self.channel_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bool show_dialog = 2; + + pub fn show_dialog(&self) -> bool { + self.show_dialog.unwrap_or(false) + } + + pub fn clear_show_dialog(&mut self) { + self.show_dialog = ::std::option::Option::None; + } + + pub fn has_show_dialog(&self) -> bool { + self.show_dialog.is_some() + } + + // Param is passed by value, moved + pub fn set_show_dialog(&mut self, v: bool) { + self.show_dialog = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "channel_id", + |m: &DebugLinkToggleThpPairingDialog| { &m.channel_id }, + |m: &mut DebugLinkToggleThpPairingDialog| { &mut m.channel_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "show_dialog", + |m: &DebugLinkToggleThpPairingDialog| { &m.show_dialog }, + |m: &mut DebugLinkToggleThpPairingDialog| { &mut m.show_dialog }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DebugLinkToggleThpPairingDialog", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for DebugLinkToggleThpPairingDialog { + const NAME: &'static str = "DebugLinkToggleThpPairingDialog"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.channel_id = ::std::option::Option::Some(is.read_bytes()?); + }, + 16 => { + self.show_dialog = ::std::option::Option::Some(is.read_bool()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.channel_id.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.show_dialog { + my_size += 1 + 1; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.channel_id.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.show_dialog { + os.write_bool(2, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> DebugLinkToggleThpPairingDialog { + DebugLinkToggleThpPairingDialog::new() + } + + fn clear(&mut self) { + self.channel_id = ::std::option::Option::None; + self.show_dialog = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static DebugLinkToggleThpPairingDialog { + static instance: DebugLinkToggleThpPairingDialog = DebugLinkToggleThpPairingDialog { + channel_id: ::std::option::Option::None, + show_dialog: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for DebugLinkToggleThpPairingDialog { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkToggleThpPairingDialog").unwrap()).clone() + } +} + +impl ::std::fmt::Display for DebugLinkToggleThpPairingDialog { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DebugLinkToggleThpPairingDialog { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + // @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkStop) #[derive(PartialEq,Clone,Default,Debug)] pub struct DebugLinkStop { @@ -4141,23 +4959,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ dPos\x12$\n\x0ereset_word_pos\x18\x0b\x20\x01(\rR\x0cresetWordPos\x12N\n\ \rmnemonic_type\x18\x0c\x20\x01(\x0e2).hw.trezor.messages.management.Bac\ kupTypeR\x0cmnemonicType\x12\x16\n\x06tokens\x18\r\x20\x03(\tR\x06tokens\ - \"\x0f\n\rDebugLinkStop\"P\n\x0cDebugLinkLog\x12\x14\n\x05level\x18\x01\ - \x20\x01(\rR\x05level\x12\x16\n\x06bucket\x18\x02\x20\x01(\tR\x06bucket\ - \x12\x12\n\x04text\x18\x03\x20\x01(\tR\x04text\"G\n\x13DebugLinkMemoryRe\ - ad\x12\x18\n\x07address\x18\x01\x20\x01(\rR\x07address\x12\x16\n\x06leng\ - th\x18\x02\x20\x01(\rR\x06length\")\n\x0fDebugLinkMemory\x12\x16\n\x06me\ - mory\x18\x01\x20\x01(\x0cR\x06memory\"^\n\x14DebugLinkMemoryWrite\x12\ - \x18\n\x07address\x18\x01\x20\x01(\rR\x07address\x12\x16\n\x06memory\x18\ - \x02\x20\x01(\x0cR\x06memory\x12\x14\n\x05flash\x18\x03\x20\x01(\x08R\ - \x05flash\"-\n\x13DebugLinkFlashErase\x12\x16\n\x06sector\x18\x01\x20\ - \x01(\rR\x06sector\".\n\x14DebugLinkEraseSdCard\x12\x16\n\x06format\x18\ - \x01\x20\x01(\x08R\x06format\"0\n\x14DebugLinkWatchLayout\x12\x14\n\x05w\ - atch\x18\x01\x20\x01(\x08R\x05watch:\x02\x18\x01\"\x1f\n\x19DebugLinkRes\ - etDebugEvents:\x02\x18\x01\"\x1a\n\x18DebugLinkOptigaSetSecMax\"\x14\n\ - \x12DebugLinkGetGcInfo\"\xa7\x01\n\x0fDebugLinkGcInfo\x12S\n\x05items\ - \x18\x01\x20\x03(\x0b2=.hw.trezor.messages.debug.DebugLinkGcInfo.DebugLi\ - nkGcInfoItemR\x05items\x1a?\n\x13DebugLinkGcInfoItem\x12\x12\n\x04name\ - \x18\x01\x20\x02(\tR\x04name\x12\x14\n\x05value\x18\x02\x20\x02(\x04R\ + \"\x87\x01\n\x17DebugLinkGetPairingInfo\x12\x1d\n\nchannel_id\x18\x01\ + \x20\x01(\x0cR\tchannelId\x12%\n\x0ehandshake_hash\x18\x02\x20\x01(\x0cR\ + \rhandshakeHash\x12&\n\x0fnfc_secret_host\x18\x03\x20\x01(\x0cR\rnfcSecr\ + etHost\"\xd2\x01\n\x14DebugLinkPairingInfo\x12\x1d\n\nchannel_id\x18\x01\ + \x20\x01(\x0cR\tchannelId\x12%\n\x0ehandshake_hash\x18\x02\x20\x01(\x0cR\ + \rhandshakeHash\x12&\n\x0fcode_entry_code\x18\x03\x20\x01(\rR\rcodeEntry\ + Code\x12\x20\n\x0ccode_qr_code\x18\x04\x20\x01(\x0cR\ncodeQrCode\x12*\n\ + \x11nfc_secret_trezor\x18\x05\x20\x01(\x0cR\x0fnfcSecretTrezor\"h\n\x1fD\ + ebugLinkToggleThpPairingDialog\x12\x1d\n\nchannel_id\x18\x01\x20\x01(\ + \x0cR\tchannelId\x12&\n\x0bshow_dialog\x18\x02\x20\x01(\x08:\x05falseR\n\ + showDialog\"\x0f\n\rDebugLinkStop\"P\n\x0cDebugLinkLog\x12\x14\n\x05leve\ + l\x18\x01\x20\x01(\rR\x05level\x12\x16\n\x06bucket\x18\x02\x20\x01(\tR\ + \x06bucket\x12\x12\n\x04text\x18\x03\x20\x01(\tR\x04text\"G\n\x13DebugLi\ + nkMemoryRead\x12\x18\n\x07address\x18\x01\x20\x01(\rR\x07address\x12\x16\ + \n\x06length\x18\x02\x20\x01(\rR\x06length\")\n\x0fDebugLinkMemory\x12\ + \x16\n\x06memory\x18\x01\x20\x01(\x0cR\x06memory\"^\n\x14DebugLinkMemory\ + Write\x12\x18\n\x07address\x18\x01\x20\x01(\rR\x07address\x12\x16\n\x06m\ + emory\x18\x02\x20\x01(\x0cR\x06memory\x12\x14\n\x05flash\x18\x03\x20\x01\ + (\x08R\x05flash\"-\n\x13DebugLinkFlashErase\x12\x16\n\x06sector\x18\x01\ + \x20\x01(\rR\x06sector\".\n\x14DebugLinkEraseSdCard\x12\x16\n\x06format\ + \x18\x01\x20\x01(\x08R\x06format\"0\n\x14DebugLinkWatchLayout\x12\x14\n\ + \x05watch\x18\x01\x20\x01(\x08R\x05watch:\x02\x18\x01\"\x1f\n\x19DebugLi\ + nkResetDebugEvents:\x02\x18\x01\"\x1a\n\x18DebugLinkOptigaSetSecMax\"\ + \x14\n\x12DebugLinkGetGcInfo\"\xa7\x01\n\x0fDebugLinkGcInfo\x12S\n\x05it\ + ems\x18\x01\x20\x03(\x0b2=.hw.trezor.messages.debug.DebugLinkGcInfo.Debu\ + gLinkGcInfoItemR\x05items\x1a?\n\x13DebugLinkGcInfoItem\x12\x12\n\x04nam\ + e\x18\x01\x20\x02(\tR\x04name\x12\x14\n\x05value\x18\x02\x20\x02(\x04R\ \x05valueB=\n#com.satoshilabs.trezor.lib.protobufB\x12TrezorMessageDebug\ \x80\xa6\x1d\x01\ "; @@ -4180,13 +5008,16 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { deps.push(super::messages_common::file_descriptor().clone()); deps.push(super::messages_management::file_descriptor().clone()); deps.push(super::options::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(19); + let mut messages = ::std::vec::Vec::with_capacity(22); messages.push(DebugLinkDecision::generated_message_descriptor_data()); messages.push(DebugLinkLayout::generated_message_descriptor_data()); messages.push(DebugLinkReseedRandom::generated_message_descriptor_data()); messages.push(DebugLinkRecordScreen::generated_message_descriptor_data()); messages.push(DebugLinkGetState::generated_message_descriptor_data()); messages.push(DebugLinkState::generated_message_descriptor_data()); + messages.push(DebugLinkGetPairingInfo::generated_message_descriptor_data()); + messages.push(DebugLinkPairingInfo::generated_message_descriptor_data()); + messages.push(DebugLinkToggleThpPairingDialog::generated_message_descriptor_data()); messages.push(DebugLinkStop::generated_message_descriptor_data()); messages.push(DebugLinkLog::generated_message_descriptor_data()); messages.push(DebugLinkMemoryRead::generated_message_descriptor_data()); diff --git a/rust/trezor-client/src/protos/generated/messages_thp.rs b/rust/trezor-client/src/protos/generated/messages_thp.rs index c792f32272..61d771722e 100644 --- a/rust/trezor-client/src/protos/generated/messages_thp.rs +++ b/rust/trezor-client/src/protos/generated/messages_thp.rs @@ -24,12 +24,3345 @@ /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpDeviceProperties) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpDeviceProperties { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.internal_model) + pub internal_model: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.model_variant) + pub model_variant: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.protocol_version_major) + pub protocol_version_major: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.protocol_version_minor) + pub protocol_version_minor: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.pairing_methods) + pub pairing_methods: ::std::vec::Vec<::protobuf::EnumOrUnknown>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpDeviceProperties.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpDeviceProperties { + fn default() -> &'a ThpDeviceProperties { + ::default_instance() + } +} + +impl ThpDeviceProperties { + pub fn new() -> ThpDeviceProperties { + ::std::default::Default::default() + } + + // optional string internal_model = 1; + + pub fn internal_model(&self) -> &str { + match self.internal_model.as_ref() { + Some(v) => v, + None => "", + } + } + + pub fn clear_internal_model(&mut self) { + self.internal_model = ::std::option::Option::None; + } + + pub fn has_internal_model(&self) -> bool { + self.internal_model.is_some() + } + + // Param is passed by value, moved + pub fn set_internal_model(&mut self, v: ::std::string::String) { + self.internal_model = ::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_internal_model(&mut self) -> &mut ::std::string::String { + if self.internal_model.is_none() { + self.internal_model = ::std::option::Option::Some(::std::string::String::new()); + } + self.internal_model.as_mut().unwrap() + } + + // Take field + pub fn take_internal_model(&mut self) -> ::std::string::String { + self.internal_model.take().unwrap_or_else(|| ::std::string::String::new()) + } + + // optional uint32 model_variant = 2; + + pub fn model_variant(&self) -> u32 { + self.model_variant.unwrap_or(0) + } + + pub fn clear_model_variant(&mut self) { + self.model_variant = ::std::option::Option::None; + } + + pub fn has_model_variant(&self) -> bool { + self.model_variant.is_some() + } + + // Param is passed by value, moved + pub fn set_model_variant(&mut self, v: u32) { + self.model_variant = ::std::option::Option::Some(v); + } + + // optional uint32 protocol_version_major = 3; + + pub fn protocol_version_major(&self) -> u32 { + self.protocol_version_major.unwrap_or(0) + } + + pub fn clear_protocol_version_major(&mut self) { + self.protocol_version_major = ::std::option::Option::None; + } + + pub fn has_protocol_version_major(&self) -> bool { + self.protocol_version_major.is_some() + } + + // Param is passed by value, moved + pub fn set_protocol_version_major(&mut self, v: u32) { + self.protocol_version_major = ::std::option::Option::Some(v); + } + + // optional uint32 protocol_version_minor = 4; + + pub fn protocol_version_minor(&self) -> u32 { + self.protocol_version_minor.unwrap_or(0) + } + + pub fn clear_protocol_version_minor(&mut self) { + self.protocol_version_minor = ::std::option::Option::None; + } + + pub fn has_protocol_version_minor(&self) -> bool { + self.protocol_version_minor.is_some() + } + + // Param is passed by value, moved + pub fn set_protocol_version_minor(&mut self, v: u32) { + self.protocol_version_minor = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(5); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "internal_model", + |m: &ThpDeviceProperties| { &m.internal_model }, + |m: &mut ThpDeviceProperties| { &mut m.internal_model }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "model_variant", + |m: &ThpDeviceProperties| { &m.model_variant }, + |m: &mut ThpDeviceProperties| { &mut m.model_variant }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "protocol_version_major", + |m: &ThpDeviceProperties| { &m.protocol_version_major }, + |m: &mut ThpDeviceProperties| { &mut m.protocol_version_major }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "protocol_version_minor", + |m: &ThpDeviceProperties| { &m.protocol_version_minor }, + |m: &mut ThpDeviceProperties| { &mut m.protocol_version_minor }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "pairing_methods", + |m: &ThpDeviceProperties| { &m.pairing_methods }, + |m: &mut ThpDeviceProperties| { &mut m.pairing_methods }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpDeviceProperties", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpDeviceProperties { + const NAME: &'static str = "ThpDeviceProperties"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.internal_model = ::std::option::Option::Some(is.read_string()?); + }, + 16 => { + self.model_variant = ::std::option::Option::Some(is.read_uint32()?); + }, + 24 => { + self.protocol_version_major = ::std::option::Option::Some(is.read_uint32()?); + }, + 32 => { + self.protocol_version_minor = ::std::option::Option::Some(is.read_uint32()?); + }, + 40 => { + self.pairing_methods.push(is.read_enum_or_unknown()?); + }, + 42 => { + ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.pairing_methods)? + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.internal_model.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(v) = self.model_variant { + my_size += ::protobuf::rt::uint32_size(2, v); + } + if let Some(v) = self.protocol_version_major { + my_size += ::protobuf::rt::uint32_size(3, v); + } + if let Some(v) = self.protocol_version_minor { + my_size += ::protobuf::rt::uint32_size(4, v); + } + for value in &self.pairing_methods { + my_size += ::protobuf::rt::int32_size(5, value.value()); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.internal_model.as_ref() { + os.write_string(1, v)?; + } + if let Some(v) = self.model_variant { + os.write_uint32(2, v)?; + } + if let Some(v) = self.protocol_version_major { + os.write_uint32(3, v)?; + } + if let Some(v) = self.protocol_version_minor { + os.write_uint32(4, v)?; + } + for v in &self.pairing_methods { + os.write_enum(5, ::protobuf::EnumOrUnknown::value(v))?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpDeviceProperties { + ThpDeviceProperties::new() + } + + fn clear(&mut self) { + self.internal_model = ::std::option::Option::None; + self.model_variant = ::std::option::Option::None; + self.protocol_version_major = ::std::option::Option::None; + self.protocol_version_minor = ::std::option::Option::None; + self.pairing_methods.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpDeviceProperties { + static instance: ThpDeviceProperties = ThpDeviceProperties { + internal_model: ::std::option::Option::None, + model_variant: ::std::option::Option::None, + protocol_version_major: ::std::option::Option::None, + protocol_version_minor: ::std::option::Option::None, + pairing_methods: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpDeviceProperties { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpDeviceProperties").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpDeviceProperties { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpDeviceProperties { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpHandshakeCompletionReqNoisePayload) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpHandshakeCompletionReqNoisePayload { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpHandshakeCompletionReqNoisePayload.host_pairing_credential) + pub host_pairing_credential: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpHandshakeCompletionReqNoisePayload.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpHandshakeCompletionReqNoisePayload { + fn default() -> &'a ThpHandshakeCompletionReqNoisePayload { + ::default_instance() + } +} + +impl ThpHandshakeCompletionReqNoisePayload { + pub fn new() -> ThpHandshakeCompletionReqNoisePayload { + ::std::default::Default::default() + } + + // optional bytes host_pairing_credential = 1; + + pub fn host_pairing_credential(&self) -> &[u8] { + match self.host_pairing_credential.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_host_pairing_credential(&mut self) { + self.host_pairing_credential = ::std::option::Option::None; + } + + pub fn has_host_pairing_credential(&self) -> bool { + self.host_pairing_credential.is_some() + } + + // Param is passed by value, moved + pub fn set_host_pairing_credential(&mut self, v: ::std::vec::Vec) { + self.host_pairing_credential = ::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_host_pairing_credential(&mut self) -> &mut ::std::vec::Vec { + if self.host_pairing_credential.is_none() { + self.host_pairing_credential = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.host_pairing_credential.as_mut().unwrap() + } + + // Take field + pub fn take_host_pairing_credential(&mut self) -> ::std::vec::Vec { + self.host_pairing_credential.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "host_pairing_credential", + |m: &ThpHandshakeCompletionReqNoisePayload| { &m.host_pairing_credential }, + |m: &mut ThpHandshakeCompletionReqNoisePayload| { &mut m.host_pairing_credential }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpHandshakeCompletionReqNoisePayload", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpHandshakeCompletionReqNoisePayload { + const NAME: &'static str = "ThpHandshakeCompletionReqNoisePayload"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.host_pairing_credential = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.host_pairing_credential.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.host_pairing_credential.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpHandshakeCompletionReqNoisePayload { + ThpHandshakeCompletionReqNoisePayload::new() + } + + fn clear(&mut self) { + self.host_pairing_credential = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpHandshakeCompletionReqNoisePayload { + static instance: ThpHandshakeCompletionReqNoisePayload = ThpHandshakeCompletionReqNoisePayload { + host_pairing_credential: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpHandshakeCompletionReqNoisePayload { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpHandshakeCompletionReqNoisePayload").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpHandshakeCompletionReqNoisePayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpHandshakeCompletionReqNoisePayload { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCreateNewSession) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCreateNewSession { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.passphrase) + pub passphrase: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.on_device) + pub on_device: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCreateNewSession.derive_cardano) + pub derive_cardano: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCreateNewSession.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCreateNewSession { + fn default() -> &'a ThpCreateNewSession { + ::default_instance() + } +} + +impl ThpCreateNewSession { + pub fn new() -> ThpCreateNewSession { + ::std::default::Default::default() + } + + // optional string passphrase = 1; + + pub fn passphrase(&self) -> &str { + match self.passphrase.as_ref() { + Some(v) => v, + None => "", + } + } + + pub fn clear_passphrase(&mut self) { + self.passphrase = ::std::option::Option::None; + } + + pub fn has_passphrase(&self) -> bool { + self.passphrase.is_some() + } + + // Param is passed by value, moved + pub fn set_passphrase(&mut self, v: ::std::string::String) { + self.passphrase = ::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_passphrase(&mut self) -> &mut ::std::string::String { + if self.passphrase.is_none() { + self.passphrase = ::std::option::Option::Some(::std::string::String::new()); + } + self.passphrase.as_mut().unwrap() + } + + // Take field + pub fn take_passphrase(&mut self) -> ::std::string::String { + self.passphrase.take().unwrap_or_else(|| ::std::string::String::new()) + } + + // optional bool on_device = 2; + + pub fn on_device(&self) -> bool { + self.on_device.unwrap_or(false) + } + + pub fn clear_on_device(&mut self) { + self.on_device = ::std::option::Option::None; + } + + pub fn has_on_device(&self) -> bool { + self.on_device.is_some() + } + + // Param is passed by value, moved + pub fn set_on_device(&mut self, v: bool) { + self.on_device = ::std::option::Option::Some(v); + } + + // optional bool derive_cardano = 3; + + pub fn derive_cardano(&self) -> bool { + self.derive_cardano.unwrap_or(false) + } + + pub fn clear_derive_cardano(&mut self) { + self.derive_cardano = ::std::option::Option::None; + } + + pub fn has_derive_cardano(&self) -> bool { + self.derive_cardano.is_some() + } + + // Param is passed by value, moved + pub fn set_derive_cardano(&mut self, v: bool) { + self.derive_cardano = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "passphrase", + |m: &ThpCreateNewSession| { &m.passphrase }, + |m: &mut ThpCreateNewSession| { &mut m.passphrase }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "on_device", + |m: &ThpCreateNewSession| { &m.on_device }, + |m: &mut ThpCreateNewSession| { &mut m.on_device }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "derive_cardano", + |m: &ThpCreateNewSession| { &m.derive_cardano }, + |m: &mut ThpCreateNewSession| { &mut m.derive_cardano }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCreateNewSession", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCreateNewSession { + const NAME: &'static str = "ThpCreateNewSession"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.passphrase = ::std::option::Option::Some(is.read_string()?); + }, + 16 => { + self.on_device = ::std::option::Option::Some(is.read_bool()?); + }, + 24 => { + self.derive_cardano = ::std::option::Option::Some(is.read_bool()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.passphrase.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(v) = self.on_device { + my_size += 1 + 1; + } + if let Some(v) = self.derive_cardano { + my_size += 1 + 1; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.passphrase.as_ref() { + os.write_string(1, v)?; + } + if let Some(v) = self.on_device { + os.write_bool(2, v)?; + } + if let Some(v) = self.derive_cardano { + os.write_bool(3, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCreateNewSession { + ThpCreateNewSession::new() + } + + fn clear(&mut self) { + self.passphrase = ::std::option::Option::None; + self.on_device = ::std::option::Option::None; + self.derive_cardano = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCreateNewSession { + static instance: ThpCreateNewSession = ThpCreateNewSession { + passphrase: ::std::option::Option::None, + on_device: ::std::option::Option::None, + derive_cardano: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCreateNewSession { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCreateNewSession").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCreateNewSession { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCreateNewSession { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairingRequest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpPairingRequest { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpPairingRequest.host_name) + pub host_name: ::std::option::Option<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairingRequest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpPairingRequest { + fn default() -> &'a ThpPairingRequest { + ::default_instance() + } +} + +impl ThpPairingRequest { + pub fn new() -> ThpPairingRequest { + ::std::default::Default::default() + } + + // optional string host_name = 1; + + pub fn host_name(&self) -> &str { + match self.host_name.as_ref() { + Some(v) => v, + None => "", + } + } + + pub fn clear_host_name(&mut self) { + self.host_name = ::std::option::Option::None; + } + + pub fn has_host_name(&self) -> bool { + self.host_name.is_some() + } + + // Param is passed by value, moved + pub fn set_host_name(&mut self, v: ::std::string::String) { + self.host_name = ::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_host_name(&mut self) -> &mut ::std::string::String { + if self.host_name.is_none() { + self.host_name = ::std::option::Option::Some(::std::string::String::new()); + } + self.host_name.as_mut().unwrap() + } + + // Take field + pub fn take_host_name(&mut self) -> ::std::string::String { + self.host_name.take().unwrap_or_else(|| ::std::string::String::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "host_name", + |m: &ThpPairingRequest| { &m.host_name }, + |m: &mut ThpPairingRequest| { &mut m.host_name }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpPairingRequest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpPairingRequest { + const NAME: &'static str = "ThpPairingRequest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.host_name = ::std::option::Option::Some(is.read_string()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.host_name.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.host_name.as_ref() { + os.write_string(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpPairingRequest { + ThpPairingRequest::new() + } + + fn clear(&mut self) { + self.host_name = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpPairingRequest { + static instance: ThpPairingRequest = ThpPairingRequest { + host_name: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpPairingRequest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpPairingRequest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpPairingRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpPairingRequest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairingRequestApproved) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpPairingRequestApproved { + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairingRequestApproved.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpPairingRequestApproved { + fn default() -> &'a ThpPairingRequestApproved { + ::default_instance() + } +} + +impl ThpPairingRequestApproved { + pub fn new() -> ThpPairingRequestApproved { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(0); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpPairingRequestApproved", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpPairingRequestApproved { + const NAME: &'static str = "ThpPairingRequestApproved"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpPairingRequestApproved { + ThpPairingRequestApproved::new() + } + + fn clear(&mut self) { + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpPairingRequestApproved { + static instance: ThpPairingRequestApproved = ThpPairingRequestApproved { + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpPairingRequestApproved { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpPairingRequestApproved").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpPairingRequestApproved { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpPairingRequestApproved { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpSelectMethod) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpSelectMethod { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpSelectMethod.selected_pairing_method) + pub selected_pairing_method: ::std::option::Option<::protobuf::EnumOrUnknown>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpSelectMethod.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpSelectMethod { + fn default() -> &'a ThpSelectMethod { + ::default_instance() + } +} + +impl ThpSelectMethod { + pub fn new() -> ThpSelectMethod { + ::std::default::Default::default() + } + + // optional .hw.trezor.messages.thp.ThpPairingMethod selected_pairing_method = 1; + + pub fn selected_pairing_method(&self) -> ThpPairingMethod { + match self.selected_pairing_method { + Some(e) => e.enum_value_or(ThpPairingMethod::SkipPairing), + None => ThpPairingMethod::SkipPairing, + } + } + + pub fn clear_selected_pairing_method(&mut self) { + self.selected_pairing_method = ::std::option::Option::None; + } + + pub fn has_selected_pairing_method(&self) -> bool { + self.selected_pairing_method.is_some() + } + + // Param is passed by value, moved + pub fn set_selected_pairing_method(&mut self, v: ThpPairingMethod) { + self.selected_pairing_method = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "selected_pairing_method", + |m: &ThpSelectMethod| { &m.selected_pairing_method }, + |m: &mut ThpSelectMethod| { &mut m.selected_pairing_method }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpSelectMethod", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpSelectMethod { + const NAME: &'static str = "ThpSelectMethod"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.selected_pairing_method = ::std::option::Option::Some(is.read_enum_or_unknown()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.selected_pairing_method { + my_size += ::protobuf::rt::int32_size(1, v.value()); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.selected_pairing_method { + os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpSelectMethod { + ThpSelectMethod::new() + } + + fn clear(&mut self) { + self.selected_pairing_method = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpSelectMethod { + static instance: ThpSelectMethod = ThpSelectMethod { + selected_pairing_method: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpSelectMethod { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpSelectMethod").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpSelectMethod { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpSelectMethod { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairingPreparationsFinished) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpPairingPreparationsFinished { + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairingPreparationsFinished.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpPairingPreparationsFinished { + fn default() -> &'a ThpPairingPreparationsFinished { + ::default_instance() + } +} + +impl ThpPairingPreparationsFinished { + pub fn new() -> ThpPairingPreparationsFinished { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(0); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpPairingPreparationsFinished", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpPairingPreparationsFinished { + const NAME: &'static str = "ThpPairingPreparationsFinished"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpPairingPreparationsFinished { + ThpPairingPreparationsFinished::new() + } + + fn clear(&mut self) { + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpPairingPreparationsFinished { + static instance: ThpPairingPreparationsFinished = ThpPairingPreparationsFinished { + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpPairingPreparationsFinished { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpPairingPreparationsFinished").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpPairingPreparationsFinished { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpPairingPreparationsFinished { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCodeEntryCommitment) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCodeEntryCommitment { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntryCommitment.commitment) + pub commitment: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCodeEntryCommitment.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCodeEntryCommitment { + fn default() -> &'a ThpCodeEntryCommitment { + ::default_instance() + } +} + +impl ThpCodeEntryCommitment { + pub fn new() -> ThpCodeEntryCommitment { + ::std::default::Default::default() + } + + // optional bytes commitment = 1; + + pub fn commitment(&self) -> &[u8] { + match self.commitment.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_commitment(&mut self) { + self.commitment = ::std::option::Option::None; + } + + pub fn has_commitment(&self) -> bool { + self.commitment.is_some() + } + + // Param is passed by value, moved + pub fn set_commitment(&mut self, v: ::std::vec::Vec) { + self.commitment = ::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_commitment(&mut self) -> &mut ::std::vec::Vec { + if self.commitment.is_none() { + self.commitment = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.commitment.as_mut().unwrap() + } + + // Take field + pub fn take_commitment(&mut self) -> ::std::vec::Vec { + self.commitment.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "commitment", + |m: &ThpCodeEntryCommitment| { &m.commitment }, + |m: &mut ThpCodeEntryCommitment| { &mut m.commitment }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCodeEntryCommitment", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCodeEntryCommitment { + const NAME: &'static str = "ThpCodeEntryCommitment"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.commitment = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.commitment.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.commitment.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCodeEntryCommitment { + ThpCodeEntryCommitment::new() + } + + fn clear(&mut self) { + self.commitment = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCodeEntryCommitment { + static instance: ThpCodeEntryCommitment = ThpCodeEntryCommitment { + commitment: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCodeEntryCommitment { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCodeEntryCommitment").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCodeEntryCommitment { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCodeEntryCommitment { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCodeEntryChallenge) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCodeEntryChallenge { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntryChallenge.challenge) + pub challenge: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCodeEntryChallenge.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCodeEntryChallenge { + fn default() -> &'a ThpCodeEntryChallenge { + ::default_instance() + } +} + +impl ThpCodeEntryChallenge { + pub fn new() -> ThpCodeEntryChallenge { + ::std::default::Default::default() + } + + // optional bytes challenge = 1; + + pub fn challenge(&self) -> &[u8] { + match self.challenge.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_challenge(&mut self) { + self.challenge = ::std::option::Option::None; + } + + pub fn has_challenge(&self) -> bool { + self.challenge.is_some() + } + + // Param is passed by value, moved + pub fn set_challenge(&mut self, v: ::std::vec::Vec) { + self.challenge = ::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_challenge(&mut self) -> &mut ::std::vec::Vec { + if self.challenge.is_none() { + self.challenge = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.challenge.as_mut().unwrap() + } + + // Take field + pub fn take_challenge(&mut self) -> ::std::vec::Vec { + self.challenge.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "challenge", + |m: &ThpCodeEntryChallenge| { &m.challenge }, + |m: &mut ThpCodeEntryChallenge| { &mut m.challenge }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCodeEntryChallenge", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCodeEntryChallenge { + const NAME: &'static str = "ThpCodeEntryChallenge"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.challenge = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.challenge.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.challenge.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCodeEntryChallenge { + ThpCodeEntryChallenge::new() + } + + fn clear(&mut self) { + self.challenge = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCodeEntryChallenge { + static instance: ThpCodeEntryChallenge = ThpCodeEntryChallenge { + challenge: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCodeEntryChallenge { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCodeEntryChallenge").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCodeEntryChallenge { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCodeEntryChallenge { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCodeEntryCpaceTrezor) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCodeEntryCpaceTrezor { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntryCpaceTrezor.cpace_trezor_public_key) + pub cpace_trezor_public_key: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCodeEntryCpaceTrezor.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCodeEntryCpaceTrezor { + fn default() -> &'a ThpCodeEntryCpaceTrezor { + ::default_instance() + } +} + +impl ThpCodeEntryCpaceTrezor { + pub fn new() -> ThpCodeEntryCpaceTrezor { + ::std::default::Default::default() + } + + // optional bytes cpace_trezor_public_key = 1; + + pub fn cpace_trezor_public_key(&self) -> &[u8] { + match self.cpace_trezor_public_key.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_cpace_trezor_public_key(&mut self) { + self.cpace_trezor_public_key = ::std::option::Option::None; + } + + pub fn has_cpace_trezor_public_key(&self) -> bool { + self.cpace_trezor_public_key.is_some() + } + + // Param is passed by value, moved + pub fn set_cpace_trezor_public_key(&mut self, v: ::std::vec::Vec) { + self.cpace_trezor_public_key = ::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_cpace_trezor_public_key(&mut self) -> &mut ::std::vec::Vec { + if self.cpace_trezor_public_key.is_none() { + self.cpace_trezor_public_key = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.cpace_trezor_public_key.as_mut().unwrap() + } + + // Take field + pub fn take_cpace_trezor_public_key(&mut self) -> ::std::vec::Vec { + self.cpace_trezor_public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "cpace_trezor_public_key", + |m: &ThpCodeEntryCpaceTrezor| { &m.cpace_trezor_public_key }, + |m: &mut ThpCodeEntryCpaceTrezor| { &mut m.cpace_trezor_public_key }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCodeEntryCpaceTrezor", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCodeEntryCpaceTrezor { + const NAME: &'static str = "ThpCodeEntryCpaceTrezor"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.cpace_trezor_public_key = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.cpace_trezor_public_key.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.cpace_trezor_public_key.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCodeEntryCpaceTrezor { + ThpCodeEntryCpaceTrezor::new() + } + + fn clear(&mut self) { + self.cpace_trezor_public_key = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCodeEntryCpaceTrezor { + static instance: ThpCodeEntryCpaceTrezor = ThpCodeEntryCpaceTrezor { + cpace_trezor_public_key: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCodeEntryCpaceTrezor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCodeEntryCpaceTrezor").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCodeEntryCpaceTrezor { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCodeEntryCpaceTrezor { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCodeEntryCpaceHostTag) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCodeEntryCpaceHostTag { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntryCpaceHostTag.cpace_host_public_key) + pub cpace_host_public_key: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntryCpaceHostTag.tag) + pub tag: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCodeEntryCpaceHostTag.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCodeEntryCpaceHostTag { + fn default() -> &'a ThpCodeEntryCpaceHostTag { + ::default_instance() + } +} + +impl ThpCodeEntryCpaceHostTag { + pub fn new() -> ThpCodeEntryCpaceHostTag { + ::std::default::Default::default() + } + + // optional bytes cpace_host_public_key = 1; + + pub fn cpace_host_public_key(&self) -> &[u8] { + match self.cpace_host_public_key.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_cpace_host_public_key(&mut self) { + self.cpace_host_public_key = ::std::option::Option::None; + } + + pub fn has_cpace_host_public_key(&self) -> bool { + self.cpace_host_public_key.is_some() + } + + // Param is passed by value, moved + pub fn set_cpace_host_public_key(&mut self, v: ::std::vec::Vec) { + self.cpace_host_public_key = ::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_cpace_host_public_key(&mut self) -> &mut ::std::vec::Vec { + if self.cpace_host_public_key.is_none() { + self.cpace_host_public_key = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.cpace_host_public_key.as_mut().unwrap() + } + + // Take field + pub fn take_cpace_host_public_key(&mut self) -> ::std::vec::Vec { + self.cpace_host_public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes tag = 2; + + pub fn tag(&self) -> &[u8] { + match self.tag.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_tag(&mut self) { + self.tag = ::std::option::Option::None; + } + + pub fn has_tag(&self) -> bool { + self.tag.is_some() + } + + // Param is passed by value, moved + pub fn set_tag(&mut self, v: ::std::vec::Vec) { + self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec { + if self.tag.is_none() { + self.tag = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.tag.as_mut().unwrap() + } + + // Take field + pub fn take_tag(&mut self) -> ::std::vec::Vec { + self.tag.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "cpace_host_public_key", + |m: &ThpCodeEntryCpaceHostTag| { &m.cpace_host_public_key }, + |m: &mut ThpCodeEntryCpaceHostTag| { &mut m.cpace_host_public_key }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "tag", + |m: &ThpCodeEntryCpaceHostTag| { &m.tag }, + |m: &mut ThpCodeEntryCpaceHostTag| { &mut m.tag }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCodeEntryCpaceHostTag", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCodeEntryCpaceHostTag { + const NAME: &'static str = "ThpCodeEntryCpaceHostTag"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.cpace_host_public_key = ::std::option::Option::Some(is.read_bytes()?); + }, + 18 => { + self.tag = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.cpace_host_public_key.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.tag.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.cpace_host_public_key.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.tag.as_ref() { + os.write_bytes(2, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCodeEntryCpaceHostTag { + ThpCodeEntryCpaceHostTag::new() + } + + fn clear(&mut self) { + self.cpace_host_public_key = ::std::option::Option::None; + self.tag = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCodeEntryCpaceHostTag { + static instance: ThpCodeEntryCpaceHostTag = ThpCodeEntryCpaceHostTag { + cpace_host_public_key: ::std::option::Option::None, + tag: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCodeEntryCpaceHostTag { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCodeEntryCpaceHostTag").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCodeEntryCpaceHostTag { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCodeEntryCpaceHostTag { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCodeEntrySecret) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCodeEntrySecret { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCodeEntrySecret.secret) + pub secret: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCodeEntrySecret.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCodeEntrySecret { + fn default() -> &'a ThpCodeEntrySecret { + ::default_instance() + } +} + +impl ThpCodeEntrySecret { + pub fn new() -> ThpCodeEntrySecret { + ::std::default::Default::default() + } + + // optional bytes secret = 1; + + pub fn secret(&self) -> &[u8] { + match self.secret.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_secret(&mut self) { + self.secret = ::std::option::Option::None; + } + + pub fn has_secret(&self) -> bool { + self.secret.is_some() + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = ::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_secret(&mut self) -> &mut ::std::vec::Vec { + if self.secret.is_none() { + self.secret = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.secret.as_mut().unwrap() + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + self.secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "secret", + |m: &ThpCodeEntrySecret| { &m.secret }, + |m: &mut ThpCodeEntrySecret| { &mut m.secret }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCodeEntrySecret", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCodeEntrySecret { + const NAME: &'static str = "ThpCodeEntrySecret"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.secret = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.secret.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCodeEntrySecret { + ThpCodeEntrySecret::new() + } + + fn clear(&mut self) { + self.secret = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCodeEntrySecret { + static instance: ThpCodeEntrySecret = ThpCodeEntrySecret { + secret: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCodeEntrySecret { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCodeEntrySecret").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCodeEntrySecret { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCodeEntrySecret { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpQrCodeTag) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpQrCodeTag { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpQrCodeTag.tag) + pub tag: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpQrCodeTag.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpQrCodeTag { + fn default() -> &'a ThpQrCodeTag { + ::default_instance() + } +} + +impl ThpQrCodeTag { + pub fn new() -> ThpQrCodeTag { + ::std::default::Default::default() + } + + // optional bytes tag = 1; + + pub fn tag(&self) -> &[u8] { + match self.tag.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_tag(&mut self) { + self.tag = ::std::option::Option::None; + } + + pub fn has_tag(&self) -> bool { + self.tag.is_some() + } + + // Param is passed by value, moved + pub fn set_tag(&mut self, v: ::std::vec::Vec) { + self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec { + if self.tag.is_none() { + self.tag = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.tag.as_mut().unwrap() + } + + // Take field + pub fn take_tag(&mut self) -> ::std::vec::Vec { + self.tag.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "tag", + |m: &ThpQrCodeTag| { &m.tag }, + |m: &mut ThpQrCodeTag| { &mut m.tag }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpQrCodeTag", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpQrCodeTag { + const NAME: &'static str = "ThpQrCodeTag"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.tag = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.tag.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.tag.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpQrCodeTag { + ThpQrCodeTag::new() + } + + fn clear(&mut self) { + self.tag = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpQrCodeTag { + static instance: ThpQrCodeTag = ThpQrCodeTag { + tag: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpQrCodeTag { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpQrCodeTag").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpQrCodeTag { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpQrCodeTag { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpQrCodeSecret) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpQrCodeSecret { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpQrCodeSecret.secret) + pub secret: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpQrCodeSecret.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpQrCodeSecret { + fn default() -> &'a ThpQrCodeSecret { + ::default_instance() + } +} + +impl ThpQrCodeSecret { + pub fn new() -> ThpQrCodeSecret { + ::std::default::Default::default() + } + + // optional bytes secret = 1; + + pub fn secret(&self) -> &[u8] { + match self.secret.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_secret(&mut self) { + self.secret = ::std::option::Option::None; + } + + pub fn has_secret(&self) -> bool { + self.secret.is_some() + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = ::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_secret(&mut self) -> &mut ::std::vec::Vec { + if self.secret.is_none() { + self.secret = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.secret.as_mut().unwrap() + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + self.secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "secret", + |m: &ThpQrCodeSecret| { &m.secret }, + |m: &mut ThpQrCodeSecret| { &mut m.secret }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpQrCodeSecret", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpQrCodeSecret { + const NAME: &'static str = "ThpQrCodeSecret"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.secret = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.secret.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpQrCodeSecret { + ThpQrCodeSecret::new() + } + + fn clear(&mut self) { + self.secret = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpQrCodeSecret { + static instance: ThpQrCodeSecret = ThpQrCodeSecret { + secret: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpQrCodeSecret { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpQrCodeSecret").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpQrCodeSecret { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpQrCodeSecret { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpNfcTagHost) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpNfcTagHost { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpNfcTagHost.tag) + pub tag: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpNfcTagHost.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpNfcTagHost { + fn default() -> &'a ThpNfcTagHost { + ::default_instance() + } +} + +impl ThpNfcTagHost { + pub fn new() -> ThpNfcTagHost { + ::std::default::Default::default() + } + + // optional bytes tag = 1; + + pub fn tag(&self) -> &[u8] { + match self.tag.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_tag(&mut self) { + self.tag = ::std::option::Option::None; + } + + pub fn has_tag(&self) -> bool { + self.tag.is_some() + } + + // Param is passed by value, moved + pub fn set_tag(&mut self, v: ::std::vec::Vec) { + self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec { + if self.tag.is_none() { + self.tag = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.tag.as_mut().unwrap() + } + + // Take field + pub fn take_tag(&mut self) -> ::std::vec::Vec { + self.tag.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "tag", + |m: &ThpNfcTagHost| { &m.tag }, + |m: &mut ThpNfcTagHost| { &mut m.tag }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpNfcTagHost", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpNfcTagHost { + const NAME: &'static str = "ThpNfcTagHost"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.tag = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.tag.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.tag.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpNfcTagHost { + ThpNfcTagHost::new() + } + + fn clear(&mut self) { + self.tag = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpNfcTagHost { + static instance: ThpNfcTagHost = ThpNfcTagHost { + tag: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpNfcTagHost { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpNfcTagHost").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpNfcTagHost { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpNfcTagHost { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpNfcTagTrezor) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpNfcTagTrezor { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpNfcTagTrezor.tag) + pub tag: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpNfcTagTrezor.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpNfcTagTrezor { + fn default() -> &'a ThpNfcTagTrezor { + ::default_instance() + } +} + +impl ThpNfcTagTrezor { + pub fn new() -> ThpNfcTagTrezor { + ::std::default::Default::default() + } + + // optional bytes tag = 1; + + pub fn tag(&self) -> &[u8] { + match self.tag.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_tag(&mut self) { + self.tag = ::std::option::Option::None; + } + + pub fn has_tag(&self) -> bool { + self.tag.is_some() + } + + // Param is passed by value, moved + pub fn set_tag(&mut self, v: ::std::vec::Vec) { + self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec { + if self.tag.is_none() { + self.tag = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.tag.as_mut().unwrap() + } + + // Take field + pub fn take_tag(&mut self) -> ::std::vec::Vec { + self.tag.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "tag", + |m: &ThpNfcTagTrezor| { &m.tag }, + |m: &mut ThpNfcTagTrezor| { &mut m.tag }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpNfcTagTrezor", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpNfcTagTrezor { + const NAME: &'static str = "ThpNfcTagTrezor"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.tag = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.tag.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.tag.as_ref() { + os.write_bytes(1, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpNfcTagTrezor { + ThpNfcTagTrezor::new() + } + + fn clear(&mut self) { + self.tag = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpNfcTagTrezor { + static instance: ThpNfcTagTrezor = ThpNfcTagTrezor { + tag: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpNfcTagTrezor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpNfcTagTrezor").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpNfcTagTrezor { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpNfcTagTrezor { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCredentialRequest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCredentialRequest { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialRequest.host_static_pubkey) + pub host_static_pubkey: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialRequest.autoconnect) + pub autoconnect: ::std::option::Option, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialRequest.credential) + pub credential: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCredentialRequest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCredentialRequest { + fn default() -> &'a ThpCredentialRequest { + ::default_instance() + } +} + +impl ThpCredentialRequest { + pub fn new() -> ThpCredentialRequest { + ::std::default::Default::default() + } + + // optional bytes host_static_pubkey = 1; + + pub fn host_static_pubkey(&self) -> &[u8] { + match self.host_static_pubkey.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_host_static_pubkey(&mut self) { + self.host_static_pubkey = ::std::option::Option::None; + } + + pub fn has_host_static_pubkey(&self) -> bool { + self.host_static_pubkey.is_some() + } + + // Param is passed by value, moved + pub fn set_host_static_pubkey(&mut self, v: ::std::vec::Vec) { + self.host_static_pubkey = ::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_host_static_pubkey(&mut self) -> &mut ::std::vec::Vec { + if self.host_static_pubkey.is_none() { + self.host_static_pubkey = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.host_static_pubkey.as_mut().unwrap() + } + + // Take field + pub fn take_host_static_pubkey(&mut self) -> ::std::vec::Vec { + self.host_static_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bool autoconnect = 2; + + pub fn autoconnect(&self) -> bool { + self.autoconnect.unwrap_or(false) + } + + pub fn clear_autoconnect(&mut self) { + self.autoconnect = ::std::option::Option::None; + } + + pub fn has_autoconnect(&self) -> bool { + self.autoconnect.is_some() + } + + // Param is passed by value, moved + pub fn set_autoconnect(&mut self, v: bool) { + self.autoconnect = ::std::option::Option::Some(v); + } + + // optional bytes credential = 3; + + pub fn credential(&self) -> &[u8] { + match self.credential.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_credential(&mut self) { + self.credential = ::std::option::Option::None; + } + + pub fn has_credential(&self) -> bool { + self.credential.is_some() + } + + // Param is passed by value, moved + pub fn set_credential(&mut self, v: ::std::vec::Vec) { + self.credential = ::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_credential(&mut self) -> &mut ::std::vec::Vec { + if self.credential.is_none() { + self.credential = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.credential.as_mut().unwrap() + } + + // Take field + pub fn take_credential(&mut self) -> ::std::vec::Vec { + self.credential.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "host_static_pubkey", + |m: &ThpCredentialRequest| { &m.host_static_pubkey }, + |m: &mut ThpCredentialRequest| { &mut m.host_static_pubkey }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "autoconnect", + |m: &ThpCredentialRequest| { &m.autoconnect }, + |m: &mut ThpCredentialRequest| { &mut m.autoconnect }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "credential", + |m: &ThpCredentialRequest| { &m.credential }, + |m: &mut ThpCredentialRequest| { &mut m.credential }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCredentialRequest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCredentialRequest { + const NAME: &'static str = "ThpCredentialRequest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.host_static_pubkey = ::std::option::Option::Some(is.read_bytes()?); + }, + 16 => { + self.autoconnect = ::std::option::Option::Some(is.read_bool()?); + }, + 26 => { + self.credential = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.host_static_pubkey.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.autoconnect { + my_size += 1 + 1; + } + if let Some(v) = self.credential.as_ref() { + my_size += ::protobuf::rt::bytes_size(3, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.host_static_pubkey.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.autoconnect { + os.write_bool(2, v)?; + } + if let Some(v) = self.credential.as_ref() { + os.write_bytes(3, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCredentialRequest { + ThpCredentialRequest::new() + } + + fn clear(&mut self) { + self.host_static_pubkey = ::std::option::Option::None; + self.autoconnect = ::std::option::Option::None; + self.credential = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCredentialRequest { + static instance: ThpCredentialRequest = ThpCredentialRequest { + host_static_pubkey: ::std::option::Option::None, + autoconnect: ::std::option::Option::None, + credential: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCredentialRequest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCredentialRequest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCredentialRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCredentialRequest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCredentialResponse) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpCredentialResponse { + // message fields + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialResponse.trezor_static_pubkey) + pub trezor_static_pubkey: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialResponse.credential) + pub credential: ::std::option::Option<::std::vec::Vec>, + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCredentialResponse.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpCredentialResponse { + fn default() -> &'a ThpCredentialResponse { + ::default_instance() + } +} + +impl ThpCredentialResponse { + pub fn new() -> ThpCredentialResponse { + ::std::default::Default::default() + } + + // optional bytes trezor_static_pubkey = 1; + + pub fn trezor_static_pubkey(&self) -> &[u8] { + match self.trezor_static_pubkey.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_trezor_static_pubkey(&mut self) { + self.trezor_static_pubkey = ::std::option::Option::None; + } + + pub fn has_trezor_static_pubkey(&self) -> bool { + self.trezor_static_pubkey.is_some() + } + + // Param is passed by value, moved + pub fn set_trezor_static_pubkey(&mut self, v: ::std::vec::Vec) { + self.trezor_static_pubkey = ::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_trezor_static_pubkey(&mut self) -> &mut ::std::vec::Vec { + if self.trezor_static_pubkey.is_none() { + self.trezor_static_pubkey = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.trezor_static_pubkey.as_mut().unwrap() + } + + // Take field + pub fn take_trezor_static_pubkey(&mut self) -> ::std::vec::Vec { + self.trezor_static_pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes credential = 2; + + pub fn credential(&self) -> &[u8] { + match self.credential.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_credential(&mut self) { + self.credential = ::std::option::Option::None; + } + + pub fn has_credential(&self) -> bool { + self.credential.is_some() + } + + // Param is passed by value, moved + pub fn set_credential(&mut self, v: ::std::vec::Vec) { + self.credential = ::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_credential(&mut self) -> &mut ::std::vec::Vec { + if self.credential.is_none() { + self.credential = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.credential.as_mut().unwrap() + } + + // Take field + pub fn take_credential(&mut self) -> ::std::vec::Vec { + self.credential.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "trezor_static_pubkey", + |m: &ThpCredentialResponse| { &m.trezor_static_pubkey }, + |m: &mut ThpCredentialResponse| { &mut m.trezor_static_pubkey }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "credential", + |m: &ThpCredentialResponse| { &m.credential }, + |m: &mut ThpCredentialResponse| { &mut m.credential }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpCredentialResponse", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpCredentialResponse { + const NAME: &'static str = "ThpCredentialResponse"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.trezor_static_pubkey = ::std::option::Option::Some(is.read_bytes()?); + }, + 18 => { + self.credential = ::std::option::Option::Some(is.read_bytes()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.trezor_static_pubkey.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(v) = self.credential.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.trezor_static_pubkey.as_ref() { + os.write_bytes(1, v)?; + } + if let Some(v) = self.credential.as_ref() { + os.write_bytes(2, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpCredentialResponse { + ThpCredentialResponse::new() + } + + fn clear(&mut self) { + self.trezor_static_pubkey = ::std::option::Option::None; + self.credential = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpCredentialResponse { + static instance: ThpCredentialResponse = ThpCredentialResponse { + trezor_static_pubkey: ::std::option::Option::None, + credential: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpCredentialResponse { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpCredentialResponse").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpCredentialResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpCredentialResponse { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpEndRequest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpEndRequest { + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpEndRequest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpEndRequest { + fn default() -> &'a ThpEndRequest { + ::default_instance() + } +} + +impl ThpEndRequest { + pub fn new() -> ThpEndRequest { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(0); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpEndRequest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpEndRequest { + const NAME: &'static str = "ThpEndRequest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpEndRequest { + ThpEndRequest::new() + } + + fn clear(&mut self) { + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpEndRequest { + static instance: ThpEndRequest = ThpEndRequest { + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpEndRequest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpEndRequest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpEndRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpEndRequest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpEndResponse) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ThpEndResponse { + // special fields + // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpEndResponse.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a ThpEndResponse { + fn default() -> &'a ThpEndResponse { + ::default_instance() + } +} + +impl ThpEndResponse { + pub fn new() -> ThpEndResponse { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(0); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ThpEndResponse", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for ThpEndResponse { + const NAME: &'static str = "ThpEndResponse"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ThpEndResponse { + ThpEndResponse::new() + } + + fn clear(&mut self) { + self.special_fields.clear(); + } + + fn default_instance() -> &'static ThpEndResponse { + static instance: ThpEndResponse = ThpEndResponse { + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ThpEndResponse { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ThpEndResponse").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ThpEndResponse { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ThpEndResponse { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + // @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpCredentialMetadata) #[derive(PartialEq,Clone,Default,Debug)] pub struct ThpCredentialMetadata { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialMetadata.host_name) pub host_name: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpCredentialMetadata.autoconnect) + pub autoconnect: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpCredentialMetadata.special_fields) pub special_fields: ::protobuf::SpecialFields, @@ -82,14 +3415,38 @@ impl ThpCredentialMetadata { self.host_name.take().unwrap_or_else(|| ::std::string::String::new()) } + // optional bool autoconnect = 2; + + pub fn autoconnect(&self) -> bool { + self.autoconnect.unwrap_or(false) + } + + pub fn clear_autoconnect(&mut self) { + self.autoconnect = ::std::option::Option::None; + } + + pub fn has_autoconnect(&self) -> bool { + self.autoconnect.is_some() + } + + // Param is passed by value, moved + pub fn set_autoconnect(&mut self, v: bool) { + self.autoconnect = ::std::option::Option::Some(v); + } + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); + let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "host_name", |m: &ThpCredentialMetadata| { &m.host_name }, |m: &mut ThpCredentialMetadata| { &mut m.host_name }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "autoconnect", + |m: &ThpCredentialMetadata| { &m.autoconnect }, + |m: &mut ThpCredentialMetadata| { &mut m.autoconnect }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ThpCredentialMetadata", fields, @@ -111,6 +3468,9 @@ impl ::protobuf::Message for ThpCredentialMetadata { 10 => { self.host_name = ::std::option::Option::Some(is.read_string()?); }, + 16 => { + self.autoconnect = ::std::option::Option::Some(is.read_bool()?); + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -126,6 +3486,9 @@ impl ::protobuf::Message for ThpCredentialMetadata { if let Some(v) = self.host_name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } + if let Some(v) = self.autoconnect { + my_size += 1 + 1; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -135,6 +3498,9 @@ impl ::protobuf::Message for ThpCredentialMetadata { if let Some(v) = self.host_name.as_ref() { os.write_string(1, v)?; } + if let Some(v) = self.autoconnect { + os.write_bool(2, v)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -153,12 +3519,14 @@ impl ::protobuf::Message for ThpCredentialMetadata { fn clear(&mut self) { self.host_name = ::std::option::Option::None; + self.autoconnect = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ThpCredentialMetadata { static instance: ThpCredentialMetadata = ThpCredentialMetadata { host_name: ::std::option::Option::None, + autoconnect: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -536,17 +3904,130 @@ impl ::protobuf::reflect::ProtobufValue for ThpAuthenticatedCredentialData { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:hw.trezor.messages.thp.ThpPairingMethod) +pub enum ThpPairingMethod { + // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.SkipPairing) + SkipPairing = 1, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.CodeEntry) + CodeEntry = 2, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.QrCode) + QrCode = 3, + // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.NFC) + NFC = 4, +} + +impl ::protobuf::Enum for ThpPairingMethod { + const NAME: &'static str = "ThpPairingMethod"; + + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 1 => ::std::option::Option::Some(ThpPairingMethod::SkipPairing), + 2 => ::std::option::Option::Some(ThpPairingMethod::CodeEntry), + 3 => ::std::option::Option::Some(ThpPairingMethod::QrCode), + 4 => ::std::option::Option::Some(ThpPairingMethod::NFC), + _ => ::std::option::Option::None + } + } + + fn from_str(str: &str) -> ::std::option::Option { + match str { + "SkipPairing" => ::std::option::Option::Some(ThpPairingMethod::SkipPairing), + "CodeEntry" => ::std::option::Option::Some(ThpPairingMethod::CodeEntry), + "QrCode" => ::std::option::Option::Some(ThpPairingMethod::QrCode), + "NFC" => ::std::option::Option::Some(ThpPairingMethod::NFC), + _ => ::std::option::Option::None + } + } + + const VALUES: &'static [ThpPairingMethod] = &[ + ThpPairingMethod::SkipPairing, + ThpPairingMethod::CodeEntry, + ThpPairingMethod::QrCode, + ThpPairingMethod::NFC, + ]; +} + +impl ::protobuf::EnumFull for ThpPairingMethod { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("ThpPairingMethod").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = match self { + ThpPairingMethod::SkipPairing => 0, + ThpPairingMethod::CodeEntry => 1, + ThpPairingMethod::QrCode => 2, + ThpPairingMethod::NFC => 3, + }; + Self::enum_descriptor().value_by_index(index) + } +} + +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for ThpPairingMethod { + fn default() -> Self { + ThpPairingMethod::SkipPairing + } +} + +impl ThpPairingMethod { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ThpPairingMethod") + } +} + static file_descriptor_proto_data: &'static [u8] = b"\ \n\x12messages-thp.proto\x12\x16hw.trezor.messages.thp\x1a\roptions.prot\ - o\":\n\x15ThpCredentialMetadata\x12\x1b\n\thost_name\x18\x01\x20\x01(\tR\ - \x08hostName:\x04\x98\xb2\x19\x01\"\x82\x01\n\x14ThpPairingCredential\ - \x12R\n\rcred_metadata\x18\x01\x20\x01(\x0b2-.hw.trezor.messages.thp.Thp\ - CredentialMetadataR\x0ccredMetadata\x12\x10\n\x03mac\x18\x02\x20\x01(\ - \x0cR\x03mac:\x04\x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredent\ - ialData\x12,\n\x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStatic\ - Pubkey\x12R\n\rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.t\ - hp.ThpCredentialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01B;\n#com.s\ - atoshilabs.trezor.lib.protobufB\x10TrezorMessageThp\x80\xa6\x1d\x01\ + o\"\xa0\x02\n\x13ThpDeviceProperties\x12%\n\x0einternal_model\x18\x01\ + \x20\x01(\tR\rinternalModel\x12#\n\rmodel_variant\x18\x02\x20\x01(\rR\ + \x0cmodelVariant\x124\n\x16protocol_version_major\x18\x03\x20\x01(\rR\ + \x14protocolVersionMajor\x124\n\x16protocol_version_minor\x18\x04\x20\ + \x01(\rR\x14protocolVersionMinor\x12Q\n\x0fpairing_methods\x18\x05\x20\ + \x03(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x0epairingMethods\"\ + _\n%ThpHandshakeCompletionReqNoisePayload\x126\n\x17host_pairing_credent\ + ial\x18\x01\x20\x01(\x0cR\x15hostPairingCredential\"y\n\x13ThpCreateNewS\ + ession\x12\x1e\n\npassphrase\x18\x01\x20\x01(\tR\npassphrase\x12\x1b\n\t\ + on_device\x18\x02\x20\x01(\x08R\x08onDevice\x12%\n\x0ederive_cardano\x18\ + \x03\x20\x01(\x08R\rderiveCardano\"0\n\x11ThpPairingRequest\x12\x1b\n\th\ + ost_name\x18\x01\x20\x01(\tR\x08hostName\"\x1b\n\x19ThpPairingRequestApp\ + roved\"s\n\x0fThpSelectMethod\x12`\n\x17selected_pairing_method\x18\x01\ + \x20\x01(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x15selectedPair\ + ingMethod\"\x20\n\x1eThpPairingPreparationsFinished\"8\n\x16ThpCodeEntry\ + Commitment\x12\x1e\n\ncommitment\x18\x01\x20\x01(\x0cR\ncommitment\"5\n\ + \x15ThpCodeEntryChallenge\x12\x1c\n\tchallenge\x18\x01\x20\x01(\x0cR\tch\ + allenge\"P\n\x17ThpCodeEntryCpaceTrezor\x125\n\x17cpace_trezor_public_ke\ + y\x18\x01\x20\x01(\x0cR\x14cpaceTrezorPublicKey\"_\n\x18ThpCodeEntryCpac\ + eHostTag\x121\n\x15cpace_host_public_key\x18\x01\x20\x01(\x0cR\x12cpaceH\ + ostPublicKey\x12\x10\n\x03tag\x18\x02\x20\x01(\x0cR\x03tag\",\n\x12ThpCo\ + deEntrySecret\x12\x16\n\x06secret\x18\x01\x20\x01(\x0cR\x06secret\"\x20\ + \n\x0cThpQrCodeTag\x12\x10\n\x03tag\x18\x01\x20\x01(\x0cR\x03tag\")\n\ + \x0fThpQrCodeSecret\x12\x16\n\x06secret\x18\x01\x20\x01(\x0cR\x06secret\ + \"!\n\rThpNfcTagHost\x12\x10\n\x03tag\x18\x01\x20\x01(\x0cR\x03tag\"#\n\ + \x0fThpNfcTagTrezor\x12\x10\n\x03tag\x18\x01\x20\x01(\x0cR\x03tag\"\x86\ + \x01\n\x14ThpCredentialRequest\x12,\n\x12host_static_pubkey\x18\x01\x20\ + \x01(\x0cR\x10hostStaticPubkey\x12\x20\n\x0bautoconnect\x18\x02\x20\x01(\ + \x08R\x0bautoconnect\x12\x1e\n\ncredential\x18\x03\x20\x01(\x0cR\ncreden\ + tial\"i\n\x15ThpCredentialResponse\x120\n\x14trezor_static_pubkey\x18\ + \x01\x20\x01(\x0cR\x12trezorStaticPubkey\x12\x1e\n\ncredential\x18\x02\ + \x20\x01(\x0cR\ncredential\"\x0f\n\rThpEndRequest\"\x10\n\x0eThpEndRespo\ + nse\"\\\n\x15ThpCredentialMetadata\x12\x1b\n\thost_name\x18\x01\x20\x01(\ + \tR\x08hostName\x12\x20\n\x0bautoconnect\x18\x02\x20\x01(\x08R\x0bautoco\ + nnect:\x04\x98\xb2\x19\x01\"\x82\x01\n\x14ThpPairingCredential\x12R\n\rc\ + red_metadata\x18\x01\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredential\ + MetadataR\x0ccredMetadata\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\x03mac:\ + \x04\x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\ + \n\x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\ + \n\rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCrede\ + ntialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*G\n\x10ThpPairingMet\ + hod\x12\x0f\n\x0bSkipPairing\x10\x01\x12\r\n\tCodeEntry\x10\x02\x12\n\n\ + \x06QrCode\x10\x03\x12\x07\n\x03NFC\x10\x04B;\n#com.satoshilabs.trezor.l\ + ib.protobufB\x10TrezorMessageThp\x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -565,11 +4046,32 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(1); deps.push(super::options::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(3); + let mut messages = ::std::vec::Vec::with_capacity(23); + messages.push(ThpDeviceProperties::generated_message_descriptor_data()); + messages.push(ThpHandshakeCompletionReqNoisePayload::generated_message_descriptor_data()); + messages.push(ThpCreateNewSession::generated_message_descriptor_data()); + messages.push(ThpPairingRequest::generated_message_descriptor_data()); + messages.push(ThpPairingRequestApproved::generated_message_descriptor_data()); + messages.push(ThpSelectMethod::generated_message_descriptor_data()); + messages.push(ThpPairingPreparationsFinished::generated_message_descriptor_data()); + messages.push(ThpCodeEntryCommitment::generated_message_descriptor_data()); + messages.push(ThpCodeEntryChallenge::generated_message_descriptor_data()); + messages.push(ThpCodeEntryCpaceTrezor::generated_message_descriptor_data()); + messages.push(ThpCodeEntryCpaceHostTag::generated_message_descriptor_data()); + messages.push(ThpCodeEntrySecret::generated_message_descriptor_data()); + messages.push(ThpQrCodeTag::generated_message_descriptor_data()); + messages.push(ThpQrCodeSecret::generated_message_descriptor_data()); + messages.push(ThpNfcTagHost::generated_message_descriptor_data()); + messages.push(ThpNfcTagTrezor::generated_message_descriptor_data()); + messages.push(ThpCredentialRequest::generated_message_descriptor_data()); + messages.push(ThpCredentialResponse::generated_message_descriptor_data()); + messages.push(ThpEndRequest::generated_message_descriptor_data()); + messages.push(ThpEndResponse::generated_message_descriptor_data()); messages.push(ThpCredentialMetadata::generated_message_descriptor_data()); messages.push(ThpPairingCredential::generated_message_descriptor_data()); messages.push(ThpAuthenticatedCredentialData::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(ThpPairingMethod::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, diff --git a/rust/trezor-client/src/protos/mod.rs b/rust/trezor-client/src/protos/mod.rs index 2d402cc3fd..4c029c36dd 100644 --- a/rust/trezor-client/src/protos/mod.rs +++ b/rust/trezor-client/src/protos/mod.rs @@ -24,6 +24,7 @@ mod generated { messages_definitions messages_management messages_benchmark + messages_thp options "bitcoin" => messages_bitcoin