|
|
|
@ -6,6 +6,7 @@ option java_package = "com.satoshilabs.trezor.lib.protobuf";
|
|
|
|
|
option java_outer_classname = "TrezorMessageEthereum";
|
|
|
|
|
|
|
|
|
|
import "messages-common.proto";
|
|
|
|
|
import "messages-ethereum-definitions.proto";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -15,8 +16,8 @@ import "messages-common.proto";
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumGetPublicKey {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bool show_display = 2; // optionally show on display before sending the result
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bool show_display = 2; // optionally show on display before sending the result
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -35,8 +36,9 @@ message EthereumPublicKey {
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumGetAddress {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bool show_display = 2; // optionally show on display before sending the result
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bool show_display = 2; // optionally show on display before sending the result
|
|
|
|
|
optional bytes encoded_network = 3; // encoded Ethereum network, see ethereum-definitions.md for details
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -58,16 +60,17 @@ message EthereumAddress {
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumSignTx {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bytes nonce = 2 [default='']; // <=256 bit unsigned big endian
|
|
|
|
|
required bytes gas_price = 3; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes gas_limit = 4; // <=256 bit unsigned big endian
|
|
|
|
|
optional string to = 11 [default='']; // recipient address
|
|
|
|
|
optional bytes value = 6 [default='']; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
optional bytes data_initial_chunk = 7 [default='']; // The initial data chunk (<= 1024 bytes)
|
|
|
|
|
optional uint32 data_length = 8 [default=0]; // Length of transaction payload
|
|
|
|
|
required uint64 chain_id = 9; // Chain Id for EIP 155
|
|
|
|
|
optional uint32 tx_type = 10; // Used for Wanchain
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
optional bytes nonce = 2 [default='']; // <=256 bit unsigned big endian
|
|
|
|
|
required bytes gas_price = 3; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes gas_limit = 4; // <=256 bit unsigned big endian
|
|
|
|
|
optional string to = 11 [default='']; // recipient address
|
|
|
|
|
optional bytes value = 6 [default='']; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
optional bytes data_initial_chunk = 7 [default='']; // The initial data chunk (<= 1024 bytes)
|
|
|
|
|
optional uint32 data_length = 8 [default=0]; // Length of transaction payload
|
|
|
|
|
required uint64 chain_id = 9; // Chain Id for EIP 155
|
|
|
|
|
optional uint32 tx_type = 10; // Used for Wanchain
|
|
|
|
|
optional ethereum_definitions.EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -78,17 +81,18 @@ message EthereumSignTx {
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumSignTxEIP1559 {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
required bytes nonce = 2; // <=256 bit unsigned big endian
|
|
|
|
|
required bytes max_gas_fee = 3; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes max_priority_fee = 4; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes gas_limit = 5; // <=256 bit unsigned big endian
|
|
|
|
|
optional string to = 6 [default='']; // recipient address
|
|
|
|
|
required bytes value = 7; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
optional bytes data_initial_chunk = 8 [default='']; // The initial data chunk (<= 1024 bytes)
|
|
|
|
|
required uint32 data_length = 9; // Length of transaction payload
|
|
|
|
|
required uint64 chain_id = 10; // Chain Id for EIP 155
|
|
|
|
|
repeated EthereumAccessList access_list = 11; // Access List
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
required bytes nonce = 2; // <=256 bit unsigned big endian
|
|
|
|
|
required bytes max_gas_fee = 3; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes max_priority_fee = 4; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
required bytes gas_limit = 5; // <=256 bit unsigned big endian
|
|
|
|
|
optional string to = 6 [default='']; // recipient address
|
|
|
|
|
required bytes value = 7; // <=256 bit unsigned big endian (in wei)
|
|
|
|
|
optional bytes data_initial_chunk = 8 [default='']; // The initial data chunk (<= 1024 bytes)
|
|
|
|
|
required uint32 data_length = 9; // Length of transaction payload
|
|
|
|
|
required uint64 chain_id = 10; // Chain Id for EIP 155
|
|
|
|
|
repeated EthereumAccessList access_list = 11; // Access List
|
|
|
|
|
optional ethereum_definitions.EthereumDefinitions definitions = 12; // network and/or token definitions for tx
|
|
|
|
|
|
|
|
|
|
message EthereumAccessList {
|
|
|
|
|
required string address = 1;
|
|
|
|
@ -125,8 +129,9 @@ message EthereumTxAck {
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumSignMessage {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
required bytes message = 2; // message to be signed
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
required bytes message = 2; // message to be signed
|
|
|
|
|
optional bytes encoded_network = 3; // encoded Ethereum network, see ethereum-definitions.md for details
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -145,9 +150,9 @@ message EthereumMessageSignature {
|
|
|
|
|
* @next Failure
|
|
|
|
|
*/
|
|
|
|
|
message EthereumVerifyMessage {
|
|
|
|
|
required bytes signature = 2; // signature to verify
|
|
|
|
|
required bytes message = 3; // message to verify
|
|
|
|
|
required string address = 4; // address to verify
|
|
|
|
|
required bytes signature = 2; // signature to verify
|
|
|
|
|
required bytes message = 3; // message to verify
|
|
|
|
|
required string address = 4; // address to verify
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -160,6 +165,7 @@ message EthereumSignTypedHash {
|
|
|
|
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
|
|
|
|
required bytes domain_separator_hash = 2; // Hash of domainSeparator of typed data to be signed
|
|
|
|
|
optional bytes message_hash = 3; // Hash of the data of typed data to be signed (empty if domain-only data)
|
|
|
|
|
optional bytes encoded_network = 4; // encoded Ethereum network, see ethereum-definitions.md for details
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|