From a3f8ace25335118dd9bd37503451029a4e68d5eb Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Tue, 4 Sep 2018 14:04:53 +0200 Subject: [PATCH] vendor: trezor-common updated; protobuf regen --- src/trezor/messages/ButtonRequestType.py | 1 + src/trezor/messages/MessageType.py | 2 + .../MoneroTransactionAllInputsSetAck.py | 18 +++++++ .../MoneroTransactionAllInputsSetRequest.py | 17 ++++++ .../messages/MoneroTransactionAllOutSetAck.py | 6 ++- .../MoneroTransactionAllOutSetRequest.py | 12 ++++- src/trezor/messages/MoneroTransactionData.py | 7 +-- .../messages/MoneroTransactionInitAck.py | 5 ++ .../messages/MoneroTransactionRangeSigAck.py | 18 +++++++ .../MoneroTransactionRangeSigRequest.py | 17 ++++++ .../messages/MoneroTransactionRsigData.py | 53 +++++++++++++++++++ .../messages/MoneroTransactionSetOutputAck.py | 8 +-- .../MoneroTransactionSetOutputRequest.py | 4 ++ .../messages/MoneroTransactionSignRequest.py | 18 +++++-- vendor/trezor-common | 2 +- 15 files changed, 174 insertions(+), 14 deletions(-) create mode 100644 src/trezor/messages/MoneroTransactionAllInputsSetAck.py create mode 100644 src/trezor/messages/MoneroTransactionAllInputsSetRequest.py create mode 100644 src/trezor/messages/MoneroTransactionRangeSigAck.py create mode 100644 src/trezor/messages/MoneroTransactionRangeSigRequest.py create mode 100644 src/trezor/messages/MoneroTransactionRsigData.py diff --git a/src/trezor/messages/ButtonRequestType.py b/src/trezor/messages/ButtonRequestType.py index d83e5dc115..5f8decd08e 100644 --- a/src/trezor/messages/ButtonRequestType.py +++ b/src/trezor/messages/ButtonRequestType.py @@ -14,3 +14,4 @@ PublicKey = 11 MnemonicWordCount = 12 MnemonicInput = 13 PassphraseType = 14 +UnknownDerivationPath = 15 diff --git a/src/trezor/messages/MessageType.py b/src/trezor/messages/MessageType.py index 62760f011b..d448c69f1e 100644 --- a/src/trezor/messages/MessageType.py +++ b/src/trezor/messages/MessageType.py @@ -141,7 +141,9 @@ MoneroTransactionInitAck = 502 MoneroTransactionSetInputAck = 503 MoneroTransactionInputsPermutationAck = 504 MoneroTransactionInputViniAck = 505 +MoneroTransactionAllInputsSetAck = 513 MoneroTransactionSetOutputAck = 506 +MoneroTransactionRangeSigAck = 514 MoneroTransactionAllOutSetAck = 507 MoneroTransactionMlsagDoneAck = 508 MoneroTransactionSignInputAck = 509 diff --git a/src/trezor/messages/MoneroTransactionAllInputsSetAck.py b/src/trezor/messages/MoneroTransactionAllInputsSetAck.py new file mode 100644 index 0000000000..4dd935a114 --- /dev/null +++ b/src/trezor/messages/MoneroTransactionAllInputsSetAck.py @@ -0,0 +1,18 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroTransactionRsigData import MoneroTransactionRsigData + + +class MoneroTransactionAllInputsSetAck(p.MessageType): + MESSAGE_WIRE_TYPE = 513 + FIELDS = { + 1: ('rsig_data', MoneroTransactionRsigData, 0), + } + + def __init__( + self, + rsig_data: MoneroTransactionRsigData = None, + ) -> None: + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionAllInputsSetRequest.py b/src/trezor/messages/MoneroTransactionAllInputsSetRequest.py new file mode 100644 index 0000000000..f17cb2a94b --- /dev/null +++ b/src/trezor/messages/MoneroTransactionAllInputsSetRequest.py @@ -0,0 +1,17 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroTransactionRsigData import MoneroTransactionRsigData + + +class MoneroTransactionAllInputsSetRequest(p.MessageType): + FIELDS = { + 1: ('rsig_data', MoneroTransactionRsigData, 0), + } + + def __init__( + self, + rsig_data: MoneroTransactionRsigData = None, + ) -> None: + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionAllOutSetAck.py b/src/trezor/messages/MoneroTransactionAllOutSetAck.py index 6333f7ca72..8382adaa7d 100644 --- a/src/trezor/messages/MoneroTransactionAllOutSetAck.py +++ b/src/trezor/messages/MoneroTransactionAllOutSetAck.py @@ -3,6 +3,7 @@ import protobuf as p from .MoneroRingCtSig import MoneroRingCtSig +from .MoneroTransactionRsigData import MoneroTransactionRsigData class MoneroTransactionAllOutSetAck(p.MessageType): @@ -10,15 +11,18 @@ class MoneroTransactionAllOutSetAck(p.MessageType): FIELDS = { 1: ('extra', p.BytesType, 0), 2: ('tx_prefix_hash', p.BytesType, 0), - 3: ('rv', MoneroRingCtSig, 0), + 3: ('rsig_data', MoneroTransactionRsigData, 0), + 4: ('rv', MoneroRingCtSig, 0), } def __init__( self, extra: bytes = None, tx_prefix_hash: bytes = None, + rsig_data: MoneroTransactionRsigData = None, rv: MoneroRingCtSig = None, ) -> None: self.extra = extra self.tx_prefix_hash = tx_prefix_hash + self.rsig_data = rsig_data self.rv = rv diff --git a/src/trezor/messages/MoneroTransactionAllOutSetRequest.py b/src/trezor/messages/MoneroTransactionAllOutSetRequest.py index 389802c490..077abb04d6 100644 --- a/src/trezor/messages/MoneroTransactionAllOutSetRequest.py +++ b/src/trezor/messages/MoneroTransactionAllOutSetRequest.py @@ -2,6 +2,16 @@ # fmt: off import protobuf as p +from .MoneroTransactionRsigData import MoneroTransactionRsigData + class MoneroTransactionAllOutSetRequest(p.MessageType): - pass + FIELDS = { + 1: ('rsig_data', MoneroTransactionRsigData, 0), + } + + def __init__( + self, + rsig_data: MoneroTransactionRsigData = None, + ) -> None: + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionData.py b/src/trezor/messages/MoneroTransactionData.py index 499ede7e3d..3f046b0eb8 100644 --- a/src/trezor/messages/MoneroTransactionData.py +++ b/src/trezor/messages/MoneroTransactionData.py @@ -3,6 +3,7 @@ import protobuf as p from .MoneroTransactionDestinationEntry import MoneroTransactionDestinationEntry +from .MoneroTransactionRsigData import MoneroTransactionRsigData if __debug__: try: @@ -26,7 +27,7 @@ class MoneroTransactionData(p.MessageType): 11: ('is_multisig', p.BoolType, 0), 12: ('exp_tx_prefix_hash', p.BytesType, 0), 13: ('use_tx_keys', p.BytesType, p.FLAG_REPEATED), - 14: ('is_bulletproof', p.BoolType, 0), + 14: ('rsig_data', MoneroTransactionRsigData, 0), } def __init__( @@ -44,7 +45,7 @@ class MoneroTransactionData(p.MessageType): is_multisig: bool = None, exp_tx_prefix_hash: bytes = None, use_tx_keys: List[bytes] = None, - is_bulletproof: bool = None, + rsig_data: MoneroTransactionRsigData = None, ) -> None: self.version = version self.payment_id = payment_id @@ -59,4 +60,4 @@ class MoneroTransactionData(p.MessageType): self.is_multisig = is_multisig self.exp_tx_prefix_hash = exp_tx_prefix_hash self.use_tx_keys = use_tx_keys if use_tx_keys is not None else [] - self.is_bulletproof = is_bulletproof + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionInitAck.py b/src/trezor/messages/MoneroTransactionInitAck.py index 80bcb0b9a7..d67fe79a62 100644 --- a/src/trezor/messages/MoneroTransactionInitAck.py +++ b/src/trezor/messages/MoneroTransactionInitAck.py @@ -2,6 +2,8 @@ # fmt: off import protobuf as p +from .MoneroTransactionRsigData import MoneroTransactionRsigData + if __debug__: try: from typing import List @@ -18,6 +20,7 @@ class MoneroTransactionInitAck(p.MessageType): 4: ('hmacs', p.BytesType, p.FLAG_REPEATED), 5: ('many_inputs', p.BoolType, 0), 6: ('many_outputs', p.BoolType, 0), + 7: ('rsig_data', MoneroTransactionRsigData, 0), } def __init__( @@ -28,6 +31,7 @@ class MoneroTransactionInitAck(p.MessageType): hmacs: List[bytes] = None, many_inputs: bool = None, many_outputs: bool = None, + rsig_data: MoneroTransactionRsigData = None, ) -> None: self.version = version self.status = status @@ -35,3 +39,4 @@ class MoneroTransactionInitAck(p.MessageType): self.hmacs = hmacs if hmacs is not None else [] self.many_inputs = many_inputs self.many_outputs = many_outputs + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionRangeSigAck.py b/src/trezor/messages/MoneroTransactionRangeSigAck.py new file mode 100644 index 0000000000..d683ccb946 --- /dev/null +++ b/src/trezor/messages/MoneroTransactionRangeSigAck.py @@ -0,0 +1,18 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroTransactionRsigData import MoneroTransactionRsigData + + +class MoneroTransactionRangeSigAck(p.MessageType): + MESSAGE_WIRE_TYPE = 514 + FIELDS = { + 1: ('rsig_data', MoneroTransactionRsigData, 0), + } + + def __init__( + self, + rsig_data: MoneroTransactionRsigData = None, + ) -> None: + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionRangeSigRequest.py b/src/trezor/messages/MoneroTransactionRangeSigRequest.py new file mode 100644 index 0000000000..96e88b6b9a --- /dev/null +++ b/src/trezor/messages/MoneroTransactionRangeSigRequest.py @@ -0,0 +1,17 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroTransactionRsigData import MoneroTransactionRsigData + + +class MoneroTransactionRangeSigRequest(p.MessageType): + FIELDS = { + 1: ('rsig_data', MoneroTransactionRsigData, 0), + } + + def __init__( + self, + rsig_data: MoneroTransactionRsigData = None, + ) -> None: + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionRsigData.py b/src/trezor/messages/MoneroTransactionRsigData.py new file mode 100644 index 0000000000..9edb2d87e4 --- /dev/null +++ b/src/trezor/messages/MoneroTransactionRsigData.py @@ -0,0 +1,53 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroTransactionDestinationEntry import MoneroTransactionDestinationEntry + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class MoneroTransactionRsigData(p.MessageType): + FIELDS = { + 1: ('version', p.UVarintType, 0), + 2: ('rsig_type', p.UVarintType, 0), + 3: ('offload_type', p.UVarintType, 0), + 4: ('grouping', p.UVarintType, p.FLAG_REPEATED), + 5: ('step', p.UVarintType, 0), + 6: ('operation', p.UVarintType, 0), + 7: ('seed', p.BytesType, 0), + 8: ('mask', p.BytesType, 0), + 9: ('amount', p.BytesType, 0), + 10: ('rsig', p.BytesType, 0), + 11: ('outputs', MoneroTransactionDestinationEntry, p.FLAG_REPEATED), + } + + def __init__( + self, + version: int = None, + rsig_type: int = None, + offload_type: int = None, + grouping: List[int] = None, + step: int = None, + operation: int = None, + seed: bytes = None, + mask: bytes = None, + amount: bytes = None, + rsig: bytes = None, + outputs: List[MoneroTransactionDestinationEntry] = None, + ) -> None: + self.version = version + self.rsig_type = rsig_type + self.offload_type = offload_type + self.grouping = grouping if grouping is not None else [] + self.step = step + self.operation = operation + self.seed = seed + self.mask = mask + self.amount = amount + self.rsig = rsig + self.outputs = outputs if outputs is not None else [] diff --git a/src/trezor/messages/MoneroTransactionSetOutputAck.py b/src/trezor/messages/MoneroTransactionSetOutputAck.py index dbfcd83ff6..ed1d8990d6 100644 --- a/src/trezor/messages/MoneroTransactionSetOutputAck.py +++ b/src/trezor/messages/MoneroTransactionSetOutputAck.py @@ -2,13 +2,15 @@ # fmt: off import protobuf as p +from .MoneroTransactionRsigData import MoneroTransactionRsigData + class MoneroTransactionSetOutputAck(p.MessageType): MESSAGE_WIRE_TYPE = 506 FIELDS = { 1: ('tx_out', p.BytesType, 0), 2: ('vouti_hmac', p.BytesType, 0), - 3: ('rsig', p.BytesType, 0), + 3: ('rsig_data', MoneroTransactionRsigData, 0), 4: ('out_pk', p.BytesType, 0), 5: ('ecdh_info', p.BytesType, 0), } @@ -17,12 +19,12 @@ class MoneroTransactionSetOutputAck(p.MessageType): self, tx_out: bytes = None, vouti_hmac: bytes = None, - rsig: bytes = None, + rsig_data: MoneroTransactionRsigData = None, out_pk: bytes = None, ecdh_info: bytes = None, ) -> None: self.tx_out = tx_out self.vouti_hmac = vouti_hmac - self.rsig = rsig + self.rsig_data = rsig_data self.out_pk = out_pk self.ecdh_info = ecdh_info diff --git a/src/trezor/messages/MoneroTransactionSetOutputRequest.py b/src/trezor/messages/MoneroTransactionSetOutputRequest.py index 73b59fb26e..577c87bee2 100644 --- a/src/trezor/messages/MoneroTransactionSetOutputRequest.py +++ b/src/trezor/messages/MoneroTransactionSetOutputRequest.py @@ -3,18 +3,22 @@ import protobuf as p from .MoneroTransactionDestinationEntry import MoneroTransactionDestinationEntry +from .MoneroTransactionRsigData import MoneroTransactionRsigData class MoneroTransactionSetOutputRequest(p.MessageType): FIELDS = { 1: ('dst_entr', MoneroTransactionDestinationEntry, 0), 2: ('dst_entr_hmac', p.BytesType, 0), + 3: ('rsig_data', MoneroTransactionRsigData, 0), } def __init__( self, dst_entr: MoneroTransactionDestinationEntry = None, dst_entr_hmac: bytes = None, + rsig_data: MoneroTransactionRsigData = None, ) -> None: self.dst_entr = dst_entr self.dst_entr_hmac = dst_entr_hmac + self.rsig_data = rsig_data diff --git a/src/trezor/messages/MoneroTransactionSignRequest.py b/src/trezor/messages/MoneroTransactionSignRequest.py index 21bc664ecc..ab5dab6242 100644 --- a/src/trezor/messages/MoneroTransactionSignRequest.py +++ b/src/trezor/messages/MoneroTransactionSignRequest.py @@ -2,12 +2,14 @@ # fmt: off import protobuf as p +from .MoneroTransactionAllInputsSetRequest import MoneroTransactionAllInputsSetRequest from .MoneroTransactionAllOutSetRequest import MoneroTransactionAllOutSetRequest from .MoneroTransactionFinalRequest import MoneroTransactionFinalRequest from .MoneroTransactionInitRequest import MoneroTransactionInitRequest from .MoneroTransactionInputViniRequest import MoneroTransactionInputViniRequest from .MoneroTransactionInputsPermutationRequest import MoneroTransactionInputsPermutationRequest from .MoneroTransactionMlsagDoneRequest import MoneroTransactionMlsagDoneRequest +from .MoneroTransactionRangeSigRequest import MoneroTransactionRangeSigRequest from .MoneroTransactionSetInputRequest import MoneroTransactionSetInputRequest from .MoneroTransactionSetOutputRequest import MoneroTransactionSetOutputRequest from .MoneroTransactionSignInputRequest import MoneroTransactionSignInputRequest @@ -20,11 +22,13 @@ class MoneroTransactionSignRequest(p.MessageType): 2: ('set_input', MoneroTransactionSetInputRequest, 0), 3: ('input_permutation', MoneroTransactionInputsPermutationRequest, 0), 4: ('input_vini', MoneroTransactionInputViniRequest, 0), - 5: ('set_output', MoneroTransactionSetOutputRequest, 0), - 6: ('all_out_set', MoneroTransactionAllOutSetRequest, 0), - 7: ('mlsag_done', MoneroTransactionMlsagDoneRequest, 0), - 8: ('sign_input', MoneroTransactionSignInputRequest, 0), - 9: ('final_msg', MoneroTransactionFinalRequest, 0), + 5: ('all_in_set', MoneroTransactionAllInputsSetRequest, 0), + 6: ('set_output', MoneroTransactionSetOutputRequest, 0), + 7: ('rsig', MoneroTransactionRangeSigRequest, 0), + 8: ('all_out_set', MoneroTransactionAllOutSetRequest, 0), + 9: ('mlsag_done', MoneroTransactionMlsagDoneRequest, 0), + 10: ('sign_input', MoneroTransactionSignInputRequest, 0), + 11: ('final_msg', MoneroTransactionFinalRequest, 0), } def __init__( @@ -33,7 +37,9 @@ class MoneroTransactionSignRequest(p.MessageType): set_input: MoneroTransactionSetInputRequest = None, input_permutation: MoneroTransactionInputsPermutationRequest = None, input_vini: MoneroTransactionInputViniRequest = None, + all_in_set: MoneroTransactionAllInputsSetRequest = None, set_output: MoneroTransactionSetOutputRequest = None, + rsig: MoneroTransactionRangeSigRequest = None, all_out_set: MoneroTransactionAllOutSetRequest = None, mlsag_done: MoneroTransactionMlsagDoneRequest = None, sign_input: MoneroTransactionSignInputRequest = None, @@ -43,7 +49,9 @@ class MoneroTransactionSignRequest(p.MessageType): self.set_input = set_input self.input_permutation = input_permutation self.input_vini = input_vini + self.all_in_set = all_in_set self.set_output = set_output + self.rsig = rsig self.all_out_set = all_out_set self.mlsag_done = mlsag_done self.sign_input = sign_input diff --git a/vendor/trezor-common b/vendor/trezor-common index 4c36e33425..a3cf029042 160000 --- a/vendor/trezor-common +++ b/vendor/trezor-common @@ -1 +1 @@ -Subproject commit 4c36e33425513402239530d24d093c47c162f97d +Subproject commit a3cf029042f092bc2e42ede0a2fa5fa1df2ec2d9