mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
Reworked TxRequest message
This commit is contained in:
parent
df99b56108
commit
bff8038fad
@ -440,13 +440,20 @@ message SimpleSignTx {
|
|||||||
* @prev TxAck
|
* @prev TxAck
|
||||||
*/
|
*/
|
||||||
message TxRequest {
|
message TxRequest {
|
||||||
|
optional RequestType request_type = 1; // what should be filled in TxAck message?
|
||||||
|
optional TxRequestDetails details = 2;
|
||||||
|
optional TxRequestSerialized serialized = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TxRequestDetails {
|
||||||
optional uint32 request_index = 1; // device expects TxAck message from the computer
|
optional uint32 request_index = 1; // device expects TxAck message from the computer
|
||||||
optional RequestType request_type = 2; // what should be filled in TxAck message?
|
optional bytes tx_hash = 2; // tx_hash of requested transaction
|
||||||
optional uint32 signature_index = 3; // 'signature' field contains signed input of this index
|
}
|
||||||
optional bytes signature = 4; // signature of the signature_index input
|
|
||||||
optional bytes serialized_tx = 5; // part of serialized and signed transaction
|
message TxRequestSerialized {
|
||||||
optional bytes tx_hash = 6; // tx_hash of requested transaction
|
optional uint32 signature_index = 1; // 'signature' field contains signed input of this index
|
||||||
optional bool finished = 7; // is this the last TxRequest?
|
optional bytes signature = 2; // signature of the signature_index input
|
||||||
|
optional bytes serialized_tx = 3; // part of serialized and signed transaction
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,6 +57,7 @@ enum RequestType {
|
|||||||
TXINPUT = 0;
|
TXINPUT = 0;
|
||||||
TXOUTPUT = 1;
|
TXOUTPUT = 1;
|
||||||
TXMETA = 2;
|
TXMETA = 2;
|
||||||
|
TXFINISHED = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user