You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/rust/trezor-client/src/protos/generated/messages_ethereum.rs

4200 lines
147 KiB

// This file is generated by rust-protobuf 3.3.0. Do not edit
// .proto file is parsed by protoc 3.20.1
// @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-ethereum.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.ethereum.EthereumGetPublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumGetPublicKey {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetPublicKey.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetPublicKey.show_display)
pub show_display: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumGetPublicKey.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumGetPublicKey {
fn default() -> &'a EthereumGetPublicKey {
<EthereumGetPublicKey as ::protobuf::Message>::default_instance()
}
}
impl EthereumGetPublicKey {
pub fn new() -> EthereumGetPublicKey {
::std::default::Default::default()
}
// optional bool show_display = 2;
pub fn show_display(&self) -> bool {
self.show_display.unwrap_or(false)
}
pub fn clear_show_display(&mut self) {
self.show_display = ::std::option::Option::None;
}
pub fn has_show_display(&self) -> bool {
self.show_display.is_some()
}
// Param is passed by value, moved
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::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_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumGetPublicKey| { &m.address_n },
|m: &mut EthereumGetPublicKey| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"show_display",
|m: &EthereumGetPublicKey| { &m.show_display },
|m: &mut EthereumGetPublicKey| { &mut m.show_display },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumGetPublicKey>(
"EthereumGetPublicKey",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumGetPublicKey {
const NAME: &'static str = "EthereumGetPublicKey";
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.show_display = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.show_display {
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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.show_display {
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() -> EthereumGetPublicKey {
EthereumGetPublicKey::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.show_display = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumGetPublicKey {
static instance: EthereumGetPublicKey = EthereumGetPublicKey {
address_n: ::std::vec::Vec::new(),
show_display: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumGetPublicKey {
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("EthereumGetPublicKey").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumGetPublicKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumGetPublicKey {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumPublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumPublicKey {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumPublicKey.node)
pub node: ::protobuf::MessageField<super::messages_common::HDNodeType>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumPublicKey.xpub)
pub xpub: ::std::option::Option<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumPublicKey.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumPublicKey {
fn default() -> &'a EthereumPublicKey {
<EthereumPublicKey as ::protobuf::Message>::default_instance()
}
}
impl EthereumPublicKey {
pub fn new() -> EthereumPublicKey {
::std::default::Default::default()
}
// required string xpub = 2;
pub fn xpub(&self) -> &str {
match self.xpub.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_xpub(&mut self) {
self.xpub = ::std::option::Option::None;
}
pub fn has_xpub(&self) -> bool {
self.xpub.is_some()
}
// Param is passed by value, moved
pub fn set_xpub(&mut self, v: ::std::string::String) {
self.xpub = ::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_xpub(&mut self) -> &mut ::std::string::String {
if self.xpub.is_none() {
self.xpub = ::std::option::Option::Some(::std::string::String::new());
}
self.xpub.as_mut().unwrap()
}
// Take field
pub fn take_xpub(&mut self) -> ::std::string::String {
self.xpub.take().unwrap_or_else(|| ::std::string::String::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_message_field_accessor::<_, super::messages_common::HDNodeType>(
"node",
|m: &EthereumPublicKey| { &m.node },
|m: &mut EthereumPublicKey| { &mut m.node },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"xpub",
|m: &EthereumPublicKey| { &m.xpub },
|m: &mut EthereumPublicKey| { &mut m.xpub },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumPublicKey>(
"EthereumPublicKey",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumPublicKey {
const NAME: &'static str = "EthereumPublicKey";
fn is_initialized(&self) -> bool {
if self.node.is_none() {
return false;
}
if self.xpub.is_none() {
return false;
}
for v in &self.node {
if !v.is_initialized() {
return false;
}
};
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 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.node)?;
},
18 => {
self.xpub = ::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.node.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.xpub.as_ref() {
my_size += ::protobuf::rt::string_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.node.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if let Some(v) = self.xpub.as_ref() {
os.write_string(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() -> EthereumPublicKey {
EthereumPublicKey::new()
}
fn clear(&mut self) {
self.node.clear();
self.xpub = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumPublicKey {
static instance: EthereumPublicKey = EthereumPublicKey {
node: ::protobuf::MessageField::none(),
xpub: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumPublicKey {
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("EthereumPublicKey").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumPublicKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumPublicKey {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumGetAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumGetAddress {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.show_display)
pub show_display: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.encoded_network)
pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumGetAddress.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumGetAddress {
fn default() -> &'a EthereumGetAddress {
<EthereumGetAddress as ::protobuf::Message>::default_instance()
}
}
impl EthereumGetAddress {
pub fn new() -> EthereumGetAddress {
::std::default::Default::default()
}
// optional bool show_display = 2;
pub fn show_display(&self) -> bool {
self.show_display.unwrap_or(false)
}
pub fn clear_show_display(&mut self) {
self.show_display = ::std::option::Option::None;
}
pub fn has_show_display(&self) -> bool {
self.show_display.is_some()
}
// Param is passed by value, moved
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
// optional bytes encoded_network = 3;
pub fn encoded_network(&self) -> &[u8] {
match self.encoded_network.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_encoded_network(&mut self) {
self.encoded_network = ::std::option::Option::None;
}
pub fn has_encoded_network(&self) -> bool {
self.encoded_network.is_some()
}
// Param is passed by value, moved
pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.encoded_network.is_none() {
self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.encoded_network.as_mut().unwrap()
}
// Take field
pub fn take_encoded_network(&mut self) -> ::std::vec::Vec<u8> {
self.encoded_network.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bool chunkify = 4;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumGetAddress| { &m.address_n },
|m: &mut EthereumGetAddress| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"show_display",
|m: &EthereumGetAddress| { &m.show_display },
|m: &mut EthereumGetAddress| { &mut m.show_display },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"encoded_network",
|m: &EthereumGetAddress| { &m.encoded_network },
|m: &mut EthereumGetAddress| { &mut m.encoded_network },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &EthereumGetAddress| { &m.chunkify },
|m: &mut EthereumGetAddress| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumGetAddress>(
"EthereumGetAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumGetAddress {
const NAME: &'static str = "EthereumGetAddress";
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.show_display = ::std::option::Option::Some(is.read_bool()?);
},
26 => {
self.encoded_network = ::std::option::Option::Some(is.read_bytes()?);
},
32 => {
self.chunkify = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.show_display {
my_size += 1 + 1;
}
if let Some(v) = self.encoded_network.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.chunkify {
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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.show_display {
os.write_bool(2, v)?;
}
if let Some(v) = self.encoded_network.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(4, 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() -> EthereumGetAddress {
EthereumGetAddress::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.show_display = ::std::option::Option::None;
self.encoded_network = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumGetAddress {
static instance: EthereumGetAddress = EthereumGetAddress {
address_n: ::std::vec::Vec::new(),
show_display: ::std::option::Option::None,
encoded_network: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumGetAddress {
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("EthereumGetAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumGetAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumGetAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumAddress {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumAddress._old_address)
pub _old_address: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumAddress.address)
pub address: ::std::option::Option<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumAddress.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumAddress {
fn default() -> &'a EthereumAddress {
<EthereumAddress as ::protobuf::Message>::default_instance()
}
}
impl EthereumAddress {
pub fn new() -> EthereumAddress {
::std::default::Default::default()
}
// optional bytes _old_address = 1;
pub fn _old_address(&self) -> &[u8] {
match self._old_address.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear__old_address(&mut self) {
self._old_address = ::std::option::Option::None;
}
pub fn has__old_address(&self) -> bool {
self._old_address.is_some()
}
// Param is passed by value, moved
pub fn set__old_address(&mut self, v: ::std::vec::Vec<u8>) {
self._old_address = ::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__old_address(&mut self) -> &mut ::std::vec::Vec<u8> {
if self._old_address.is_none() {
self._old_address = ::std::option::Option::Some(::std::vec::Vec::new());
}
self._old_address.as_mut().unwrap()
}
// Take field
pub fn take__old_address(&mut self) -> ::std::vec::Vec<u8> {
self._old_address.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional string address = 2;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::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_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::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::<_, _>(
"_old_address",
|m: &EthereumAddress| { &m._old_address },
|m: &mut EthereumAddress| { &mut m._old_address },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &EthereumAddress| { &m.address },
|m: &mut EthereumAddress| { &mut m.address },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumAddress>(
"EthereumAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumAddress {
const NAME: &'static str = "EthereumAddress";
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._old_address = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
self.address = ::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._old_address.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_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._old_address.as_ref() {
os.write_bytes(1, v)?;
}
if let Some(v) = self.address.as_ref() {
os.write_string(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() -> EthereumAddress {
EthereumAddress::new()
}
fn clear(&mut self) {
self._old_address = ::std::option::Option::None;
self.address = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumAddress {
static instance: EthereumAddress = EthereumAddress {
_old_address: ::std::option::Option::None,
address: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumAddress {
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("EthereumAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTx {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.nonce)
pub nonce: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.gas_price)
pub gas_price: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.gas_limit)
pub gas_limit: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.to)
pub to: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.value)
pub value: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.data_initial_chunk)
pub data_initial_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.data_length)
pub data_length: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chain_id)
pub chain_id: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.tx_type)
pub tx_type: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.definitions)
pub definitions: ::protobuf::MessageField<super::messages_ethereum_definitions::EthereumDefinitions>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTx.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumSignTx {
fn default() -> &'a EthereumSignTx {
<EthereumSignTx as ::protobuf::Message>::default_instance()
}
}
impl EthereumSignTx {
pub fn new() -> EthereumSignTx {
::std::default::Default::default()
}
// optional bytes nonce = 2;
pub fn nonce(&self) -> &[u8] {
match self.nonce.as_ref() {
Some(v) => v,
None => b"",
}
}
pub fn clear_nonce(&mut self) {
self.nonce = ::std::option::Option::None;
}
pub fn has_nonce(&self) -> bool {
self.nonce.is_some()
}
// Param is passed by value, moved
pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
self.nonce = ::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_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.nonce.is_none() {
self.nonce = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.nonce.as_mut().unwrap()
}
// Take field
pub fn take_nonce(&mut self) -> ::std::vec::Vec<u8> {
self.nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes gas_price = 3;
pub fn gas_price(&self) -> &[u8] {
match self.gas_price.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_gas_price(&mut self) {
self.gas_price = ::std::option::Option::None;
}
pub fn has_gas_price(&self) -> bool {
self.gas_price.is_some()
}
// Param is passed by value, moved
pub fn set_gas_price(&mut self, v: ::std::vec::Vec<u8>) {
self.gas_price = ::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_gas_price(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gas_price.is_none() {
self.gas_price = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.gas_price.as_mut().unwrap()
}
// Take field
pub fn take_gas_price(&mut self) -> ::std::vec::Vec<u8> {
self.gas_price.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes gas_limit = 4;
pub fn gas_limit(&self) -> &[u8] {
match self.gas_limit.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_gas_limit(&mut self) {
self.gas_limit = ::std::option::Option::None;
}
pub fn has_gas_limit(&self) -> bool {
self.gas_limit.is_some()
}
// Param is passed by value, moved
pub fn set_gas_limit(&mut self, v: ::std::vec::Vec<u8>) {
self.gas_limit = ::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_gas_limit(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gas_limit.is_none() {
self.gas_limit = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.gas_limit.as_mut().unwrap()
}
// Take field
pub fn take_gas_limit(&mut self) -> ::std::vec::Vec<u8> {
self.gas_limit.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional string to = 11;
pub fn to(&self) -> &str {
match self.to.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_to(&mut self) {
self.to = ::std::option::Option::None;
}
pub fn has_to(&self) -> bool {
self.to.is_some()
}
// Param is passed by value, moved
pub fn set_to(&mut self, v: ::std::string::String) {
self.to = ::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_to(&mut self) -> &mut ::std::string::String {
if self.to.is_none() {
self.to = ::std::option::Option::Some(::std::string::String::new());
}
self.to.as_mut().unwrap()
}
// Take field
pub fn take_to(&mut self) -> ::std::string::String {
self.to.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional bytes value = 6;
pub fn value(&self) -> &[u8] {
match self.value.as_ref() {
Some(v) => v,
None => b"",
}
}
pub fn clear_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_value(&self) -> bool {
self.value.is_some()
}
// Param is passed by value, moved
pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
self.value = ::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_value(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.value.is_none() {
self.value = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.value.as_mut().unwrap()
}
// Take field
pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes data_initial_chunk = 7;
pub fn data_initial_chunk(&self) -> &[u8] {
match self.data_initial_chunk.as_ref() {
Some(v) => v,
None => b"",
}
}
pub fn clear_data_initial_chunk(&mut self) {
self.data_initial_chunk = ::std::option::Option::None;
}
pub fn has_data_initial_chunk(&self) -> bool {
self.data_initial_chunk.is_some()
}
// Param is passed by value, moved
pub fn set_data_initial_chunk(&mut self, v: ::std::vec::Vec<u8>) {
self.data_initial_chunk = ::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_data_initial_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.data_initial_chunk.is_none() {
self.data_initial_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.data_initial_chunk.as_mut().unwrap()
}
// Take field
pub fn take_data_initial_chunk(&mut self) -> ::std::vec::Vec<u8> {
self.data_initial_chunk.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional uint32 data_length = 8;
pub fn data_length(&self) -> u32 {
self.data_length.unwrap_or(0u32)
}
pub fn clear_data_length(&mut self) {
self.data_length = ::std::option::Option::None;
}
pub fn has_data_length(&self) -> bool {
self.data_length.is_some()
}
// Param is passed by value, moved
pub fn set_data_length(&mut self, v: u32) {
self.data_length = ::std::option::Option::Some(v);
}
// required uint64 chain_id = 9;
pub fn chain_id(&self) -> u64 {
self.chain_id.unwrap_or(0)
}
pub fn clear_chain_id(&mut self) {
self.chain_id = ::std::option::Option::None;
}
pub fn has_chain_id(&self) -> bool {
self.chain_id.is_some()
}
// Param is passed by value, moved
pub fn set_chain_id(&mut self, v: u64) {
self.chain_id = ::std::option::Option::Some(v);
}
// optional uint32 tx_type = 10;
pub fn tx_type(&self) -> u32 {
self.tx_type.unwrap_or(0)
}
pub fn clear_tx_type(&mut self) {
self.tx_type = ::std::option::Option::None;
}
pub fn has_tx_type(&self) -> bool {
self.tx_type.is_some()
}
// Param is passed by value, moved
pub fn set_tx_type(&mut self, v: u32) {
self.tx_type = ::std::option::Option::Some(v);
}
// optional bool chunkify = 13;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(12);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumSignTx| { &m.address_n },
|m: &mut EthereumSignTx| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"nonce",
|m: &EthereumSignTx| { &m.nonce },
|m: &mut EthereumSignTx| { &mut m.nonce },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"gas_price",
|m: &EthereumSignTx| { &m.gas_price },
|m: &mut EthereumSignTx| { &mut m.gas_price },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"gas_limit",
|m: &EthereumSignTx| { &m.gas_limit },
|m: &mut EthereumSignTx| { &mut m.gas_limit },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"to",
|m: &EthereumSignTx| { &m.to },
|m: &mut EthereumSignTx| { &mut m.to },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"value",
|m: &EthereumSignTx| { &m.value },
|m: &mut EthereumSignTx| { &mut m.value },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"data_initial_chunk",
|m: &EthereumSignTx| { &m.data_initial_chunk },
|m: &mut EthereumSignTx| { &mut m.data_initial_chunk },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"data_length",
|m: &EthereumSignTx| { &m.data_length },
|m: &mut EthereumSignTx| { &mut m.data_length },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chain_id",
|m: &EthereumSignTx| { &m.chain_id },
|m: &mut EthereumSignTx| { &mut m.chain_id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"tx_type",
|m: &EthereumSignTx| { &m.tx_type },
|m: &mut EthereumSignTx| { &mut m.tx_type },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_ethereum_definitions::EthereumDefinitions>(
"definitions",
|m: &EthereumSignTx| { &m.definitions },
|m: &mut EthereumSignTx| { &mut m.definitions },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &EthereumSignTx| { &m.chunkify },
|m: &mut EthereumSignTx| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTx>(
"EthereumSignTx",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumSignTx {
const NAME: &'static str = "EthereumSignTx";
fn is_initialized(&self) -> bool {
if self.gas_price.is_none() {
return false;
}
if self.gas_limit.is_none() {
return false;
}
if self.chain_id.is_none() {
return false;
}
for v in &self.definitions {
if !v.is_initialized() {
return false;
}
};
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
18 => {
self.nonce = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.gas_price = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.gas_limit = ::std::option::Option::Some(is.read_bytes()?);
},
90 => {
self.to = ::std::option::Option::Some(is.read_string()?);
},
50 => {
self.value = ::std::option::Option::Some(is.read_bytes()?);
},
58 => {
self.data_initial_chunk = ::std::option::Option::Some(is.read_bytes()?);
},
64 => {
self.data_length = ::std::option::Option::Some(is.read_uint32()?);
},
72 => {
self.chain_id = ::std::option::Option::Some(is.read_uint64()?);
},
80 => {
self.tx_type = ::std::option::Option::Some(is.read_uint32()?);
},
98 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.definitions)?;
},
104 => {
self.chunkify = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.nonce.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.gas_price.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.gas_limit.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
if let Some(v) = self.to.as_ref() {
my_size += ::protobuf::rt::string_size(11, &v);
}
if let Some(v) = self.value.as_ref() {
my_size += ::protobuf::rt::bytes_size(6, &v);
}
if let Some(v) = self.data_initial_chunk.as_ref() {
my_size += ::protobuf::rt::bytes_size(7, &v);
}
if let Some(v) = self.data_length {
my_size += ::protobuf::rt::uint32_size(8, v);
}
if let Some(v) = self.chain_id {
my_size += ::protobuf::rt::uint64_size(9, v);
}
if let Some(v) = self.tx_type {
my_size += ::protobuf::rt::uint32_size(10, v);
}
if let Some(v) = self.definitions.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.chunkify {
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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.nonce.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.gas_price.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.gas_limit.as_ref() {
os.write_bytes(4, v)?;
}
if let Some(v) = self.to.as_ref() {
os.write_string(11, v)?;
}
if let Some(v) = self.value.as_ref() {
os.write_bytes(6, v)?;
}
if let Some(v) = self.data_initial_chunk.as_ref() {
os.write_bytes(7, v)?;
}
if let Some(v) = self.data_length {
os.write_uint32(8, v)?;
}
if let Some(v) = self.chain_id {
os.write_uint64(9, v)?;
}
if let Some(v) = self.tx_type {
os.write_uint32(10, v)?;
}
if let Some(v) = self.definitions.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
}
if let Some(v) = self.chunkify {
os.write_bool(13, 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() -> EthereumSignTx {
EthereumSignTx::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.nonce = ::std::option::Option::None;
self.gas_price = ::std::option::Option::None;
self.gas_limit = ::std::option::Option::None;
self.to = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.data_initial_chunk = ::std::option::Option::None;
self.data_length = ::std::option::Option::None;
self.chain_id = ::std::option::Option::None;
self.tx_type = ::std::option::Option::None;
self.definitions.clear();
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumSignTx {
static instance: EthereumSignTx = EthereumSignTx {
address_n: ::std::vec::Vec::new(),
nonce: ::std::option::Option::None,
gas_price: ::std::option::Option::None,
gas_limit: ::std::option::Option::None,
to: ::std::option::Option::None,
value: ::std::option::Option::None,
data_initial_chunk: ::std::option::Option::None,
data_length: ::std::option::Option::None,
chain_id: ::std::option::Option::None,
tx_type: ::std::option::Option::None,
definitions: ::protobuf::MessageField::none(),
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumSignTx {
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("EthereumSignTx").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumSignTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumSignTx {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTxEIP1559)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTxEIP1559 {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.nonce)
pub nonce: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.max_gas_fee)
pub max_gas_fee: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.max_priority_fee)
pub max_priority_fee: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.gas_limit)
pub gas_limit: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.to)
pub to: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.value)
pub value: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.data_initial_chunk)
pub data_initial_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.data_length)
pub data_length: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chain_id)
pub chain_id: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.access_list)
pub access_list: ::std::vec::Vec<ethereum_sign_tx_eip1559::EthereumAccessList>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.definitions)
pub definitions: ::protobuf::MessageField<super::messages_ethereum_definitions::EthereumDefinitions>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumSignTxEIP1559 {
fn default() -> &'a EthereumSignTxEIP1559 {
<EthereumSignTxEIP1559 as ::protobuf::Message>::default_instance()
}
}
impl EthereumSignTxEIP1559 {
pub fn new() -> EthereumSignTxEIP1559 {
::std::default::Default::default()
}
// required bytes nonce = 2;
pub fn nonce(&self) -> &[u8] {
match self.nonce.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_nonce(&mut self) {
self.nonce = ::std::option::Option::None;
}
pub fn has_nonce(&self) -> bool {
self.nonce.is_some()
}
// Param is passed by value, moved
pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
self.nonce = ::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_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.nonce.is_none() {
self.nonce = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.nonce.as_mut().unwrap()
}
// Take field
pub fn take_nonce(&mut self) -> ::std::vec::Vec<u8> {
self.nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes max_gas_fee = 3;
pub fn max_gas_fee(&self) -> &[u8] {
match self.max_gas_fee.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_max_gas_fee(&mut self) {
self.max_gas_fee = ::std::option::Option::None;
}
pub fn has_max_gas_fee(&self) -> bool {
self.max_gas_fee.is_some()
}
// Param is passed by value, moved
pub fn set_max_gas_fee(&mut self, v: ::std::vec::Vec<u8>) {
self.max_gas_fee = ::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_max_gas_fee(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.max_gas_fee.is_none() {
self.max_gas_fee = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.max_gas_fee.as_mut().unwrap()
}
// Take field
pub fn take_max_gas_fee(&mut self) -> ::std::vec::Vec<u8> {
self.max_gas_fee.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes max_priority_fee = 4;
pub fn max_priority_fee(&self) -> &[u8] {
match self.max_priority_fee.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_max_priority_fee(&mut self) {
self.max_priority_fee = ::std::option::Option::None;
}
pub fn has_max_priority_fee(&self) -> bool {
self.max_priority_fee.is_some()
}
// Param is passed by value, moved
pub fn set_max_priority_fee(&mut self, v: ::std::vec::Vec<u8>) {
self.max_priority_fee = ::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_max_priority_fee(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.max_priority_fee.is_none() {
self.max_priority_fee = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.max_priority_fee.as_mut().unwrap()
}
// Take field
pub fn take_max_priority_fee(&mut self) -> ::std::vec::Vec<u8> {
self.max_priority_fee.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes gas_limit = 5;
pub fn gas_limit(&self) -> &[u8] {
match self.gas_limit.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_gas_limit(&mut self) {
self.gas_limit = ::std::option::Option::None;
}
pub fn has_gas_limit(&self) -> bool {
self.gas_limit.is_some()
}
// Param is passed by value, moved
pub fn set_gas_limit(&mut self, v: ::std::vec::Vec<u8>) {
self.gas_limit = ::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_gas_limit(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gas_limit.is_none() {
self.gas_limit = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.gas_limit.as_mut().unwrap()
}
// Take field
pub fn take_gas_limit(&mut self) -> ::std::vec::Vec<u8> {
self.gas_limit.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional string to = 6;
pub fn to(&self) -> &str {
match self.to.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_to(&mut self) {
self.to = ::std::option::Option::None;
}
pub fn has_to(&self) -> bool {
self.to.is_some()
}
// Param is passed by value, moved
pub fn set_to(&mut self, v: ::std::string::String) {
self.to = ::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_to(&mut self) -> &mut ::std::string::String {
if self.to.is_none() {
self.to = ::std::option::Option::Some(::std::string::String::new());
}
self.to.as_mut().unwrap()
}
// Take field
pub fn take_to(&mut self) -> ::std::string::String {
self.to.take().unwrap_or_else(|| ::std::string::String::new())
}
// required bytes value = 7;
pub fn value(&self) -> &[u8] {
match self.value.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_value(&mut self) {
self.value = ::std::option::Option::None;
}
pub fn has_value(&self) -> bool {
self.value.is_some()
}
// Param is passed by value, moved
pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
self.value = ::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_value(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.value.is_none() {
self.value = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.value.as_mut().unwrap()
}
// Take field
pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes data_initial_chunk = 8;
pub fn data_initial_chunk(&self) -> &[u8] {
match self.data_initial_chunk.as_ref() {
Some(v) => v,
None => b"",
}
}
pub fn clear_data_initial_chunk(&mut self) {
self.data_initial_chunk = ::std::option::Option::None;
}
pub fn has_data_initial_chunk(&self) -> bool {
self.data_initial_chunk.is_some()
}
// Param is passed by value, moved
pub fn set_data_initial_chunk(&mut self, v: ::std::vec::Vec<u8>) {
self.data_initial_chunk = ::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_data_initial_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.data_initial_chunk.is_none() {
self.data_initial_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.data_initial_chunk.as_mut().unwrap()
}
// Take field
pub fn take_data_initial_chunk(&mut self) -> ::std::vec::Vec<u8> {
self.data_initial_chunk.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required uint32 data_length = 9;
pub fn data_length(&self) -> u32 {
self.data_length.unwrap_or(0)
}
pub fn clear_data_length(&mut self) {
self.data_length = ::std::option::Option::None;
}
pub fn has_data_length(&self) -> bool {
self.data_length.is_some()
}
// Param is passed by value, moved
pub fn set_data_length(&mut self, v: u32) {
self.data_length = ::std::option::Option::Some(v);
}
// required uint64 chain_id = 10;
pub fn chain_id(&self) -> u64 {
self.chain_id.unwrap_or(0)
}
pub fn clear_chain_id(&mut self) {
self.chain_id = ::std::option::Option::None;
}
pub fn has_chain_id(&self) -> bool {
self.chain_id.is_some()
}
// Param is passed by value, moved
pub fn set_chain_id(&mut self, v: u64) {
self.chain_id = ::std::option::Option::Some(v);
}
// optional bool chunkify = 13;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(13);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumSignTxEIP1559| { &m.address_n },
|m: &mut EthereumSignTxEIP1559| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"nonce",
|m: &EthereumSignTxEIP1559| { &m.nonce },
|m: &mut EthereumSignTxEIP1559| { &mut m.nonce },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"max_gas_fee",
|m: &EthereumSignTxEIP1559| { &m.max_gas_fee },
|m: &mut EthereumSignTxEIP1559| { &mut m.max_gas_fee },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"max_priority_fee",
|m: &EthereumSignTxEIP1559| { &m.max_priority_fee },
|m: &mut EthereumSignTxEIP1559| { &mut m.max_priority_fee },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"gas_limit",
|m: &EthereumSignTxEIP1559| { &m.gas_limit },
|m: &mut EthereumSignTxEIP1559| { &mut m.gas_limit },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"to",
|m: &EthereumSignTxEIP1559| { &m.to },
|m: &mut EthereumSignTxEIP1559| { &mut m.to },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"value",
|m: &EthereumSignTxEIP1559| { &m.value },
|m: &mut EthereumSignTxEIP1559| { &mut m.value },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"data_initial_chunk",
|m: &EthereumSignTxEIP1559| { &m.data_initial_chunk },
|m: &mut EthereumSignTxEIP1559| { &mut m.data_initial_chunk },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"data_length",
|m: &EthereumSignTxEIP1559| { &m.data_length },
|m: &mut EthereumSignTxEIP1559| { &mut m.data_length },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chain_id",
|m: &EthereumSignTxEIP1559| { &m.chain_id },
|m: &mut EthereumSignTxEIP1559| { &mut m.chain_id },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"access_list",
|m: &EthereumSignTxEIP1559| { &m.access_list },
|m: &mut EthereumSignTxEIP1559| { &mut m.access_list },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_ethereum_definitions::EthereumDefinitions>(
"definitions",
|m: &EthereumSignTxEIP1559| { &m.definitions },
|m: &mut EthereumSignTxEIP1559| { &mut m.definitions },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &EthereumSignTxEIP1559| { &m.chunkify },
|m: &mut EthereumSignTxEIP1559| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTxEIP1559>(
"EthereumSignTxEIP1559",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumSignTxEIP1559 {
const NAME: &'static str = "EthereumSignTxEIP1559";
fn is_initialized(&self) -> bool {
if self.nonce.is_none() {
return false;
}
if self.max_gas_fee.is_none() {
return false;
}
if self.max_priority_fee.is_none() {
return false;
}
if self.gas_limit.is_none() {
return false;
}
if self.value.is_none() {
return false;
}
if self.data_length.is_none() {
return false;
}
if self.chain_id.is_none() {
return false;
}
for v in &self.access_list {
if !v.is_initialized() {
return false;
}
};
for v in &self.definitions {
if !v.is_initialized() {
return false;
}
};
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
18 => {
self.nonce = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.max_gas_fee = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.max_priority_fee = ::std::option::Option::Some(is.read_bytes()?);
},
42 => {
self.gas_limit = ::std::option::Option::Some(is.read_bytes()?);
},
50 => {
self.to = ::std::option::Option::Some(is.read_string()?);
},
58 => {
self.value = ::std::option::Option::Some(is.read_bytes()?);
},
66 => {
self.data_initial_chunk = ::std::option::Option::Some(is.read_bytes()?);
},
72 => {
self.data_length = ::std::option::Option::Some(is.read_uint32()?);
},
80 => {
self.chain_id = ::std::option::Option::Some(is.read_uint64()?);
},
90 => {
self.access_list.push(is.read_message()?);
},
98 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.definitions)?;
},
104 => {
self.chunkify = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.nonce.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.max_gas_fee.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.max_priority_fee.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
if let Some(v) = self.gas_limit.as_ref() {
my_size += ::protobuf::rt::bytes_size(5, &v);
}
if let Some(v) = self.to.as_ref() {
my_size += ::protobuf::rt::string_size(6, &v);
}
if let Some(v) = self.value.as_ref() {
my_size += ::protobuf::rt::bytes_size(7, &v);
}
if let Some(v) = self.data_initial_chunk.as_ref() {
my_size += ::protobuf::rt::bytes_size(8, &v);
}
if let Some(v) = self.data_length {
my_size += ::protobuf::rt::uint32_size(9, v);
}
if let Some(v) = self.chain_id {
my_size += ::protobuf::rt::uint64_size(10, v);
}
for value in &self.access_list {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if let Some(v) = self.definitions.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.chunkify {
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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.nonce.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.max_gas_fee.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.max_priority_fee.as_ref() {
os.write_bytes(4, v)?;
}
if let Some(v) = self.gas_limit.as_ref() {
os.write_bytes(5, v)?;
}
if let Some(v) = self.to.as_ref() {
os.write_string(6, v)?;
}
if let Some(v) = self.value.as_ref() {
os.write_bytes(7, v)?;
}
if let Some(v) = self.data_initial_chunk.as_ref() {
os.write_bytes(8, v)?;
}
if let Some(v) = self.data_length {
os.write_uint32(9, v)?;
}
if let Some(v) = self.chain_id {
os.write_uint64(10, v)?;
}
for v in &self.access_list {
::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
};
if let Some(v) = self.definitions.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
}
if let Some(v) = self.chunkify {
os.write_bool(13, 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() -> EthereumSignTxEIP1559 {
EthereumSignTxEIP1559::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.nonce = ::std::option::Option::None;
self.max_gas_fee = ::std::option::Option::None;
self.max_priority_fee = ::std::option::Option::None;
self.gas_limit = ::std::option::Option::None;
self.to = ::std::option::Option::None;
self.value = ::std::option::Option::None;
self.data_initial_chunk = ::std::option::Option::None;
self.data_length = ::std::option::Option::None;
self.chain_id = ::std::option::Option::None;
self.access_list.clear();
self.definitions.clear();
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumSignTxEIP1559 {
static instance: EthereumSignTxEIP1559 = EthereumSignTxEIP1559 {
address_n: ::std::vec::Vec::new(),
nonce: ::std::option::Option::None,
max_gas_fee: ::std::option::Option::None,
max_priority_fee: ::std::option::Option::None,
gas_limit: ::std::option::Option::None,
to: ::std::option::Option::None,
value: ::std::option::Option::None,
data_initial_chunk: ::std::option::Option::None,
data_length: ::std::option::Option::None,
chain_id: ::std::option::Option::None,
access_list: ::std::vec::Vec::new(),
definitions: ::protobuf::MessageField::none(),
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumSignTxEIP1559 {
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("EthereumSignTxEIP1559").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumSignTxEIP1559 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumSignTxEIP1559 {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `EthereumSignTxEIP1559`
pub mod ethereum_sign_tx_eip1559 {
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumAccessList {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.address)
pub address: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.storage_keys)
pub storage_keys: ::std::vec::Vec<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumAccessList {
fn default() -> &'a EthereumAccessList {
<EthereumAccessList as ::protobuf::Message>::default_instance()
}
}
impl EthereumAccessList {
pub fn new() -> EthereumAccessList {
::std::default::Default::default()
}
// required string address = 1;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::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_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
pub(in super) 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::<_, _>(
"address",
|m: &EthereumAccessList| { &m.address },
|m: &mut EthereumAccessList| { &mut m.address },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"storage_keys",
|m: &EthereumAccessList| { &m.storage_keys },
|m: &mut EthereumAccessList| { &mut m.storage_keys },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumAccessList>(
"EthereumSignTxEIP1559.EthereumAccessList",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumAccessList {
const NAME: &'static str = "EthereumAccessList";
fn is_initialized(&self) -> bool {
if self.address.is_none() {
return false;
}
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.address = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.storage_keys.push(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.address.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
for value in &self.storage_keys {
my_size += ::protobuf::rt::bytes_size(2, &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.address.as_ref() {
os.write_string(1, v)?;
}
for v in &self.storage_keys {
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() -> EthereumAccessList {
EthereumAccessList::new()
}
fn clear(&mut self) {
self.address = ::std::option::Option::None;
self.storage_keys.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumAccessList {
static instance: EthereumAccessList = EthereumAccessList {
address: ::std::option::Option::None,
storage_keys: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumAccessList {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("EthereumSignTxEIP1559.EthereumAccessList").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumAccessList {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumAccessList {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumTxRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTxRequest {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.data_length)
pub data_length: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_v)
pub signature_v: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_r)
pub signature_r: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_s)
pub signature_s: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumTxRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumTxRequest {
fn default() -> &'a EthereumTxRequest {
<EthereumTxRequest as ::protobuf::Message>::default_instance()
}
}
impl EthereumTxRequest {
pub fn new() -> EthereumTxRequest {
::std::default::Default::default()
}
// optional uint32 data_length = 1;
pub fn data_length(&self) -> u32 {
self.data_length.unwrap_or(0)
}
pub fn clear_data_length(&mut self) {
self.data_length = ::std::option::Option::None;
}
pub fn has_data_length(&self) -> bool {
self.data_length.is_some()
}
// Param is passed by value, moved
pub fn set_data_length(&mut self, v: u32) {
self.data_length = ::std::option::Option::Some(v);
}
// optional uint32 signature_v = 2;
pub fn signature_v(&self) -> u32 {
self.signature_v.unwrap_or(0)
}
pub fn clear_signature_v(&mut self) {
self.signature_v = ::std::option::Option::None;
}
pub fn has_signature_v(&self) -> bool {
self.signature_v.is_some()
}
// Param is passed by value, moved
pub fn set_signature_v(&mut self, v: u32) {
self.signature_v = ::std::option::Option::Some(v);
}
// optional bytes signature_r = 3;
pub fn signature_r(&self) -> &[u8] {
match self.signature_r.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature_r(&mut self) {
self.signature_r = ::std::option::Option::None;
}
pub fn has_signature_r(&self) -> bool {
self.signature_r.is_some()
}
// Param is passed by value, moved
pub fn set_signature_r(&mut self, v: ::std::vec::Vec<u8>) {
self.signature_r = ::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_signature_r(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature_r.is_none() {
self.signature_r = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature_r.as_mut().unwrap()
}
// Take field
pub fn take_signature_r(&mut self) -> ::std::vec::Vec<u8> {
self.signature_r.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes signature_s = 4;
pub fn signature_s(&self) -> &[u8] {
match self.signature_s.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature_s(&mut self) {
self.signature_s = ::std::option::Option::None;
}
pub fn has_signature_s(&self) -> bool {
self.signature_s.is_some()
}
// Param is passed by value, moved
pub fn set_signature_s(&mut self, v: ::std::vec::Vec<u8>) {
self.signature_s = ::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_signature_s(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature_s.is_none() {
self.signature_s = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature_s.as_mut().unwrap()
}
// Take field
pub fn take_signature_s(&mut self) -> ::std::vec::Vec<u8> {
self.signature_s.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"data_length",
|m: &EthereumTxRequest| { &m.data_length },
|m: &mut EthereumTxRequest| { &mut m.data_length },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature_v",
|m: &EthereumTxRequest| { &m.signature_v },
|m: &mut EthereumTxRequest| { &mut m.signature_v },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature_r",
|m: &EthereumTxRequest| { &m.signature_r },
|m: &mut EthereumTxRequest| { &mut m.signature_r },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature_s",
|m: &EthereumTxRequest| { &m.signature_s },
|m: &mut EthereumTxRequest| { &mut m.signature_s },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumTxRequest>(
"EthereumTxRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumTxRequest {
const NAME: &'static str = "EthereumTxRequest";
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.data_length = ::std::option::Option::Some(is.read_uint32()?);
},
16 => {
self.signature_v = ::std::option::Option::Some(is.read_uint32()?);
},
26 => {
self.signature_r = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.signature_s = ::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.data_length {
my_size += ::protobuf::rt::uint32_size(1, v);
}
if let Some(v) = self.signature_v {
my_size += ::protobuf::rt::uint32_size(2, v);
}
if let Some(v) = self.signature_r.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.signature_s.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &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.data_length {
os.write_uint32(1, v)?;
}
if let Some(v) = self.signature_v {
os.write_uint32(2, v)?;
}
if let Some(v) = self.signature_r.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.signature_s.as_ref() {
os.write_bytes(4, 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() -> EthereumTxRequest {
EthereumTxRequest::new()
}
fn clear(&mut self) {
self.data_length = ::std::option::Option::None;
self.signature_v = ::std::option::Option::None;
self.signature_r = ::std::option::Option::None;
self.signature_s = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumTxRequest {
static instance: EthereumTxRequest = EthereumTxRequest {
data_length: ::std::option::Option::None,
signature_v: ::std::option::Option::None,
signature_r: ::std::option::Option::None,
signature_s: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumTxRequest {
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("EthereumTxRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumTxRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumTxRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumTxAck)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTxAck {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxAck.data_chunk)
pub data_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumTxAck.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumTxAck {
fn default() -> &'a EthereumTxAck {
<EthereumTxAck as ::protobuf::Message>::default_instance()
}
}
impl EthereumTxAck {
pub fn new() -> EthereumTxAck {
::std::default::Default::default()
}
// required bytes data_chunk = 1;
pub fn data_chunk(&self) -> &[u8] {
match self.data_chunk.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_data_chunk(&mut self) {
self.data_chunk = ::std::option::Option::None;
}
pub fn has_data_chunk(&self) -> bool {
self.data_chunk.is_some()
}
// Param is passed by value, moved
pub fn set_data_chunk(&mut self, v: ::std::vec::Vec<u8>) {
self.data_chunk = ::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_data_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.data_chunk.is_none() {
self.data_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.data_chunk.as_mut().unwrap()
}
// Take field
pub fn take_data_chunk(&mut self) -> ::std::vec::Vec<u8> {
self.data_chunk.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::<_, _>(
"data_chunk",
|m: &EthereumTxAck| { &m.data_chunk },
|m: &mut EthereumTxAck| { &mut m.data_chunk },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumTxAck>(
"EthereumTxAck",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumTxAck {
const NAME: &'static str = "EthereumTxAck";
fn is_initialized(&self) -> bool {
if self.data_chunk.is_none() {
return false;
}
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.data_chunk = ::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.data_chunk.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.data_chunk.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() -> EthereumTxAck {
EthereumTxAck::new()
}
fn clear(&mut self) {
self.data_chunk = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumTxAck {
static instance: EthereumTxAck = EthereumTxAck {
data_chunk: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumTxAck {
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("EthereumTxAck").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumTxAck {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumTxAck {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignMessage {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.message)
pub message: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.encoded_network)
pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignMessage.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumSignMessage {
fn default() -> &'a EthereumSignMessage {
<EthereumSignMessage as ::protobuf::Message>::default_instance()
}
}
impl EthereumSignMessage {
pub fn new() -> EthereumSignMessage {
::std::default::Default::default()
}
// required bytes message = 2;
pub fn message(&self) -> &[u8] {
match self.message.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_message(&mut self) {
self.message = ::std::option::Option::None;
}
pub fn has_message(&self) -> bool {
self.message.is_some()
}
// Param is passed by value, moved
pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.message.is_none() {
self.message = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.message.as_mut().unwrap()
}
// Take field
pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes encoded_network = 3;
pub fn encoded_network(&self) -> &[u8] {
match self.encoded_network.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_encoded_network(&mut self) {
self.encoded_network = ::std::option::Option::None;
}
pub fn has_encoded_network(&self) -> bool {
self.encoded_network.is_some()
}
// Param is passed by value, moved
pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.encoded_network.is_none() {
self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.encoded_network.as_mut().unwrap()
}
// Take field
pub fn take_encoded_network(&mut self) -> ::std::vec::Vec<u8> {
self.encoded_network.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bool chunkify = 4;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumSignMessage| { &m.address_n },
|m: &mut EthereumSignMessage| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"message",
|m: &EthereumSignMessage| { &m.message },
|m: &mut EthereumSignMessage| { &mut m.message },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"encoded_network",
|m: &EthereumSignMessage| { &m.encoded_network },
|m: &mut EthereumSignMessage| { &mut m.encoded_network },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &EthereumSignMessage| { &m.chunkify },
|m: &mut EthereumSignMessage| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignMessage>(
"EthereumSignMessage",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumSignMessage {
const NAME: &'static str = "EthereumSignMessage";
fn is_initialized(&self) -> bool {
if self.message.is_none() {
return false;
}
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
18 => {
self.message = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.encoded_network = ::std::option::Option::Some(is.read_bytes()?);
},
32 => {
self.chunkify = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.message.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.encoded_network.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.chunkify {
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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.message.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.encoded_network.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(4, 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() -> EthereumSignMessage {
EthereumSignMessage::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.message = ::std::option::Option::None;
self.encoded_network = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumSignMessage {
static instance: EthereumSignMessage = EthereumSignMessage {
address_n: ::std::vec::Vec::new(),
message: ::std::option::Option::None,
encoded_network: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumSignMessage {
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("EthereumSignMessage").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumSignMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumSignMessage {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumMessageSignature)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumMessageSignature {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumMessageSignature.signature)
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumMessageSignature.address)
pub address: ::std::option::Option<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumMessageSignature.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumMessageSignature {
fn default() -> &'a EthereumMessageSignature {
<EthereumMessageSignature as ::protobuf::Message>::default_instance()
}
}
impl EthereumMessageSignature {
pub fn new() -> EthereumMessageSignature {
::std::default::Default::default()
}
// required bytes signature = 2;
pub fn signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature = ::std::option::Option::None;
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
// Param is passed by value, moved
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature.as_mut().unwrap()
}
// Take field
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required string address = 3;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::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_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::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::<_, _>(
"signature",
|m: &EthereumMessageSignature| { &m.signature },
|m: &mut EthereumMessageSignature| { &mut m.signature },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &EthereumMessageSignature| { &m.address },
|m: &mut EthereumMessageSignature| { &mut m.address },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumMessageSignature>(
"EthereumMessageSignature",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumMessageSignature {
const NAME: &'static str = "EthereumMessageSignature";
fn is_initialized(&self) -> bool {
if self.signature.is_none() {
return false;
}
if self.address.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
18 => {
self.signature = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.address = ::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.signature.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_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.signature.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.address.as_ref() {
os.write_string(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() -> EthereumMessageSignature {
EthereumMessageSignature::new()
}
fn clear(&mut self) {
self.signature = ::std::option::Option::None;
self.address = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumMessageSignature {
static instance: EthereumMessageSignature = EthereumMessageSignature {
signature: ::std::option::Option::None,
address: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumMessageSignature {
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("EthereumMessageSignature").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumMessageSignature {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumMessageSignature {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumVerifyMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumVerifyMessage {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.signature)
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.message)
pub message: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.address)
pub address: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumVerifyMessage.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumVerifyMessage {
fn default() -> &'a EthereumVerifyMessage {
<EthereumVerifyMessage as ::protobuf::Message>::default_instance()
}
}
impl EthereumVerifyMessage {
pub fn new() -> EthereumVerifyMessage {
::std::default::Default::default()
}
// required bytes signature = 2;
pub fn signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature = ::std::option::Option::None;
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
// Param is passed by value, moved
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature.as_mut().unwrap()
}
// Take field
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes message = 3;
pub fn message(&self) -> &[u8] {
match self.message.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_message(&mut self) {
self.message = ::std::option::Option::None;
}
pub fn has_message(&self) -> bool {
self.message.is_some()
}
// Param is passed by value, moved
pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.message.is_none() {
self.message = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.message.as_mut().unwrap()
}
// Take field
pub fn take_message(&mut self) -> ::std::vec::Vec<u8> {
self.message.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required string address = 4;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::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_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional bool chunkify = 5;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature",
|m: &EthereumVerifyMessage| { &m.signature },
|m: &mut EthereumVerifyMessage| { &mut m.signature },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"message",
|m: &EthereumVerifyMessage| { &m.message },
|m: &mut EthereumVerifyMessage| { &mut m.message },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &EthereumVerifyMessage| { &m.address },
|m: &mut EthereumVerifyMessage| { &mut m.address },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &EthereumVerifyMessage| { &m.chunkify },
|m: &mut EthereumVerifyMessage| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumVerifyMessage>(
"EthereumVerifyMessage",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumVerifyMessage {
const NAME: &'static str = "EthereumVerifyMessage";
fn is_initialized(&self) -> bool {
if self.signature.is_none() {
return false;
}
if self.message.is_none() {
return false;
}
if self.address.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
18 => {
self.signature = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.message = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.address = ::std::option::Option::Some(is.read_string()?);
},
40 => {
self.chunkify = ::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.signature.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.message.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
if let Some(v) = self.chunkify {
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.signature.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.message.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.address.as_ref() {
os.write_string(4, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(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() -> EthereumVerifyMessage {
EthereumVerifyMessage::new()
}
fn clear(&mut self) {
self.signature = ::std::option::Option::None;
self.message = ::std::option::Option::None;
self.address = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumVerifyMessage {
static instance: EthereumVerifyMessage = EthereumVerifyMessage {
signature: ::std::option::Option::None,
message: ::std::option::Option::None,
address: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumVerifyMessage {
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("EthereumVerifyMessage").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumVerifyMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumVerifyMessage {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTypedHash)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTypedHash {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.domain_separator_hash)
pub domain_separator_hash: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.message_hash)
pub message_hash: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.encoded_network)
pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTypedHash.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumSignTypedHash {
fn default() -> &'a EthereumSignTypedHash {
<EthereumSignTypedHash as ::protobuf::Message>::default_instance()
}
}
impl EthereumSignTypedHash {
pub fn new() -> EthereumSignTypedHash {
::std::default::Default::default()
}
// required bytes domain_separator_hash = 2;
pub fn domain_separator_hash(&self) -> &[u8] {
match self.domain_separator_hash.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_domain_separator_hash(&mut self) {
self.domain_separator_hash = ::std::option::Option::None;
}
pub fn has_domain_separator_hash(&self) -> bool {
self.domain_separator_hash.is_some()
}
// Param is passed by value, moved
pub fn set_domain_separator_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.domain_separator_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_domain_separator_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.domain_separator_hash.is_none() {
self.domain_separator_hash = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.domain_separator_hash.as_mut().unwrap()
}
// Take field
pub fn take_domain_separator_hash(&mut self) -> ::std::vec::Vec<u8> {
self.domain_separator_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes message_hash = 3;
pub fn message_hash(&self) -> &[u8] {
match self.message_hash.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_message_hash(&mut self) {
self.message_hash = ::std::option::Option::None;
}
pub fn has_message_hash(&self) -> bool {
self.message_hash.is_some()
}
// Param is passed by value, moved
pub fn set_message_hash(&mut self, v: ::std::vec::Vec<u8>) {
self.message_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_message_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.message_hash.is_none() {
self.message_hash = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.message_hash.as_mut().unwrap()
}
// Take field
pub fn take_message_hash(&mut self) -> ::std::vec::Vec<u8> {
self.message_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes encoded_network = 4;
pub fn encoded_network(&self) -> &[u8] {
match self.encoded_network.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_encoded_network(&mut self) {
self.encoded_network = ::std::option::Option::None;
}
pub fn has_encoded_network(&self) -> bool {
self.encoded_network.is_some()
}
// Param is passed by value, moved
pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.encoded_network.is_none() {
self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.encoded_network.as_mut().unwrap()
}
// Take field
pub fn take_encoded_network(&mut self) -> ::std::vec::Vec<u8> {
self.encoded_network.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &EthereumSignTypedHash| { &m.address_n },
|m: &mut EthereumSignTypedHash| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"domain_separator_hash",
|m: &EthereumSignTypedHash| { &m.domain_separator_hash },
|m: &mut EthereumSignTypedHash| { &mut m.domain_separator_hash },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"message_hash",
|m: &EthereumSignTypedHash| { &m.message_hash },
|m: &mut EthereumSignTypedHash| { &mut m.message_hash },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"encoded_network",
|m: &EthereumSignTypedHash| { &m.encoded_network },
|m: &mut EthereumSignTypedHash| { &mut m.encoded_network },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTypedHash>(
"EthereumSignTypedHash",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumSignTypedHash {
const NAME: &'static str = "EthereumSignTypedHash";
fn is_initialized(&self) -> bool {
if self.domain_separator_hash.is_none() {
return false;
}
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 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
18 => {
self.domain_separator_hash = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.message_hash = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.encoded_network = ::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;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.domain_separator_hash.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.message_hash.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.encoded_network.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &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<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.domain_separator_hash.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.message_hash.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.encoded_network.as_ref() {
os.write_bytes(4, 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() -> EthereumSignTypedHash {
EthereumSignTypedHash::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.domain_separator_hash = ::std::option::Option::None;
self.message_hash = ::std::option::Option::None;
self.encoded_network = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumSignTypedHash {
static instance: EthereumSignTypedHash = EthereumSignTypedHash {
address_n: ::std::vec::Vec::new(),
domain_separator_hash: ::std::option::Option::None,
message_hash: ::std::option::Option::None,
encoded_network: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumSignTypedHash {
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("EthereumSignTypedHash").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumSignTypedHash {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumSignTypedHash {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumTypedDataSignature)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTypedDataSignature {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTypedDataSignature.signature)
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTypedDataSignature.address)
pub address: ::std::option::Option<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumTypedDataSignature.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a EthereumTypedDataSignature {
fn default() -> &'a EthereumTypedDataSignature {
<EthereumTypedDataSignature as ::protobuf::Message>::default_instance()
}
}
impl EthereumTypedDataSignature {
pub fn new() -> EthereumTypedDataSignature {
::std::default::Default::default()
}
// required bytes signature = 1;
pub fn signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature = ::std::option::Option::None;
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
// Param is passed by value, moved
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature.as_mut().unwrap()
}
// Take field
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required string address = 2;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::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_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::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::<_, _>(
"signature",
|m: &EthereumTypedDataSignature| { &m.signature },
|m: &mut EthereumTypedDataSignature| { &mut m.signature },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &EthereumTypedDataSignature| { &m.address },
|m: &mut EthereumTypedDataSignature| { &mut m.address },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumTypedDataSignature>(
"EthereumTypedDataSignature",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for EthereumTypedDataSignature {
const NAME: &'static str = "EthereumTypedDataSignature";
fn is_initialized(&self) -> bool {
if self.signature.is_none() {
return false;
}
if self.address.is_none() {
return false;
}
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.signature = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
self.address = ::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.signature.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_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.signature.as_ref() {
os.write_bytes(1, v)?;
}
if let Some(v) = self.address.as_ref() {
os.write_string(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() -> EthereumTypedDataSignature {
EthereumTypedDataSignature::new()
}
fn clear(&mut self) {
self.signature = ::std::option::Option::None;
self.address = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static EthereumTypedDataSignature {
static instance: EthereumTypedDataSignature = EthereumTypedDataSignature {
signature: ::std::option::Option::None,
address: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for EthereumTypedDataSignature {
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("EthereumTypedDataSignature").unwrap()).clone()
}
}
impl ::std::fmt::Display for EthereumTypedDataSignature {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EthereumTypedDataSignature {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x17messages-ethereum.proto\x12\x1bhw.trezor.messages.ethereum\x1a\x15\
messages-common.proto\x1a#messages-ethereum-definitions.proto\"V\n\x14Et\
hereumGetPublicKey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\
\x12!\n\x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\"b\n\x11Eth\
ereumPublicKey\x129\n\x04node\x18\x01\x20\x02(\x0b2%.hw.trezor.messages.\
common.HDNodeTypeR\x04node\x12\x12\n\x04xpub\x18\x02\x20\x02(\tR\x04xpub\
\"\x99\x01\n\x12EthereumGetAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\
\rR\x08addressN\x12!\n\x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisp\
lay\x12'\n\x0fencoded_network\x18\x03\x20\x01(\x0cR\x0eencodedNetwork\
\x12\x1a\n\x08chunkify\x18\x04\x20\x01(\x08R\x08chunkify\"Q\n\x0fEthereu\
mAddress\x12$\n\x0c_old_address\x18\x01\x20\x01(\x0cR\nOldAddressB\x02\
\x18\x01\x12\x18\n\x07address\x18\x02\x20\x01(\tR\x07address\"\xad\x03\n\
\x0eEthereumSignTx\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\
\x12\x16\n\x05nonce\x18\x02\x20\x01(\x0c:\0R\x05nonce\x12\x1b\n\tgas_pri\
ce\x18\x03\x20\x02(\x0cR\x08gasPrice\x12\x1b\n\tgas_limit\x18\x04\x20\
\x02(\x0cR\x08gasLimit\x12\x10\n\x02to\x18\x0b\x20\x01(\t:\0R\x02to\x12\
\x16\n\x05value\x18\x06\x20\x01(\x0c:\0R\x05value\x12.\n\x12data_initial\
_chunk\x18\x07\x20\x01(\x0c:\0R\x10dataInitialChunk\x12\"\n\x0bdata_leng\
th\x18\x08\x20\x01(\r:\x010R\ndataLength\x12\x19\n\x08chain_id\x18\t\x20\
\x02(\x04R\x07chainId\x12\x17\n\x07tx_type\x18\n\x20\x01(\rR\x06txType\
\x12^\n\x0bdefinitions\x18\x0c\x20\x01(\x0b2<.hw.trezor.messages.ethereu\
m_definitions.EthereumDefinitionsR\x0bdefinitions\x12\x1a\n\x08chunkify\
\x18\r\x20\x01(\x08R\x08chunkify\"\xfc\x04\n\x15EthereumSignTxEIP1559\
\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x14\n\x05nonce\
\x18\x02\x20\x02(\x0cR\x05nonce\x12\x1e\n\x0bmax_gas_fee\x18\x03\x20\x02\
(\x0cR\tmaxGasFee\x12(\n\x10max_priority_fee\x18\x04\x20\x02(\x0cR\x0ema\
xPriorityFee\x12\x1b\n\tgas_limit\x18\x05\x20\x02(\x0cR\x08gasLimit\x12\
\x10\n\x02to\x18\x06\x20\x01(\t:\0R\x02to\x12\x14\n\x05value\x18\x07\x20\
\x02(\x0cR\x05value\x12.\n\x12data_initial_chunk\x18\x08\x20\x01(\x0c:\0\
R\x10dataInitialChunk\x12\x1f\n\x0bdata_length\x18\t\x20\x02(\rR\ndataLe\
ngth\x12\x19\n\x08chain_id\x18\n\x20\x02(\x04R\x07chainId\x12f\n\x0bacce\
ss_list\x18\x0b\x20\x03(\x0b2E.hw.trezor.messages.ethereum.EthereumSignT\
xEIP1559.EthereumAccessListR\naccessList\x12^\n\x0bdefinitions\x18\x0c\
\x20\x01(\x0b2<.hw.trezor.messages.ethereum_definitions.EthereumDefiniti\
onsR\x0bdefinitions\x12\x1a\n\x08chunkify\x18\r\x20\x01(\x08R\x08chunkif\
y\x1aQ\n\x12EthereumAccessList\x12\x18\n\x07address\x18\x01\x20\x02(\tR\
\x07address\x12!\n\x0cstorage_keys\x18\x02\x20\x03(\x0cR\x0bstorageKeys\
\"\x97\x01\n\x11EthereumTxRequest\x12\x1f\n\x0bdata_length\x18\x01\x20\
\x01(\rR\ndataLength\x12\x1f\n\x0bsignature_v\x18\x02\x20\x01(\rR\nsigna\
tureV\x12\x1f\n\x0bsignature_r\x18\x03\x20\x01(\x0cR\nsignatureR\x12\x1f\
\n\x0bsignature_s\x18\x04\x20\x01(\x0cR\nsignatureS\".\n\rEthereumTxAck\
\x12\x1d\n\ndata_chunk\x18\x01\x20\x02(\x0cR\tdataChunk\"\x91\x01\n\x13E\
thereumSignMessage\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\
\x12\x18\n\x07message\x18\x02\x20\x02(\x0cR\x07message\x12'\n\x0fencoded\
_network\x18\x03\x20\x01(\x0cR\x0eencodedNetwork\x12\x1a\n\x08chunkify\
\x18\x04\x20\x01(\x08R\x08chunkify\"R\n\x18EthereumMessageSignature\x12\
\x1c\n\tsignature\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07address\
\x18\x03\x20\x02(\tR\x07address\"\x85\x01\n\x15EthereumVerifyMessage\x12\
\x1c\n\tsignature\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07message\
\x18\x03\x20\x02(\x0cR\x07message\x12\x18\n\x07address\x18\x04\x20\x02(\
\tR\x07address\x12\x1a\n\x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\
\xb4\x01\n\x15EthereumSignTypedHash\x12\x1b\n\taddress_n\x18\x01\x20\x03\
(\rR\x08addressN\x122\n\x15domain_separator_hash\x18\x02\x20\x02(\x0cR\
\x13domainSeparatorHash\x12!\n\x0cmessage_hash\x18\x03\x20\x01(\x0cR\x0b\
messageHash\x12'\n\x0fencoded_network\x18\x04\x20\x01(\x0cR\x0eencodedNe\
twork\"T\n\x1aEthereumTypedDataSignature\x12\x1c\n\tsignature\x18\x01\
\x20\x02(\x0cR\tsignature\x12\x18\n\x07address\x18\x02\x20\x02(\tR\x07ad\
dressB<\n#com.satoshilabs.trezor.lib.protobufB\x15TrezorMessageEthereum\
";
/// `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(2);
deps.push(super::messages_common::file_descriptor().clone());
deps.push(super::messages_ethereum_definitions::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(14);
messages.push(EthereumGetPublicKey::generated_message_descriptor_data());
messages.push(EthereumPublicKey::generated_message_descriptor_data());
messages.push(EthereumGetAddress::generated_message_descriptor_data());
messages.push(EthereumAddress::generated_message_descriptor_data());
messages.push(EthereumSignTx::generated_message_descriptor_data());
messages.push(EthereumSignTxEIP1559::generated_message_descriptor_data());
messages.push(EthereumTxRequest::generated_message_descriptor_data());
messages.push(EthereumTxAck::generated_message_descriptor_data());
messages.push(EthereumSignMessage::generated_message_descriptor_data());
messages.push(EthereumMessageSignature::generated_message_descriptor_data());
messages.push(EthereumVerifyMessage::generated_message_descriptor_data());
messages.push(EthereumSignTypedHash::generated_message_descriptor_data());
messages.push(EthereumTypedDataSignature::generated_message_descriptor_data());
messages.push(ethereum_sign_tx_eip1559::EthereumAccessList::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)
})
}