From 0902aefd624b37a5278a862595aa66d18ed4a566 Mon Sep 17 00:00:00 2001 From: ZuluCrypto Date: Tue, 3 Apr 2018 19:49:56 -0600 Subject: [PATCH] update generated protobuf files with Stellar changes --- trezorlib/messages/ApplySettings.py | 1 - trezorlib/messages/DebugLinkDecision.py | 4 +--- trezorlib/messages/DebugLinkState.py | 1 - trezorlib/messages/Features.py | 1 - trezorlib/messages/MessageType.py | 19 +++++++++++++++++ trezorlib/messages/StellarAccountMergeOp.py | 10 +++++++++ trezorlib/messages/StellarAllowTrustOp.py | 13 ++++++++++++ trezorlib/messages/StellarAssetType.py | 10 +++++++++ trezorlib/messages/StellarBumpSequenceOp.py | 10 +++++++++ trezorlib/messages/StellarChangeTrustOp.py | 12 +++++++++++ trezorlib/messages/StellarCreateAccountOp.py | 11 ++++++++++ .../messages/StellarCreatePassiveOfferOp.py | 15 +++++++++++++ trezorlib/messages/StellarGetPublicKey.py | 9 ++++++++ trezorlib/messages/StellarManageDataOp.py | 11 ++++++++++ trezorlib/messages/StellarManageOfferOp.py | 16 ++++++++++++++ trezorlib/messages/StellarMessageSignature.py | 10 +++++++++ trezorlib/messages/StellarPathPaymentOp.py | 16 ++++++++++++++ trezorlib/messages/StellarPaymentOp.py | 13 ++++++++++++ trezorlib/messages/StellarPublicKey.py | 9 ++++++++ trezorlib/messages/StellarSetOptionsOp.py | 20 ++++++++++++++++++ trezorlib/messages/StellarSignMessage.py | 10 +++++++++ trezorlib/messages/StellarSignTx.py | 21 +++++++++++++++++++ trezorlib/messages/StellarSignedTx.py | 10 +++++++++ trezorlib/messages/StellarTxOpRequest.py | 6 ++++++ trezorlib/messages/StellarVerifyMessage.py | 11 ++++++++++ trezorlib/messages/__init__.py | 21 ++++++++++++++++++- 26 files changed, 283 insertions(+), 7 deletions(-) create mode 100644 trezorlib/messages/StellarAccountMergeOp.py create mode 100644 trezorlib/messages/StellarAllowTrustOp.py create mode 100644 trezorlib/messages/StellarAssetType.py create mode 100644 trezorlib/messages/StellarBumpSequenceOp.py create mode 100644 trezorlib/messages/StellarChangeTrustOp.py create mode 100644 trezorlib/messages/StellarCreateAccountOp.py create mode 100644 trezorlib/messages/StellarCreatePassiveOfferOp.py create mode 100644 trezorlib/messages/StellarGetPublicKey.py create mode 100644 trezorlib/messages/StellarManageDataOp.py create mode 100644 trezorlib/messages/StellarManageOfferOp.py create mode 100644 trezorlib/messages/StellarMessageSignature.py create mode 100644 trezorlib/messages/StellarPathPaymentOp.py create mode 100644 trezorlib/messages/StellarPaymentOp.py create mode 100644 trezorlib/messages/StellarPublicKey.py create mode 100644 trezorlib/messages/StellarSetOptionsOp.py create mode 100644 trezorlib/messages/StellarSignMessage.py create mode 100644 trezorlib/messages/StellarSignTx.py create mode 100644 trezorlib/messages/StellarSignedTx.py create mode 100644 trezorlib/messages/StellarTxOpRequest.py create mode 100644 trezorlib/messages/StellarVerifyMessage.py diff --git a/trezorlib/messages/ApplySettings.py b/trezorlib/messages/ApplySettings.py index 3d836642a..32f829541 100644 --- a/trezorlib/messages/ApplySettings.py +++ b/trezorlib/messages/ApplySettings.py @@ -8,6 +8,5 @@ class ApplySettings(p.MessageType): 2: ('label', p.UnicodeType, 0), 3: ('use_passphrase', p.BoolType, 0), 4: ('homescreen', p.BytesType, 0), - 5: ('passphrase_source', p.UVarintType, 0), } MESSAGE_WIRE_TYPE = 25 diff --git a/trezorlib/messages/DebugLinkDecision.py b/trezorlib/messages/DebugLinkDecision.py index e5016f304..482d886c6 100644 --- a/trezorlib/messages/DebugLinkDecision.py +++ b/trezorlib/messages/DebugLinkDecision.py @@ -4,8 +4,6 @@ from .. import protobuf as p class DebugLinkDecision(p.MessageType): FIELDS = { - 1: ('yes_no', p.BoolType, 0), - 2: ('up_down', p.BoolType, 0), - 3: ('input', p.UnicodeType, 0), + 1: ('yes_no', p.BoolType, 0), # required } MESSAGE_WIRE_TYPE = 100 diff --git a/trezorlib/messages/DebugLinkState.py b/trezorlib/messages/DebugLinkState.py index ef671619e..9438fe8c3 100644 --- a/trezorlib/messages/DebugLinkState.py +++ b/trezorlib/messages/DebugLinkState.py @@ -15,6 +15,5 @@ class DebugLinkState(p.MessageType): 8: ('reset_entropy', p.BytesType, 0), 9: ('recovery_fake_word', p.UnicodeType, 0), 10: ('recovery_word_pos', p.UVarintType, 0), - 11: ('reset_word_pos', p.UVarintType, 0), } MESSAGE_WIRE_TYPE = 102 diff --git a/trezorlib/messages/Features.py b/trezorlib/messages/Features.py index d1eaaa39a..878266dec 100644 --- a/trezorlib/messages/Features.py +++ b/trezorlib/messages/Features.py @@ -31,6 +31,5 @@ class Features(p.MessageType): 24: ('fw_patch', p.UVarintType, 0), 25: ('fw_vendor', p.UnicodeType, 0), 26: ('fw_vendor_keys', p.BytesType, 0), - 27: ('unfinished_backup', p.BoolType, 0), } MESSAGE_WIRE_TYPE = 17 diff --git a/trezorlib/messages/MessageType.py b/trezorlib/messages/MessageType.py index 8409048cd..c4a2c1ad3 100644 --- a/trezorlib/messages/MessageType.py +++ b/trezorlib/messages/MessageType.py @@ -84,3 +84,22 @@ DebugLinkMemoryRead = 110 DebugLinkMemory = 111 DebugLinkMemoryWrite = 112 DebugLinkFlashErase = 113 +StellarGetPublicKey = 200 +StellarPublicKey = 201 +StellarSignTx = 202 +StellarTxOpRequest = 203 +StellarSignMessage = 204 +StellarMessageSignature = 205 +StellarVerifyMessage = 206 +StellarCreateAccountOp = 210 +StellarPaymentOp = 211 +StellarPathPaymentOp = 212 +StellarManageOfferOp = 213 +StellarCreatePassiveOfferOp = 214 +StellarSetOptionsOp = 215 +StellarChangeTrustOp = 216 +StellarAllowTrustOp = 217 +StellarAccountMergeOp = 218 +StellarManageDataOp = 220 +StellarBumpSequenceOp = 221 +StellarSignedTx = 230 diff --git a/trezorlib/messages/StellarAccountMergeOp.py b/trezorlib/messages/StellarAccountMergeOp.py new file mode 100644 index 000000000..83732ae9b --- /dev/null +++ b/trezorlib/messages/StellarAccountMergeOp.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarAccountMergeOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('destination_account', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 218 diff --git a/trezorlib/messages/StellarAllowTrustOp.py b/trezorlib/messages/StellarAllowTrustOp.py new file mode 100644 index 000000000..2232c3ec1 --- /dev/null +++ b/trezorlib/messages/StellarAllowTrustOp.py @@ -0,0 +1,13 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarAllowTrustOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('trusted_account', p.BytesType, 0), + 3: ('asset_type', p.UVarintType, 0), + 4: ('asset_code', p.UnicodeType, 0), + 5: ('is_authorized', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 217 diff --git a/trezorlib/messages/StellarAssetType.py b/trezorlib/messages/StellarAssetType.py new file mode 100644 index 000000000..c997a7d67 --- /dev/null +++ b/trezorlib/messages/StellarAssetType.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarAssetType(p.MessageType): + FIELDS = { + 1: ('type', p.UVarintType, 0), + 2: ('code', p.UnicodeType, 0), + 3: ('issuer', p.BytesType, 0), + } diff --git a/trezorlib/messages/StellarBumpSequenceOp.py b/trezorlib/messages/StellarBumpSequenceOp.py new file mode 100644 index 000000000..ba82bd6c1 --- /dev/null +++ b/trezorlib/messages/StellarBumpSequenceOp.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarBumpSequenceOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('bump_to', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 221 diff --git a/trezorlib/messages/StellarChangeTrustOp.py b/trezorlib/messages/StellarChangeTrustOp.py new file mode 100644 index 000000000..86884830e --- /dev/null +++ b/trezorlib/messages/StellarChangeTrustOp.py @@ -0,0 +1,12 @@ +# Automatically generated by pb2py +from .. import protobuf as p +from .StellarAssetType import StellarAssetType + + +class StellarChangeTrustOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('asset', StellarAssetType, 0), + 3: ('limit', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 216 diff --git a/trezorlib/messages/StellarCreateAccountOp.py b/trezorlib/messages/StellarCreateAccountOp.py new file mode 100644 index 000000000..c650c9c5b --- /dev/null +++ b/trezorlib/messages/StellarCreateAccountOp.py @@ -0,0 +1,11 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarCreateAccountOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('new_account', p.BytesType, 0), + 3: ('starting_balance', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 210 diff --git a/trezorlib/messages/StellarCreatePassiveOfferOp.py b/trezorlib/messages/StellarCreatePassiveOfferOp.py new file mode 100644 index 000000000..c3ee4865c --- /dev/null +++ b/trezorlib/messages/StellarCreatePassiveOfferOp.py @@ -0,0 +1,15 @@ +# Automatically generated by pb2py +from .. import protobuf as p +from .StellarAssetType import StellarAssetType + + +class StellarCreatePassiveOfferOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('selling_asset', StellarAssetType, 0), + 3: ('buying_asset', StellarAssetType, 0), + 4: ('amount', p.UVarintType, 0), + 5: ('price_n', p.UVarintType, 0), + 6: ('price_d', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 214 diff --git a/trezorlib/messages/StellarGetPublicKey.py b/trezorlib/messages/StellarGetPublicKey.py new file mode 100644 index 000000000..2d2272aae --- /dev/null +++ b/trezorlib/messages/StellarGetPublicKey.py @@ -0,0 +1,9 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarGetPublicKey(p.MessageType): + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + } + MESSAGE_WIRE_TYPE = 200 diff --git a/trezorlib/messages/StellarManageDataOp.py b/trezorlib/messages/StellarManageDataOp.py new file mode 100644 index 000000000..140019354 --- /dev/null +++ b/trezorlib/messages/StellarManageDataOp.py @@ -0,0 +1,11 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarManageDataOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('key', p.UnicodeType, 0), + 3: ('value', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 220 diff --git a/trezorlib/messages/StellarManageOfferOp.py b/trezorlib/messages/StellarManageOfferOp.py new file mode 100644 index 000000000..858d92f63 --- /dev/null +++ b/trezorlib/messages/StellarManageOfferOp.py @@ -0,0 +1,16 @@ +# Automatically generated by pb2py +from .. import protobuf as p +from .StellarAssetType import StellarAssetType + + +class StellarManageOfferOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('selling_asset', StellarAssetType, 0), + 3: ('buying_asset', StellarAssetType, 0), + 4: ('amount', p.UVarintType, 0), + 5: ('price_n', p.UVarintType, 0), + 6: ('price_d', p.UVarintType, 0), + 7: ('offer_id', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 213 diff --git a/trezorlib/messages/StellarMessageSignature.py b/trezorlib/messages/StellarMessageSignature.py new file mode 100644 index 000000000..430ea9449 --- /dev/null +++ b/trezorlib/messages/StellarMessageSignature.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarMessageSignature(p.MessageType): + FIELDS = { + 1: ('public_key', p.BytesType, 0), + 2: ('signature', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 205 diff --git a/trezorlib/messages/StellarPathPaymentOp.py b/trezorlib/messages/StellarPathPaymentOp.py new file mode 100644 index 000000000..4381ecce1 --- /dev/null +++ b/trezorlib/messages/StellarPathPaymentOp.py @@ -0,0 +1,16 @@ +# Automatically generated by pb2py +from .. import protobuf as p +from .StellarAssetType import StellarAssetType + + +class StellarPathPaymentOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('send_asset', StellarAssetType, 0), + 3: ('send_max', p.UVarintType, 0), + 4: ('destination_account', p.BytesType, 0), + 5: ('destination_asset', StellarAssetType, 0), + 6: ('destination_amount', p.UVarintType, 0), + 7: ('paths', StellarAssetType, p.FLAG_REPEATED), + } + MESSAGE_WIRE_TYPE = 212 diff --git a/trezorlib/messages/StellarPaymentOp.py b/trezorlib/messages/StellarPaymentOp.py new file mode 100644 index 000000000..d4706dcd1 --- /dev/null +++ b/trezorlib/messages/StellarPaymentOp.py @@ -0,0 +1,13 @@ +# Automatically generated by pb2py +from .. import protobuf as p +from .StellarAssetType import StellarAssetType + + +class StellarPaymentOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('destination_account', p.BytesType, 0), + 3: ('asset', StellarAssetType, 0), + 4: ('amount', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 211 diff --git a/trezorlib/messages/StellarPublicKey.py b/trezorlib/messages/StellarPublicKey.py new file mode 100644 index 000000000..1229d25f4 --- /dev/null +++ b/trezorlib/messages/StellarPublicKey.py @@ -0,0 +1,9 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarPublicKey(p.MessageType): + FIELDS = { + 1: ('public_key', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 201 diff --git a/trezorlib/messages/StellarSetOptionsOp.py b/trezorlib/messages/StellarSetOptionsOp.py new file mode 100644 index 000000000..53d3c2ff8 --- /dev/null +++ b/trezorlib/messages/StellarSetOptionsOp.py @@ -0,0 +1,20 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarSetOptionsOp(p.MessageType): + FIELDS = { + 1: ('source_account', p.BytesType, 0), + 2: ('inflation_destination_account', p.BytesType, 0), + 3: ('clear_flags', p.UVarintType, 0), + 4: ('set_flags', p.UVarintType, 0), + 5: ('master_weight', p.UVarintType, 0), + 6: ('low_threshold', p.UVarintType, 0), + 7: ('medium_threshold', p.UVarintType, 0), + 8: ('high_threshold', p.UVarintType, 0), + 9: ('home_domain', p.UnicodeType, 0), + 10: ('signer_type', p.UVarintType, 0), + 11: ('signer_key', p.BytesType, 0), + 12: ('signer_weight', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 215 diff --git a/trezorlib/messages/StellarSignMessage.py b/trezorlib/messages/StellarSignMessage.py new file mode 100644 index 000000000..5d51be39d --- /dev/null +++ b/trezorlib/messages/StellarSignMessage.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarSignMessage(p.MessageType): + FIELDS = { + 1: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 2: ('message', p.UnicodeType, 0), + } + MESSAGE_WIRE_TYPE = 204 diff --git a/trezorlib/messages/StellarSignTx.py b/trezorlib/messages/StellarSignTx.py new file mode 100644 index 000000000..a78649d45 --- /dev/null +++ b/trezorlib/messages/StellarSignTx.py @@ -0,0 +1,21 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarSignTx(p.MessageType): + FIELDS = { + 1: ('protocol_version', p.UVarintType, 0), + 2: ('address_n', p.UVarintType, p.FLAG_REPEATED), + 3: ('network_passphrase', p.UnicodeType, 0), + 4: ('source_account', p.BytesType, 0), + 5: ('fee', p.UVarintType, 0), + 6: ('sequence_number', p.UVarintType, 0), + 8: ('timebounds_start', p.UVarintType, 0), + 9: ('timebounds_end', p.UVarintType, 0), + 10: ('memo_type', p.UVarintType, 0), + 11: ('memo_text', p.UnicodeType, 0), + 12: ('memo_id', p.UVarintType, 0), + 13: ('memo_hash', p.BytesType, 0), + 14: ('num_operations', p.UVarintType, 0), + } + MESSAGE_WIRE_TYPE = 202 diff --git a/trezorlib/messages/StellarSignedTx.py b/trezorlib/messages/StellarSignedTx.py new file mode 100644 index 000000000..9ae7a314c --- /dev/null +++ b/trezorlib/messages/StellarSignedTx.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarSignedTx(p.MessageType): + FIELDS = { + 1: ('public_key', p.BytesType, 0), + 2: ('signature', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 230 diff --git a/trezorlib/messages/StellarTxOpRequest.py b/trezorlib/messages/StellarTxOpRequest.py new file mode 100644 index 000000000..8b93fba82 --- /dev/null +++ b/trezorlib/messages/StellarTxOpRequest.py @@ -0,0 +1,6 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarTxOpRequest(p.MessageType): + MESSAGE_WIRE_TYPE = 203 diff --git a/trezorlib/messages/StellarVerifyMessage.py b/trezorlib/messages/StellarVerifyMessage.py new file mode 100644 index 000000000..967bdea48 --- /dev/null +++ b/trezorlib/messages/StellarVerifyMessage.py @@ -0,0 +1,11 @@ +# Automatically generated by pb2py +from .. import protobuf as p + + +class StellarVerifyMessage(p.MessageType): + FIELDS = { + 1: ('public_key', p.BytesType, 0), + 2: ('message', p.BytesType, 0), + 3: ('signature', p.BytesType, 0), + } + MESSAGE_WIRE_TYPE = 206 diff --git a/trezorlib/messages/__init__.py b/trezorlib/messages/__init__.py index 54b9b5174..07dc3fc85 100644 --- a/trezorlib/messages/__init__.py +++ b/trezorlib/messages/__init__.py @@ -15,6 +15,7 @@ from .NEMMosaicSupplyChange import NEMMosaicSupplyChange from .NEMProvisionNamespace import NEMProvisionNamespace from .NEMTransactionCommon import NEMTransactionCommon from .NEMTransfer import NEMTransfer +from .StellarAssetType import StellarAssetType from .TransactionType import TransactionType from .TxInputType import TxInputType from .TxOutputBinType import TxOutputBinType @@ -29,7 +30,6 @@ from . import ButtonRequestType from . import PinMatrixRequestType from . import RecoveryDeviceType from . import WordRequestType -from . import PassphraseSourceType from . import NEMMosaicLevy from . import NEMSupplyChangeType from . import NEMModificationType @@ -111,6 +111,25 @@ from .SignMessage import SignMessage from .SignTx import SignTx from .SignedIdentity import SignedIdentity from .SimpleSignTx import SimpleSignTx +from .StellarAccountMergeOp import StellarAccountMergeOp +from .StellarAllowTrustOp import StellarAllowTrustOp +from .StellarBumpSequenceOp import StellarBumpSequenceOp +from .StellarChangeTrustOp import StellarChangeTrustOp +from .StellarCreateAccountOp import StellarCreateAccountOp +from .StellarCreatePassiveOfferOp import StellarCreatePassiveOfferOp +from .StellarGetPublicKey import StellarGetPublicKey +from .StellarManageDataOp import StellarManageDataOp +from .StellarManageOfferOp import StellarManageOfferOp +from .StellarMessageSignature import StellarMessageSignature +from .StellarPathPaymentOp import StellarPathPaymentOp +from .StellarPaymentOp import StellarPaymentOp +from .StellarPublicKey import StellarPublicKey +from .StellarSetOptionsOp import StellarSetOptionsOp +from .StellarSignMessage import StellarSignMessage +from .StellarSignTx import StellarSignTx +from .StellarSignedTx import StellarSignedTx +from .StellarTxOpRequest import StellarTxOpRequest +from .StellarVerifyMessage import StellarVerifyMessage from .Success import Success from .TxAck import TxAck from .TxRequest import TxRequest