mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-23 06:58:13 +00:00
feat(common): Add PaymentRequest field to Ethereum signing.
This commit is contained in:
parent
607b5c26fe
commit
b4d3f9bcc6
@ -6,6 +6,7 @@ option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
|||||||
option java_outer_classname = "TrezorMessageEthereum";
|
option java_outer_classname = "TrezorMessageEthereum";
|
||||||
|
|
||||||
import "messages-common.proto";
|
import "messages-common.proto";
|
||||||
|
import "options.proto";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request: Ask device for public key corresponding to address_n path
|
* Request: Ask device for public key corresponding to address_n path
|
||||||
@ -72,6 +73,7 @@ message EthereumSignTx {
|
|||||||
optional uint32 tx_type = 10; // Used for Wanchain
|
optional uint32 tx_type = 10; // Used for Wanchain
|
||||||
optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
||||||
optional bool chunkify = 13; // display the address in chunks of 4 characters
|
optional bool chunkify = 13; // display the address in chunks of 4 characters
|
||||||
|
optional common.PaymentRequest payment_req = 14 [(experimental_field)=true]; // SLIP-24 payment request
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,6 +97,7 @@ message EthereumSignTxEIP1559 {
|
|||||||
repeated EthereumAccessList access_list = 11; // Access List
|
repeated EthereumAccessList access_list = 11; // Access List
|
||||||
optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
||||||
optional bool chunkify = 13; // display the address in chunks of 4 characters
|
optional bool chunkify = 13; // display the address in chunks of 4 characters
|
||||||
|
optional common.PaymentRequest payment_req = 14 [(experimental_field)=true]; // SLIP-24 payment request
|
||||||
|
|
||||||
message EthereumAccessList {
|
message EthereumAccessList {
|
||||||
required string address = 1;
|
required string address = 1;
|
||||||
|
@ -87,7 +87,6 @@ Q(apps.bitcoin.sign_tx.helpers)
|
|||||||
Q(apps.bitcoin.sign_tx.layout)
|
Q(apps.bitcoin.sign_tx.layout)
|
||||||
Q(apps.bitcoin.sign_tx.matchcheck)
|
Q(apps.bitcoin.sign_tx.matchcheck)
|
||||||
Q(apps.bitcoin.sign_tx.omni)
|
Q(apps.bitcoin.sign_tx.omni)
|
||||||
Q(apps.bitcoin.sign_tx.payment_request)
|
|
||||||
Q(apps.bitcoin.sign_tx.progress)
|
Q(apps.bitcoin.sign_tx.progress)
|
||||||
Q(apps.bitcoin.sign_tx.sig_hasher)
|
Q(apps.bitcoin.sign_tx.sig_hasher)
|
||||||
Q(apps.bitcoin.sign_tx.tx_info)
|
Q(apps.bitcoin.sign_tx.tx_info)
|
||||||
@ -111,6 +110,7 @@ Q(apps.common.definitions_constants)
|
|||||||
Q(apps.common.keychain)
|
Q(apps.common.keychain)
|
||||||
Q(apps.common.passphrase)
|
Q(apps.common.passphrase)
|
||||||
Q(apps.common.paths)
|
Q(apps.common.paths)
|
||||||
|
Q(apps.common.payment_request)
|
||||||
Q(apps.common.readers)
|
Q(apps.common.readers)
|
||||||
Q(apps.common.request_pin)
|
Q(apps.common.request_pin)
|
||||||
Q(apps.common.safety_checks)
|
Q(apps.common.safety_checks)
|
||||||
|
4
core/src/trezor/messages.py
generated
4
core/src/trezor/messages.py
generated
@ -3608,6 +3608,7 @@ if TYPE_CHECKING:
|
|||||||
tx_type: "int | None"
|
tx_type: "int | None"
|
||||||
definitions: "EthereumDefinitions | None"
|
definitions: "EthereumDefinitions | None"
|
||||||
chunkify: "bool | None"
|
chunkify: "bool | None"
|
||||||
|
payment_req: "PaymentRequest | None"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -3624,6 +3625,7 @@ if TYPE_CHECKING:
|
|||||||
tx_type: "int | None" = None,
|
tx_type: "int | None" = None,
|
||||||
definitions: "EthereumDefinitions | None" = None,
|
definitions: "EthereumDefinitions | None" = None,
|
||||||
chunkify: "bool | None" = None,
|
chunkify: "bool | None" = None,
|
||||||
|
payment_req: "PaymentRequest | None" = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -3645,6 +3647,7 @@ if TYPE_CHECKING:
|
|||||||
access_list: "list[EthereumAccessList]"
|
access_list: "list[EthereumAccessList]"
|
||||||
definitions: "EthereumDefinitions | None"
|
definitions: "EthereumDefinitions | None"
|
||||||
chunkify: "bool | None"
|
chunkify: "bool | None"
|
||||||
|
payment_req: "PaymentRequest | None"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -3662,6 +3665,7 @@ if TYPE_CHECKING:
|
|||||||
data_initial_chunk: "bytes | None" = None,
|
data_initial_chunk: "bytes | None" = None,
|
||||||
definitions: "EthereumDefinitions | None" = None,
|
definitions: "EthereumDefinitions | None" = None,
|
||||||
chunkify: "bool | None" = None,
|
chunkify: "bool | None" = None,
|
||||||
|
payment_req: "PaymentRequest | None" = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
6
python/src/trezorlib/messages.py
generated
6
python/src/trezorlib/messages.py
generated
@ -4971,6 +4971,7 @@ class EthereumSignTx(protobuf.MessageType):
|
|||||||
10: protobuf.Field("tx_type", "uint32", repeated=False, required=False, default=None),
|
10: protobuf.Field("tx_type", "uint32", repeated=False, required=False, default=None),
|
||||||
12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
|
12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
|
||||||
13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
|
13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
|
||||||
|
14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -4988,6 +4989,7 @@ class EthereumSignTx(protobuf.MessageType):
|
|||||||
tx_type: Optional["int"] = None,
|
tx_type: Optional["int"] = None,
|
||||||
definitions: Optional["EthereumDefinitions"] = None,
|
definitions: Optional["EthereumDefinitions"] = None,
|
||||||
chunkify: Optional["bool"] = None,
|
chunkify: Optional["bool"] = None,
|
||||||
|
payment_req: Optional["PaymentRequest"] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address_n: Sequence["int"] = address_n if address_n is not None else []
|
self.address_n: Sequence["int"] = address_n if address_n is not None else []
|
||||||
self.gas_price = gas_price
|
self.gas_price = gas_price
|
||||||
@ -5001,6 +5003,7 @@ class EthereumSignTx(protobuf.MessageType):
|
|||||||
self.tx_type = tx_type
|
self.tx_type = tx_type
|
||||||
self.definitions = definitions
|
self.definitions = definitions
|
||||||
self.chunkify = chunkify
|
self.chunkify = chunkify
|
||||||
|
self.payment_req = payment_req
|
||||||
|
|
||||||
|
|
||||||
class EthereumSignTxEIP1559(protobuf.MessageType):
|
class EthereumSignTxEIP1559(protobuf.MessageType):
|
||||||
@ -5019,6 +5022,7 @@ class EthereumSignTxEIP1559(protobuf.MessageType):
|
|||||||
11: protobuf.Field("access_list", "EthereumAccessList", repeated=True, required=False, default=None),
|
11: protobuf.Field("access_list", "EthereumAccessList", repeated=True, required=False, default=None),
|
||||||
12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
|
12: protobuf.Field("definitions", "EthereumDefinitions", repeated=False, required=False, default=None),
|
||||||
13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
|
13: protobuf.Field("chunkify", "bool", repeated=False, required=False, default=None),
|
||||||
|
14: protobuf.Field("payment_req", "PaymentRequest", repeated=False, required=False, default=None),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -5037,6 +5041,7 @@ class EthereumSignTxEIP1559(protobuf.MessageType):
|
|||||||
data_initial_chunk: Optional["bytes"] = b'',
|
data_initial_chunk: Optional["bytes"] = b'',
|
||||||
definitions: Optional["EthereumDefinitions"] = None,
|
definitions: Optional["EthereumDefinitions"] = None,
|
||||||
chunkify: Optional["bool"] = None,
|
chunkify: Optional["bool"] = None,
|
||||||
|
payment_req: Optional["PaymentRequest"] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address_n: Sequence["int"] = address_n if address_n is not None else []
|
self.address_n: Sequence["int"] = address_n if address_n is not None else []
|
||||||
self.access_list: Sequence["EthereumAccessList"] = access_list if access_list is not None else []
|
self.access_list: Sequence["EthereumAccessList"] = access_list if access_list is not None else []
|
||||||
@ -5051,6 +5056,7 @@ class EthereumSignTxEIP1559(protobuf.MessageType):
|
|||||||
self.data_initial_chunk = data_initial_chunk
|
self.data_initial_chunk = data_initial_chunk
|
||||||
self.definitions = definitions
|
self.definitions = definitions
|
||||||
self.chunkify = chunkify
|
self.chunkify = chunkify
|
||||||
|
self.payment_req = payment_req
|
||||||
|
|
||||||
|
|
||||||
class EthereumTxRequest(protobuf.MessageType):
|
class EthereumTxRequest(protobuf.MessageType):
|
||||||
|
@ -921,6 +921,8 @@ pub struct EthereumSignTx {
|
|||||||
pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
|
pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
|
||||||
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chunkify)
|
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chunkify)
|
||||||
pub chunkify: ::std::option::Option<bool>,
|
pub chunkify: ::std::option::Option<bool>,
|
||||||
|
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.payment_req)
|
||||||
|
pub payment_req: ::protobuf::MessageField<super::messages_common::PaymentRequest>,
|
||||||
// special fields
|
// special fields
|
||||||
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTx.special_fields)
|
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTx.special_fields)
|
||||||
pub special_fields: ::protobuf::SpecialFields,
|
pub special_fields: ::protobuf::SpecialFields,
|
||||||
@ -1230,7 +1232,7 @@ impl EthereumSignTx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||||
let mut fields = ::std::vec::Vec::with_capacity(12);
|
let mut fields = ::std::vec::Vec::with_capacity(13);
|
||||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||||
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
|
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
|
||||||
"address_n",
|
"address_n",
|
||||||
@ -1292,6 +1294,11 @@ impl EthereumSignTx {
|
|||||||
|m: &EthereumSignTx| { &m.chunkify },
|
|m: &EthereumSignTx| { &m.chunkify },
|
||||||
|m: &mut EthereumSignTx| { &mut m.chunkify },
|
|m: &mut EthereumSignTx| { &mut m.chunkify },
|
||||||
));
|
));
|
||||||
|
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::PaymentRequest>(
|
||||||
|
"payment_req",
|
||||||
|
|m: &EthereumSignTx| { &m.payment_req },
|
||||||
|
|m: &mut EthereumSignTx| { &mut m.payment_req },
|
||||||
|
));
|
||||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTx>(
|
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTx>(
|
||||||
"EthereumSignTx",
|
"EthereumSignTx",
|
||||||
fields,
|
fields,
|
||||||
@ -1318,6 +1325,11 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
for v in &self.payment_req {
|
||||||
|
if !v.is_initialized() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1363,6 +1375,9 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
104 => {
|
104 => {
|
||||||
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
|
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
|
||||||
},
|
},
|
||||||
|
114 => {
|
||||||
|
::protobuf::rt::read_singular_message_into_field(is, &mut self.payment_req)?;
|
||||||
|
},
|
||||||
tag => {
|
tag => {
|
||||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||||
},
|
},
|
||||||
@ -1412,6 +1427,10 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
if let Some(v) = self.chunkify {
|
if let Some(v) = self.chunkify {
|
||||||
my_size += 1 + 1;
|
my_size += 1 + 1;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.payment_req.as_ref() {
|
||||||
|
let len = v.compute_size();
|
||||||
|
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
|
||||||
|
}
|
||||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||||
self.special_fields.cached_size().set(my_size as u32);
|
self.special_fields.cached_size().set(my_size as u32);
|
||||||
my_size
|
my_size
|
||||||
@ -1454,6 +1473,9 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
if let Some(v) = self.chunkify {
|
if let Some(v) = self.chunkify {
|
||||||
os.write_bool(13, v)?;
|
os.write_bool(13, v)?;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.payment_req.as_ref() {
|
||||||
|
::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
|
||||||
|
}
|
||||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||||
::std::result::Result::Ok(())
|
::std::result::Result::Ok(())
|
||||||
}
|
}
|
||||||
@ -1483,6 +1505,7 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
self.tx_type = ::std::option::Option::None;
|
self.tx_type = ::std::option::Option::None;
|
||||||
self.definitions.clear();
|
self.definitions.clear();
|
||||||
self.chunkify = ::std::option::Option::None;
|
self.chunkify = ::std::option::Option::None;
|
||||||
|
self.payment_req.clear();
|
||||||
self.special_fields.clear();
|
self.special_fields.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1500,6 +1523,7 @@ impl ::protobuf::Message for EthereumSignTx {
|
|||||||
tx_type: ::std::option::Option::None,
|
tx_type: ::std::option::Option::None,
|
||||||
definitions: ::protobuf::MessageField::none(),
|
definitions: ::protobuf::MessageField::none(),
|
||||||
chunkify: ::std::option::Option::None,
|
chunkify: ::std::option::Option::None,
|
||||||
|
payment_req: ::protobuf::MessageField::none(),
|
||||||
special_fields: ::protobuf::SpecialFields::new(),
|
special_fields: ::protobuf::SpecialFields::new(),
|
||||||
};
|
};
|
||||||
&instance
|
&instance
|
||||||
@ -1553,6 +1577,8 @@ pub struct EthereumSignTxEIP1559 {
|
|||||||
pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
|
pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
|
||||||
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chunkify)
|
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chunkify)
|
||||||
pub chunkify: ::std::option::Option<bool>,
|
pub chunkify: ::std::option::Option<bool>,
|
||||||
|
// @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.payment_req)
|
||||||
|
pub payment_req: ::protobuf::MessageField<super::messages_common::PaymentRequest>,
|
||||||
// special fields
|
// special fields
|
||||||
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.special_fields)
|
// @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.special_fields)
|
||||||
pub special_fields: ::protobuf::SpecialFields,
|
pub special_fields: ::protobuf::SpecialFields,
|
||||||
@ -1879,7 +1905,7 @@ impl EthereumSignTxEIP1559 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||||
let mut fields = ::std::vec::Vec::with_capacity(13);
|
let mut fields = ::std::vec::Vec::with_capacity(14);
|
||||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||||
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
|
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
|
||||||
"address_n",
|
"address_n",
|
||||||
@ -1946,6 +1972,11 @@ impl EthereumSignTxEIP1559 {
|
|||||||
|m: &EthereumSignTxEIP1559| { &m.chunkify },
|
|m: &EthereumSignTxEIP1559| { &m.chunkify },
|
||||||
|m: &mut EthereumSignTxEIP1559| { &mut m.chunkify },
|
|m: &mut EthereumSignTxEIP1559| { &mut m.chunkify },
|
||||||
));
|
));
|
||||||
|
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::PaymentRequest>(
|
||||||
|
"payment_req",
|
||||||
|
|m: &EthereumSignTxEIP1559| { &m.payment_req },
|
||||||
|
|m: &mut EthereumSignTxEIP1559| { &mut m.payment_req },
|
||||||
|
));
|
||||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTxEIP1559>(
|
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTxEIP1559>(
|
||||||
"EthereumSignTxEIP1559",
|
"EthereumSignTxEIP1559",
|
||||||
fields,
|
fields,
|
||||||
@ -1989,6 +2020,11 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
for v in &self.payment_req {
|
||||||
|
if !v.is_initialized() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2037,6 +2073,9 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
104 => {
|
104 => {
|
||||||
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
|
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
|
||||||
},
|
},
|
||||||
|
114 => {
|
||||||
|
::protobuf::rt::read_singular_message_into_field(is, &mut self.payment_req)?;
|
||||||
|
},
|
||||||
tag => {
|
tag => {
|
||||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||||
},
|
},
|
||||||
@ -2090,6 +2129,10 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
if let Some(v) = self.chunkify {
|
if let Some(v) = self.chunkify {
|
||||||
my_size += 1 + 1;
|
my_size += 1 + 1;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.payment_req.as_ref() {
|
||||||
|
let len = v.compute_size();
|
||||||
|
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
|
||||||
|
}
|
||||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||||
self.special_fields.cached_size().set(my_size as u32);
|
self.special_fields.cached_size().set(my_size as u32);
|
||||||
my_size
|
my_size
|
||||||
@ -2135,6 +2178,9 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
if let Some(v) = self.chunkify {
|
if let Some(v) = self.chunkify {
|
||||||
os.write_bool(13, v)?;
|
os.write_bool(13, v)?;
|
||||||
}
|
}
|
||||||
|
if let Some(v) = self.payment_req.as_ref() {
|
||||||
|
::protobuf::rt::write_message_field_with_cached_size(14, v, os)?;
|
||||||
|
}
|
||||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||||
::std::result::Result::Ok(())
|
::std::result::Result::Ok(())
|
||||||
}
|
}
|
||||||
@ -2165,6 +2211,7 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
self.access_list.clear();
|
self.access_list.clear();
|
||||||
self.definitions.clear();
|
self.definitions.clear();
|
||||||
self.chunkify = ::std::option::Option::None;
|
self.chunkify = ::std::option::Option::None;
|
||||||
|
self.payment_req.clear();
|
||||||
self.special_fields.clear();
|
self.special_fields.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2183,6 +2230,7 @@ impl ::protobuf::Message for EthereumSignTxEIP1559 {
|
|||||||
access_list: ::std::vec::Vec::new(),
|
access_list: ::std::vec::Vec::new(),
|
||||||
definitions: ::protobuf::MessageField::none(),
|
definitions: ::protobuf::MessageField::none(),
|
||||||
chunkify: ::std::option::Option::None,
|
chunkify: ::std::option::Option::None,
|
||||||
|
payment_req: ::protobuf::MessageField::none(),
|
||||||
special_fields: ::protobuf::SpecialFields::new(),
|
special_fields: ::protobuf::SpecialFields::new(),
|
||||||
};
|
};
|
||||||
&instance
|
&instance
|
||||||
@ -4360,32 +4408,34 @@ impl ::protobuf::reflect::ProtobufValue for EthereumDefinitions {
|
|||||||
|
|
||||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||||
\n\x17messages-ethereum.proto\x12\x1bhw.trezor.messages.ethereum\x1a\x15\
|
\n\x17messages-ethereum.proto\x12\x1bhw.trezor.messages.ethereum\x1a\x15\
|
||||||
messages-common.proto\"V\n\x14EthereumGetPublicKey\x12\x1b\n\taddress_n\
|
messages-common.proto\x1a\roptions.proto\"V\n\x14EthereumGetPublicKey\
|
||||||
\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_display\x18\x02\x20\x01(\
|
|
||||||
\x08R\x0bshowDisplay\"b\n\x11EthereumPublicKey\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_dis\
|
\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_dis\
|
||||||
play\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12'\n\x0fencoded_network\x18\
|
play\x18\x02\x20\x01(\x08R\x0bshowDisplay\"b\n\x11EthereumPublicKey\x129\
|
||||||
\x03\x20\x01(\x0cR\x0eencodedNetwork\x12\x1a\n\x08chunkify\x18\x04\x20\
|
\n\x04node\x18\x01\x20\x02(\x0b2%.hw.trezor.messages.common.HDNodeTypeR\
|
||||||
\x01(\x08R\x08chunkify\"c\n\x0fEthereumAddress\x12$\n\x0c_old_address\
|
\x04node\x12\x12\n\x04xpub\x18\x02\x20\x02(\tR\x04xpub\"\x99\x01\n\x12Et\
|
||||||
\x18\x01\x20\x01(\x0cR\nOldAddressB\x02\x18\x01\x12\x18\n\x07address\x18\
|
hereumGetAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\
|
||||||
\x02\x20\x01(\tR\x07address\x12\x10\n\x03mac\x18\x03\x20\x01(\x0cR\x03ma\
|
\x12!\n\x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12'\n\x0fe\
|
||||||
c\"\xa1\x03\n\x0eEthereumSignTx\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\
|
ncoded_network\x18\x03\x20\x01(\x0cR\x0eencodedNetwork\x12\x1a\n\x08chun\
|
||||||
\x08addressN\x12\x16\n\x05nonce\x18\x02\x20\x01(\x0c:\0R\x05nonce\x12\
|
kify\x18\x04\x20\x01(\x08R\x08chunkify\"c\n\x0fEthereumAddress\x12$\n\
|
||||||
\x1b\n\tgas_price\x18\x03\x20\x02(\x0cR\x08gasPrice\x12\x1b\n\tgas_limit\
|
\x0c_old_address\x18\x01\x20\x01(\x0cR\nOldAddressB\x02\x18\x01\x12\x18\
|
||||||
\x18\x04\x20\x02(\x0cR\x08gasLimit\x12\x10\n\x02to\x18\x0b\x20\x01(\t:\0\
|
\n\x07address\x18\x02\x20\x01(\tR\x07address\x12\x10\n\x03mac\x18\x03\
|
||||||
R\x02to\x12\x16\n\x05value\x18\x06\x20\x01(\x0c:\0R\x05value\x12.\n\x12d\
|
\x20\x01(\x0cR\x03mac\"\xf3\x03\n\x0eEthereumSignTx\x12\x1b\n\taddress_n\
|
||||||
ata_initial_chunk\x18\x07\x20\x01(\x0c:\0R\x10dataInitialChunk\x12\"\n\
|
\x18\x01\x20\x03(\rR\x08addressN\x12\x16\n\x05nonce\x18\x02\x20\x01(\x0c\
|
||||||
\x0bdata_length\x18\x08\x20\x01(\r:\x010R\ndataLength\x12\x19\n\x08chain\
|
:\0R\x05nonce\x12\x1b\n\tgas_price\x18\x03\x20\x02(\x0cR\x08gasPrice\x12\
|
||||||
_id\x18\t\x20\x02(\x04R\x07chainId\x12\x17\n\x07tx_type\x18\n\x20\x01(\r\
|
\x1b\n\tgas_limit\x18\x04\x20\x02(\x0cR\x08gasLimit\x12\x10\n\x02to\x18\
|
||||||
R\x06txType\x12R\n\x0bdefinitions\x18\x0c\x20\x01(\x0b20.hw.trezor.messa\
|
\x0b\x20\x01(\t:\0R\x02to\x12\x16\n\x05value\x18\x06\x20\x01(\x0c:\0R\
|
||||||
ges.ethereum.EthereumDefinitionsR\x0bdefinitions\x12\x1a\n\x08chunkify\
|
\x05value\x12.\n\x12data_initial_chunk\x18\x07\x20\x01(\x0c:\0R\x10dataI\
|
||||||
\x18\r\x20\x01(\x08R\x08chunkify\"\xf0\x04\n\x15EthereumSignTxEIP1559\
|
nitialChunk\x12\"\n\x0bdata_length\x18\x08\x20\x01(\r:\x010R\ndataLength\
|
||||||
\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x14\n\x05nonce\
|
\x12\x19\n\x08chain_id\x18\t\x20\x02(\x04R\x07chainId\x12\x17\n\x07tx_ty\
|
||||||
\x18\x02\x20\x02(\x0cR\x05nonce\x12\x1e\n\x0bmax_gas_fee\x18\x03\x20\x02\
|
pe\x18\n\x20\x01(\rR\x06txType\x12R\n\x0bdefinitions\x18\x0c\x20\x01(\
|
||||||
(\x0cR\tmaxGasFee\x12(\n\x10max_priority_fee\x18\x04\x20\x02(\x0cR\x0ema\
|
\x0b20.hw.trezor.messages.ethereum.EthereumDefinitionsR\x0bdefinitions\
|
||||||
xPriorityFee\x12\x1b\n\tgas_limit\x18\x05\x20\x02(\x0cR\x08gasLimit\x12\
|
\x12\x1a\n\x08chunkify\x18\r\x20\x01(\x08R\x08chunkify\x12P\n\x0bpayment\
|
||||||
|
_req\x18\x0e\x20\x01(\x0b2).hw.trezor.messages.common.PaymentRequestR\np\
|
||||||
|
aymentReqB\x04\xc8\xf0\x19\x01\"\xc2\x05\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\x0emax\
|
||||||
|
PriorityFee\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\
|
\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\
|
\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\
|
R\x10dataInitialChunk\x12\x1f\n\x0bdata_length\x18\t\x20\x02(\rR\ndataLe\
|
||||||
@ -4393,32 +4443,34 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
|||||||
ss_list\x18\x0b\x20\x03(\x0b2E.hw.trezor.messages.ethereum.EthereumSignT\
|
ss_list\x18\x0b\x20\x03(\x0b2E.hw.trezor.messages.ethereum.EthereumSignT\
|
||||||
xEIP1559.EthereumAccessListR\naccessList\x12R\n\x0bdefinitions\x18\x0c\
|
xEIP1559.EthereumAccessListR\naccessList\x12R\n\x0bdefinitions\x18\x0c\
|
||||||
\x20\x01(\x0b20.hw.trezor.messages.ethereum.EthereumDefinitionsR\x0bdefi\
|
\x20\x01(\x0b20.hw.trezor.messages.ethereum.EthereumDefinitionsR\x0bdefi\
|
||||||
nitions\x12\x1a\n\x08chunkify\x18\r\x20\x01(\x08R\x08chunkify\x1aQ\n\x12\
|
nitions\x12\x1a\n\x08chunkify\x18\r\x20\x01(\x08R\x08chunkify\x12P\n\x0b\
|
||||||
EthereumAccessList\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\
|
payment_req\x18\x0e\x20\x01(\x0b2).hw.trezor.messages.common.PaymentRequ\
|
||||||
\x12!\n\x0cstorage_keys\x18\x02\x20\x03(\x0cR\x0bstorageKeys\"\x97\x01\n\
|
estR\npaymentReqB\x04\xc8\xf0\x19\x01\x1aQ\n\x12EthereumAccessList\x12\
|
||||||
\x11EthereumTxRequest\x12\x1f\n\x0bdata_length\x18\x01\x20\x01(\rR\ndata\
|
\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12!\n\x0cstorage_keys\
|
||||||
Length\x12\x1f\n\x0bsignature_v\x18\x02\x20\x01(\rR\nsignatureV\x12\x1f\
|
\x18\x02\x20\x03(\x0cR\x0bstorageKeys\"\x97\x01\n\x11EthereumTxRequest\
|
||||||
\n\x0bsignature_r\x18\x03\x20\x01(\x0cR\nsignatureR\x12\x1f\n\x0bsignatu\
|
\x12\x1f\n\x0bdata_length\x18\x01\x20\x01(\rR\ndataLength\x12\x1f\n\x0bs\
|
||||||
re_s\x18\x04\x20\x01(\x0cR\nsignatureS\".\n\rEthereumTxAck\x12\x1d\n\nda\
|
ignature_v\x18\x02\x20\x01(\rR\nsignatureV\x12\x1f\n\x0bsignature_r\x18\
|
||||||
ta_chunk\x18\x01\x20\x02(\x0cR\tdataChunk\"\x91\x01\n\x13EthereumSignMes\
|
\x03\x20\x01(\x0cR\nsignatureR\x12\x1f\n\x0bsignature_s\x18\x04\x20\x01(\
|
||||||
sage\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07m\
|
\x0cR\nsignatureS\".\n\rEthereumTxAck\x12\x1d\n\ndata_chunk\x18\x01\x20\
|
||||||
essage\x18\x02\x20\x02(\x0cR\x07message\x12'\n\x0fencoded_network\x18\
|
\x02(\x0cR\tdataChunk\"\x91\x01\n\x13EthereumSignMessage\x12\x1b\n\taddr\
|
||||||
\x03\x20\x01(\x0cR\x0eencodedNetwork\x12\x1a\n\x08chunkify\x18\x04\x20\
|
ess_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07message\x18\x02\x20\
|
||||||
\x01(\x08R\x08chunkify\"R\n\x18EthereumMessageSignature\x12\x1c\n\tsigna\
|
\x02(\x0cR\x07message\x12'\n\x0fencoded_network\x18\x03\x20\x01(\x0cR\
|
||||||
ture\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07address\x18\x03\x20\
|
\x0eencodedNetwork\x12\x1a\n\x08chunkify\x18\x04\x20\x01(\x08R\x08chunki\
|
||||||
\x02(\tR\x07address\"\x85\x01\n\x15EthereumVerifyMessage\x12\x1c\n\tsign\
|
fy\"R\n\x18EthereumMessageSignature\x12\x1c\n\tsignature\x18\x02\x20\x02\
|
||||||
ature\x18\x02\x20\x02(\x0cR\tsignature\x12\x18\n\x07message\x18\x03\x20\
|
(\x0cR\tsignature\x12\x18\n\x07address\x18\x03\x20\x02(\tR\x07address\"\
|
||||||
\x02(\x0cR\x07message\x12\x18\n\x07address\x18\x04\x20\x02(\tR\x07addres\
|
\x85\x01\n\x15EthereumVerifyMessage\x12\x1c\n\tsignature\x18\x02\x20\x02\
|
||||||
s\x12\x1a\n\x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\xb4\x01\n\
|
(\x0cR\tsignature\x12\x18\n\x07message\x18\x03\x20\x02(\x0cR\x07message\
|
||||||
\x15EthereumSignTypedHash\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08ad\
|
\x12\x18\n\x07address\x18\x04\x20\x02(\tR\x07address\x12\x1a\n\x08chunki\
|
||||||
dressN\x122\n\x15domain_separator_hash\x18\x02\x20\x02(\x0cR\x13domainSe\
|
fy\x18\x05\x20\x01(\x08R\x08chunkify\"\xb4\x01\n\x15EthereumSignTypedHas\
|
||||||
paratorHash\x12!\n\x0cmessage_hash\x18\x03\x20\x01(\x0cR\x0bmessageHash\
|
h\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x122\n\x15domain_\
|
||||||
\x12'\n\x0fencoded_network\x18\x04\x20\x01(\x0cR\x0eencodedNetwork\"T\n\
|
separator_hash\x18\x02\x20\x02(\x0cR\x13domainSeparatorHash\x12!\n\x0cme\
|
||||||
\x1aEthereumTypedDataSignature\x12\x1c\n\tsignature\x18\x01\x20\x02(\x0c\
|
ssage_hash\x18\x03\x20\x01(\x0cR\x0bmessageHash\x12'\n\x0fencoded_networ\
|
||||||
R\tsignature\x12\x18\n\x07address\x18\x02\x20\x02(\tR\x07address\"c\n\
|
k\x18\x04\x20\x01(\x0cR\x0eencodedNetwork\"T\n\x1aEthereumTypedDataSigna\
|
||||||
\x13EthereumDefinitions\x12'\n\x0fencoded_network\x18\x01\x20\x01(\x0cR\
|
ture\x12\x1c\n\tsignature\x18\x01\x20\x02(\x0cR\tsignature\x12\x18\n\x07\
|
||||||
\x0eencodedNetwork\x12#\n\rencoded_token\x18\x02\x20\x01(\x0cR\x0cencode\
|
address\x18\x02\x20\x02(\tR\x07address\"c\n\x13EthereumDefinitions\x12'\
|
||||||
dTokenB<\n#com.satoshilabs.trezor.lib.protobufB\x15TrezorMessageEthereum\
|
\n\x0fencoded_network\x18\x01\x20\x01(\x0cR\x0eencodedNetwork\x12#\n\ren\
|
||||||
|
coded_token\x18\x02\x20\x01(\x0cR\x0cencodedTokenB<\n#com.satoshilabs.tr\
|
||||||
|
ezor.lib.protobufB\x15TrezorMessageEthereum\
|
||||||
";
|
";
|
||||||
|
|
||||||
/// `FileDescriptorProto` object which was a source for this generated file
|
/// `FileDescriptorProto` object which was a source for this generated file
|
||||||
@ -4435,8 +4487,9 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
|||||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||||
file_descriptor.get(|| {
|
file_descriptor.get(|| {
|
||||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
let mut deps = ::std::vec::Vec::with_capacity(2);
|
||||||
deps.push(super::messages_common::file_descriptor().clone());
|
deps.push(super::messages_common::file_descriptor().clone());
|
||||||
|
deps.push(super::options::file_descriptor().clone());
|
||||||
let mut messages = ::std::vec::Vec::with_capacity(15);
|
let mut messages = ::std::vec::Vec::with_capacity(15);
|
||||||
messages.push(EthereumGetPublicKey::generated_message_descriptor_data());
|
messages.push(EthereumGetPublicKey::generated_message_descriptor_data());
|
||||||
messages.push(EthereumPublicKey::generated_message_descriptor_data());
|
messages.push(EthereumPublicKey::generated_message_descriptor_data());
|
||||||
|
Loading…
Reference in New Issue
Block a user