1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

xmr: no wrapper

This commit is contained in:
Dusan Klinec 2018-09-18 11:25:23 +02:00 committed by Jan Pochyla
parent 0c39ac7fc2
commit 08e89cabd2
2 changed files with 47 additions and 88 deletions

View File

@ -147,7 +147,7 @@ message MoneroTransactionInitRequest {
/**
* Response: Response to transaction signing initialization.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSetInputRequest
*/
message MoneroTransactionInitAck {
optional uint32 version = 1;
@ -170,7 +170,8 @@ message MoneroTransactionSetInputRequest {
/**
* Response: Response to setting UTXO for signature. Contains sealed values needed for further protocol steps.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSetInputAck
* @next MoneroTransactionInputsPermutationRequest
*/
message MoneroTransactionSetInputAck {
optional bytes vini = 1; // xmrtypes.TxinToKey
@ -191,7 +192,7 @@ message MoneroTransactionInputsPermutationRequest {
/**
* Response: Response to setting permutation on key images
* @next MoneroTransactionSignRequest
* @next MoneroTransactionInputViniRequest
*/
message MoneroTransactionInputsPermutationAck {
}
@ -210,7 +211,8 @@ message MoneroTransactionInputViniRequest {
/**
* Response: Response to setting UTXO to the device
* @next MoneroTransactionSignRequest
* @next MoneroTransactionInputViniRequest
* @next MoneroTransactionAllInputsSetRequest
*/
message MoneroTransactionInputViniAck {
}
@ -225,7 +227,7 @@ message MoneroTransactionAllInputsSetRequest {
/**
* Response: Response to after all inputs have been set.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSetOutputRequest
*/
message MoneroTransactionAllInputsSetAck {
optional MoneroTransactionRsigData rsig_data = 1;
@ -243,7 +245,8 @@ message MoneroTransactionSetOutputRequest {
/**
* Response: Response to setting transaction destination. Contains sealed values needed for further protocol steps.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSetOutputRequest
* @next MoneroTransactionAllOutSetRequest
*/
message MoneroTransactionSetOutputAck {
optional bytes tx_out = 1; // xmrtypes.TxOut
@ -253,22 +256,6 @@ message MoneroTransactionSetOutputAck {
optional bytes ecdh_info = 5;
}
/**
* Request: Sub request of MoneroTransactionSign. Rangesig offloading roundtrips.
* @next MoneroTransactionAllInputsSetAck
*/
message MoneroTransactionRangeSigRequest {
optional MoneroTransactionRsigData rsig_data = 1;
}
/**
* Response: Response to rangesig offloading request
* @next MoneroTransactionSignRequest
*/
message MoneroTransactionRangeSigAck {
optional MoneroTransactionRsigData rsig_data = 1;
}
/**
* Request: Sub request of MoneroTransactionSign. Sent after all outputs are sent.
* @next MoneroTransactionAllOutSetAck
@ -279,7 +266,7 @@ message MoneroTransactionAllOutSetRequest {
/**
* Response: After all outputs are sent the initial RCT signature fields are sent.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionMlsagDoneRequest
*/
message MoneroTransactionAllOutSetAck {
optional bytes extra = 1;
@ -305,7 +292,7 @@ message MoneroTransactionMlsagDoneRequest {
/**
* Response: Contains full message hash needed for the signature
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSignInputRequest
*/
message MoneroTransactionMlsagDoneAck {
optional bytes full_message_hash = 1;
@ -327,7 +314,8 @@ message MoneroTransactionSignInputRequest {
/**
* Response: Contains full MG signature of the UTXO + multisig data if applicable.
* @next MoneroTransactionSignRequest
* @next MoneroTransactionSignInputRequest
* @next MoneroTransactionFinalRequest
*/
message MoneroTransactionSignInputAck {
optional bytes signature = 1;
@ -352,34 +340,6 @@ message MoneroTransactionFinalAck {
optional bytes tx_enc_keys = 4;
}
/**
* Request: Wrapping request for transaction signature protocol.
* @wrap MoneroTransactionInitRequest
* @wrap MoneroTransactionSetInputRequest
* @wrap MoneroTransactionInputsPermutationRequest
* @wrap MoneroTransactionInputViniRequest
* @wrap MoneroTransactionAllInputsSetRequest
* @wrap MoneroTransactionSetOutputRequest
* @wrap MoneroTransactionRangeSigRequest
* @wrap MoneroTransactionAllOutSetRequest
* @wrap MoneroTransactionMlsagDoneRequest
* @wrap MoneroTransactionSignInputRequest
* @wrap MoneroTransactionFinalRequest
*/
message MoneroTransactionSignRequest {
optional MoneroTransactionInitRequest init = 1;
optional MoneroTransactionSetInputRequest set_input = 2;
optional MoneroTransactionInputsPermutationRequest input_permutation = 3;
optional MoneroTransactionInputViniRequest input_vini = 4;
optional MoneroTransactionAllInputsSetRequest all_in_set = 5;
optional MoneroTransactionSetOutputRequest set_output = 6;
optional MoneroTransactionRangeSigRequest rsig = 7;
optional MoneroTransactionAllOutSetRequest all_out_set = 8;
optional MoneroTransactionMlsagDoneRequest mlsag_done = 9;
optional MoneroTransactionSignInputRequest sign_input = 10;
optional MoneroTransactionFinalRequest final_msg = 11;
}
/**
* Request: Sub request of MoneroKeyImageSync. Initializing key image sync.
* @start
@ -402,7 +362,7 @@ message MoneroKeyImageExportInitRequest {
/**
* Response: Response to key image sync initialization.
* @next MoneroKeyImageSyncRequest
* @next MoneroKeyImageSyncStepRequest
*/
message MoneroKeyImageExportInitAck {
}
@ -426,7 +386,8 @@ message MoneroKeyImageSyncStepRequest {
/**
* Response: Response to key image sync step. Contains encrypted exported key image.
* @next MoneroKeyImageSyncRequest
* @next MoneroKeyImageSyncStepRequest
* @next MoneroKeyImageSyncFinalRequest
*/
message MoneroKeyImageSyncStepAck {
repeated MoneroExportedKeyImage kis = 1;
@ -455,18 +416,6 @@ message MoneroKeyImageSyncFinalAck {
optional bytes enc_key = 1;
}
/**
* Request: Wrapping request for key image sync protocol.
* @wrap MoneroKeyImageExportInitRequest
* @wrap MoneroKeyImageSyncStepRequest
* @wrap MoneroKeyImageSyncFinalRequest
*/
message MoneroKeyImageSyncRequest {
optional MoneroKeyImageExportInitRequest init = 1;
optional MoneroKeyImageSyncStepRequest step = 2;
optional MoneroKeyImageSyncFinalRequest final_msg = 3;
}
/**
* Request: Universal Monero protocol implementation diagnosis request.
* @start

View File

@ -197,26 +197,36 @@ enum MessageType {
MessageType_RippleSignedTx = 403 [(wire_in) = true];
// Monero
MessageType_MoneroTransactionSignRequest = 501 [(wire_in) = true];
MessageType_MoneroTransactionInitRequest = 501 [(wire_out) = true];
MessageType_MoneroTransactionInitAck = 502 [(wire_out) = true];
MessageType_MoneroTransactionSetInputAck = 503 [(wire_out) = true];
MessageType_MoneroTransactionInputsPermutationAck = 504 [(wire_out) = true];
MessageType_MoneroTransactionInputViniAck = 505 [(wire_out) = true];
MessageType_MoneroTransactionAllInputsSetAck = 513 [(wire_out) = true];
MessageType_MoneroTransactionSetOutputAck = 506 [(wire_out) = true];
MessageType_MoneroTransactionRangeSigAck = 514 [(wire_out) = true];
MessageType_MoneroTransactionAllOutSetAck = 507 [(wire_out) = true];
MessageType_MoneroTransactionMlsagDoneAck = 508 [(wire_out) = true];
MessageType_MoneroTransactionSignInputAck = 509 [(wire_out) = true];
MessageType_MoneroTransactionFinalAck = 510 [(wire_out) = true];
MessageType_MoneroKeyImageSyncRequest = 511 [(wire_in) = true];
MessageType_MoneroKeyImageExportInitAck = 520 [(wire_out) = true];
MessageType_MoneroKeyImageSyncStepAck = 521 [(wire_out) = true];
MessageType_MoneroKeyImageSyncFinalAck = 522 [(wire_out) = true];
MessageType_MoneroGetAddress = 530 [(wire_in) = true];
MessageType_MoneroAddress = 531 [(wire_out) = true];
MessageType_MoneroGetWatchKey = 532 [(wire_in) = true];
MessageType_MoneroWatchKey = 533 [(wire_out) = true];
MessageType_DebugMoneroDiagRequest = 536 [(wire_in) = true];
MessageType_DebugMoneroDiagAck = 537 [(wire_out) = true];
MessageType_MoneroTransactionSetInputRequest = 503 [(wire_out) = true];
MessageType_MoneroTransactionSetInputAck = 504 [(wire_out) = true];
MessageType_MoneroTransactionInputsPermutationRequest = 505 [(wire_out) = true];
MessageType_MoneroTransactionInputsPermutationAck = 506 [(wire_out) = true];
MessageType_MoneroTransactionInputViniRequest = 507 [(wire_out) = true];
MessageType_MoneroTransactionInputViniAck = 508 [(wire_out) = true];
MessageType_MoneroTransactionAllInputsSetRequest = 509 [(wire_out) = true];
MessageType_MoneroTransactionAllInputsSetAck = 510 [(wire_out) = true];
MessageType_MoneroTransactionSetOutputRequest = 511 [(wire_out) = true];
MessageType_MoneroTransactionSetOutputAck = 512 [(wire_out) = true];
MessageType_MoneroTransactionAllOutSetRequest = 513 [(wire_out) = true];
MessageType_MoneroTransactionAllOutSetAck = 514 [(wire_out) = true];
MessageType_MoneroTransactionMlsagDoneRequest = 515 [(wire_out) = true];
MessageType_MoneroTransactionMlsagDoneAck = 516 [(wire_out) = true];
MessageType_MoneroTransactionSignInputRequest = 517 [(wire_out) = true];
MessageType_MoneroTransactionSignInputAck = 518 [(wire_out) = true];
MessageType_MoneroTransactionFinalRequest = 519 [(wire_out) = true];
MessageType_MoneroTransactionFinalAck = 520 [(wire_out) = true];
MessageType_MoneroKeyImageExportInitRequest = 530 [(wire_out) = true];
MessageType_MoneroKeyImageExportInitAck = 531 [(wire_out) = true];
MessageType_MoneroKeyImageSyncStepRequest = 532 [(wire_out) = true];
MessageType_MoneroKeyImageSyncStepAck = 533 [(wire_out) = true];
MessageType_MoneroKeyImageSyncFinalRequest = 534 [(wire_out) = true];
MessageType_MoneroKeyImageSyncFinalAck = 535 [(wire_out) = true];
MessageType_MoneroGetAddress = 540 [(wire_in) = true];
MessageType_MoneroAddress = 541 [(wire_out) = true];
MessageType_MoneroGetWatchKey = 542 [(wire_in) = true];
MessageType_MoneroWatchKey = 543 [(wire_out) = true];
MessageType_DebugMoneroDiagRequest = 546 [(wire_in) = true];
MessageType_DebugMoneroDiagAck = 547 [(wire_out) = true];
}