mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-04 23:28:46 +00:00
Clarify field limits in EthereumSignTx
This commit is contained in:
parent
2b72edf8f3
commit
072ca020cf
@ -592,6 +592,7 @@ message TxAck {
|
|||||||
/**
|
/**
|
||||||
* Request: Ask device to sign transaction
|
* Request: Ask device to sign transaction
|
||||||
* All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing.
|
* All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing.
|
||||||
|
* Note: the first at most 1024 bytes of data MUST be transmitted as part of this message.
|
||||||
* @next PassphraseRequest
|
* @next PassphraseRequest
|
||||||
* @next PinMatrixRequest
|
* @next PinMatrixRequest
|
||||||
* @next EthereumTxRequest
|
* @next EthereumTxRequest
|
||||||
@ -599,11 +600,11 @@ message TxAck {
|
|||||||
*/
|
*/
|
||||||
message EthereumSignTx {
|
message EthereumSignTx {
|
||||||
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node
|
||||||
optional bytes nonce = 2; // 256 bit unsigned big endian
|
optional bytes nonce = 2; // <=256 bit unsigned big endian
|
||||||
optional bytes gas_price = 3; // 256 bit unsigned big endian (in wei)
|
optional bytes gas_price = 3; // <=256 bit unsigned big endian (in wei)
|
||||||
optional bytes gas_limit = 4; // 256 bit unsigned big endian
|
optional bytes gas_limit = 4; // <=256 bit unsigned big endian
|
||||||
optional bytes to = 5; // 160 bit address hash
|
optional bytes to = 5; // 160 bit address hash
|
||||||
optional bytes value = 6; // 256 bit unsigned big endian (in wei)
|
optional bytes value = 6; // <=256 bit unsigned big endian (in wei)
|
||||||
optional bytes data_initial_chunk = 7; // The initial data chunk (<= 1024 bytes)
|
optional bytes data_initial_chunk = 7; // The initial data chunk (<= 1024 bytes)
|
||||||
optional uint32 data_length = 8; // Length of transaction payload
|
optional uint32 data_length = 8; // Length of transaction payload
|
||||||
}
|
}
|
||||||
@ -611,15 +612,15 @@ message EthereumSignTx {
|
|||||||
/**
|
/**
|
||||||
* Response: Device asks for more data from transaction payload, or returns the signature.
|
* Response: Device asks for more data from transaction payload, or returns the signature.
|
||||||
* If data_length is set, device awaits that many more bytes of payload.
|
* If data_length is set, device awaits that many more bytes of payload.
|
||||||
* Otherwise, the signature_* fields contain the computed transaction signature.
|
* Otherwise, the signature_* fields contain the computed transaction signature. All three fields will be present.
|
||||||
* @prev EthereumSignTx
|
* @prev EthereumSignTx
|
||||||
* @next EthereumTxAck
|
* @next EthereumTxAck
|
||||||
*/
|
*/
|
||||||
message EthereumTxRequest {
|
message EthereumTxRequest {
|
||||||
optional uint32 data_length = 1; // Number of bytes being requested
|
optional uint32 data_length = 1; // Number of bytes being requested (<= 1024)
|
||||||
optional uint32 signature_v = 2; // Computed signature (recovery parameter, limited to 27 or 28)
|
optional uint32 signature_v = 2; // Computed signature (recovery parameter, limited to 27 or 28)
|
||||||
optional bytes signature_r = 3; // Computed signature
|
optional bytes signature_r = 3; // Computed signature R component (256 bit)
|
||||||
optional bytes signature_s = 4; // Computed signature
|
optional bytes signature_s = 4; // Computed signature S component (256 bit)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -628,7 +629,7 @@ message EthereumTxRequest {
|
|||||||
* @next EthereumTxRequest
|
* @next EthereumTxRequest
|
||||||
*/
|
*/
|
||||||
message EthereumTxAck {
|
message EthereumTxAck {
|
||||||
optional bytes data_chunk = 1; // Bytes from transaction payload
|
optional bytes data_chunk = 1; // Bytes from transaction payload (<= 1024 bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user