diff --git a/src/trezor/messages/Address.py b/src/trezor/messages/Address.py index 80ab23fe02..1f7f2bc928 100644 --- a/src/trezor/messages/Address.py +++ b/src/trezor/messages/Address.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('Address') -t.wire_type = 30 +t.wire_type = const(30) t.add_field(1, 'address', p.UnicodeType, flags=p.FLAG_REQUIRED) Address = t \ No newline at end of file diff --git a/src/trezor/messages/ApplySettings.py b/src/trezor/messages/ApplySettings.py index a8efcc9699..6b4736ebc4 100644 --- a/src/trezor/messages/ApplySettings.py +++ b/src/trezor/messages/ApplySettings.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('ApplySettings') -t.wire_type = 25 +t.wire_type = const(25) t.add_field(1, 'language', p.UnicodeType) t.add_field(2, 'label', p.UnicodeType) t.add_field(3, 'use_passphrase', p.BoolType) diff --git a/src/trezor/messages/ButtonAck.py b/src/trezor/messages/ButtonAck.py index 2c436a301f..7bb582345b 100644 --- a/src/trezor/messages/ButtonAck.py +++ b/src/trezor/messages/ButtonAck.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('ButtonAck') -t.wire_type = 27 +t.wire_type = const(27) ButtonAck = t \ No newline at end of file diff --git a/src/trezor/messages/ButtonRequest.py b/src/trezor/messages/ButtonRequest.py index 56f4c1891a..4564efdf73 100644 --- a/src/trezor/messages/ButtonRequest.py +++ b/src/trezor/messages/ButtonRequest.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('ButtonRequest') -t.wire_type = 26 +t.wire_type = const(26) t.add_field(1, 'code', p.UVarintType) t.add_field(2, 'data', p.UnicodeType) ButtonRequest = t \ No newline at end of file diff --git a/src/trezor/messages/Cancel.py b/src/trezor/messages/Cancel.py index eaf6909a5b..ce9d6fb3e7 100644 --- a/src/trezor/messages/Cancel.py +++ b/src/trezor/messages/Cancel.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('Cancel') -t.wire_type = 20 +t.wire_type = const(20) Cancel = t \ No newline at end of file diff --git a/src/trezor/messages/ChangePin.py b/src/trezor/messages/ChangePin.py index 851615a906..42b7084120 100644 --- a/src/trezor/messages/ChangePin.py +++ b/src/trezor/messages/ChangePin.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('ChangePin') -t.wire_type = 4 +t.wire_type = const(4) t.add_field(1, 'remove', p.BoolType) ChangePin = t \ No newline at end of file diff --git a/src/trezor/messages/CipherKeyValue.py b/src/trezor/messages/CipherKeyValue.py index 2473a3c5a6..fb1f595380 100644 --- a/src/trezor/messages/CipherKeyValue.py +++ b/src/trezor/messages/CipherKeyValue.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('CipherKeyValue') -t.wire_type = 23 +t.wire_type = const(23) t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) t.add_field(2, 'key', p.UnicodeType) t.add_field(3, 'value', p.BytesType) diff --git a/src/trezor/messages/CipheredKeyValue.py b/src/trezor/messages/CipheredKeyValue.py index 0a34ed8d6c..c1d325166d 100644 --- a/src/trezor/messages/CipheredKeyValue.py +++ b/src/trezor/messages/CipheredKeyValue.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('CipheredKeyValue') -t.wire_type = 48 +t.wire_type = const(48) t.add_field(1, 'value', p.BytesType) CipheredKeyValue = t \ No newline at end of file diff --git a/src/trezor/messages/ClearSession.py b/src/trezor/messages/ClearSession.py index a220ebfde2..5352e9f400 100644 --- a/src/trezor/messages/ClearSession.py +++ b/src/trezor/messages/ClearSession.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('ClearSession') -t.wire_type = 24 +t.wire_type = const(24) ClearSession = t \ No newline at end of file diff --git a/src/trezor/messages/CoinType.py b/src/trezor/messages/CoinType.py index 2095b59690..b716e972b3 100644 --- a/src/trezor/messages/CoinType.py +++ b/src/trezor/messages/CoinType.py @@ -9,4 +9,5 @@ t.add_field(4, 'maxfee_kb', p.UVarintType) t.add_field(5, 'address_type_p2sh', p.UVarintType, default=5) t.add_field(6, 'address_type_p2wpkh', p.UVarintType, default=6) t.add_field(7, 'address_type_p2wsh', p.UVarintType, default=10) +t.add_field(8, 'signed_message_header', p.UnicodeType) CoinType = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkDecision.py b/src/trezor/messages/DebugLinkDecision.py index a202f7733f..5a7f86eec9 100644 --- a/src/trezor/messages/DebugLinkDecision.py +++ b/src/trezor/messages/DebugLinkDecision.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('DebugLinkDecision') -t.wire_type = 100 +t.wire_type = const(100) t.add_field(1, 'yes_no', p.BoolType, flags=p.FLAG_REQUIRED) DebugLinkDecision = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkFlashErase.py b/src/trezor/messages/DebugLinkFlashErase.py new file mode 100644 index 0000000000..6944cf4101 --- /dev/null +++ b/src/trezor/messages/DebugLinkFlashErase.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('DebugLinkFlashErase') +t.wire_type = const(113) +t.add_field(1, 'sector', p.UVarintType) +DebugLinkFlashErase = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkGetState.py b/src/trezor/messages/DebugLinkGetState.py index 8ae02f59df..03aecce36b 100644 --- a/src/trezor/messages/DebugLinkGetState.py +++ b/src/trezor/messages/DebugLinkGetState.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('DebugLinkGetState') -t.wire_type = 101 +t.wire_type = const(101) DebugLinkGetState = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkLog.py b/src/trezor/messages/DebugLinkLog.py index d546982818..46b7b92888 100644 --- a/src/trezor/messages/DebugLinkLog.py +++ b/src/trezor/messages/DebugLinkLog.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('DebugLinkLog') -t.wire_type = 104 +t.wire_type = const(104) t.add_field(1, 'level', p.UVarintType) t.add_field(2, 'bucket', p.UnicodeType) t.add_field(3, 'text', p.UnicodeType) diff --git a/src/trezor/messages/DebugLinkMemory.py b/src/trezor/messages/DebugLinkMemory.py new file mode 100644 index 0000000000..9f56c1d0fb --- /dev/null +++ b/src/trezor/messages/DebugLinkMemory.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('DebugLinkMemory') +t.wire_type = const(111) +t.add_field(1, 'memory', p.BytesType) +DebugLinkMemory = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkMemoryRead.py b/src/trezor/messages/DebugLinkMemoryRead.py new file mode 100644 index 0000000000..c5c29573ab --- /dev/null +++ b/src/trezor/messages/DebugLinkMemoryRead.py @@ -0,0 +1,8 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('DebugLinkMemoryRead') +t.wire_type = const(110) +t.add_field(1, 'address', p.UVarintType) +t.add_field(2, 'length', p.UVarintType) +DebugLinkMemoryRead = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkMemoryWrite.py b/src/trezor/messages/DebugLinkMemoryWrite.py new file mode 100644 index 0000000000..24e3354e7e --- /dev/null +++ b/src/trezor/messages/DebugLinkMemoryWrite.py @@ -0,0 +1,9 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('DebugLinkMemoryWrite') +t.wire_type = const(112) +t.add_field(1, 'address', p.UVarintType) +t.add_field(2, 'memory', p.BytesType) +t.add_field(3, 'flash', p.BoolType) +DebugLinkMemoryWrite = t \ No newline at end of file diff --git a/src/trezor/messages/DebugLinkState.py b/src/trezor/messages/DebugLinkState.py index 28a1db5ae2..136cdae8a1 100644 --- a/src/trezor/messages/DebugLinkState.py +++ b/src/trezor/messages/DebugLinkState.py @@ -3,7 +3,7 @@ import protobuf as p from micropython import const from .HDNodeType import HDNodeType t = p.MessageType('DebugLinkState') -t.wire_type = 102 +t.wire_type = const(102) t.add_field(1, 'layout', p.BytesType) t.add_field(2, 'pin', p.UnicodeType) t.add_field(3, 'matrix', p.UnicodeType) diff --git a/src/trezor/messages/DebugLinkStop.py b/src/trezor/messages/DebugLinkStop.py index 1c91f4eda6..0eff22098d 100644 --- a/src/trezor/messages/DebugLinkStop.py +++ b/src/trezor/messages/DebugLinkStop.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('DebugLinkStop') -t.wire_type = 103 +t.wire_type = const(103) DebugLinkStop = t \ No newline at end of file diff --git a/src/trezor/messages/DecryptMessage.py b/src/trezor/messages/DecryptMessage.py index 5b19fdf572..8be4490e33 100644 --- a/src/trezor/messages/DecryptMessage.py +++ b/src/trezor/messages/DecryptMessage.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('DecryptMessage') -t.wire_type = 51 +t.wire_type = const(51) t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) t.add_field(2, 'nonce', p.BytesType) t.add_field(3, 'message', p.BytesType) diff --git a/src/trezor/messages/DecryptedMessage.py b/src/trezor/messages/DecryptedMessage.py index 9bb0c9f565..53f1519446 100644 --- a/src/trezor/messages/DecryptedMessage.py +++ b/src/trezor/messages/DecryptedMessage.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('DecryptedMessage') -t.wire_type = 52 +t.wire_type = const(52) t.add_field(1, 'message', p.BytesType) t.add_field(2, 'address', p.UnicodeType) DecryptedMessage = t \ No newline at end of file diff --git a/src/trezor/messages/ECDHSessionKey.py b/src/trezor/messages/ECDHSessionKey.py new file mode 100644 index 0000000000..70025a9b83 --- /dev/null +++ b/src/trezor/messages/ECDHSessionKey.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('ECDHSessionKey') +t.wire_type = const(62) +t.add_field(1, 'session_key', p.BytesType) +ECDHSessionKey = t \ No newline at end of file diff --git a/src/trezor/messages/EncryptMessage.py b/src/trezor/messages/EncryptMessage.py index c56f277f93..dfaec5363d 100644 --- a/src/trezor/messages/EncryptMessage.py +++ b/src/trezor/messages/EncryptMessage.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('EncryptMessage') -t.wire_type = 49 +t.wire_type = const(49) t.add_field(1, 'pubkey', p.BytesType) t.add_field(2, 'message', p.BytesType) t.add_field(3, 'display_only', p.BoolType) diff --git a/src/trezor/messages/EncryptedMessage.py b/src/trezor/messages/EncryptedMessage.py index 9e8c879339..93ae9bc496 100644 --- a/src/trezor/messages/EncryptedMessage.py +++ b/src/trezor/messages/EncryptedMessage.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('EncryptedMessage') -t.wire_type = 50 +t.wire_type = const(50) t.add_field(1, 'nonce', p.BytesType) t.add_field(2, 'message', p.BytesType) t.add_field(3, 'hmac', p.BytesType) diff --git a/src/trezor/messages/Entropy.py b/src/trezor/messages/Entropy.py index 71941bac26..1a31582725 100644 --- a/src/trezor/messages/Entropy.py +++ b/src/trezor/messages/Entropy.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('Entropy') -t.wire_type = 10 +t.wire_type = const(10) t.add_field(1, 'entropy', p.BytesType, flags=p.FLAG_REQUIRED) Entropy = t \ No newline at end of file diff --git a/src/trezor/messages/EntropyAck.py b/src/trezor/messages/EntropyAck.py index 0a41e0c7f0..cc0944f7ca 100644 --- a/src/trezor/messages/EntropyAck.py +++ b/src/trezor/messages/EntropyAck.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('EntropyAck') -t.wire_type = 36 +t.wire_type = const(36) t.add_field(1, 'entropy', p.BytesType) EntropyAck = t \ No newline at end of file diff --git a/src/trezor/messages/EntropyRequest.py b/src/trezor/messages/EntropyRequest.py index baa589684b..36b28201f4 100644 --- a/src/trezor/messages/EntropyRequest.py +++ b/src/trezor/messages/EntropyRequest.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('EntropyRequest') -t.wire_type = 35 +t.wire_type = const(35) EntropyRequest = t \ No newline at end of file diff --git a/src/trezor/messages/EstimateTxSize.py b/src/trezor/messages/EstimateTxSize.py index e17e3cb671..ec60fba666 100644 --- a/src/trezor/messages/EstimateTxSize.py +++ b/src/trezor/messages/EstimateTxSize.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('EstimateTxSize') -t.wire_type = 43 +t.wire_type = const(43) t.add_field(1, 'outputs_count', p.UVarintType, flags=p.FLAG_REQUIRED) t.add_field(2, 'inputs_count', p.UVarintType, flags=p.FLAG_REQUIRED) t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin') diff --git a/src/trezor/messages/EthereumAddress.py b/src/trezor/messages/EthereumAddress.py new file mode 100644 index 0000000000..6860fe172e --- /dev/null +++ b/src/trezor/messages/EthereumAddress.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('EthereumAddress') +t.wire_type = const(57) +t.add_field(1, 'address', p.BytesType, flags=p.FLAG_REQUIRED) +EthereumAddress = t \ No newline at end of file diff --git a/src/trezor/messages/EthereumGetAddress.py b/src/trezor/messages/EthereumGetAddress.py new file mode 100644 index 0000000000..c26939f50b --- /dev/null +++ b/src/trezor/messages/EthereumGetAddress.py @@ -0,0 +1,8 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('EthereumGetAddress') +t.wire_type = const(56) +t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) +t.add_field(2, 'show_display', p.BoolType) +EthereumGetAddress = t \ No newline at end of file diff --git a/src/trezor/messages/EthereumSignTx.py b/src/trezor/messages/EthereumSignTx.py new file mode 100644 index 0000000000..c806663f73 --- /dev/null +++ b/src/trezor/messages/EthereumSignTx.py @@ -0,0 +1,14 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('EthereumSignTx') +t.wire_type = const(58) +t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) +t.add_field(2, 'nonce', p.BytesType) +t.add_field(3, 'gas_price', p.BytesType) +t.add_field(4, 'gas_limit', p.BytesType) +t.add_field(5, 'to', p.BytesType) +t.add_field(6, 'value', p.BytesType) +t.add_field(7, 'data_initial_chunk', p.BytesType) +t.add_field(8, 'data_length', p.UVarintType) +EthereumSignTx = t \ No newline at end of file diff --git a/src/trezor/messages/EthereumTxAck.py b/src/trezor/messages/EthereumTxAck.py new file mode 100644 index 0000000000..55f8f25676 --- /dev/null +++ b/src/trezor/messages/EthereumTxAck.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('EthereumTxAck') +t.wire_type = const(60) +t.add_field(1, 'data_chunk', p.BytesType) +EthereumTxAck = t \ No newline at end of file diff --git a/src/trezor/messages/EthereumTxRequest.py b/src/trezor/messages/EthereumTxRequest.py new file mode 100644 index 0000000000..244db3a5b0 --- /dev/null +++ b/src/trezor/messages/EthereumTxRequest.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('EthereumTxRequest') +t.wire_type = const(59) +t.add_field(1, 'data_length', p.UVarintType) +t.add_field(2, 'signature_v', p.UVarintType) +t.add_field(3, 'signature_r', p.BytesType) +t.add_field(4, 'signature_s', p.BytesType) +EthereumTxRequest = t \ No newline at end of file diff --git a/src/trezor/messages/Failure.py b/src/trezor/messages/Failure.py index ed2e890522..d396f5defe 100644 --- a/src/trezor/messages/Failure.py +++ b/src/trezor/messages/Failure.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('Failure') -t.wire_type = 3 +t.wire_type = const(3) t.add_field(1, 'code', p.UVarintType) t.add_field(2, 'message', p.UnicodeType) Failure = t \ No newline at end of file diff --git a/src/trezor/messages/Features.py b/src/trezor/messages/Features.py index fc59d2bf3f..a34279152f 100644 --- a/src/trezor/messages/Features.py +++ b/src/trezor/messages/Features.py @@ -3,7 +3,7 @@ import protobuf as p from micropython import const from .CoinType import CoinType t = p.MessageType('Features') -t.wire_type = 17 +t.wire_type = const(17) t.add_field(1, 'vendor', p.UnicodeType) t.add_field(2, 'major_version', p.UVarintType) t.add_field(3, 'minor_version', p.UVarintType) @@ -21,4 +21,5 @@ t.add_field(14, 'bootloader_hash', p.BytesType) t.add_field(15, 'imported', p.BoolType) t.add_field(16, 'pin_cached', p.BoolType) t.add_field(17, 'passphrase_cached', p.BoolType) +t.add_field(18, 'firmware_present', p.BoolType) Features = t \ No newline at end of file diff --git a/src/trezor/messages/FirmwareErase.py b/src/trezor/messages/FirmwareErase.py index 448d5e9c49..dee9b20030 100644 --- a/src/trezor/messages/FirmwareErase.py +++ b/src/trezor/messages/FirmwareErase.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('FirmwareErase') -t.wire_type = 6 +t.wire_type = const(6) FirmwareErase = t \ No newline at end of file diff --git a/src/trezor/messages/FirmwareUpload.py b/src/trezor/messages/FirmwareUpload.py index 675e21b038..b9dcc3bd3a 100644 --- a/src/trezor/messages/FirmwareUpload.py +++ b/src/trezor/messages/FirmwareUpload.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('FirmwareUpload') -t.wire_type = 7 +t.wire_type = const(7) t.add_field(1, 'payload', p.BytesType, flags=p.FLAG_REQUIRED) FirmwareUpload = t \ No newline at end of file diff --git a/src/trezor/messages/GetAddress.py b/src/trezor/messages/GetAddress.py index ed1d306095..06b5726412 100644 --- a/src/trezor/messages/GetAddress.py +++ b/src/trezor/messages/GetAddress.py @@ -3,9 +3,10 @@ import protobuf as p from micropython import const from .MultisigRedeemScriptType import MultisigRedeemScriptType t = p.MessageType('GetAddress') -t.wire_type = 29 +t.wire_type = const(29) t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) t.add_field(2, 'coin_name', p.UnicodeType, default=u'Bitcoin') t.add_field(3, 'show_display', p.BoolType) t.add_field(4, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType)) +t.add_field(5, 'script_type', p.UVarintType, default=0) GetAddress = t \ No newline at end of file diff --git a/src/trezor/messages/GetECDHSessionKey.py b/src/trezor/messages/GetECDHSessionKey.py new file mode 100644 index 0000000000..7831006915 --- /dev/null +++ b/src/trezor/messages/GetECDHSessionKey.py @@ -0,0 +1,10 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +from .IdentityType import IdentityType +t = p.MessageType('GetECDHSessionKey') +t.wire_type = const(61) +t.add_field(1, 'identity', p.EmbeddedMessage(IdentityType)) +t.add_field(2, 'peer_public_key', p.BytesType) +t.add_field(3, 'ecdsa_curve_name', p.UnicodeType) +GetECDHSessionKey = t \ No newline at end of file diff --git a/src/trezor/messages/GetEntropy.py b/src/trezor/messages/GetEntropy.py index fedcd2059f..0c1bc47e5f 100644 --- a/src/trezor/messages/GetEntropy.py +++ b/src/trezor/messages/GetEntropy.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('GetEntropy') -t.wire_type = 9 +t.wire_type = const(9) t.add_field(1, 'size', p.UVarintType, flags=p.FLAG_REQUIRED) GetEntropy = t \ No newline at end of file diff --git a/src/trezor/messages/GetFeatures.py b/src/trezor/messages/GetFeatures.py index 4ca34cc49a..4eafddaaa8 100644 --- a/src/trezor/messages/GetFeatures.py +++ b/src/trezor/messages/GetFeatures.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('GetFeatures') -t.wire_type = 55 +t.wire_type = const(55) GetFeatures = t \ No newline at end of file diff --git a/src/trezor/messages/GetPublicKey.py b/src/trezor/messages/GetPublicKey.py index ac4805df0b..2566fca07f 100644 --- a/src/trezor/messages/GetPublicKey.py +++ b/src/trezor/messages/GetPublicKey.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('GetPublicKey') -t.wire_type = 11 +t.wire_type = const(11) t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) t.add_field(2, 'ecdsa_curve_name', p.UnicodeType) t.add_field(3, 'show_display', p.BoolType) diff --git a/src/trezor/messages/Initialize.py b/src/trezor/messages/Initialize.py index ddccc3cebf..25414c1ba4 100644 --- a/src/trezor/messages/Initialize.py +++ b/src/trezor/messages/Initialize.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('Initialize') -t.wire_type = 0 +t.wire_type = const(0) Initialize = t \ No newline at end of file diff --git a/src/trezor/messages/InputScriptType.py b/src/trezor/messages/InputScriptType.py index c1b9ce7eb8..e467964e00 100644 --- a/src/trezor/messages/InputScriptType.py +++ b/src/trezor/messages/InputScriptType.py @@ -1,3 +1,6 @@ # Automatically generated by pb2py SPENDADDRESS = const(0) -SPENDMULTISIG = const(1) \ No newline at end of file +SPENDMULTISIG = const(1) +EXTERNAL = const(2) +SPENDWITNESS = const(3) +SPENDP2SHWITNESS = const(4) \ No newline at end of file diff --git a/src/trezor/messages/LoadDevice.py b/src/trezor/messages/LoadDevice.py index 68dddbf180..7a800a5b61 100644 --- a/src/trezor/messages/LoadDevice.py +++ b/src/trezor/messages/LoadDevice.py @@ -3,7 +3,7 @@ import protobuf as p from micropython import const from .HDNodeType import HDNodeType t = p.MessageType('LoadDevice') -t.wire_type = 13 +t.wire_type = const(13) t.add_field(1, 'mnemonic', p.UnicodeType) t.add_field(2, 'node', p.EmbeddedMessage(HDNodeType)) t.add_field(3, 'pin', p.UnicodeType) diff --git a/src/trezor/messages/MessageSignature.py b/src/trezor/messages/MessageSignature.py index 6d22bb892a..e844b22a12 100644 --- a/src/trezor/messages/MessageSignature.py +++ b/src/trezor/messages/MessageSignature.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('MessageSignature') -t.wire_type = 40 +t.wire_type = const(40) t.add_field(1, 'address', p.UnicodeType) t.add_field(2, 'signature', p.BytesType) MessageSignature = t \ No newline at end of file diff --git a/src/trezor/messages/MessageType.py b/src/trezor/messages/MessageType.py index fa6c854489..7fe7e11bef 100644 --- a/src/trezor/messages/MessageType.py +++ b/src/trezor/messages/MessageType.py @@ -48,8 +48,20 @@ DecryptedMessage = const(52) SignIdentity = const(53) SignedIdentity = const(54) GetFeatures = const(55) +EthereumGetAddress = const(56) +EthereumAddress = const(57) +EthereumSignTx = const(58) +EthereumTxRequest = const(59) +EthereumTxAck = const(60) +GetECDHSessionKey = const(61) +ECDHSessionKey = const(62) +SetU2FCounter = const(63) DebugLinkDecision = const(100) DebugLinkGetState = const(101) DebugLinkState = const(102) DebugLinkStop = const(103) -DebugLinkLog = const(104) \ No newline at end of file +DebugLinkLog = const(104) +DebugLinkMemoryRead = const(110) +DebugLinkMemory = const(111) +DebugLinkMemoryWrite = const(112) +DebugLinkFlashErase = const(113) \ No newline at end of file diff --git a/src/trezor/messages/OutputScriptType.py b/src/trezor/messages/OutputScriptType.py index cf1259563a..8d79526eff 100644 --- a/src/trezor/messages/OutputScriptType.py +++ b/src/trezor/messages/OutputScriptType.py @@ -2,4 +2,6 @@ PAYTOADDRESS = const(0) PAYTOSCRIPTHASH = const(1) PAYTOMULTISIG = const(2) -PAYTOOPRETURN = const(3) \ No newline at end of file +PAYTOOPRETURN = const(3) +PAYTOWITNESS = const(4) +PAYTOP2SHWITNESS = const(5) \ No newline at end of file diff --git a/src/trezor/messages/PassphraseAck.py b/src/trezor/messages/PassphraseAck.py index 53bf960748..c72d354537 100644 --- a/src/trezor/messages/PassphraseAck.py +++ b/src/trezor/messages/PassphraseAck.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('PassphraseAck') -t.wire_type = 42 +t.wire_type = const(42) t.add_field(1, 'passphrase', p.UnicodeType, flags=p.FLAG_REQUIRED) PassphraseAck = t \ No newline at end of file diff --git a/src/trezor/messages/PassphraseRequest.py b/src/trezor/messages/PassphraseRequest.py index 997bb0a0bd..37740fc254 100644 --- a/src/trezor/messages/PassphraseRequest.py +++ b/src/trezor/messages/PassphraseRequest.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('PassphraseRequest') -t.wire_type = 41 +t.wire_type = const(41) PassphraseRequest = t \ No newline at end of file diff --git a/src/trezor/messages/PinMatrixAck.py b/src/trezor/messages/PinMatrixAck.py index 2bdcc1186b..9b5193fc72 100644 --- a/src/trezor/messages/PinMatrixAck.py +++ b/src/trezor/messages/PinMatrixAck.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('PinMatrixAck') -t.wire_type = 19 +t.wire_type = const(19) t.add_field(1, 'pin', p.UnicodeType, flags=p.FLAG_REQUIRED) PinMatrixAck = t \ No newline at end of file diff --git a/src/trezor/messages/PinMatrixRequest.py b/src/trezor/messages/PinMatrixRequest.py index 25dc497ef0..5eb590fb25 100644 --- a/src/trezor/messages/PinMatrixRequest.py +++ b/src/trezor/messages/PinMatrixRequest.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('PinMatrixRequest') -t.wire_type = 18 +t.wire_type = const(18) t.add_field(1, 'type', p.UVarintType) PinMatrixRequest = t \ No newline at end of file diff --git a/src/trezor/messages/Ping.py b/src/trezor/messages/Ping.py index 741fe05b6e..e458088f8a 100644 --- a/src/trezor/messages/Ping.py +++ b/src/trezor/messages/Ping.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('Ping') -t.wire_type = 1 +t.wire_type = const(1) t.add_field(1, 'message', p.UnicodeType) t.add_field(2, 'button_protection', p.BoolType) t.add_field(3, 'pin_protection', p.BoolType) diff --git a/src/trezor/messages/PublicKey.py b/src/trezor/messages/PublicKey.py index f56ae53068..f134262df6 100644 --- a/src/trezor/messages/PublicKey.py +++ b/src/trezor/messages/PublicKey.py @@ -3,7 +3,7 @@ import protobuf as p from micropython import const from .HDNodeType import HDNodeType t = p.MessageType('PublicKey') -t.wire_type = 12 +t.wire_type = const(12) t.add_field(1, 'node', p.EmbeddedMessage(HDNodeType), flags=p.FLAG_REQUIRED) t.add_field(2, 'xpub', p.UnicodeType) PublicKey = t \ No newline at end of file diff --git a/src/trezor/messages/RecoveryDevice.py b/src/trezor/messages/RecoveryDevice.py index dcf0702fbf..da7dbc4c77 100644 --- a/src/trezor/messages/RecoveryDevice.py +++ b/src/trezor/messages/RecoveryDevice.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('RecoveryDevice') -t.wire_type = 45 +t.wire_type = const(45) t.add_field(1, 'word_count', p.UVarintType) t.add_field(2, 'passphrase_protection', p.BoolType) t.add_field(3, 'pin_protection', p.BoolType) diff --git a/src/trezor/messages/ResetDevice.py b/src/trezor/messages/ResetDevice.py index 0773076879..25786b0712 100644 --- a/src/trezor/messages/ResetDevice.py +++ b/src/trezor/messages/ResetDevice.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('ResetDevice') -t.wire_type = 14 +t.wire_type = const(14) t.add_field(1, 'display_random', p.BoolType) t.add_field(2, 'strength', p.UVarintType, default=256) t.add_field(3, 'passphrase_protection', p.BoolType) diff --git a/src/trezor/messages/SetU2FCounter.py b/src/trezor/messages/SetU2FCounter.py new file mode 100644 index 0000000000..ef2250035f --- /dev/null +++ b/src/trezor/messages/SetU2FCounter.py @@ -0,0 +1,7 @@ +# Automatically generated by pb2py +import protobuf as p +from micropython import const +t = p.MessageType('SetU2FCounter') +t.wire_type = const(63) +t.add_field(1, 'u2f_counter', p.UVarintType) +SetU2FCounter = t \ No newline at end of file diff --git a/src/trezor/messages/SignIdentity.py b/src/trezor/messages/SignIdentity.py index 7a72d626be..c8b02727a6 100644 --- a/src/trezor/messages/SignIdentity.py +++ b/src/trezor/messages/SignIdentity.py @@ -3,7 +3,7 @@ import protobuf as p from micropython import const from .IdentityType import IdentityType t = p.MessageType('SignIdentity') -t.wire_type = 53 +t.wire_type = const(53) t.add_field(1, 'identity', p.EmbeddedMessage(IdentityType)) t.add_field(2, 'challenge_hidden', p.BytesType) t.add_field(3, 'challenge_visual', p.UnicodeType) diff --git a/src/trezor/messages/SignMessage.py b/src/trezor/messages/SignMessage.py index 4dc215e627..0f7bde100d 100644 --- a/src/trezor/messages/SignMessage.py +++ b/src/trezor/messages/SignMessage.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('SignMessage') -t.wire_type = 38 +t.wire_type = const(38) t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED) t.add_field(2, 'message', p.BytesType, flags=p.FLAG_REQUIRED) t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin') diff --git a/src/trezor/messages/SignTx.py b/src/trezor/messages/SignTx.py index a596e1413d..69b8b078f6 100644 --- a/src/trezor/messages/SignTx.py +++ b/src/trezor/messages/SignTx.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('SignTx') -t.wire_type = 15 +t.wire_type = const(15) t.add_field(1, 'outputs_count', p.UVarintType, flags=p.FLAG_REQUIRED) t.add_field(2, 'inputs_count', p.UVarintType, flags=p.FLAG_REQUIRED) t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin') diff --git a/src/trezor/messages/SignedIdentity.py b/src/trezor/messages/SignedIdentity.py index 0bcf44757f..fef2f41b49 100644 --- a/src/trezor/messages/SignedIdentity.py +++ b/src/trezor/messages/SignedIdentity.py @@ -2,7 +2,7 @@ import protobuf as p from micropython import const t = p.MessageType('SignedIdentity') -t.wire_type = 54 +t.wire_type = const(54) t.add_field(1, 'address', p.UnicodeType) t.add_field(2, 'public_key', p.BytesType) t.add_field(3, 'signature', p.BytesType) diff --git a/src/trezor/messages/SimpleSignTx.py b/src/trezor/messages/SimpleSignTx.py index 39514036aa..d8efcedd29 100644 --- a/src/trezor/messages/SimpleSignTx.py +++ b/src/trezor/messages/SimpleSignTx.py @@ -5,7 +5,7 @@ from .TxInputType import TxInputType from .TxOutputType import TxOutputType from .TransactionType import TransactionType t = p.MessageType('SimpleSignTx') -t.wire_type = 16 +t.wire_type = const(16) t.add_field(1, 'inputs', p.EmbeddedMessage(TxInputType), flags=p.FLAG_REPEATED) t.add_field(2, 'outputs', p.EmbeddedMessage(TxOutputType), flags=p.FLAG_REPEATED) t.add_field(3, 'transactions', p.EmbeddedMessage(TransactionType), flags=p.FLAG_REPEATED) diff --git a/src/trezor/messages/Success.py b/src/trezor/messages/Success.py index b0df46becd..bb1e3b51b9 100644 --- a/src/trezor/messages/Success.py +++ b/src/trezor/messages/Success.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('Success') -t.wire_type = 2 +t.wire_type = const(2) t.add_field(1, 'message', p.UnicodeType) Success = t \ No newline at end of file diff --git a/src/trezor/messages/TxAck.py b/src/trezor/messages/TxAck.py index a199e66761..97b8d07489 100644 --- a/src/trezor/messages/TxAck.py +++ b/src/trezor/messages/TxAck.py @@ -3,6 +3,6 @@ import protobuf as p from micropython import const from .TransactionType import TransactionType t = p.MessageType('TxAck') -t.wire_type = 22 +t.wire_type = const(22) t.add_field(1, 'tx', p.EmbeddedMessage(TransactionType)) TxAck = t \ No newline at end of file diff --git a/src/trezor/messages/TxInputType.py b/src/trezor/messages/TxInputType.py index 87aee37b7c..584979e912 100644 --- a/src/trezor/messages/TxInputType.py +++ b/src/trezor/messages/TxInputType.py @@ -10,4 +10,5 @@ t.add_field(4, 'script_sig', p.BytesType) t.add_field(5, 'sequence', p.UVarintType, default=4294967295) t.add_field(6, 'script_type', p.UVarintType, default=0) t.add_field(7, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType)) +t.add_field(8, 'amount', p.UVarintType) TxInputType = t \ No newline at end of file diff --git a/src/trezor/messages/TxRequest.py b/src/trezor/messages/TxRequest.py index 6e795d2fbc..56d5037fd1 100644 --- a/src/trezor/messages/TxRequest.py +++ b/src/trezor/messages/TxRequest.py @@ -4,7 +4,7 @@ from micropython import const from .TxRequestDetailsType import TxRequestDetailsType from .TxRequestSerializedType import TxRequestSerializedType t = p.MessageType('TxRequest') -t.wire_type = 21 +t.wire_type = const(21) t.add_field(1, 'request_type', p.UVarintType) t.add_field(2, 'details', p.EmbeddedMessage(TxRequestDetailsType)) t.add_field(3, 'serialized', p.EmbeddedMessage(TxRequestSerializedType)) diff --git a/src/trezor/messages/TxSize.py b/src/trezor/messages/TxSize.py index e5196e99cf..c05452f15c 100644 --- a/src/trezor/messages/TxSize.py +++ b/src/trezor/messages/TxSize.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('TxSize') -t.wire_type = 44 +t.wire_type = const(44) t.add_field(1, 'tx_size', p.UVarintType) TxSize = t \ No newline at end of file diff --git a/src/trezor/messages/VerifyMessage.py b/src/trezor/messages/VerifyMessage.py index b35ebf8234..0c891529d1 100644 --- a/src/trezor/messages/VerifyMessage.py +++ b/src/trezor/messages/VerifyMessage.py @@ -2,8 +2,9 @@ import protobuf as p from micropython import const t = p.MessageType('VerifyMessage') -t.wire_type = 39 +t.wire_type = const(39) t.add_field(1, 'address', p.UnicodeType) t.add_field(2, 'signature', p.BytesType) t.add_field(3, 'message', p.BytesType) +t.add_field(4, 'coin_name', p.UnicodeType, default=u'Bitcoin') VerifyMessage = t \ No newline at end of file diff --git a/src/trezor/messages/WipeDevice.py b/src/trezor/messages/WipeDevice.py index 65220826c6..4886e7fd9b 100644 --- a/src/trezor/messages/WipeDevice.py +++ b/src/trezor/messages/WipeDevice.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('WipeDevice') -t.wire_type = 5 +t.wire_type = const(5) WipeDevice = t \ No newline at end of file diff --git a/src/trezor/messages/WordAck.py b/src/trezor/messages/WordAck.py index 58791a0206..062464850f 100644 --- a/src/trezor/messages/WordAck.py +++ b/src/trezor/messages/WordAck.py @@ -2,6 +2,6 @@ import protobuf as p from micropython import const t = p.MessageType('WordAck') -t.wire_type = 47 +t.wire_type = const(47) t.add_field(1, 'word', p.UnicodeType, flags=p.FLAG_REQUIRED) WordAck = t \ No newline at end of file diff --git a/src/trezor/messages/WordRequest.py b/src/trezor/messages/WordRequest.py index 2c3499cb4d..e957e46c36 100644 --- a/src/trezor/messages/WordRequest.py +++ b/src/trezor/messages/WordRequest.py @@ -2,5 +2,5 @@ import protobuf as p from micropython import const t = p.MessageType('WordRequest') -t.wire_type = 46 +t.wire_type = const(46) WordRequest = t \ No newline at end of file diff --git a/src/trezor/messages/wire_types.py b/src/trezor/messages/wire_types.py index 6b4f802cf9..f2952d641e 100644 --- a/src/trezor/messages/wire_types.py +++ b/src/trezor/messages/wire_types.py @@ -1,54 +1,66 @@ -WordRequest = 46 -ButtonAck = 27 -MessageSignature = 40 -Ping = 1 -EncryptedMessage = 50 -DebugLinkStop = 103 -EstimateTxSize = 43 -GetPublicKey = 11 -GetFeatures = 55 -PinMatrixRequest = 18 -ClearSession = 24 -LoadDevice = 13 -VerifyMessage = 39 -PassphraseRequest = 41 -TxAck = 22 -ChangePin = 4 -DebugLinkLog = 104 -FirmwareErase = 6 -TxRequest = 21 -DebugLinkState = 102 -FirmwareUpload = 7 -SignedIdentity = 54 -Failure = 3 -EntropyRequest = 35 -ApplySettings = 25 -Address = 30 -Initialize = 0 -PinMatrixAck = 19 -SignTx = 15 -DebugLinkGetState = 101 -Success = 2 -ResetDevice = 14 -WordAck = 47 -SimpleSignTx = 16 -GetAddress = 29 -RecoveryDevice = 45 -PassphraseAck = 42 -SignMessage = 38 -DecryptedMessage = 52 -DecryptMessage = 51 -GetEntropy = 9 -EntropyAck = 36 -WipeDevice = 5 -CipherKeyValue = 23 -Features = 17 -TxSize = 44 -SignIdentity = 53 -DebugLinkDecision = 100 -CipheredKeyValue = 48 -ButtonRequest = 26 -PublicKey = 12 -Entropy = 10 -Cancel = 20 -EncryptMessage = 49 +WordRequest = const(46) +DebugLinkMemoryWrite = const(112) +ButtonAck = const(27) +MessageSignature = const(40) +EthereumAddress = const(57) +EthereumTxAck = const(60) +Ping = const(1) +EncryptedMessage = const(50) +DebugLinkStop = const(103) +EstimateTxSize = const(43) +GetPublicKey = const(11) +GetFeatures = const(55) +GetECDHSessionKey = const(61) +PinMatrixRequest = const(18) +ClearSession = const(24) +LoadDevice = const(13) +VerifyMessage = const(39) +EthereumSignTx = const(58) +PassphraseRequest = const(41) +TxAck = const(22) +ChangePin = const(4) +DebugLinkLog = const(104) +FirmwareErase = const(6) +TxRequest = const(21) +EthereumGetAddress = const(56) +DebugLinkState = const(102) +EthereumTxRequest = const(59) +FirmwareUpload = const(7) +SignedIdentity = const(54) +Failure = const(3) +EntropyRequest = const(35) +ApplySettings = const(25) +DebugLinkFlashErase = const(113) +Address = const(30) +Initialize = const(0) +PinMatrixAck = const(19) +SetU2FCounter = const(63) +SignTx = const(15) +DebugLinkGetState = const(101) +Success = const(2) +ResetDevice = const(14) +WordAck = const(47) +SimpleSignTx = const(16) +GetAddress = const(29) +TxSize = const(44) +PassphraseAck = const(42) +SignMessage = const(38) +DecryptedMessage = const(52) +DecryptMessage = const(51) +GetEntropy = const(9) +EntropyAck = const(36) +WipeDevice = const(5) +CipherKeyValue = const(23) +Features = const(17) +RecoveryDevice = const(45) +SignIdentity = const(53) +DebugLinkDecision = const(100) +CipheredKeyValue = const(48) +ButtonRequest = const(26) +PublicKey = const(12) +DebugLinkMemory = const(111) +Entropy = const(10) +Cancel = const(20) +DebugLinkMemoryRead = const(110) +EncryptMessage = const(49) +ECDHSessionKey = const(62)