|
|
|
@ -7645,8 +7645,8 @@ pub struct RecoveryDevice {
|
|
|
|
|
pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<recovery_device::RecoveryDeviceType>>,
|
|
|
|
|
// @@protoc_insertion_point(field:hw.trezor.messages.management.RecoveryDevice.u2f_counter)
|
|
|
|
|
pub u2f_counter: ::std::option::Option<u32>,
|
|
|
|
|
// @@protoc_insertion_point(field:hw.trezor.messages.management.RecoveryDevice.dry_run)
|
|
|
|
|
pub dry_run: ::std::option::Option<bool>,
|
|
|
|
|
// @@protoc_insertion_point(field:hw.trezor.messages.management.RecoveryDevice.kind)
|
|
|
|
|
pub kind: ::std::option::Option<::protobuf::EnumOrUnknown<recovery_device::RecoveryKind>>,
|
|
|
|
|
// special fields
|
|
|
|
|
// @@protoc_insertion_point(special_field:hw.trezor.messages.management.RecoveryDevice.special_fields)
|
|
|
|
|
pub special_fields: ::protobuf::SpecialFields,
|
|
|
|
@ -7852,23 +7852,26 @@ impl RecoveryDevice {
|
|
|
|
|
self.u2f_counter = ::std::option::Option::Some(v);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// optional bool dry_run = 10;
|
|
|
|
|
// optional .hw.trezor.messages.management.RecoveryDevice.RecoveryKind kind = 10;
|
|
|
|
|
|
|
|
|
|
pub fn dry_run(&self) -> bool {
|
|
|
|
|
self.dry_run.unwrap_or(false)
|
|
|
|
|
pub fn kind(&self) -> recovery_device::RecoveryKind {
|
|
|
|
|
match self.kind {
|
|
|
|
|
Some(e) => e.enum_value_or(recovery_device::RecoveryKind::RecoveryKind_NormalRecovery),
|
|
|
|
|
None => recovery_device::RecoveryKind::RecoveryKind_NormalRecovery,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn clear_dry_run(&mut self) {
|
|
|
|
|
self.dry_run = ::std::option::Option::None;
|
|
|
|
|
pub fn clear_kind(&mut self) {
|
|
|
|
|
self.kind = ::std::option::Option::None;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn has_dry_run(&self) -> bool {
|
|
|
|
|
self.dry_run.is_some()
|
|
|
|
|
pub fn has_kind(&self) -> bool {
|
|
|
|
|
self.kind.is_some()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Param is passed by value, moved
|
|
|
|
|
pub fn set_dry_run(&mut self, v: bool) {
|
|
|
|
|
self.dry_run = ::std::option::Option::Some(v);
|
|
|
|
|
pub fn set_kind(&mut self, v: recovery_device::RecoveryKind) {
|
|
|
|
|
self.kind = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
|
|
|
@ -7915,9 +7918,9 @@ impl RecoveryDevice {
|
|
|
|
|
|m: &mut RecoveryDevice| { &mut m.u2f_counter },
|
|
|
|
|
));
|
|
|
|
|
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
|
|
|
|
|
"dry_run",
|
|
|
|
|
|m: &RecoveryDevice| { &m.dry_run },
|
|
|
|
|
|m: &mut RecoveryDevice| { &mut m.dry_run },
|
|
|
|
|
"kind",
|
|
|
|
|
|m: &RecoveryDevice| { &m.kind },
|
|
|
|
|
|m: &mut RecoveryDevice| { &mut m.kind },
|
|
|
|
|
));
|
|
|
|
|
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RecoveryDevice>(
|
|
|
|
|
"RecoveryDevice",
|
|
|
|
@ -7962,7 +7965,7 @@ impl ::protobuf::Message for RecoveryDevice {
|
|
|
|
|
self.u2f_counter = ::std::option::Option::Some(is.read_uint32()?);
|
|
|
|
|
},
|
|
|
|
|
80 => {
|
|
|
|
|
self.dry_run = ::std::option::Option::Some(is.read_bool()?);
|
|
|
|
|
self.kind = ::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())?;
|
|
|
|
@ -8000,8 +8003,8 @@ impl ::protobuf::Message for RecoveryDevice {
|
|
|
|
|
if let Some(v) = self.u2f_counter {
|
|
|
|
|
my_size += ::protobuf::rt::uint32_size(9, v);
|
|
|
|
|
}
|
|
|
|
|
if let Some(v) = self.dry_run {
|
|
|
|
|
my_size += 1 + 1;
|
|
|
|
|
if let Some(v) = self.kind {
|
|
|
|
|
my_size += ::protobuf::rt::int32_size(10, v.value());
|
|
|
|
|
}
|
|
|
|
|
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
|
|
|
|
self.special_fields.cached_size().set(my_size as u32);
|
|
|
|
@ -8033,8 +8036,8 @@ impl ::protobuf::Message for RecoveryDevice {
|
|
|
|
|
if let Some(v) = self.u2f_counter {
|
|
|
|
|
os.write_uint32(9, v)?;
|
|
|
|
|
}
|
|
|
|
|
if let Some(v) = self.dry_run {
|
|
|
|
|
os.write_bool(10, v)?;
|
|
|
|
|
if let Some(v) = self.kind {
|
|
|
|
|
os.write_enum(10, ::protobuf::EnumOrUnknown::value(&v))?;
|
|
|
|
|
}
|
|
|
|
|
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
|
|
|
|
::std::result::Result::Ok(())
|
|
|
|
@ -8061,7 +8064,7 @@ impl ::protobuf::Message for RecoveryDevice {
|
|
|
|
|
self.enforce_wordlist = ::std::option::Option::None;
|
|
|
|
|
self.type_ = ::std::option::Option::None;
|
|
|
|
|
self.u2f_counter = ::std::option::Option::None;
|
|
|
|
|
self.dry_run = ::std::option::Option::None;
|
|
|
|
|
self.kind = ::std::option::Option::None;
|
|
|
|
|
self.special_fields.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -8075,7 +8078,7 @@ impl ::protobuf::Message for RecoveryDevice {
|
|
|
|
|
enforce_wordlist: ::std::option::Option::None,
|
|
|
|
|
type_: ::std::option::Option::None,
|
|
|
|
|
u2f_counter: ::std::option::Option::None,
|
|
|
|
|
dry_run: ::std::option::Option::None,
|
|
|
|
|
kind: ::std::option::Option::None,
|
|
|
|
|
special_fields: ::protobuf::SpecialFields::new(),
|
|
|
|
|
};
|
|
|
|
|
&instance
|
|
|
|
@ -8162,6 +8165,73 @@ pub mod recovery_device {
|
|
|
|
|
::protobuf::reflect::GeneratedEnumDescriptorData::new::<RecoveryDeviceType>("RecoveryDevice.RecoveryDeviceType")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
|
|
|
|
|
// @@protoc_insertion_point(enum:hw.trezor.messages.management.RecoveryDevice.RecoveryKind)
|
|
|
|
|
pub enum RecoveryKind {
|
|
|
|
|
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.RecoveryDevice.RecoveryKind.RecoveryKind_NormalRecovery)
|
|
|
|
|
RecoveryKind_NormalRecovery = 0,
|
|
|
|
|
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.RecoveryDevice.RecoveryKind.RecoveryKind_DryRun)
|
|
|
|
|
RecoveryKind_DryRun = 1,
|
|
|
|
|
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.RecoveryDevice.RecoveryKind.RecoveryKind_UnlockRepeatedBackup)
|
|
|
|
|
RecoveryKind_UnlockRepeatedBackup = 2,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ::protobuf::Enum for RecoveryKind {
|
|
|
|
|
const NAME: &'static str = "RecoveryKind";
|
|
|
|
|
|
|
|
|
|
fn value(&self) -> i32 {
|
|
|
|
|
*self as i32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn from_i32(value: i32) -> ::std::option::Option<RecoveryKind> {
|
|
|
|
|
match value {
|
|
|
|
|
0 => ::std::option::Option::Some(RecoveryKind::RecoveryKind_NormalRecovery),
|
|
|
|
|
1 => ::std::option::Option::Some(RecoveryKind::RecoveryKind_DryRun),
|
|
|
|
|
2 => ::std::option::Option::Some(RecoveryKind::RecoveryKind_UnlockRepeatedBackup),
|
|
|
|
|
_ => ::std::option::Option::None
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn from_str(str: &str) -> ::std::option::Option<RecoveryKind> {
|
|
|
|
|
match str {
|
|
|
|
|
"RecoveryKind_NormalRecovery" => ::std::option::Option::Some(RecoveryKind::RecoveryKind_NormalRecovery),
|
|
|
|
|
"RecoveryKind_DryRun" => ::std::option::Option::Some(RecoveryKind::RecoveryKind_DryRun),
|
|
|
|
|
"RecoveryKind_UnlockRepeatedBackup" => ::std::option::Option::Some(RecoveryKind::RecoveryKind_UnlockRepeatedBackup),
|
|
|
|
|
_ => ::std::option::Option::None
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const VALUES: &'static [RecoveryKind] = &[
|
|
|
|
|
RecoveryKind::RecoveryKind_NormalRecovery,
|
|
|
|
|
RecoveryKind::RecoveryKind_DryRun,
|
|
|
|
|
RecoveryKind::RecoveryKind_UnlockRepeatedBackup,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ::protobuf::EnumFull for RecoveryKind {
|
|
|
|
|
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
|
|
|
|
|
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
|
|
|
|
|
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("RecoveryDevice.RecoveryKind").unwrap()).clone()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
|
|
|
|
|
let index = *self as usize;
|
|
|
|
|
Self::enum_descriptor().value_by_index(index)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ::std::default::Default for RecoveryKind {
|
|
|
|
|
fn default() -> Self {
|
|
|
|
|
RecoveryKind::RecoveryKind_NormalRecovery
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl RecoveryKind {
|
|
|
|
|
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
|
|
|
|
|
::protobuf::reflect::GeneratedEnumDescriptorData::new::<RecoveryKind>("RecoveryDevice.RecoveryKind")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(message:hw.trezor.messages.management.WordRequest)
|
|
|
|
@ -10676,7 +10746,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
|
|
|
|
\n\x10member_threshold\x18\x01\x20\x02(\rR\x0fmemberThreshold\x12!\n\x0c\
|
|
|
|
|
member_count\x18\x02\x20\x02(\rR\x0bmemberCount\"\x10\n\x0eEntropyReques\
|
|
|
|
|
t\"&\n\nEntropyAck\x12\x18\n\x07entropy\x18\x01\x20\x02(\x0cR\x07entropy\
|
|
|
|
|
\"\xd8\x03\n\x0eRecoveryDevice\x12\x1d\n\nword_count\x18\x01\x20\x01(\rR\
|
|
|
|
|
\"\x80\x05\n\x0eRecoveryDevice\x12\x1d\n\nword_count\x18\x01\x20\x01(\rR\
|
|
|
|
|
\twordCount\x123\n\x15passphrase_protection\x18\x02\x20\x01(\x08R\x14pas\
|
|
|
|
|
sphraseProtection\x12%\n\x0epin_protection\x18\x03\x20\x01(\x08R\rpinPro\
|
|
|
|
|
tection\x12\x1e\n\x08language\x18\x04\x20\x01(\tR\x08languageB\x02\x18\
|
|
|
|
@ -10684,20 +10754,23 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
|
|
|
|
ordlist\x18\x06\x20\x01(\x08R\x0fenforceWordlist\x12T\n\x04type\x18\x08\
|
|
|
|
|
\x20\x01(\x0e2@.hw.trezor.messages.management.RecoveryDevice.RecoveryDev\
|
|
|
|
|
iceTypeR\x04type\x12\x1f\n\x0bu2f_counter\x18\t\x20\x01(\rR\nu2fCounter\
|
|
|
|
|
\x12\x17\n\x07dry_run\x18\n\x20\x01(\x08R\x06dryRun\"Z\n\x12RecoveryDevi\
|
|
|
|
|
ceType\x12%\n!RecoveryDeviceType_ScrambledWords\x10\0\x12\x1d\n\x19Recov\
|
|
|
|
|
eryDeviceType_Matrix\x10\x01\"\xc5\x01\n\x0bWordRequest\x12N\n\x04type\
|
|
|
|
|
\x18\x01\x20\x02(\x0e2:.hw.trezor.messages.management.WordRequest.WordRe\
|
|
|
|
|
questTypeR\x04type\"f\n\x0fWordRequestType\x12\x19\n\x15WordRequestType_\
|
|
|
|
|
Plain\x10\0\x12\x1b\n\x17WordRequestType_Matrix9\x10\x01\x12\x1b\n\x17Wo\
|
|
|
|
|
rdRequestType_Matrix6\x10\x02\"\x1d\n\x07WordAck\x12\x12\n\x04word\x18\
|
|
|
|
|
\x01\x20\x02(\tR\x04word\"0\n\rSetU2FCounter\x12\x1f\n\x0bu2f_counter\
|
|
|
|
|
\x18\x01\x20\x02(\rR\nu2fCounter\"\x13\n\x11GetNextU2FCounter\"1\n\x0eNe\
|
|
|
|
|
xtU2FCounter\x12\x1f\n\x0bu2f_counter\x18\x01\x20\x02(\rR\nu2fCounter\"\
|
|
|
|
|
\x11\n\x0fDoPreauthorized\"\x16\n\x14PreauthorizedRequest\"\x15\n\x13Can\
|
|
|
|
|
celAuthorization\"\x9a\x02\n\x12RebootToBootloader\x12o\n\x0cboot_comman\
|
|
|
|
|
d\x18\x01\x20\x01(\x0e2=.hw.trezor.messages.management.RebootToBootloade\
|
|
|
|
|
r.BootCommand:\rSTOP_AND_WAITR\x0bbootCommand\x12'\n\x0ffirmware_header\
|
|
|
|
|
\x12N\n\x04kind\x18\n\x20\x01(\x0e2:.hw.trezor.messages.management.Recov\
|
|
|
|
|
eryDevice.RecoveryKindR\x04kind\"Z\n\x12RecoveryDeviceType\x12%\n!Recove\
|
|
|
|
|
ryDeviceType_ScrambledWords\x10\0\x12\x1d\n\x19RecoveryDeviceType_Matrix\
|
|
|
|
|
\x10\x01\"o\n\x0cRecoveryKind\x12\x1f\n\x1bRecoveryKind_NormalRecovery\
|
|
|
|
|
\x10\0\x12\x17\n\x13RecoveryKind_DryRun\x10\x01\x12%\n!RecoveryKind_Unlo\
|
|
|
|
|
ckRepeatedBackup\x10\x02\"\xc5\x01\n\x0bWordRequest\x12N\n\x04type\x18\
|
|
|
|
|
\x01\x20\x02(\x0e2:.hw.trezor.messages.management.WordRequest.WordReques\
|
|
|
|
|
tTypeR\x04type\"f\n\x0fWordRequestType\x12\x19\n\x15WordRequestType_Plai\
|
|
|
|
|
n\x10\0\x12\x1b\n\x17WordRequestType_Matrix9\x10\x01\x12\x1b\n\x17WordRe\
|
|
|
|
|
questType_Matrix6\x10\x02\"\x1d\n\x07WordAck\x12\x12\n\x04word\x18\x01\
|
|
|
|
|
\x20\x02(\tR\x04word\"0\n\rSetU2FCounter\x12\x1f\n\x0bu2f_counter\x18\
|
|
|
|
|
\x01\x20\x02(\rR\nu2fCounter\"\x13\n\x11GetNextU2FCounter\"1\n\x0eNextU2\
|
|
|
|
|
FCounter\x12\x1f\n\x0bu2f_counter\x18\x01\x20\x02(\rR\nu2fCounter\"\x11\
|
|
|
|
|
\n\x0fDoPreauthorized\"\x16\n\x14PreauthorizedRequest\"\x15\n\x13CancelA\
|
|
|
|
|
uthorization\"\x9a\x02\n\x12RebootToBootloader\x12o\n\x0cboot_command\
|
|
|
|
|
\x18\x01\x20\x01(\x0e2=.hw.trezor.messages.management.RebootToBootloader\
|
|
|
|
|
.BootCommand:\rSTOP_AND_WAITR\x0bbootCommand\x12'\n\x0ffirmware_header\
|
|
|
|
|
\x18\x02\x20\x01(\x0cR\x0efirmwareHeader\x123\n\x14language_data_length\
|
|
|
|
|
\x18\x03\x20\x01(\r:\x010R\x12languageDataLength\"5\n\x0bBootCommand\x12\
|
|
|
|
|
\x11\n\rSTOP_AND_WAIT\x10\0\x12\x13\n\x0fINSTALL_UPGRADE\x10\x01\"\x10\n\
|
|
|
|
@ -10777,13 +10850,14 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
|
|
|
|
messages.push(ShowDeviceTutorial::generated_message_descriptor_data());
|
|
|
|
|
messages.push(UnlockBootloader::generated_message_descriptor_data());
|
|
|
|
|
messages.push(backup_device::Slip39Group::generated_message_descriptor_data());
|
|
|
|
|
let mut enums = ::std::vec::Vec::with_capacity(8);
|
|
|
|
|
let mut enums = ::std::vec::Vec::with_capacity(9);
|
|
|
|
|
enums.push(BackupType::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(SafetyCheckLevel::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(HomescreenFormat::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(features::Capability::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(sd_protect::SdProtectOperationType::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(recovery_device::RecoveryDeviceType::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(recovery_device::RecoveryKind::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(word_request::WordRequestType::generated_enum_descriptor_data());
|
|
|
|
|
enums.push(reboot_to_bootloader::BootCommand::generated_enum_descriptor_data());
|
|
|
|
|
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
|
|
|
|