mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
Added new messages
This commit is contained in:
parent
f5d2007297
commit
97522be434
@ -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
|
@ -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)
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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)
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
7
src/trezor/messages/DebugLinkFlashErase.py
Normal file
7
src/trezor/messages/DebugLinkFlashErase.py
Normal file
@ -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
|
@ -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
|
@ -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)
|
||||
|
7
src/trezor/messages/DebugLinkMemory.py
Normal file
7
src/trezor/messages/DebugLinkMemory.py
Normal file
@ -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
|
8
src/trezor/messages/DebugLinkMemoryRead.py
Normal file
8
src/trezor/messages/DebugLinkMemoryRead.py
Normal file
@ -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
|
9
src/trezor/messages/DebugLinkMemoryWrite.py
Normal file
9
src/trezor/messages/DebugLinkMemoryWrite.py
Normal file
@ -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
|
@ -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)
|
||||
|
@ -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
|
@ -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)
|
||||
|
@ -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
|
7
src/trezor/messages/ECDHSessionKey.py
Normal file
7
src/trezor/messages/ECDHSessionKey.py
Normal file
@ -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
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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')
|
||||
|
7
src/trezor/messages/EthereumAddress.py
Normal file
7
src/trezor/messages/EthereumAddress.py
Normal file
@ -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
|
8
src/trezor/messages/EthereumGetAddress.py
Normal file
8
src/trezor/messages/EthereumGetAddress.py
Normal file
@ -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
|
14
src/trezor/messages/EthereumSignTx.py
Normal file
14
src/trezor/messages/EthereumSignTx.py
Normal file
@ -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
|
7
src/trezor/messages/EthereumTxAck.py
Normal file
7
src/trezor/messages/EthereumTxAck.py
Normal file
@ -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
|
10
src/trezor/messages/EthereumTxRequest.py
Normal file
10
src/trezor/messages/EthereumTxRequest.py
Normal file
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
10
src/trezor/messages/GetECDHSessionKey.py
Normal file
10
src/trezor/messages/GetECDHSessionKey.py
Normal file
@ -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
|
@ -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
|
@ -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
|
@ -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)
|
||||
|
@ -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
|
@ -1,3 +1,6 @@
|
||||
# Automatically generated by pb2py
|
||||
SPENDADDRESS = const(0)
|
||||
SPENDMULTISIG = const(1)
|
||||
SPENDMULTISIG = const(1)
|
||||
EXTERNAL = const(2)
|
||||
SPENDWITNESS = const(3)
|
||||
SPENDP2SHWITNESS = const(4)
|
@ -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)
|
||||
|
@ -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
|
@ -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)
|
||||
DebugLinkLog = const(104)
|
||||
DebugLinkMemoryRead = const(110)
|
||||
DebugLinkMemory = const(111)
|
||||
DebugLinkMemoryWrite = const(112)
|
||||
DebugLinkFlashErase = const(113)
|
@ -2,4 +2,6 @@
|
||||
PAYTOADDRESS = const(0)
|
||||
PAYTOSCRIPTHASH = const(1)
|
||||
PAYTOMULTISIG = const(2)
|
||||
PAYTOOPRETURN = const(3)
|
||||
PAYTOOPRETURN = const(3)
|
||||
PAYTOWITNESS = const(4)
|
||||
PAYTOP2SHWITNESS = const(5)
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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)
|
||||
|
@ -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
|
@ -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)
|
||||
|
@ -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)
|
||||
|
7
src/trezor/messages/SetU2FCounter.py
Normal file
7
src/trezor/messages/SetU2FCounter.py
Normal file
@ -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
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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))
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user