diff --git a/src/trezor/messages/CardanoGetPublicKey.py b/src/trezor/messages/CardanoGetPublicKey.py index 425df0b7f..e2c3887c1 100644 --- a/src/trezor/messages/CardanoGetPublicKey.py +++ b/src/trezor/messages/CardanoGetPublicKey.py @@ -13,10 +13,13 @@ class CardanoGetPublicKey(p.MessageType): MESSAGE_WIRE_TYPE = 305 FIELDS = { 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('show_display', p.BoolType, 0), } def __init__( self, address_n: List[int] = None, + show_display: bool = None, ) -> None: self.address_n = address_n if address_n is not None else [] + self.show_display = show_display diff --git a/src/trezor/messages/MessageType.py b/src/trezor/messages/MessageType.py index 2c46a341d..c07d8eaeb 100644 --- a/src/trezor/messages/MessageType.py +++ b/src/trezor/messages/MessageType.py @@ -122,6 +122,18 @@ CardanoGetAddress = 307 CardanoAddress = 308 CardanoTxAck = 309 CardanoSignedTransaction = 310 +OntologyGetAddress = 350 +OntologyAddress = 351 +OntologyGetPublicKey = 352 +OntologyPublicKey = 353 +OntologySignTransfer = 354 +OntologySignedTransfer = 355 +OntologySignWithdrawOng = 356 +OntologySignedWithdrawOng = 357 +OntologySignOntIdRegister = 358 +OntologySignedOntIdRegister = 359 +OntologySignOntIdAddAttributes = 360 +OntologySignedOntIdAddAttributes = 361 RippleGetAddress = 400 RippleAddress = 401 RippleSignTx = 402 diff --git a/src/trezor/messages/MoneroMultisigKLRki.py b/src/trezor/messages/MoneroMultisigKLRki.py new file mode 100644 index 000000000..8276f2316 --- /dev/null +++ b/src/trezor/messages/MoneroMultisigKLRki.py @@ -0,0 +1,24 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class MoneroMultisigKLRki(p.MessageType): + FIELDS = { + 1: ('K', p.BytesType, 0), + 2: ('L', p.BytesType, 0), + 3: ('R', p.BytesType, 0), + 4: ('ki', p.BytesType, 0), + } + + def __init__( + self, + K: bytes = None, + L: bytes = None, + R: bytes = None, + ki: bytes = None, + ) -> None: + self.K = K + self.L = L + self.R = R + self.ki = ki diff --git a/src/trezor/messages/MoneroOutputEntry.py b/src/trezor/messages/MoneroOutputEntry.py new file mode 100644 index 000000000..03f628e98 --- /dev/null +++ b/src/trezor/messages/MoneroOutputEntry.py @@ -0,0 +1,20 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroRctKey import MoneroRctKey + + +class MoneroOutputEntry(p.MessageType): + FIELDS = { + 1: ('idx', p.UVarintType, 0), + 2: ('key', MoneroRctKey, 0), + } + + def __init__( + self, + idx: int = None, + key: MoneroRctKey = None, + ) -> None: + self.idx = idx + self.key = key diff --git a/src/trezor/messages/MoneroRctKey.py b/src/trezor/messages/MoneroRctKey.py new file mode 100644 index 000000000..6784be77f --- /dev/null +++ b/src/trezor/messages/MoneroRctKey.py @@ -0,0 +1,18 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class MoneroRctKey(p.MessageType): + FIELDS = { + 1: ('dest', p.BytesType, 0), + 2: ('mask', p.BytesType, 0), + } + + def __init__( + self, + dest: bytes = None, + mask: bytes = None, + ) -> None: + self.dest = dest + self.mask = mask diff --git a/src/trezor/messages/MoneroTransactionInputViniRequest.py b/src/trezor/messages/MoneroTransactionInputViniRequest.py index 148d68526..0ed950e82 100644 --- a/src/trezor/messages/MoneroTransactionInputViniRequest.py +++ b/src/trezor/messages/MoneroTransactionInputViniRequest.py @@ -2,10 +2,12 @@ # fmt: off import protobuf as p +from .MoneroTransactionSourceEntry import MoneroTransactionSourceEntry + class MoneroTransactionInputViniRequest(p.MessageType): FIELDS = { - 1: ('src_entr', p.BytesType, 0), + 1: ('src_entr', MoneroTransactionSourceEntry, 0), 2: ('vini', p.BytesType, 0), 3: ('vini_hmac', p.BytesType, 0), 4: ('pseudo_out', p.BytesType, 0), @@ -14,7 +16,7 @@ class MoneroTransactionInputViniRequest(p.MessageType): def __init__( self, - src_entr: bytes = None, + src_entr: MoneroTransactionSourceEntry = None, vini: bytes = None, vini_hmac: bytes = None, pseudo_out: bytes = None, diff --git a/src/trezor/messages/MoneroTransactionSetInputRequest.py b/src/trezor/messages/MoneroTransactionSetInputRequest.py index 715358a5f..e424b1e7a 100644 --- a/src/trezor/messages/MoneroTransactionSetInputRequest.py +++ b/src/trezor/messages/MoneroTransactionSetInputRequest.py @@ -2,17 +2,19 @@ # fmt: off import protobuf as p +from .MoneroTransactionSourceEntry import MoneroTransactionSourceEntry + class MoneroTransactionSetInputRequest(p.MessageType): FIELDS = { 1: ('version', p.UVarintType, 0), - 2: ('src_entr', p.BytesType, 0), + 2: ('src_entr', MoneroTransactionSourceEntry, 0), } def __init__( self, version: int = None, - src_entr: bytes = None, + src_entr: MoneroTransactionSourceEntry = None, ) -> None: self.version = version self.src_entr = src_entr diff --git a/src/trezor/messages/MoneroTransactionSetOutputRequest.py b/src/trezor/messages/MoneroTransactionSetOutputRequest.py index 3592fb83f..73b59fb26 100644 --- a/src/trezor/messages/MoneroTransactionSetOutputRequest.py +++ b/src/trezor/messages/MoneroTransactionSetOutputRequest.py @@ -2,16 +2,18 @@ # fmt: off import protobuf as p +from .MoneroTransactionDestinationEntry import MoneroTransactionDestinationEntry + class MoneroTransactionSetOutputRequest(p.MessageType): FIELDS = { - 1: ('dst_entr', p.BytesType, 0), + 1: ('dst_entr', MoneroTransactionDestinationEntry, 0), 2: ('dst_entr_hmac', p.BytesType, 0), } def __init__( self, - dst_entr: bytes = None, + dst_entr: MoneroTransactionDestinationEntry = None, dst_entr_hmac: bytes = None, ) -> None: self.dst_entr = dst_entr diff --git a/src/trezor/messages/MoneroTransactionSignInputRequest.py b/src/trezor/messages/MoneroTransactionSignInputRequest.py index 6eda2db7d..9866d5b0f 100644 --- a/src/trezor/messages/MoneroTransactionSignInputRequest.py +++ b/src/trezor/messages/MoneroTransactionSignInputRequest.py @@ -2,10 +2,12 @@ # fmt: off import protobuf as p +from .MoneroTransactionSourceEntry import MoneroTransactionSourceEntry + class MoneroTransactionSignInputRequest(p.MessageType): FIELDS = { - 1: ('src_entr', p.BytesType, 0), + 1: ('src_entr', MoneroTransactionSourceEntry, 0), 2: ('vini', p.BytesType, 0), 3: ('vini_hmac', p.BytesType, 0), 4: ('pseudo_out', p.BytesType, 0), @@ -16,7 +18,7 @@ class MoneroTransactionSignInputRequest(p.MessageType): def __init__( self, - src_entr: bytes = None, + src_entr: MoneroTransactionSourceEntry = None, vini: bytes = None, vini_hmac: bytes = None, pseudo_out: bytes = None, diff --git a/src/trezor/messages/MoneroTransactionSourceEntry.py b/src/trezor/messages/MoneroTransactionSourceEntry.py new file mode 100644 index 000000000..515d02c8c --- /dev/null +++ b/src/trezor/messages/MoneroTransactionSourceEntry.py @@ -0,0 +1,48 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .MoneroMultisigKLRki import MoneroMultisigKLRki +from .MoneroOutputEntry import MoneroOutputEntry + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class MoneroTransactionSourceEntry(p.MessageType): + FIELDS = { + 1: ('outputs', MoneroOutputEntry, p.FLAG_REPEATED), + 2: ('real_output', p.UVarintType, 0), + 3: ('real_out_tx_key', p.BytesType, 0), + 4: ('real_out_additional_tx_keys', p.BytesType, p.FLAG_REPEATED), + 5: ('real_output_in_tx_index', p.UVarintType, 0), + 6: ('amount', p.UVarintType, 0), + 7: ('rct', p.BoolType, 0), + 8: ('mask', p.BytesType, 0), + 9: ('multisig_kLRki', MoneroMultisigKLRki, 0), + } + + def __init__( + self, + outputs: List[MoneroOutputEntry] = None, + real_output: int = None, + real_out_tx_key: bytes = None, + real_out_additional_tx_keys: List[bytes] = None, + real_output_in_tx_index: int = None, + amount: int = None, + rct: bool = None, + mask: bytes = None, + multisig_kLRki: MoneroMultisigKLRki = None, + ) -> None: + self.outputs = outputs if outputs is not None else [] + self.real_output = real_output + self.real_out_tx_key = real_out_tx_key + self.real_out_additional_tx_keys = real_out_additional_tx_keys if real_out_additional_tx_keys is not None else [] + self.real_output_in_tx_index = real_output_in_tx_index + self.amount = amount + self.rct = rct + self.mask = mask + self.multisig_kLRki = multisig_kLRki diff --git a/src/trezor/messages/OntologyAddress.py b/src/trezor/messages/OntologyAddress.py new file mode 100644 index 000000000..f45422878 --- /dev/null +++ b/src/trezor/messages/OntologyAddress.py @@ -0,0 +1,16 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyAddress(p.MessageType): + MESSAGE_WIRE_TYPE = 351 + FIELDS = { + 1: ('address', p.UnicodeType, 0), + } + + def __init__( + self, + address: str = None, + ) -> None: + self.address = address diff --git a/src/trezor/messages/OntologyAsset.py b/src/trezor/messages/OntologyAsset.py new file mode 100644 index 000000000..daa8b0786 --- /dev/null +++ b/src/trezor/messages/OntologyAsset.py @@ -0,0 +1,4 @@ +# Automatically generated by pb2py +# fmt: off +ONT = 1 +ONG = 2 diff --git a/src/trezor/messages/OntologyGetAddress.py b/src/trezor/messages/OntologyGetAddress.py new file mode 100644 index 000000000..38388b000 --- /dev/null +++ b/src/trezor/messages/OntologyGetAddress.py @@ -0,0 +1,25 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologyGetAddress(p.MessageType): + MESSAGE_WIRE_TYPE = 350 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('show_display', p.BoolType, 0), + } + + def __init__( + self, + address_n: List[int] = None, + show_display: bool = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.show_display = show_display diff --git a/src/trezor/messages/OntologyGetPublicKey.py b/src/trezor/messages/OntologyGetPublicKey.py new file mode 100644 index 000000000..c1727741c --- /dev/null +++ b/src/trezor/messages/OntologyGetPublicKey.py @@ -0,0 +1,25 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologyGetPublicKey(p.MessageType): + MESSAGE_WIRE_TYPE = 352 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('show_display', p.BoolType, 0), + } + + def __init__( + self, + address_n: List[int] = None, + show_display: bool = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.show_display = show_display diff --git a/src/trezor/messages/OntologyOntIdAddAttributes.py b/src/trezor/messages/OntologyOntIdAddAttributes.py new file mode 100644 index 000000000..9982538a4 --- /dev/null +++ b/src/trezor/messages/OntologyOntIdAddAttributes.py @@ -0,0 +1,29 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyOntIdAttribute import OntologyOntIdAttribute + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologyOntIdAddAttributes(p.MessageType): + FIELDS = { + 1: ('ont_id', p.UnicodeType, 0), + 2: ('public_key', p.BytesType, 0), + 3: ('ont_id_attributes', OntologyOntIdAttribute, p.FLAG_REPEATED), + } + + def __init__( + self, + ont_id: str = None, + public_key: bytes = None, + ont_id_attributes: List[OntologyOntIdAttribute] = None, + ) -> None: + self.ont_id = ont_id + self.public_key = public_key + self.ont_id_attributes = ont_id_attributes if ont_id_attributes is not None else [] diff --git a/src/trezor/messages/OntologyOntIdAttribute.py b/src/trezor/messages/OntologyOntIdAttribute.py new file mode 100644 index 000000000..48cbd7db5 --- /dev/null +++ b/src/trezor/messages/OntologyOntIdAttribute.py @@ -0,0 +1,21 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyOntIdAttribute(p.MessageType): + FIELDS = { + 1: ('key', p.UnicodeType, 0), + 2: ('type', p.UnicodeType, 0), + 3: ('value', p.UnicodeType, 0), + } + + def __init__( + self, + key: str = None, + type: str = None, + value: str = None, + ) -> None: + self.key = key + self.type = type + self.value = value diff --git a/src/trezor/messages/OntologyOntIdRegister.py b/src/trezor/messages/OntologyOntIdRegister.py new file mode 100644 index 000000000..ebe434346 --- /dev/null +++ b/src/trezor/messages/OntologyOntIdRegister.py @@ -0,0 +1,18 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyOntIdRegister(p.MessageType): + FIELDS = { + 1: ('ont_id', p.UnicodeType, 0), + 2: ('public_key', p.BytesType, 0), + } + + def __init__( + self, + ont_id: str = None, + public_key: bytes = None, + ) -> None: + self.ont_id = ont_id + self.public_key = public_key diff --git a/src/trezor/messages/OntologyPublicKey.py b/src/trezor/messages/OntologyPublicKey.py new file mode 100644 index 000000000..d62a65a66 --- /dev/null +++ b/src/trezor/messages/OntologyPublicKey.py @@ -0,0 +1,16 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyPublicKey(p.MessageType): + MESSAGE_WIRE_TYPE = 353 + FIELDS = { + 1: ('public_key', p.BytesType, 0), + } + + def __init__( + self, + public_key: bytes = None, + ) -> None: + self.public_key = public_key diff --git a/src/trezor/messages/OntologySignOntIdAddAttributes.py b/src/trezor/messages/OntologySignOntIdAddAttributes.py new file mode 100644 index 000000000..b42dee1b9 --- /dev/null +++ b/src/trezor/messages/OntologySignOntIdAddAttributes.py @@ -0,0 +1,31 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyOntIdAddAttributes import OntologyOntIdAddAttributes +from .OntologyTransaction import OntologyTransaction + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologySignOntIdAddAttributes(p.MessageType): + MESSAGE_WIRE_TYPE = 360 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('transaction', OntologyTransaction, 0), + 3: ('ont_id_add_attributes', OntologyOntIdAddAttributes, 0), + } + + def __init__( + self, + address_n: List[int] = None, + transaction: OntologyTransaction = None, + ont_id_add_attributes: OntologyOntIdAddAttributes = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.transaction = transaction + self.ont_id_add_attributes = ont_id_add_attributes diff --git a/src/trezor/messages/OntologySignOntIdRegister.py b/src/trezor/messages/OntologySignOntIdRegister.py new file mode 100644 index 000000000..cf83aae5b --- /dev/null +++ b/src/trezor/messages/OntologySignOntIdRegister.py @@ -0,0 +1,31 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyOntIdRegister import OntologyOntIdRegister +from .OntologyTransaction import OntologyTransaction + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologySignOntIdRegister(p.MessageType): + MESSAGE_WIRE_TYPE = 358 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('transaction', OntologyTransaction, 0), + 3: ('ont_id_register', OntologyOntIdRegister, 0), + } + + def __init__( + self, + address_n: List[int] = None, + transaction: OntologyTransaction = None, + ont_id_register: OntologyOntIdRegister = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.transaction = transaction + self.ont_id_register = ont_id_register diff --git a/src/trezor/messages/OntologySignTransfer.py b/src/trezor/messages/OntologySignTransfer.py new file mode 100644 index 000000000..78758cae6 --- /dev/null +++ b/src/trezor/messages/OntologySignTransfer.py @@ -0,0 +1,31 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyTransaction import OntologyTransaction +from .OntologyTransfer import OntologyTransfer + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologySignTransfer(p.MessageType): + MESSAGE_WIRE_TYPE = 354 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('transaction', OntologyTransaction, 0), + 3: ('transfer', OntologyTransfer, 0), + } + + def __init__( + self, + address_n: List[int] = None, + transaction: OntologyTransaction = None, + transfer: OntologyTransfer = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.transaction = transaction + self.transfer = transfer diff --git a/src/trezor/messages/OntologySignWithdrawOng.py b/src/trezor/messages/OntologySignWithdrawOng.py new file mode 100644 index 000000000..b9a99b7d4 --- /dev/null +++ b/src/trezor/messages/OntologySignWithdrawOng.py @@ -0,0 +1,31 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyTransaction import OntologyTransaction +from .OntologyWithdrawOng import OntologyWithdrawOng + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologySignWithdrawOng(p.MessageType): + MESSAGE_WIRE_TYPE = 356 + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('transaction', OntologyTransaction, 0), + 3: ('withdraw_ong', OntologyWithdrawOng, 0), + } + + def __init__( + self, + address_n: List[int] = None, + transaction: OntologyTransaction = None, + withdraw_ong: OntologyWithdrawOng = None, + ) -> None: + self.address_n = address_n if address_n is not None else [] + self.transaction = transaction + self.withdraw_ong = withdraw_ong diff --git a/src/trezor/messages/OntologySignedOntIdAddAttributes.py b/src/trezor/messages/OntologySignedOntIdAddAttributes.py new file mode 100644 index 000000000..e88436442 --- /dev/null +++ b/src/trezor/messages/OntologySignedOntIdAddAttributes.py @@ -0,0 +1,19 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologySignedOntIdAddAttributes(p.MessageType): + MESSAGE_WIRE_TYPE = 361 + FIELDS = { + 1: ('signature', p.BytesType, 0), + 2: ('payload', p.BytesType, 0), + } + + def __init__( + self, + signature: bytes = None, + payload: bytes = None, + ) -> None: + self.signature = signature + self.payload = payload diff --git a/src/trezor/messages/OntologySignedOntIdRegister.py b/src/trezor/messages/OntologySignedOntIdRegister.py new file mode 100644 index 000000000..0b6fd3845 --- /dev/null +++ b/src/trezor/messages/OntologySignedOntIdRegister.py @@ -0,0 +1,19 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologySignedOntIdRegister(p.MessageType): + MESSAGE_WIRE_TYPE = 359 + FIELDS = { + 1: ('signature', p.BytesType, 0), + 2: ('payload', p.BytesType, 0), + } + + def __init__( + self, + signature: bytes = None, + payload: bytes = None, + ) -> None: + self.signature = signature + self.payload = payload diff --git a/src/trezor/messages/OntologySignedTransfer.py b/src/trezor/messages/OntologySignedTransfer.py new file mode 100644 index 000000000..40e24eabb --- /dev/null +++ b/src/trezor/messages/OntologySignedTransfer.py @@ -0,0 +1,19 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologySignedTransfer(p.MessageType): + MESSAGE_WIRE_TYPE = 355 + FIELDS = { + 1: ('signature', p.BytesType, 0), + 2: ('payload', p.BytesType, 0), + } + + def __init__( + self, + signature: bytes = None, + payload: bytes = None, + ) -> None: + self.signature = signature + self.payload = payload diff --git a/src/trezor/messages/OntologySignedWithdrawOng.py b/src/trezor/messages/OntologySignedWithdrawOng.py new file mode 100644 index 000000000..54d729abe --- /dev/null +++ b/src/trezor/messages/OntologySignedWithdrawOng.py @@ -0,0 +1,19 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologySignedWithdrawOng(p.MessageType): + MESSAGE_WIRE_TYPE = 357 + FIELDS = { + 1: ('signature', p.BytesType, 0), + 2: ('payload', p.BytesType, 0), + } + + def __init__( + self, + signature: bytes = None, + payload: bytes = None, + ) -> None: + self.signature = signature + self.payload = payload diff --git a/src/trezor/messages/OntologyTransaction.py b/src/trezor/messages/OntologyTransaction.py new file mode 100644 index 000000000..d2d6f1a7b --- /dev/null +++ b/src/trezor/messages/OntologyTransaction.py @@ -0,0 +1,41 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .OntologyTxAttribute import OntologyTxAttribute + +if __debug__: + try: + from typing import List + except ImportError: + List = None # type: ignore + + +class OntologyTransaction(p.MessageType): + FIELDS = { + 1: ('version', p.UVarintType, 0), + 2: ('type', p.UVarintType, 0), + 3: ('nonce', p.UVarintType, 0), + 4: ('gas_price', p.UVarintType, 0), + 5: ('gas_limit', p.UVarintType, 0), + 6: ('payer', p.UnicodeType, 0), + 7: ('tx_attributes', OntologyTxAttribute, p.FLAG_REPEATED), + } + + def __init__( + self, + version: int = None, + type: int = None, + nonce: int = None, + gas_price: int = None, + gas_limit: int = None, + payer: str = None, + tx_attributes: List[OntologyTxAttribute] = None, + ) -> None: + self.version = version + self.type = type + self.nonce = nonce + self.gas_price = gas_price + self.gas_limit = gas_limit + self.payer = payer + self.tx_attributes = tx_attributes if tx_attributes is not None else [] diff --git a/src/trezor/messages/OntologyTransfer.py b/src/trezor/messages/OntologyTransfer.py new file mode 100644 index 000000000..679a6dbc6 --- /dev/null +++ b/src/trezor/messages/OntologyTransfer.py @@ -0,0 +1,24 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyTransfer(p.MessageType): + FIELDS = { + 1: ('asset', p.UVarintType, 0), + 2: ('amount', p.UVarintType, 0), + 3: ('from_address', p.UnicodeType, 0), + 4: ('to_address', p.UnicodeType, 0), + } + + def __init__( + self, + asset: int = None, + amount: int = None, + from_address: str = None, + to_address: str = None, + ) -> None: + self.asset = asset + self.amount = amount + self.from_address = from_address + self.to_address = to_address diff --git a/src/trezor/messages/OntologyTxAttribute.py b/src/trezor/messages/OntologyTxAttribute.py new file mode 100644 index 000000000..fce579c7f --- /dev/null +++ b/src/trezor/messages/OntologyTxAttribute.py @@ -0,0 +1,18 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyTxAttribute(p.MessageType): + FIELDS = { + 1: ('usage', p.UVarintType, 0), + 2: ('data', p.BytesType, 0), + } + + def __init__( + self, + usage: int = None, + data: bytes = None, + ) -> None: + self.usage = usage + self.data = data diff --git a/src/trezor/messages/OntologyWithdrawOng.py b/src/trezor/messages/OntologyWithdrawOng.py new file mode 100644 index 000000000..b4977f59f --- /dev/null +++ b/src/trezor/messages/OntologyWithdrawOng.py @@ -0,0 +1,21 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + + +class OntologyWithdrawOng(p.MessageType): + FIELDS = { + 1: ('amount', p.UVarintType, 0), + 2: ('from_address', p.UnicodeType, 0), + 3: ('to_address', p.UnicodeType, 0), + } + + def __init__( + self, + amount: int = None, + from_address: str = None, + to_address: str = None, + ) -> None: + self.amount = amount + self.from_address = from_address + self.to_address = to_address diff --git a/src/trezor/messages/TezosCurveType.py b/src/trezor/messages/TezosCurveType.py new file mode 100644 index 000000000..3c1415d30 --- /dev/null +++ b/src/trezor/messages/TezosCurveType.py @@ -0,0 +1,5 @@ +# Automatically generated by pb2py +# fmt: off +Ed25519 = 0 +Secp256k1 = 1 +P256 = 2 diff --git a/src/trezor/messages/TezosOperationCommon.py b/src/trezor/messages/TezosDelegationOp.py similarity index 53% rename from src/trezor/messages/TezosOperationCommon.py rename to src/trezor/messages/TezosDelegationOp.py index bdcc8a99b..0058bc953 100644 --- a/src/trezor/messages/TezosOperationCommon.py +++ b/src/trezor/messages/TezosDelegationOp.py @@ -5,31 +5,28 @@ import protobuf as p from .TezosContractID import TezosContractID -class TezosOperationCommon(p.MessageType): +class TezosDelegationOp(p.MessageType): FIELDS = { - 1: ('branch', p.BytesType, 0), - 2: ('tag', p.UVarintType, 0), - 3: ('source', TezosContractID, 0), - 4: ('fee', p.UVarintType, 0), - 5: ('counter', p.UVarintType, 0), - 6: ('gas_limit', p.UVarintType, 0), - 7: ('storage_limit', p.UVarintType, 0), + 1: ('source', TezosContractID, 0), + 2: ('fee', p.UVarintType, 0), + 3: ('counter', p.UVarintType, 0), + 4: ('gas_limit', p.UVarintType, 0), + 5: ('storage_limit', p.UVarintType, 0), + 6: ('delegate', p.BytesType, 0), } def __init__( self, - branch: bytes = None, - tag: int = None, source: TezosContractID = None, fee: int = None, counter: int = None, gas_limit: int = None, storage_limit: int = None, + delegate: bytes = None, ) -> None: - self.branch = branch - self.tag = tag self.source = source self.fee = fee self.counter = counter self.gas_limit = gas_limit self.storage_limit = storage_limit + self.delegate = delegate diff --git a/src/trezor/messages/TezosDelegationType.py b/src/trezor/messages/TezosDelegationType.py deleted file mode 100644 index a0d43a728..000000000 --- a/src/trezor/messages/TezosDelegationType.py +++ /dev/null @@ -1,15 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -import protobuf as p - - -class TezosDelegationType(p.MessageType): - FIELDS = { - 1: ('delegate', p.BytesType, 0), - } - - def __init__( - self, - delegate: bytes = None, - ) -> None: - self.delegate = delegate diff --git a/src/trezor/messages/TezosGetAddress.py b/src/trezor/messages/TezosGetAddress.py index fa57b39b2..06569c835 100644 --- a/src/trezor/messages/TezosGetAddress.py +++ b/src/trezor/messages/TezosGetAddress.py @@ -13,13 +13,16 @@ class TezosGetAddress(p.MessageType): MESSAGE_WIRE_TYPE = 150 FIELDS = { 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), - 2: ('show_display', p.BoolType, 0), + 2: ('curve', p.UVarintType, 0), # default=Ed25519 + 3: ('show_display', p.BoolType, 0), } def __init__( self, address_n: List[int] = None, + curve: int = None, show_display: bool = None, ) -> None: self.address_n = address_n if address_n is not None else [] + self.curve = curve self.show_display = show_display diff --git a/src/trezor/messages/TezosGetPublicKey.py b/src/trezor/messages/TezosGetPublicKey.py index 548b49f13..2daa9c56a 100644 --- a/src/trezor/messages/TezosGetPublicKey.py +++ b/src/trezor/messages/TezosGetPublicKey.py @@ -13,13 +13,16 @@ class TezosGetPublicKey(p.MessageType): MESSAGE_WIRE_TYPE = 154 FIELDS = { 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), - 2: ('show_display', p.BoolType, 0), + 2: ('curve', p.UVarintType, 0), # default=Ed25519 + 3: ('show_display', p.BoolType, 0), } def __init__( self, address_n: List[int] = None, + curve: int = None, show_display: bool = None, ) -> None: self.address_n = address_n if address_n is not None else [] + self.curve = curve self.show_display = show_display diff --git a/src/trezor/messages/TezosOperationType.py b/src/trezor/messages/TezosOperationType.py deleted file mode 100644 index d84d4f3b9..000000000 --- a/src/trezor/messages/TezosOperationType.py +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -Transaction = 8 -Origination = 9 -Delegation = 10 diff --git a/src/trezor/messages/TezosOriginationOp.py b/src/trezor/messages/TezosOriginationOp.py new file mode 100644 index 000000000..65585500d --- /dev/null +++ b/src/trezor/messages/TezosOriginationOp.py @@ -0,0 +1,47 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .TezosContractID import TezosContractID + + +class TezosOriginationOp(p.MessageType): + FIELDS = { + 1: ('source', TezosContractID, 0), + 2: ('fee', p.UVarintType, 0), + 3: ('counter', p.UVarintType, 0), + 4: ('gas_limit', p.UVarintType, 0), + 5: ('storage_limit', p.UVarintType, 0), + 6: ('manager_pubkey', p.BytesType, 0), + 7: ('balance', p.UVarintType, 0), + 8: ('spendable', p.BoolType, 0), + 9: ('delegatable', p.BoolType, 0), + 10: ('delegate', p.BytesType, 0), + 11: ('script', p.BytesType, 0), + } + + def __init__( + self, + source: TezosContractID = None, + fee: int = None, + counter: int = None, + gas_limit: int = None, + storage_limit: int = None, + manager_pubkey: bytes = None, + balance: int = None, + spendable: bool = None, + delegatable: bool = None, + delegate: bytes = None, + script: bytes = None, + ) -> None: + self.source = source + self.fee = fee + self.counter = counter + self.gas_limit = gas_limit + self.storage_limit = storage_limit + self.manager_pubkey = manager_pubkey + self.balance = balance + self.spendable = spendable + self.delegatable = delegatable + self.delegate = delegate + self.script = script diff --git a/src/trezor/messages/TezosOriginationType.py b/src/trezor/messages/TezosOriginationType.py deleted file mode 100644 index 854717b2f..000000000 --- a/src/trezor/messages/TezosOriginationType.py +++ /dev/null @@ -1,30 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -import protobuf as p - - -class TezosOriginationType(p.MessageType): - FIELDS = { - 1: ('manager_pubkey', p.BytesType, 0), - 2: ('balance', p.UVarintType, 0), - 3: ('spendable', p.BoolType, 0), - 4: ('delegatable', p.BoolType, 0), - 5: ('delegate', p.BytesType, 0), - 6: ('script', p.BytesType, 0), - } - - def __init__( - self, - manager_pubkey: bytes = None, - balance: int = None, - spendable: bool = None, - delegatable: bool = None, - delegate: bytes = None, - script: bytes = None, - ) -> None: - self.manager_pubkey = manager_pubkey - self.balance = balance - self.spendable = spendable - self.delegatable = delegatable - self.delegate = delegate - self.script = script diff --git a/src/trezor/messages/TezosPublicKey.py b/src/trezor/messages/TezosPublicKey.py index 99c4fdc5b..9a4a40d0c 100644 --- a/src/trezor/messages/TezosPublicKey.py +++ b/src/trezor/messages/TezosPublicKey.py @@ -6,11 +6,11 @@ import protobuf as p class TezosPublicKey(p.MessageType): MESSAGE_WIRE_TYPE = 155 FIELDS = { - 1: ('public_key', p.BytesType, 0), + 1: ('public_key', p.UnicodeType, 0), } def __init__( self, - public_key: bytes = None, + public_key: str = None, ) -> None: self.public_key = public_key diff --git a/src/trezor/messages/TezosRevealOp.py b/src/trezor/messages/TezosRevealOp.py new file mode 100644 index 000000000..2d2111a8a --- /dev/null +++ b/src/trezor/messages/TezosRevealOp.py @@ -0,0 +1,32 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .TezosContractID import TezosContractID + + +class TezosRevealOp(p.MessageType): + FIELDS = { + 1: ('source', TezosContractID, 0), + 2: ('fee', p.UVarintType, 0), + 3: ('counter', p.UVarintType, 0), + 4: ('gas_limit', p.UVarintType, 0), + 5: ('storage_limit', p.UVarintType, 0), + 6: ('public_key', p.BytesType, 0), + } + + def __init__( + self, + source: TezosContractID = None, + fee: int = None, + counter: int = None, + gas_limit: int = None, + storage_limit: int = None, + public_key: bytes = None, + ) -> None: + self.source = source + self.fee = fee + self.counter = counter + self.gas_limit = gas_limit + self.storage_limit = storage_limit + self.public_key = public_key diff --git a/src/trezor/messages/TezosSignTx.py b/src/trezor/messages/TezosSignTx.py index eaaebab25..b7c963456 100644 --- a/src/trezor/messages/TezosSignTx.py +++ b/src/trezor/messages/TezosSignTx.py @@ -2,10 +2,10 @@ # fmt: off import protobuf as p -from .TezosDelegationType import TezosDelegationType -from .TezosOperationCommon import TezosOperationCommon -from .TezosOriginationType import TezosOriginationType -from .TezosTransactionType import TezosTransactionType +from .TezosDelegationOp import TezosDelegationOp +from .TezosOriginationOp import TezosOriginationOp +from .TezosRevealOp import TezosRevealOp +from .TezosTransactionOp import TezosTransactionOp if __debug__: try: @@ -18,22 +18,28 @@ class TezosSignTx(p.MessageType): MESSAGE_WIRE_TYPE = 152 FIELDS = { 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), - 2: ('operation', TezosOperationCommon, 0), - 3: ('transaction', TezosTransactionType, 0), - 4: ('origination', TezosOriginationType, 0), - 5: ('delegation', TezosDelegationType, 0), + 2: ('curve', p.UVarintType, 0), # default=Ed25519 + 3: ('branch', p.BytesType, 0), + 4: ('reveal', TezosRevealOp, 0), + 5: ('transaction', TezosTransactionOp, 0), + 6: ('origination', TezosOriginationOp, 0), + 7: ('delegation', TezosDelegationOp, 0), } def __init__( self, address_n: List[int] = None, - operation: TezosOperationCommon = None, - transaction: TezosTransactionType = None, - origination: TezosOriginationType = None, - delegation: TezosDelegationType = None, + curve: int = None, + branch: bytes = None, + reveal: TezosRevealOp = None, + transaction: TezosTransactionOp = None, + origination: TezosOriginationOp = None, + delegation: TezosDelegationOp = None, ) -> None: self.address_n = address_n if address_n is not None else [] - self.operation = operation + self.curve = curve + self.branch = branch + self.reveal = reveal self.transaction = transaction self.origination = origination self.delegation = delegation diff --git a/src/trezor/messages/TezosSignedTx.py b/src/trezor/messages/TezosSignedTx.py index e6dd9555c..3db0c180e 100644 --- a/src/trezor/messages/TezosSignedTx.py +++ b/src/trezor/messages/TezosSignedTx.py @@ -6,14 +6,14 @@ import protobuf as p class TezosSignedTx(p.MessageType): MESSAGE_WIRE_TYPE = 153 FIELDS = { - 1: ('signature', p.BytesType, 0), + 1: ('signature', p.UnicodeType, 0), 2: ('sig_op_contents', p.BytesType, 0), 3: ('operation_hash', p.UnicodeType, 0), } def __init__( self, - signature: bytes = None, + signature: str = None, sig_op_contents: bytes = None, operation_hash: str = None, ) -> None: diff --git a/src/trezor/messages/TezosTransactionOp.py b/src/trezor/messages/TezosTransactionOp.py new file mode 100644 index 000000000..1b196fd70 --- /dev/null +++ b/src/trezor/messages/TezosTransactionOp.py @@ -0,0 +1,38 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +from .TezosContractID import TezosContractID + + +class TezosTransactionOp(p.MessageType): + FIELDS = { + 1: ('source', TezosContractID, 0), + 2: ('fee', p.UVarintType, 0), + 3: ('counter', p.UVarintType, 0), + 4: ('gas_limit', p.UVarintType, 0), + 5: ('storage_limit', p.UVarintType, 0), + 6: ('amount', p.UVarintType, 0), + 7: ('destination', TezosContractID, 0), + 8: ('parameters', p.BytesType, 0), + } + + def __init__( + self, + source: TezosContractID = None, + fee: int = None, + counter: int = None, + gas_limit: int = None, + storage_limit: int = None, + amount: int = None, + destination: TezosContractID = None, + parameters: bytes = None, + ) -> None: + self.source = source + self.fee = fee + self.counter = counter + self.gas_limit = gas_limit + self.storage_limit = storage_limit + self.amount = amount + self.destination = destination + self.parameters = parameters diff --git a/src/trezor/messages/TezosTransactionType.py b/src/trezor/messages/TezosTransactionType.py deleted file mode 100644 index 12e88a0fa..000000000 --- a/src/trezor/messages/TezosTransactionType.py +++ /dev/null @@ -1,23 +0,0 @@ -# Automatically generated by pb2py -# fmt: off -import protobuf as p - -from .TezosContractID import TezosContractID - - -class TezosTransactionType(p.MessageType): - FIELDS = { - 1: ('amount', p.UVarintType, 0), - 2: ('destination', TezosContractID, 0), - 3: ('parameters', p.BytesType, 0), - } - - def __init__( - self, - amount: int = None, - destination: TezosContractID = None, - parameters: bytes = None, - ) -> None: - self.amount = amount - self.destination = destination - self.parameters = parameters