1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-06 02:16:07 +00:00

feat(core): add BLE unpair command & message

[no changelog]
This commit is contained in:
tychovrahe 2025-03-27 19:00:36 +01:00 committed by TychoVrahe
parent 51ff4f5946
commit 4adf6d087d
23 changed files with 628 additions and 227 deletions

View File

@ -0,0 +1,22 @@
syntax = "proto2";
package hw.trezor.messages.ble;
// Sugar for easier handling in Java
option java_package = "com.satoshilabs.trezor.lib.protobuf";
option java_outer_classname = "TrezorMessageBle";
import "options.proto";
option (include_in_bitcoin_only) = true;
/**
* Request: erases bond for currently connected device
* @start
* @next Success
* @next Failure
*/
message BleUnpair {
optional bool all = 1; // whether to erase bonds for all devices
}

View File

@ -88,6 +88,9 @@ enum MessageType {
MessageType_FirmwareRequest = 8 [(bitcoin_only) = true, (wire_out) = true, (wire_bootloader) = true];
MessageType_ProdTestT1 = 32 [(bitcoin_only) = true, (wire_in) = true, (wire_bootloader) = true];
// BLE
MessageType_BleUnpair = 8001 [(bitcoin_only) = true, (wire_in) = true];
// Bitcoin
MessageType_GetPublicKey = 11 [(bitcoin_only) = true, (wire_in) = true];
MessageType_PublicKey = 12 [(bitcoin_only) = true, (wire_out) = true];

View File

@ -133,6 +133,9 @@ static void _librust_qstrs(void) {
MP_QSTR_bitcoin__unverified_external_inputs;
MP_QSTR_bitcoin__valid_signature;
MP_QSTR_bitcoin__voting_rights;
MP_QSTR_ble__unpair_all;
MP_QSTR_ble__unpair_current;
MP_QSTR_ble__unpair_title;
MP_QSTR_ble_event;
MP_QSTR_bootscreen;
MP_QSTR_br_code;

View File

@ -1404,6 +1404,9 @@ pub enum TranslatedString {
instructions__tap_to_continue = 991, // "Tap to continue"
#[cfg(feature = "universal_fw")]
nostr__event_kind_template = 992, // "Event kind: {0}"
ble__unpair_all = 993, // "Unpair all bluetooth devices"
ble__unpair_current = 994, // "Unpair connected device"
ble__unpair_title = 995, // "Unpair"
}
impl TranslatedString {
@ -2804,6 +2807,9 @@ impl TranslatedString {
Self::instructions__tap_to_continue => "Tap to continue",
#[cfg(feature = "universal_fw")]
Self::nostr__event_kind_template => "Event kind: {0}",
Self::ble__unpair_all => "Unpair all bluetooth devices",
Self::ble__unpair_current => "Unpair connected device",
Self::ble__unpair_title => "Unpair",
}
}
@ -4203,6 +4209,9 @@ impl TranslatedString {
Qstr::MP_QSTR_instructions__tap_to_continue => Some(Self::instructions__tap_to_continue),
#[cfg(feature = "universal_fw")]
Qstr::MP_QSTR_nostr__event_kind_template => Some(Self::nostr__event_kind_template),
Qstr::MP_QSTR_ble__unpair_all => Some(Self::ble__unpair_all),
Qstr::MP_QSTR_ble__unpair_current => Some(Self::ble__unpair_current),
Qstr::MP_QSTR_ble__unpair_title => Some(Self::ble__unpair_title),
_ => None,
}
}

View File

@ -80,6 +80,9 @@ class TR:
bitcoin__unverified_external_inputs: str = "The transaction contains unverified external inputs."
bitcoin__valid_signature: str = "The signature is valid."
bitcoin__voting_rights: str = "Voting rights to"
ble__unpair_all: str = "Unpair all bluetooth devices"
ble__unpair_current: str = "Unpair connected device"
ble__unpair_title: str = "Unpair"
brightness__change_title: str = "Change display brightness"
brightness__changed_title: str = "Display brightness changed"
brightness__title: str = "Display brightness"

View File

@ -369,6 +369,8 @@ apps.management.authenticate_device
import apps.management.authenticate_device
apps.management.backup_device
import apps.management.backup_device
apps.management.ble.unpair
import apps.management.ble.unpair
apps.management.change_language
import apps.management.change_language
apps.management.change_pin

View File

@ -0,0 +1,27 @@
from trezorio import ble
from typing import TYPE_CHECKING
from trezor import TR
if TYPE_CHECKING:
from trezor.messages import BleUnpair
async def unpair(msg: BleUnpair) -> None:
from trezor.messages import Success
from trezor.ui.layouts import confirm_action
from trezor.wire.context import get_context
if msg.all:
await confirm_action("erase bonds", TR.ble__unpair_title, TR.ble__unpair_all)
else:
await confirm_action("unpair", TR.ble__unpair_title, TR.ble__unpair_current)
ctx = get_context()
await ctx.write(Success(message="Erasing.."))
if msg.all:
ble.erase_bonds()
else:
ble.unpair()

View File

@ -76,6 +76,10 @@ def _find_message_handler_module(msg_type: int) -> str:
if utils.USE_OPTIGA and msg_type == MessageType.AuthenticateDevice:
return "apps.management.authenticate_device"
if utils.USE_BLE:
if msg_type == MessageType.BleUnpair:
return "apps.management.ble.unpair"
# bitcoin
if msg_type == MessageType.AuthorizeCoinJoin:
return "apps.bitcoin.authorize_coinjoin"

View File

@ -60,6 +60,7 @@ FirmwareErase = 6
FirmwareUpload = 7
FirmwareRequest = 8
ProdTestT1 = 32
BleUnpair = 8001
GetPublicKey = 11
PublicKey = 12
SignTx = 15

View File

@ -409,6 +409,7 @@ if TYPE_CHECKING:
FirmwareUpload = 7
FirmwareRequest = 8
ProdTestT1 = 32
BleUnpair = 8001
GetPublicKey = 11
PublicKey = 12
SignTx = 15

View File

@ -1256,6 +1256,20 @@ if TYPE_CHECKING:
def is_type_of(cls, msg: Any) -> TypeGuard["TxAckPrevExtraDataWrapper"]:
return isinstance(msg, cls)
class BleUnpair(protobuf.MessageType):
all: "bool | None"
def __init__(
self,
*,
all: "bool | None" = None,
) -> None:
pass
@classmethod
def is_type_of(cls, msg: Any) -> TypeGuard["BleUnpair"]:
return isinstance(msg, cls)
class CardanoBlockchainPointerType(protobuf.MessageType):
block_index: "int"
tx_index: "int"

View File

@ -82,6 +82,9 @@
"bitcoin__unverified_external_inputs": "The transaction contains unverified external inputs.",
"bitcoin__valid_signature": "The signature is valid.",
"bitcoin__voting_rights": "Voting rights to",
"ble__unpair_title": "Unpair",
"ble__unpair_current": "Unpair connected device",
"ble__unpair_all": "Unpair all bluetooth devices",
"brightness__change_title": "Change display brightness",
"brightness__changed_title": "Display brightness changed",
"brightness__title": "Display brightness",

View File

@ -991,5 +991,8 @@
"989": "solana__stake_on_question",
"990": "sign_message__confirm_without_review",
"991": "instructions__tap_to_continue",
"992": "nostr__event_kind_template"
"992": "nostr__event_kind_template",
"993": "ble__unpair_all",
"994": "ble__unpair_current",
"995": "ble__unpair_title"
}

View File

@ -1,8 +1,8 @@
{
"current": {
"merkle_root": "fbbdd04c752b339e663b9b78ebcc09546594775721fc21c09e703d2101b08513",
"datetime": "2025-03-11T23:56:45.371231",
"commit": "ec4fbecc1dd87cc758654eb00635a7c2826e9cba"
"merkle_root": "136cfad983788597b6218f51a94b93b14535f20111dc91aa953e6e9df462ab16",
"datetime": "2025-03-27T18:08:46.572012",
"commit": "b340d6c7b21d110b8bb4478c654b293bd3a977f0"
},
"history": [
{

View File

@ -13,7 +13,8 @@ SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdPro
ChangeLanguage TranslationDataRequest TranslationDataAck \
SetBrightness DebugLinkOptigaSetSecMax EntropyCheckReady EntropyCheckContinue \
BenchmarkListNames BenchmarkRun BenchmarkNames BenchmarkResult \
NostrGetPubkey NostrPubkey NostrSignEvent NostrEventSignature
NostrGetPubkey NostrPubkey NostrSignEvent NostrEventSignature \
BleUnpair
ifeq ($(BITCOIN_ONLY), 1)
SKIPPED_MESSAGES += Ethereum NEM Stellar

View File

@ -0,0 +1,21 @@
import typing as t
from . import messages
from .tools import session
if t.TYPE_CHECKING:
from ..client import TrezorClient
@session
def unpair(
client: "TrezorClient",
all: bool,
):
resp = client.call(messages.BleUnpair(all=all))
if isinstance(resp, messages.Success):
return
else:
raise RuntimeError(f"Unexpected message {resp}")

View File

@ -0,0 +1,55 @@
# This file is part of the Trezor project.
#
# Copyright (C) 2012-2022 SatoshiLabs and contributors
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the License along with this library.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
import sys
from typing import TYPE_CHECKING
import click
from .. import ble, exceptions
from . import with_client
if TYPE_CHECKING:
from ..client import TrezorClient
@click.group(name="ble")
def cli() -> None:
"""BLE commands."""
@cli.command()
@click.option(
"-a",
"--all",
help="Erase all bonds.",
is_flag=True,
)
@with_client
def unpair(
client: "TrezorClient",
all: bool,
) -> None:
"""Erase bond of currently connected device, or all devices (on device side)"""
try:
ble.unpair(client, all)
click.echo("Unpair successful.")
except exceptions.Cancelled:
click.echo("Unpair cancelled on device.")
except exceptions.TrezorException as e:
click.echo(f"Unpair failed: {e}")
sys.exit(3)

View File

@ -33,6 +33,7 @@ from . import (
TrezorConnection,
benchmark,
binance,
ble,
btc,
cardano,
crypto,
@ -420,6 +421,7 @@ cli.add_command(tezos.cli)
cli.add_command(firmware.cli)
cli.add_command(debug.cli)
cli.add_command(benchmark.cli)
cli.add_command(ble.cli)
#
# Main

View File

@ -462,6 +462,7 @@ class MessageType(IntEnum):
FirmwareUpload = 7
FirmwareRequest = 8
ProdTestT1 = 32
BleUnpair = 8001
GetPublicKey = 11
PublicKey = 12
SignTx = 15
@ -2207,6 +2208,20 @@ class TxAckPrevExtraDataWrapper(protobuf.MessageType):
self.extra_data_chunk = extra_data_chunk
class BleUnpair(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 8001
FIELDS = {
1: protobuf.Field("all", "bool", repeated=False, required=False, default=None),
}
def __init__(
self,
*,
all: Optional["bool"] = None,
) -> None:
self.all = all
class FirmwareErase(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 6
FIELDS = {

View File

@ -60,6 +60,7 @@ trezor_message_impl! {
FirmwareUpload => MessageType_FirmwareUpload,
FirmwareRequest => MessageType_FirmwareRequest,
ProdTestT1 => MessageType_ProdTestT1,
BleUnpair => MessageType_BleUnpair,
CipherKeyValue => MessageType_CipherKeyValue,
CipheredKeyValue => MessageType_CipheredKeyValue,
SignIdentity => MessageType_SignIdentity,

View File

@ -150,6 +150,8 @@ pub enum MessageType {
MessageType_FirmwareRequest = 8,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_ProdTestT1)
MessageType_ProdTestT1 = 32,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_BleUnpair)
MessageType_BleUnpair = 8001,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_GetPublicKey)
MessageType_GetPublicKey = 11,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_PublicKey)
@ -602,6 +604,7 @@ impl ::protobuf::Enum for MessageType {
7 => ::std::option::Option::Some(MessageType::MessageType_FirmwareUpload),
8 => ::std::option::Option::Some(MessageType::MessageType_FirmwareRequest),
32 => ::std::option::Option::Some(MessageType::MessageType_ProdTestT1),
8001 => ::std::option::Option::Some(MessageType::MessageType_BleUnpair),
11 => ::std::option::Option::Some(MessageType::MessageType_GetPublicKey),
12 => ::std::option::Option::Some(MessageType::MessageType_PublicKey),
15 => ::std::option::Option::Some(MessageType::MessageType_SignTx),
@ -859,6 +862,7 @@ impl ::protobuf::Enum for MessageType {
"MessageType_FirmwareUpload" => ::std::option::Option::Some(MessageType::MessageType_FirmwareUpload),
"MessageType_FirmwareRequest" => ::std::option::Option::Some(MessageType::MessageType_FirmwareRequest),
"MessageType_ProdTestT1" => ::std::option::Option::Some(MessageType::MessageType_ProdTestT1),
"MessageType_BleUnpair" => ::std::option::Option::Some(MessageType::MessageType_BleUnpair),
"MessageType_GetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_GetPublicKey),
"MessageType_PublicKey" => ::std::option::Option::Some(MessageType::MessageType_PublicKey),
"MessageType_SignTx" => ::std::option::Option::Some(MessageType::MessageType_SignTx),
@ -1115,6 +1119,7 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_FirmwareUpload,
MessageType::MessageType_FirmwareRequest,
MessageType::MessageType_ProdTestT1,
MessageType::MessageType_BleUnpair,
MessageType::MessageType_GetPublicKey,
MessageType::MessageType_PublicKey,
MessageType::MessageType_SignTx,
@ -1377,196 +1382,197 @@ impl ::protobuf::EnumFull for MessageType {
MessageType::MessageType_FirmwareUpload => 58,
MessageType::MessageType_FirmwareRequest => 59,
MessageType::MessageType_ProdTestT1 => 60,
MessageType::MessageType_GetPublicKey => 61,
MessageType::MessageType_PublicKey => 62,
MessageType::MessageType_SignTx => 63,
MessageType::MessageType_TxRequest => 64,
MessageType::MessageType_TxAck => 65,
MessageType::MessageType_GetAddress => 66,
MessageType::MessageType_Address => 67,
MessageType::MessageType_TxAckPaymentRequest => 68,
MessageType::MessageType_SignMessage => 69,
MessageType::MessageType_VerifyMessage => 70,
MessageType::MessageType_MessageSignature => 71,
MessageType::MessageType_GetOwnershipId => 72,
MessageType::MessageType_OwnershipId => 73,
MessageType::MessageType_GetOwnershipProof => 74,
MessageType::MessageType_OwnershipProof => 75,
MessageType::MessageType_AuthorizeCoinJoin => 76,
MessageType::MessageType_CipherKeyValue => 77,
MessageType::MessageType_CipheredKeyValue => 78,
MessageType::MessageType_SignIdentity => 79,
MessageType::MessageType_SignedIdentity => 80,
MessageType::MessageType_GetECDHSessionKey => 81,
MessageType::MessageType_ECDHSessionKey => 82,
MessageType::MessageType_DebugLinkDecision => 83,
MessageType::MessageType_DebugLinkGetState => 84,
MessageType::MessageType_DebugLinkState => 85,
MessageType::MessageType_DebugLinkStop => 86,
MessageType::MessageType_DebugLinkLog => 87,
MessageType::MessageType_DebugLinkMemoryRead => 88,
MessageType::MessageType_DebugLinkMemory => 89,
MessageType::MessageType_DebugLinkMemoryWrite => 90,
MessageType::MessageType_DebugLinkFlashErase => 91,
MessageType::MessageType_DebugLinkLayout => 92,
MessageType::MessageType_DebugLinkReseedRandom => 93,
MessageType::MessageType_DebugLinkRecordScreen => 94,
MessageType::MessageType_DebugLinkEraseSdCard => 95,
MessageType::MessageType_DebugLinkWatchLayout => 96,
MessageType::MessageType_DebugLinkResetDebugEvents => 97,
MessageType::MessageType_DebugLinkOptigaSetSecMax => 98,
MessageType::MessageType_EthereumGetPublicKey => 99,
MessageType::MessageType_EthereumPublicKey => 100,
MessageType::MessageType_EthereumGetAddress => 101,
MessageType::MessageType_EthereumAddress => 102,
MessageType::MessageType_EthereumSignTx => 103,
MessageType::MessageType_EthereumSignTxEIP1559 => 104,
MessageType::MessageType_EthereumTxRequest => 105,
MessageType::MessageType_EthereumTxAck => 106,
MessageType::MessageType_EthereumSignMessage => 107,
MessageType::MessageType_EthereumVerifyMessage => 108,
MessageType::MessageType_EthereumMessageSignature => 109,
MessageType::MessageType_EthereumSignTypedData => 110,
MessageType::MessageType_EthereumTypedDataStructRequest => 111,
MessageType::MessageType_EthereumTypedDataStructAck => 112,
MessageType::MessageType_EthereumTypedDataValueRequest => 113,
MessageType::MessageType_EthereumTypedDataValueAck => 114,
MessageType::MessageType_EthereumTypedDataSignature => 115,
MessageType::MessageType_EthereumSignTypedHash => 116,
MessageType::MessageType_NEMGetAddress => 117,
MessageType::MessageType_NEMAddress => 118,
MessageType::MessageType_NEMSignTx => 119,
MessageType::MessageType_NEMSignedTx => 120,
MessageType::MessageType_NEMDecryptMessage => 121,
MessageType::MessageType_NEMDecryptedMessage => 122,
MessageType::MessageType_TezosGetAddress => 123,
MessageType::MessageType_TezosAddress => 124,
MessageType::MessageType_TezosSignTx => 125,
MessageType::MessageType_TezosSignedTx => 126,
MessageType::MessageType_TezosGetPublicKey => 127,
MessageType::MessageType_TezosPublicKey => 128,
MessageType::MessageType_StellarSignTx => 129,
MessageType::MessageType_StellarTxOpRequest => 130,
MessageType::MessageType_StellarGetAddress => 131,
MessageType::MessageType_StellarAddress => 132,
MessageType::MessageType_StellarCreateAccountOp => 133,
MessageType::MessageType_StellarPaymentOp => 134,
MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 135,
MessageType::MessageType_StellarManageSellOfferOp => 136,
MessageType::MessageType_StellarCreatePassiveSellOfferOp => 137,
MessageType::MessageType_StellarSetOptionsOp => 138,
MessageType::MessageType_StellarChangeTrustOp => 139,
MessageType::MessageType_StellarAllowTrustOp => 140,
MessageType::MessageType_StellarAccountMergeOp => 141,
MessageType::MessageType_StellarManageDataOp => 142,
MessageType::MessageType_StellarBumpSequenceOp => 143,
MessageType::MessageType_StellarManageBuyOfferOp => 144,
MessageType::MessageType_StellarPathPaymentStrictSendOp => 145,
MessageType::MessageType_StellarClaimClaimableBalanceOp => 146,
MessageType::MessageType_StellarSignedTx => 147,
MessageType::MessageType_CardanoGetPublicKey => 148,
MessageType::MessageType_CardanoPublicKey => 149,
MessageType::MessageType_CardanoGetAddress => 150,
MessageType::MessageType_CardanoAddress => 151,
MessageType::MessageType_CardanoTxItemAck => 152,
MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 153,
MessageType::MessageType_CardanoTxWitnessRequest => 154,
MessageType::MessageType_CardanoTxWitnessResponse => 155,
MessageType::MessageType_CardanoTxHostAck => 156,
MessageType::MessageType_CardanoTxBodyHash => 157,
MessageType::MessageType_CardanoSignTxFinished => 158,
MessageType::MessageType_CardanoSignTxInit => 159,
MessageType::MessageType_CardanoTxInput => 160,
MessageType::MessageType_CardanoTxOutput => 161,
MessageType::MessageType_CardanoAssetGroup => 162,
MessageType::MessageType_CardanoToken => 163,
MessageType::MessageType_CardanoTxCertificate => 164,
MessageType::MessageType_CardanoTxWithdrawal => 165,
MessageType::MessageType_CardanoTxAuxiliaryData => 166,
MessageType::MessageType_CardanoPoolOwner => 167,
MessageType::MessageType_CardanoPoolRelayParameters => 168,
MessageType::MessageType_CardanoGetNativeScriptHash => 169,
MessageType::MessageType_CardanoNativeScriptHash => 170,
MessageType::MessageType_CardanoTxMint => 171,
MessageType::MessageType_CardanoTxCollateralInput => 172,
MessageType::MessageType_CardanoTxRequiredSigner => 173,
MessageType::MessageType_CardanoTxInlineDatumChunk => 174,
MessageType::MessageType_CardanoTxReferenceScriptChunk => 175,
MessageType::MessageType_CardanoTxReferenceInput => 176,
MessageType::MessageType_RippleGetAddress => 177,
MessageType::MessageType_RippleAddress => 178,
MessageType::MessageType_RippleSignTx => 179,
MessageType::MessageType_RippleSignedTx => 180,
MessageType::MessageType_MoneroTransactionInitRequest => 181,
MessageType::MessageType_MoneroTransactionInitAck => 182,
MessageType::MessageType_MoneroTransactionSetInputRequest => 183,
MessageType::MessageType_MoneroTransactionSetInputAck => 184,
MessageType::MessageType_MoneroTransactionInputViniRequest => 185,
MessageType::MessageType_MoneroTransactionInputViniAck => 186,
MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 187,
MessageType::MessageType_MoneroTransactionAllInputsSetAck => 188,
MessageType::MessageType_MoneroTransactionSetOutputRequest => 189,
MessageType::MessageType_MoneroTransactionSetOutputAck => 190,
MessageType::MessageType_MoneroTransactionAllOutSetRequest => 191,
MessageType::MessageType_MoneroTransactionAllOutSetAck => 192,
MessageType::MessageType_MoneroTransactionSignInputRequest => 193,
MessageType::MessageType_MoneroTransactionSignInputAck => 194,
MessageType::MessageType_MoneroTransactionFinalRequest => 195,
MessageType::MessageType_MoneroTransactionFinalAck => 196,
MessageType::MessageType_MoneroKeyImageExportInitRequest => 197,
MessageType::MessageType_MoneroKeyImageExportInitAck => 198,
MessageType::MessageType_MoneroKeyImageSyncStepRequest => 199,
MessageType::MessageType_MoneroKeyImageSyncStepAck => 200,
MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 201,
MessageType::MessageType_MoneroKeyImageSyncFinalAck => 202,
MessageType::MessageType_MoneroGetAddress => 203,
MessageType::MessageType_MoneroAddress => 204,
MessageType::MessageType_MoneroGetWatchKey => 205,
MessageType::MessageType_MoneroWatchKey => 206,
MessageType::MessageType_DebugMoneroDiagRequest => 207,
MessageType::MessageType_DebugMoneroDiagAck => 208,
MessageType::MessageType_MoneroGetTxKeyRequest => 209,
MessageType::MessageType_MoneroGetTxKeyAck => 210,
MessageType::MessageType_MoneroLiveRefreshStartRequest => 211,
MessageType::MessageType_MoneroLiveRefreshStartAck => 212,
MessageType::MessageType_MoneroLiveRefreshStepRequest => 213,
MessageType::MessageType_MoneroLiveRefreshStepAck => 214,
MessageType::MessageType_MoneroLiveRefreshFinalRequest => 215,
MessageType::MessageType_MoneroLiveRefreshFinalAck => 216,
MessageType::MessageType_EosGetPublicKey => 217,
MessageType::MessageType_EosPublicKey => 218,
MessageType::MessageType_EosSignTx => 219,
MessageType::MessageType_EosTxActionRequest => 220,
MessageType::MessageType_EosTxActionAck => 221,
MessageType::MessageType_EosSignedTx => 222,
MessageType::MessageType_BinanceGetAddress => 223,
MessageType::MessageType_BinanceAddress => 224,
MessageType::MessageType_BinanceGetPublicKey => 225,
MessageType::MessageType_BinancePublicKey => 226,
MessageType::MessageType_BinanceSignTx => 227,
MessageType::MessageType_BinanceTxRequest => 228,
MessageType::MessageType_BinanceTransferMsg => 229,
MessageType::MessageType_BinanceOrderMsg => 230,
MessageType::MessageType_BinanceCancelMsg => 231,
MessageType::MessageType_BinanceSignedTx => 232,
MessageType::MessageType_WebAuthnListResidentCredentials => 233,
MessageType::MessageType_WebAuthnCredentials => 234,
MessageType::MessageType_WebAuthnAddResidentCredential => 235,
MessageType::MessageType_WebAuthnRemoveResidentCredential => 236,
MessageType::MessageType_SolanaGetPublicKey => 237,
MessageType::MessageType_SolanaPublicKey => 238,
MessageType::MessageType_SolanaGetAddress => 239,
MessageType::MessageType_SolanaAddress => 240,
MessageType::MessageType_SolanaSignTx => 241,
MessageType::MessageType_SolanaTxSignature => 242,
MessageType::MessageType_NostrGetPubkey => 243,
MessageType::MessageType_NostrPubkey => 244,
MessageType::MessageType_NostrSignEvent => 245,
MessageType::MessageType_NostrEventSignature => 246,
MessageType::MessageType_BenchmarkListNames => 247,
MessageType::MessageType_BenchmarkNames => 248,
MessageType::MessageType_BenchmarkRun => 249,
MessageType::MessageType_BenchmarkResult => 250,
MessageType::MessageType_BleUnpair => 61,
MessageType::MessageType_GetPublicKey => 62,
MessageType::MessageType_PublicKey => 63,
MessageType::MessageType_SignTx => 64,
MessageType::MessageType_TxRequest => 65,
MessageType::MessageType_TxAck => 66,
MessageType::MessageType_GetAddress => 67,
MessageType::MessageType_Address => 68,
MessageType::MessageType_TxAckPaymentRequest => 69,
MessageType::MessageType_SignMessage => 70,
MessageType::MessageType_VerifyMessage => 71,
MessageType::MessageType_MessageSignature => 72,
MessageType::MessageType_GetOwnershipId => 73,
MessageType::MessageType_OwnershipId => 74,
MessageType::MessageType_GetOwnershipProof => 75,
MessageType::MessageType_OwnershipProof => 76,
MessageType::MessageType_AuthorizeCoinJoin => 77,
MessageType::MessageType_CipherKeyValue => 78,
MessageType::MessageType_CipheredKeyValue => 79,
MessageType::MessageType_SignIdentity => 80,
MessageType::MessageType_SignedIdentity => 81,
MessageType::MessageType_GetECDHSessionKey => 82,
MessageType::MessageType_ECDHSessionKey => 83,
MessageType::MessageType_DebugLinkDecision => 84,
MessageType::MessageType_DebugLinkGetState => 85,
MessageType::MessageType_DebugLinkState => 86,
MessageType::MessageType_DebugLinkStop => 87,
MessageType::MessageType_DebugLinkLog => 88,
MessageType::MessageType_DebugLinkMemoryRead => 89,
MessageType::MessageType_DebugLinkMemory => 90,
MessageType::MessageType_DebugLinkMemoryWrite => 91,
MessageType::MessageType_DebugLinkFlashErase => 92,
MessageType::MessageType_DebugLinkLayout => 93,
MessageType::MessageType_DebugLinkReseedRandom => 94,
MessageType::MessageType_DebugLinkRecordScreen => 95,
MessageType::MessageType_DebugLinkEraseSdCard => 96,
MessageType::MessageType_DebugLinkWatchLayout => 97,
MessageType::MessageType_DebugLinkResetDebugEvents => 98,
MessageType::MessageType_DebugLinkOptigaSetSecMax => 99,
MessageType::MessageType_EthereumGetPublicKey => 100,
MessageType::MessageType_EthereumPublicKey => 101,
MessageType::MessageType_EthereumGetAddress => 102,
MessageType::MessageType_EthereumAddress => 103,
MessageType::MessageType_EthereumSignTx => 104,
MessageType::MessageType_EthereumSignTxEIP1559 => 105,
MessageType::MessageType_EthereumTxRequest => 106,
MessageType::MessageType_EthereumTxAck => 107,
MessageType::MessageType_EthereumSignMessage => 108,
MessageType::MessageType_EthereumVerifyMessage => 109,
MessageType::MessageType_EthereumMessageSignature => 110,
MessageType::MessageType_EthereumSignTypedData => 111,
MessageType::MessageType_EthereumTypedDataStructRequest => 112,
MessageType::MessageType_EthereumTypedDataStructAck => 113,
MessageType::MessageType_EthereumTypedDataValueRequest => 114,
MessageType::MessageType_EthereumTypedDataValueAck => 115,
MessageType::MessageType_EthereumTypedDataSignature => 116,
MessageType::MessageType_EthereumSignTypedHash => 117,
MessageType::MessageType_NEMGetAddress => 118,
MessageType::MessageType_NEMAddress => 119,
MessageType::MessageType_NEMSignTx => 120,
MessageType::MessageType_NEMSignedTx => 121,
MessageType::MessageType_NEMDecryptMessage => 122,
MessageType::MessageType_NEMDecryptedMessage => 123,
MessageType::MessageType_TezosGetAddress => 124,
MessageType::MessageType_TezosAddress => 125,
MessageType::MessageType_TezosSignTx => 126,
MessageType::MessageType_TezosSignedTx => 127,
MessageType::MessageType_TezosGetPublicKey => 128,
MessageType::MessageType_TezosPublicKey => 129,
MessageType::MessageType_StellarSignTx => 130,
MessageType::MessageType_StellarTxOpRequest => 131,
MessageType::MessageType_StellarGetAddress => 132,
MessageType::MessageType_StellarAddress => 133,
MessageType::MessageType_StellarCreateAccountOp => 134,
MessageType::MessageType_StellarPaymentOp => 135,
MessageType::MessageType_StellarPathPaymentStrictReceiveOp => 136,
MessageType::MessageType_StellarManageSellOfferOp => 137,
MessageType::MessageType_StellarCreatePassiveSellOfferOp => 138,
MessageType::MessageType_StellarSetOptionsOp => 139,
MessageType::MessageType_StellarChangeTrustOp => 140,
MessageType::MessageType_StellarAllowTrustOp => 141,
MessageType::MessageType_StellarAccountMergeOp => 142,
MessageType::MessageType_StellarManageDataOp => 143,
MessageType::MessageType_StellarBumpSequenceOp => 144,
MessageType::MessageType_StellarManageBuyOfferOp => 145,
MessageType::MessageType_StellarPathPaymentStrictSendOp => 146,
MessageType::MessageType_StellarClaimClaimableBalanceOp => 147,
MessageType::MessageType_StellarSignedTx => 148,
MessageType::MessageType_CardanoGetPublicKey => 149,
MessageType::MessageType_CardanoPublicKey => 150,
MessageType::MessageType_CardanoGetAddress => 151,
MessageType::MessageType_CardanoAddress => 152,
MessageType::MessageType_CardanoTxItemAck => 153,
MessageType::MessageType_CardanoTxAuxiliaryDataSupplement => 154,
MessageType::MessageType_CardanoTxWitnessRequest => 155,
MessageType::MessageType_CardanoTxWitnessResponse => 156,
MessageType::MessageType_CardanoTxHostAck => 157,
MessageType::MessageType_CardanoTxBodyHash => 158,
MessageType::MessageType_CardanoSignTxFinished => 159,
MessageType::MessageType_CardanoSignTxInit => 160,
MessageType::MessageType_CardanoTxInput => 161,
MessageType::MessageType_CardanoTxOutput => 162,
MessageType::MessageType_CardanoAssetGroup => 163,
MessageType::MessageType_CardanoToken => 164,
MessageType::MessageType_CardanoTxCertificate => 165,
MessageType::MessageType_CardanoTxWithdrawal => 166,
MessageType::MessageType_CardanoTxAuxiliaryData => 167,
MessageType::MessageType_CardanoPoolOwner => 168,
MessageType::MessageType_CardanoPoolRelayParameters => 169,
MessageType::MessageType_CardanoGetNativeScriptHash => 170,
MessageType::MessageType_CardanoNativeScriptHash => 171,
MessageType::MessageType_CardanoTxMint => 172,
MessageType::MessageType_CardanoTxCollateralInput => 173,
MessageType::MessageType_CardanoTxRequiredSigner => 174,
MessageType::MessageType_CardanoTxInlineDatumChunk => 175,
MessageType::MessageType_CardanoTxReferenceScriptChunk => 176,
MessageType::MessageType_CardanoTxReferenceInput => 177,
MessageType::MessageType_RippleGetAddress => 178,
MessageType::MessageType_RippleAddress => 179,
MessageType::MessageType_RippleSignTx => 180,
MessageType::MessageType_RippleSignedTx => 181,
MessageType::MessageType_MoneroTransactionInitRequest => 182,
MessageType::MessageType_MoneroTransactionInitAck => 183,
MessageType::MessageType_MoneroTransactionSetInputRequest => 184,
MessageType::MessageType_MoneroTransactionSetInputAck => 185,
MessageType::MessageType_MoneroTransactionInputViniRequest => 186,
MessageType::MessageType_MoneroTransactionInputViniAck => 187,
MessageType::MessageType_MoneroTransactionAllInputsSetRequest => 188,
MessageType::MessageType_MoneroTransactionAllInputsSetAck => 189,
MessageType::MessageType_MoneroTransactionSetOutputRequest => 190,
MessageType::MessageType_MoneroTransactionSetOutputAck => 191,
MessageType::MessageType_MoneroTransactionAllOutSetRequest => 192,
MessageType::MessageType_MoneroTransactionAllOutSetAck => 193,
MessageType::MessageType_MoneroTransactionSignInputRequest => 194,
MessageType::MessageType_MoneroTransactionSignInputAck => 195,
MessageType::MessageType_MoneroTransactionFinalRequest => 196,
MessageType::MessageType_MoneroTransactionFinalAck => 197,
MessageType::MessageType_MoneroKeyImageExportInitRequest => 198,
MessageType::MessageType_MoneroKeyImageExportInitAck => 199,
MessageType::MessageType_MoneroKeyImageSyncStepRequest => 200,
MessageType::MessageType_MoneroKeyImageSyncStepAck => 201,
MessageType::MessageType_MoneroKeyImageSyncFinalRequest => 202,
MessageType::MessageType_MoneroKeyImageSyncFinalAck => 203,
MessageType::MessageType_MoneroGetAddress => 204,
MessageType::MessageType_MoneroAddress => 205,
MessageType::MessageType_MoneroGetWatchKey => 206,
MessageType::MessageType_MoneroWatchKey => 207,
MessageType::MessageType_DebugMoneroDiagRequest => 208,
MessageType::MessageType_DebugMoneroDiagAck => 209,
MessageType::MessageType_MoneroGetTxKeyRequest => 210,
MessageType::MessageType_MoneroGetTxKeyAck => 211,
MessageType::MessageType_MoneroLiveRefreshStartRequest => 212,
MessageType::MessageType_MoneroLiveRefreshStartAck => 213,
MessageType::MessageType_MoneroLiveRefreshStepRequest => 214,
MessageType::MessageType_MoneroLiveRefreshStepAck => 215,
MessageType::MessageType_MoneroLiveRefreshFinalRequest => 216,
MessageType::MessageType_MoneroLiveRefreshFinalAck => 217,
MessageType::MessageType_EosGetPublicKey => 218,
MessageType::MessageType_EosPublicKey => 219,
MessageType::MessageType_EosSignTx => 220,
MessageType::MessageType_EosTxActionRequest => 221,
MessageType::MessageType_EosTxActionAck => 222,
MessageType::MessageType_EosSignedTx => 223,
MessageType::MessageType_BinanceGetAddress => 224,
MessageType::MessageType_BinanceAddress => 225,
MessageType::MessageType_BinanceGetPublicKey => 226,
MessageType::MessageType_BinancePublicKey => 227,
MessageType::MessageType_BinanceSignTx => 228,
MessageType::MessageType_BinanceTxRequest => 229,
MessageType::MessageType_BinanceTransferMsg => 230,
MessageType::MessageType_BinanceOrderMsg => 231,
MessageType::MessageType_BinanceCancelMsg => 232,
MessageType::MessageType_BinanceSignedTx => 233,
MessageType::MessageType_WebAuthnListResidentCredentials => 234,
MessageType::MessageType_WebAuthnCredentials => 235,
MessageType::MessageType_WebAuthnAddResidentCredential => 236,
MessageType::MessageType_WebAuthnRemoveResidentCredential => 237,
MessageType::MessageType_SolanaGetPublicKey => 238,
MessageType::MessageType_SolanaPublicKey => 239,
MessageType::MessageType_SolanaGetAddress => 240,
MessageType::MessageType_SolanaAddress => 241,
MessageType::MessageType_SolanaSignTx => 242,
MessageType::MessageType_SolanaTxSignature => 243,
MessageType::MessageType_NostrGetPubkey => 244,
MessageType::MessageType_NostrPubkey => 245,
MessageType::MessageType_NostrSignEvent => 246,
MessageType::MessageType_NostrEventSignature => 247,
MessageType::MessageType_BenchmarkListNames => 248,
MessageType::MessageType_BenchmarkNames => 249,
MessageType::MessageType_BenchmarkRun => 250,
MessageType::MessageType_BenchmarkResult => 251,
};
Self::enum_descriptor().value_by_index(index)
}
@ -1585,7 +1591,7 @@ impl MessageType {
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\x86W\
\n\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xacW\
\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\
@ -1659,37 +1665,38 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x18\x01\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12-\n\x1bMessageType_FirmwareR\
equest\x10\x08\x1a\x0c\xb8\xb5\x18\x01\x80\xa6\x1d\x01\x98\xb5\x18\x01\
\x12(\n\x16MessageType_ProdTestT1\x10\x20\x1a\x0c\xb8\xb5\x18\x01\x80\
\xa6\x1d\x01\x90\xb5\x18\x01\x12&\n\x18MessageType_GetPublicKey\x10\x0b\
\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12#\n\x15MessageType_PublicKey\
\x10\x0c\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12\x20\n\x12MessageTyp\
e_SignTx\x10\x0f\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12#\n\x15Messa\
geType_TxRequest\x10\x15\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12\x1f\
\n\x11MessageType_TxAck\x10\x16\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\
\x12$\n\x16MessageType_GetAddress\x10\x1d\x1a\x08\x80\xa6\x1d\x01\x90\
\xb5\x18\x01\x12!\n\x13MessageType_Address\x10\x1e\x1a\x08\x80\xa6\x1d\
\x01\x98\xb5\x18\x01\x12)\n\x1fMessageType_TxAckPaymentRequest\x10%\x1a\
\x04\x90\xb5\x18\x01\x12%\n\x17MessageType_SignMessage\x10&\x1a\x08\x80\
\xa6\x1d\x01\x90\xb5\x18\x01\x12'\n\x19MessageType_VerifyMessage\x10'\
\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12*\n\x1cMessageType_MessageSi\
gnature\x10(\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12(\n\x1aMessageTy\
pe_GetOwnershipId\x10+\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12%\n\
\x17MessageType_OwnershipId\x10,\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\
\x12+\n\x1dMessageType_GetOwnershipProof\x101\x1a\x08\x80\xa6\x1d\x01\
\x90\xb5\x18\x01\x12(\n\x1aMessageType_OwnershipProof\x102\x1a\x08\x80\
\xa6\x1d\x01\x98\xb5\x18\x01\x12+\n\x1dMessageType_AuthorizeCoinJoin\x10\
3\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageType_CipherKe\
yValue\x10\x17\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12*\n\x1cMessage\
Type_CipheredKeyValue\x100\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12&\
\n\x18MessageType_SignIdentity\x105\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\
\x01\x12(\n\x1aMessageType_SignedIdentity\x106\x1a\x08\x80\xa6\x1d\x01\
\x98\xb5\x18\x01\x12+\n\x1dMessageType_GetECDHSessionKey\x10=\x1a\x08\
\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageType_ECDHSessionKey\
\x10>\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x123\n\x1dMessageType_Debu\
gLinkDecision\x10d\x1a\x10\xc0\xb5\x18\x01\xb0\xb5\x18\x01\x80\xa6\x1d\
\x01\xa0\xb5\x18\x01\x12/\n\x1dMessageType_DebugLinkGetState\x10e\x1a\
\x0c\x80\xa6\x1d\x01\xb0\xb5\x18\x01\xa0\xb5\x18\x01\x12(\n\x1aMessageTy\
pe_DebugLinkState\x10f\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x12'\n\
\x19MessageType_DebugLinkStop\x10g\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\
\xa6\x1d\x01\x90\xb5\x18\x01\x12$\n\x15MessageType_BleUnpair\x10\xc1>\
\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12&\n\x18MessageType_GetPublic\
Key\x10\x0b\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12#\n\x15MessageTyp\
e_PublicKey\x10\x0c\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12\x20\n\
\x12MessageType_SignTx\x10\x0f\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\
\x12#\n\x15MessageType_TxRequest\x10\x15\x1a\x08\x80\xa6\x1d\x01\x98\xb5\
\x18\x01\x12\x1f\n\x11MessageType_TxAck\x10\x16\x1a\x08\x80\xa6\x1d\x01\
\x90\xb5\x18\x01\x12$\n\x16MessageType_GetAddress\x10\x1d\x1a\x08\x80\
\xa6\x1d\x01\x90\xb5\x18\x01\x12!\n\x13MessageType_Address\x10\x1e\x1a\
\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12)\n\x1fMessageType_TxAckPaymentR\
equest\x10%\x1a\x04\x90\xb5\x18\x01\x12%\n\x17MessageType_SignMessage\
\x10&\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12'\n\x19MessageType_Veri\
fyMessage\x10'\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12*\n\x1cMessage\
Type_MessageSignature\x10(\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12(\
\n\x1aMessageType_GetOwnershipId\x10+\x1a\x08\x80\xa6\x1d\x01\x90\xb5\
\x18\x01\x12%\n\x17MessageType_OwnershipId\x10,\x1a\x08\x80\xa6\x1d\x01\
\x98\xb5\x18\x01\x12+\n\x1dMessageType_GetOwnershipProof\x101\x1a\x08\
\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageType_OwnershipProof\
\x102\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12+\n\x1dMessageType_Auth\
orizeCoinJoin\x103\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMes\
sageType_CipherKeyValue\x10\x17\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\
\x12*\n\x1cMessageType_CipheredKeyValue\x100\x1a\x08\x80\xa6\x1d\x01\x98\
\xb5\x18\x01\x12&\n\x18MessageType_SignIdentity\x105\x1a\x08\x80\xa6\x1d\
\x01\x90\xb5\x18\x01\x12(\n\x1aMessageType_SignedIdentity\x106\x1a\x08\
\x80\xa6\x1d\x01\x98\xb5\x18\x01\x12+\n\x1dMessageType_GetECDHSessionKey\
\x10=\x1a\x08\x80\xa6\x1d\x01\x90\xb5\x18\x01\x12(\n\x1aMessageType_ECDH\
SessionKey\x10>\x1a\x08\x80\xa6\x1d\x01\x98\xb5\x18\x01\x123\n\x1dMessag\
eType_DebugLinkDecision\x10d\x1a\x10\xc0\xb5\x18\x01\xb0\xb5\x18\x01\x80\
\xa6\x1d\x01\xa0\xb5\x18\x01\x12/\n\x1dMessageType_DebugLinkGetState\x10\
e\x1a\x0c\x80\xa6\x1d\x01\xb0\xb5\x18\x01\xa0\xb5\x18\x01\x12(\n\x1aMess\
ageType_DebugLinkState\x10f\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x12'\
\n\x19MessageType_DebugLinkStop\x10g\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\
\x01\x12&\n\x18MessageType_DebugLinkLog\x10h\x1a\x08\x80\xa6\x1d\x01\xa8\
\xb5\x18\x01\x12-\n\x1fMessageType_DebugLinkMemoryRead\x10n\x1a\x08\x80\
\xa6\x1d\x01\xa0\xb5\x18\x01\x12)\n\x1bMessageType_DebugLinkMemory\x10o\

View File

@ -0,0 +1,203 @@
// This file is generated by rust-protobuf 3.3.0. Do not edit
// .proto file is parsed by protoc 3.19.6
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
//! Generated file from `messages-ble.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
// @@protoc_insertion_point(message:hw.trezor.messages.ble.BleUnpair)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct BleUnpair {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ble.BleUnpair.all)
pub all: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ble.BleUnpair.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a BleUnpair {
fn default() -> &'a BleUnpair {
<BleUnpair as ::protobuf::Message>::default_instance()
}
}
impl BleUnpair {
pub fn new() -> BleUnpair {
::std::default::Default::default()
}
// optional bool all = 1;
pub fn all(&self) -> bool {
self.all.unwrap_or(false)
}
pub fn clear_all(&mut self) {
self.all = ::std::option::Option::None;
}
pub fn has_all(&self) -> bool {
self.all.is_some()
}
// Param is passed by value, moved
pub fn set_all(&mut self, v: bool) {
self.all = ::std::option::Option::Some(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::<_, _>(
"all",
|m: &BleUnpair| { &m.all },
|m: &mut BleUnpair| { &mut m.all },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<BleUnpair>(
"BleUnpair",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for BleUnpair {
const NAME: &'static str = "BleUnpair";
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.all = ::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.all {
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.all {
os.write_bool(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() -> BleUnpair {
BleUnpair::new()
}
fn clear(&mut self) {
self.all = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static BleUnpair {
static instance: BleUnpair = BleUnpair {
all: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for BleUnpair {
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("BleUnpair").unwrap()).clone()
}
}
impl ::std::fmt::Display for BleUnpair {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for BleUnpair {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x12messages-ble.proto\x12\x16hw.trezor.messages.ble\x1a\roptions.prot\
o\"\x1d\n\tBleUnpair\x12\x10\n\x03all\x18\x01\x20\x01(\x08R\x03allB;\n#c\
om.satoshilabs.trezor.lib.protobufB\x10TrezorMessageBle\x80\xa6\x1d\x01\
";
/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
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(1);
messages.push(BleUnpair::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}

View File

@ -17,6 +17,7 @@ mod generated {
modules! {
messages
messages_bootloader
messages_ble
messages_common
messages_crypto
messages_debug