mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-10 21:26:07 +00:00
trezor.messages: regenerate classes
This commit is contained in:
parent
507d9bdf68
commit
6e658ff2f1
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('Address')
|
t = p.MessageType('Address')
|
||||||
t.wire_type = const(30)
|
t.wire_type = const(30)
|
||||||
t.add_field(1, 'address', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'address', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
||||||
Address = t
|
Address = t
|
||||||
|
@ -7,4 +7,4 @@ t.add_field(1, 'language', p.UnicodeType)
|
|||||||
t.add_field(2, 'label', p.UnicodeType)
|
t.add_field(2, 'label', p.UnicodeType)
|
||||||
t.add_field(3, 'use_passphrase', p.BoolType)
|
t.add_field(3, 'use_passphrase', p.BoolType)
|
||||||
t.add_field(4, 'homescreen', p.BytesType)
|
t.add_field(4, 'homescreen', p.BytesType)
|
||||||
ApplySettings = t
|
ApplySettings = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('ButtonAck')
|
t = p.MessageType('ButtonAck')
|
||||||
t.wire_type = const(27)
|
t.wire_type = const(27)
|
||||||
ButtonAck = t
|
ButtonAck = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('ButtonRequest')
|
|||||||
t.wire_type = const(26)
|
t.wire_type = const(26)
|
||||||
t.add_field(1, 'code', p.UVarintType)
|
t.add_field(1, 'code', p.UVarintType)
|
||||||
t.add_field(2, 'data', p.UnicodeType)
|
t.add_field(2, 'data', p.UnicodeType)
|
||||||
ButtonRequest = t
|
ButtonRequest = t
|
||||||
|
@ -9,4 +9,4 @@ ProtectCall = const(7)
|
|||||||
SignTx = const(8)
|
SignTx = const(8)
|
||||||
FirmwareCheck = const(9)
|
FirmwareCheck = const(9)
|
||||||
Address = const(10)
|
Address = const(10)
|
||||||
PublicKey = const(11)
|
PublicKey = const(11)
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('Cancel')
|
t = p.MessageType('Cancel')
|
||||||
t.wire_type = const(20)
|
t.wire_type = const(20)
|
||||||
Cancel = t
|
Cancel = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('ChangePin')
|
t = p.MessageType('ChangePin')
|
||||||
t.wire_type = const(4)
|
t.wire_type = const(4)
|
||||||
t.add_field(1, 'remove', p.BoolType)
|
t.add_field(1, 'remove', p.BoolType)
|
||||||
ChangePin = t
|
ChangePin = t
|
||||||
|
@ -10,4 +10,4 @@ t.add_field(4, 'encrypt', p.BoolType)
|
|||||||
t.add_field(5, 'ask_on_encrypt', p.BoolType)
|
t.add_field(5, 'ask_on_encrypt', p.BoolType)
|
||||||
t.add_field(6, 'ask_on_decrypt', p.BoolType)
|
t.add_field(6, 'ask_on_decrypt', p.BoolType)
|
||||||
t.add_field(7, 'iv', p.BytesType)
|
t.add_field(7, 'iv', p.BytesType)
|
||||||
CipherKeyValue = t
|
CipherKeyValue = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('CipheredKeyValue')
|
t = p.MessageType('CipheredKeyValue')
|
||||||
t.wire_type = const(48)
|
t.wire_type = const(48)
|
||||||
t.add_field(1, 'value', p.BytesType)
|
t.add_field(1, 'value', p.BytesType)
|
||||||
CipheredKeyValue = t
|
CipheredKeyValue = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('ClearSession')
|
t = p.MessageType('ClearSession')
|
||||||
t.wire_type = const(24)
|
t.wire_type = const(24)
|
||||||
ClearSession = t
|
ClearSession = t
|
||||||
|
@ -10,4 +10,4 @@ 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(6, 'address_type_p2wpkh', p.UVarintType, default=6)
|
||||||
t.add_field(7, 'address_type_p2wsh', p.UVarintType, default=10)
|
t.add_field(7, 'address_type_p2wsh', p.UVarintType, default=10)
|
||||||
t.add_field(8, 'signed_message_header', p.UnicodeType)
|
t.add_field(8, 'signed_message_header', p.UnicodeType)
|
||||||
CoinType = t
|
CoinType = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('DebugLinkDecision')
|
t = p.MessageType('DebugLinkDecision')
|
||||||
t.wire_type = const(100)
|
t.wire_type = const(100)
|
||||||
t.add_field(1, 'yes_no', p.BoolType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'yes_no', p.BoolType, flags=p.FLAG_REQUIRED)
|
||||||
DebugLinkDecision = t
|
DebugLinkDecision = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('DebugLinkFlashErase')
|
t = p.MessageType('DebugLinkFlashErase')
|
||||||
t.wire_type = const(113)
|
t.wire_type = const(113)
|
||||||
t.add_field(1, 'sector', p.UVarintType)
|
t.add_field(1, 'sector', p.UVarintType)
|
||||||
DebugLinkFlashErase = t
|
DebugLinkFlashErase = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('DebugLinkGetState')
|
t = p.MessageType('DebugLinkGetState')
|
||||||
t.wire_type = const(101)
|
t.wire_type = const(101)
|
||||||
DebugLinkGetState = t
|
DebugLinkGetState = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(104)
|
|||||||
t.add_field(1, 'level', p.UVarintType)
|
t.add_field(1, 'level', p.UVarintType)
|
||||||
t.add_field(2, 'bucket', p.UnicodeType)
|
t.add_field(2, 'bucket', p.UnicodeType)
|
||||||
t.add_field(3, 'text', p.UnicodeType)
|
t.add_field(3, 'text', p.UnicodeType)
|
||||||
DebugLinkLog = t
|
DebugLinkLog = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('DebugLinkMemory')
|
t = p.MessageType('DebugLinkMemory')
|
||||||
t.wire_type = const(111)
|
t.wire_type = const(111)
|
||||||
t.add_field(1, 'memory', p.BytesType)
|
t.add_field(1, 'memory', p.BytesType)
|
||||||
DebugLinkMemory = t
|
DebugLinkMemory = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('DebugLinkMemoryRead')
|
|||||||
t.wire_type = const(110)
|
t.wire_type = const(110)
|
||||||
t.add_field(1, 'address', p.UVarintType)
|
t.add_field(1, 'address', p.UVarintType)
|
||||||
t.add_field(2, 'length', p.UVarintType)
|
t.add_field(2, 'length', p.UVarintType)
|
||||||
DebugLinkMemoryRead = t
|
DebugLinkMemoryRead = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(112)
|
|||||||
t.add_field(1, 'address', p.UVarintType)
|
t.add_field(1, 'address', p.UVarintType)
|
||||||
t.add_field(2, 'memory', p.BytesType)
|
t.add_field(2, 'memory', p.BytesType)
|
||||||
t.add_field(3, 'flash', p.BoolType)
|
t.add_field(3, 'flash', p.BoolType)
|
||||||
DebugLinkMemoryWrite = t
|
DebugLinkMemoryWrite = t
|
||||||
|
@ -14,4 +14,4 @@ t.add_field(7, 'reset_word', p.UnicodeType)
|
|||||||
t.add_field(8, 'reset_entropy', p.BytesType)
|
t.add_field(8, 'reset_entropy', p.BytesType)
|
||||||
t.add_field(9, 'recovery_fake_word', p.UnicodeType)
|
t.add_field(9, 'recovery_fake_word', p.UnicodeType)
|
||||||
t.add_field(10, 'recovery_word_pos', p.UVarintType)
|
t.add_field(10, 'recovery_word_pos', p.UVarintType)
|
||||||
DebugLinkState = t
|
DebugLinkState = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('DebugLinkStop')
|
t = p.MessageType('DebugLinkStop')
|
||||||
t.wire_type = const(103)
|
t.wire_type = const(103)
|
||||||
DebugLinkStop = t
|
DebugLinkStop = t
|
||||||
|
@ -7,4 +7,4 @@ t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
|||||||
t.add_field(2, 'nonce', p.BytesType)
|
t.add_field(2, 'nonce', p.BytesType)
|
||||||
t.add_field(3, 'message', p.BytesType)
|
t.add_field(3, 'message', p.BytesType)
|
||||||
t.add_field(4, 'hmac', p.BytesType)
|
t.add_field(4, 'hmac', p.BytesType)
|
||||||
DecryptMessage = t
|
DecryptMessage = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('DecryptedMessage')
|
|||||||
t.wire_type = const(52)
|
t.wire_type = const(52)
|
||||||
t.add_field(1, 'message', p.BytesType)
|
t.add_field(1, 'message', p.BytesType)
|
||||||
t.add_field(2, 'address', p.UnicodeType)
|
t.add_field(2, 'address', p.UnicodeType)
|
||||||
DecryptedMessage = t
|
DecryptedMessage = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('ECDHSessionKey')
|
t = p.MessageType('ECDHSessionKey')
|
||||||
t.wire_type = const(62)
|
t.wire_type = const(62)
|
||||||
t.add_field(1, 'session_key', p.BytesType)
|
t.add_field(1, 'session_key', p.BytesType)
|
||||||
ECDHSessionKey = t
|
ECDHSessionKey = t
|
||||||
|
@ -8,4 +8,4 @@ t.add_field(2, 'message', p.BytesType)
|
|||||||
t.add_field(3, 'display_only', p.BoolType)
|
t.add_field(3, 'display_only', p.BoolType)
|
||||||
t.add_field(4, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
t.add_field(4, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
||||||
t.add_field(5, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(5, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
EncryptMessage = t
|
EncryptMessage = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(50)
|
|||||||
t.add_field(1, 'nonce', p.BytesType)
|
t.add_field(1, 'nonce', p.BytesType)
|
||||||
t.add_field(2, 'message', p.BytesType)
|
t.add_field(2, 'message', p.BytesType)
|
||||||
t.add_field(3, 'hmac', p.BytesType)
|
t.add_field(3, 'hmac', p.BytesType)
|
||||||
EncryptedMessage = t
|
EncryptedMessage = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('Entropy')
|
t = p.MessageType('Entropy')
|
||||||
t.wire_type = const(10)
|
t.wire_type = const(10)
|
||||||
t.add_field(1, 'entropy', p.BytesType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'entropy', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
Entropy = t
|
Entropy = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('EntropyAck')
|
t = p.MessageType('EntropyAck')
|
||||||
t.wire_type = const(36)
|
t.wire_type = const(36)
|
||||||
t.add_field(1, 'entropy', p.BytesType)
|
t.add_field(1, 'entropy', p.BytesType)
|
||||||
EntropyAck = t
|
EntropyAck = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('EntropyRequest')
|
t = p.MessageType('EntropyRequest')
|
||||||
t.wire_type = const(35)
|
t.wire_type = const(35)
|
||||||
EntropyRequest = t
|
EntropyRequest = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(43)
|
|||||||
t.add_field(1, 'outputs_count', p.UVarintType, flags=p.FLAG_REQUIRED)
|
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(2, 'inputs_count', p.UVarintType, flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
EstimateTxSize = t
|
EstimateTxSize = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('EthereumAddress')
|
t = p.MessageType('EthereumAddress')
|
||||||
t.wire_type = const(57)
|
t.wire_type = const(57)
|
||||||
t.add_field(1, 'address', p.BytesType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'address', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
EthereumAddress = t
|
EthereumAddress = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('EthereumGetAddress')
|
|||||||
t.wire_type = const(56)
|
t.wire_type = const(56)
|
||||||
t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
||||||
t.add_field(2, 'show_display', p.BoolType)
|
t.add_field(2, 'show_display', p.BoolType)
|
||||||
EthereumGetAddress = t
|
EthereumGetAddress = t
|
||||||
|
@ -11,4 +11,4 @@ t.add_field(5, 'to', p.BytesType)
|
|||||||
t.add_field(6, 'value', p.BytesType)
|
t.add_field(6, 'value', p.BytesType)
|
||||||
t.add_field(7, 'data_initial_chunk', p.BytesType)
|
t.add_field(7, 'data_initial_chunk', p.BytesType)
|
||||||
t.add_field(8, 'data_length', p.UVarintType)
|
t.add_field(8, 'data_length', p.UVarintType)
|
||||||
EthereumSignTx = t
|
EthereumSignTx = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('EthereumTxAck')
|
t = p.MessageType('EthereumTxAck')
|
||||||
t.wire_type = const(60)
|
t.wire_type = const(60)
|
||||||
t.add_field(1, 'data_chunk', p.BytesType)
|
t.add_field(1, 'data_chunk', p.BytesType)
|
||||||
EthereumTxAck = t
|
EthereumTxAck = t
|
||||||
|
@ -7,4 +7,4 @@ t.add_field(1, 'data_length', p.UVarintType)
|
|||||||
t.add_field(2, 'signature_v', p.UVarintType)
|
t.add_field(2, 'signature_v', p.UVarintType)
|
||||||
t.add_field(3, 'signature_r', p.BytesType)
|
t.add_field(3, 'signature_r', p.BytesType)
|
||||||
t.add_field(4, 'signature_s', p.BytesType)
|
t.add_field(4, 'signature_s', p.BytesType)
|
||||||
EthereumTxRequest = t
|
EthereumTxRequest = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('Failure')
|
|||||||
t.wire_type = const(3)
|
t.wire_type = const(3)
|
||||||
t.add_field(1, 'code', p.UVarintType)
|
t.add_field(1, 'code', p.UVarintType)
|
||||||
t.add_field(2, 'message', p.UnicodeType)
|
t.add_field(2, 'message', p.UnicodeType)
|
||||||
Failure = t
|
Failure = t
|
||||||
|
@ -10,4 +10,4 @@ InvalidSignature = const(8)
|
|||||||
Other = const(9)
|
Other = const(9)
|
||||||
NotEnoughFunds = const(10)
|
NotEnoughFunds = const(10)
|
||||||
NotInitialized = const(11)
|
NotInitialized = const(11)
|
||||||
FirmwareError = const(99)
|
FirmwareError = const(99)
|
||||||
|
@ -22,4 +22,4 @@ t.add_field(15, 'imported', p.BoolType)
|
|||||||
t.add_field(16, 'pin_cached', p.BoolType)
|
t.add_field(16, 'pin_cached', p.BoolType)
|
||||||
t.add_field(17, 'passphrase_cached', p.BoolType)
|
t.add_field(17, 'passphrase_cached', p.BoolType)
|
||||||
t.add_field(18, 'firmware_present', p.BoolType)
|
t.add_field(18, 'firmware_present', p.BoolType)
|
||||||
Features = t
|
Features = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('FirmwareErase')
|
t = p.MessageType('FirmwareErase')
|
||||||
t.wire_type = const(6)
|
t.wire_type = const(6)
|
||||||
FirmwareErase = t
|
FirmwareErase = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('FirmwareUpload')
|
t = p.MessageType('FirmwareUpload')
|
||||||
t.wire_type = const(7)
|
t.wire_type = const(7)
|
||||||
t.add_field(1, 'payload', p.BytesType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'payload', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
FirmwareUpload = t
|
FirmwareUpload = t
|
||||||
|
@ -9,4 +9,4 @@ t.add_field(2, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
|||||||
t.add_field(3, 'show_display', p.BoolType)
|
t.add_field(3, 'show_display', p.BoolType)
|
||||||
t.add_field(4, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
t.add_field(4, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
||||||
t.add_field(5, 'script_type', p.UVarintType, default=0)
|
t.add_field(5, 'script_type', p.UVarintType, default=0)
|
||||||
GetAddress = t
|
GetAddress = t
|
||||||
|
@ -7,4 +7,4 @@ t.wire_type = const(61)
|
|||||||
t.add_field(1, 'identity', p.EmbeddedMessage(IdentityType))
|
t.add_field(1, 'identity', p.EmbeddedMessage(IdentityType))
|
||||||
t.add_field(2, 'peer_public_key', p.BytesType)
|
t.add_field(2, 'peer_public_key', p.BytesType)
|
||||||
t.add_field(3, 'ecdsa_curve_name', p.UnicodeType)
|
t.add_field(3, 'ecdsa_curve_name', p.UnicodeType)
|
||||||
GetECDHSessionKey = t
|
GetECDHSessionKey = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('GetEntropy')
|
t = p.MessageType('GetEntropy')
|
||||||
t.wire_type = const(9)
|
t.wire_type = const(9)
|
||||||
t.add_field(1, 'size', p.UVarintType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'size', p.UVarintType, flags=p.FLAG_REQUIRED)
|
||||||
GetEntropy = t
|
GetEntropy = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('GetFeatures')
|
t = p.MessageType('GetFeatures')
|
||||||
t.wire_type = const(55)
|
t.wire_type = const(55)
|
||||||
GetFeatures = t
|
GetFeatures = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(11)
|
|||||||
t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
||||||
t.add_field(2, 'ecdsa_curve_name', p.UnicodeType)
|
t.add_field(2, 'ecdsa_curve_name', p.UnicodeType)
|
||||||
t.add_field(3, 'show_display', p.BoolType)
|
t.add_field(3, 'show_display', p.BoolType)
|
||||||
GetPublicKey = t
|
GetPublicKey = t
|
||||||
|
@ -5,4 +5,4 @@ from .HDNodeType import HDNodeType
|
|||||||
t = p.MessageType('HDNodePathType')
|
t = p.MessageType('HDNodePathType')
|
||||||
t.add_field(1, 'node', p.EmbeddedMessage(HDNodeType), flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'node', p.EmbeddedMessage(HDNodeType), flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(2, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
t.add_field(2, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
||||||
HDNodePathType = t
|
HDNodePathType = t
|
||||||
|
@ -8,4 +8,4 @@ t.add_field(3, 'child_num', p.UVarintType, flags=p.FLAG_REQUIRED)
|
|||||||
t.add_field(4, 'chain_code', p.BytesType, flags=p.FLAG_REQUIRED)
|
t.add_field(4, 'chain_code', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(5, 'private_key', p.BytesType)
|
t.add_field(5, 'private_key', p.BytesType)
|
||||||
t.add_field(6, 'public_key', p.BytesType)
|
t.add_field(6, 'public_key', p.BytesType)
|
||||||
HDNodeType = t
|
HDNodeType = t
|
||||||
|
@ -8,4 +8,4 @@ t.add_field(3, 'host', p.UnicodeType)
|
|||||||
t.add_field(4, 'port', p.UnicodeType)
|
t.add_field(4, 'port', p.UnicodeType)
|
||||||
t.add_field(5, 'path', p.UnicodeType)
|
t.add_field(5, 'path', p.UnicodeType)
|
||||||
t.add_field(6, 'index', p.UVarintType, default=0)
|
t.add_field(6, 'index', p.UVarintType, default=0)
|
||||||
IdentityType = t
|
IdentityType = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('Initialize')
|
t = p.MessageType('Initialize')
|
||||||
t.wire_type = const(0)
|
t.wire_type = const(0)
|
||||||
Initialize = t
|
Initialize = t
|
||||||
|
@ -3,4 +3,4 @@ SPENDADDRESS = const(0)
|
|||||||
SPENDMULTISIG = const(1)
|
SPENDMULTISIG = const(1)
|
||||||
EXTERNAL = const(2)
|
EXTERNAL = const(2)
|
||||||
SPENDWITNESS = const(3)
|
SPENDWITNESS = const(3)
|
||||||
SPENDP2SHWITNESS = const(4)
|
SPENDP2SHWITNESS = const(4)
|
||||||
|
@ -11,4 +11,4 @@ t.add_field(4, 'passphrase_protection', p.BoolType)
|
|||||||
t.add_field(5, 'language', p.UnicodeType, default=u'english')
|
t.add_field(5, 'language', p.UnicodeType, default=u'english')
|
||||||
t.add_field(6, 'label', p.UnicodeType)
|
t.add_field(6, 'label', p.UnicodeType)
|
||||||
t.add_field(7, 'skip_checksum', p.BoolType)
|
t.add_field(7, 'skip_checksum', p.BoolType)
|
||||||
LoadDevice = t
|
LoadDevice = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('MessageSignature')
|
|||||||
t.wire_type = const(40)
|
t.wire_type = const(40)
|
||||||
t.add_field(1, 'address', p.UnicodeType)
|
t.add_field(1, 'address', p.UnicodeType)
|
||||||
t.add_field(2, 'signature', p.BytesType)
|
t.add_field(2, 'signature', p.BytesType)
|
||||||
MessageSignature = t
|
MessageSignature = t
|
||||||
|
@ -64,4 +64,4 @@ DebugLinkLog = const(104)
|
|||||||
DebugLinkMemoryRead = const(110)
|
DebugLinkMemoryRead = const(110)
|
||||||
DebugLinkMemory = const(111)
|
DebugLinkMemory = const(111)
|
||||||
DebugLinkMemoryWrite = const(112)
|
DebugLinkMemoryWrite = const(112)
|
||||||
DebugLinkFlashErase = const(113)
|
DebugLinkFlashErase = const(113)
|
||||||
|
@ -6,4 +6,4 @@ t = p.MessageType('MultisigRedeemScriptType')
|
|||||||
t.add_field(1, 'pubkeys', p.EmbeddedMessage(HDNodePathType), flags=p.FLAG_REPEATED)
|
t.add_field(1, 'pubkeys', p.EmbeddedMessage(HDNodePathType), flags=p.FLAG_REPEATED)
|
||||||
t.add_field(2, 'signatures', p.BytesType, flags=p.FLAG_REPEATED)
|
t.add_field(2, 'signatures', p.BytesType, flags=p.FLAG_REPEATED)
|
||||||
t.add_field(3, 'm', p.UVarintType)
|
t.add_field(3, 'm', p.UVarintType)
|
||||||
MultisigRedeemScriptType = t
|
MultisigRedeemScriptType = t
|
||||||
|
@ -4,4 +4,4 @@ PAYTOSCRIPTHASH = const(1)
|
|||||||
PAYTOMULTISIG = const(2)
|
PAYTOMULTISIG = const(2)
|
||||||
PAYTOOPRETURN = const(3)
|
PAYTOOPRETURN = const(3)
|
||||||
PAYTOWITNESS = const(4)
|
PAYTOWITNESS = const(4)
|
||||||
PAYTOP2SHWITNESS = const(5)
|
PAYTOP2SHWITNESS = const(5)
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('PassphraseAck')
|
t = p.MessageType('PassphraseAck')
|
||||||
t.wire_type = const(42)
|
t.wire_type = const(42)
|
||||||
t.add_field(1, 'passphrase', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'passphrase', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
||||||
PassphraseAck = t
|
PassphraseAck = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('PassphraseRequest')
|
t = p.MessageType('PassphraseRequest')
|
||||||
t.wire_type = const(41)
|
t.wire_type = const(41)
|
||||||
PassphraseRequest = t
|
PassphraseRequest = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('PinMatrixAck')
|
t = p.MessageType('PinMatrixAck')
|
||||||
t.wire_type = const(19)
|
t.wire_type = const(19)
|
||||||
t.add_field(1, 'pin', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'pin', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
||||||
PinMatrixAck = t
|
PinMatrixAck = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('PinMatrixRequest')
|
t = p.MessageType('PinMatrixRequest')
|
||||||
t.wire_type = const(18)
|
t.wire_type = const(18)
|
||||||
t.add_field(1, 'type', p.UVarintType)
|
t.add_field(1, 'type', p.UVarintType)
|
||||||
PinMatrixRequest = t
|
PinMatrixRequest = t
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
Current = const(1)
|
Current = const(1)
|
||||||
NewFirst = const(2)
|
NewFirst = const(2)
|
||||||
NewSecond = const(3)
|
NewSecond = const(3)
|
||||||
|
@ -7,4 +7,4 @@ t.add_field(1, 'message', p.UnicodeType)
|
|||||||
t.add_field(2, 'button_protection', p.BoolType)
|
t.add_field(2, 'button_protection', p.BoolType)
|
||||||
t.add_field(3, 'pin_protection', p.BoolType)
|
t.add_field(3, 'pin_protection', p.BoolType)
|
||||||
t.add_field(4, 'passphrase_protection', p.BoolType)
|
t.add_field(4, 'passphrase_protection', p.BoolType)
|
||||||
Ping = t
|
Ping = t
|
||||||
|
@ -6,4 +6,4 @@ t = p.MessageType('PublicKey')
|
|||||||
t.wire_type = const(12)
|
t.wire_type = const(12)
|
||||||
t.add_field(1, 'node', p.EmbeddedMessage(HDNodeType), flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'node', p.EmbeddedMessage(HDNodeType), flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(2, 'xpub', p.UnicodeType)
|
t.add_field(2, 'xpub', p.UnicodeType)
|
||||||
PublicKey = t
|
PublicKey = t
|
||||||
|
@ -9,4 +9,4 @@ t.add_field(3, 'pin_protection', p.BoolType)
|
|||||||
t.add_field(4, 'language', p.UnicodeType, default=u'english')
|
t.add_field(4, 'language', p.UnicodeType, default=u'english')
|
||||||
t.add_field(5, 'label', p.UnicodeType)
|
t.add_field(5, 'label', p.UnicodeType)
|
||||||
t.add_field(6, 'enforce_wordlist', p.BoolType)
|
t.add_field(6, 'enforce_wordlist', p.BoolType)
|
||||||
RecoveryDevice = t
|
RecoveryDevice = t
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
TXINPUT = const(0)
|
TXINPUT = const(0)
|
||||||
TXOUTPUT = const(1)
|
TXOUTPUT = const(1)
|
||||||
TXMETA = const(2)
|
TXMETA = const(2)
|
||||||
TXFINISHED = const(3)
|
TXFINISHED = const(3)
|
||||||
|
TXEXTRADATA = const(4)
|
||||||
|
@ -9,4 +9,4 @@ t.add_field(3, 'passphrase_protection', p.BoolType)
|
|||||||
t.add_field(4, 'pin_protection', p.BoolType)
|
t.add_field(4, 'pin_protection', p.BoolType)
|
||||||
t.add_field(5, 'language', p.UnicodeType, default=u'english')
|
t.add_field(5, 'language', p.UnicodeType, default=u'english')
|
||||||
t.add_field(6, 'label', p.UnicodeType)
|
t.add_field(6, 'label', p.UnicodeType)
|
||||||
ResetDevice = t
|
ResetDevice = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('SetU2FCounter')
|
t = p.MessageType('SetU2FCounter')
|
||||||
t.wire_type = const(63)
|
t.wire_type = const(63)
|
||||||
t.add_field(1, 'u2f_counter', p.UVarintType)
|
t.add_field(1, 'u2f_counter', p.UVarintType)
|
||||||
SetU2FCounter = t
|
SetU2FCounter = t
|
||||||
|
@ -8,4 +8,4 @@ t.add_field(1, 'identity', p.EmbeddedMessage(IdentityType))
|
|||||||
t.add_field(2, 'challenge_hidden', p.BytesType)
|
t.add_field(2, 'challenge_hidden', p.BytesType)
|
||||||
t.add_field(3, 'challenge_visual', p.UnicodeType)
|
t.add_field(3, 'challenge_visual', p.UnicodeType)
|
||||||
t.add_field(4, 'ecdsa_curve_name', p.UnicodeType)
|
t.add_field(4, 'ecdsa_curve_name', p.UnicodeType)
|
||||||
SignIdentity = t
|
SignIdentity = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(38)
|
|||||||
t.add_field(1, 'address_n', p.UVarintType, flags=p.FLAG_REPEATED)
|
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(2, 'message', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
SignMessage = t
|
SignMessage = t
|
||||||
|
@ -8,4 +8,4 @@ t.add_field(2, 'inputs_count', p.UVarintType, flags=p.FLAG_REQUIRED)
|
|||||||
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(3, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
t.add_field(4, 'version', p.UVarintType, default=1)
|
t.add_field(4, 'version', p.UVarintType, default=1)
|
||||||
t.add_field(5, 'lock_time', p.UVarintType, default=0)
|
t.add_field(5, 'lock_time', p.UVarintType, default=0)
|
||||||
SignTx = t
|
SignTx = t
|
||||||
|
@ -6,4 +6,4 @@ t.wire_type = const(54)
|
|||||||
t.add_field(1, 'address', p.UnicodeType)
|
t.add_field(1, 'address', p.UnicodeType)
|
||||||
t.add_field(2, 'public_key', p.BytesType)
|
t.add_field(2, 'public_key', p.BytesType)
|
||||||
t.add_field(3, 'signature', p.BytesType)
|
t.add_field(3, 'signature', p.BytesType)
|
||||||
SignedIdentity = t
|
SignedIdentity = t
|
||||||
|
@ -12,4 +12,4 @@ t.add_field(3, 'transactions', p.EmbeddedMessage(TransactionType), flags=p.FLAG_
|
|||||||
t.add_field(4, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(4, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
t.add_field(5, 'version', p.UVarintType, default=1)
|
t.add_field(5, 'version', p.UVarintType, default=1)
|
||||||
t.add_field(6, 'lock_time', p.UVarintType, default=0)
|
t.add_field(6, 'lock_time', p.UVarintType, default=0)
|
||||||
SimpleSignTx = t
|
SimpleSignTx = t
|
||||||
|
@ -14,4 +14,4 @@ t.add_field(8, 'label', p.UnicodeType)
|
|||||||
t.add_field(9, 'imported', p.BoolType)
|
t.add_field(9, 'imported', p.BoolType)
|
||||||
t.add_field(10, 'homescreen', p.BytesType)
|
t.add_field(10, 'homescreen', p.BytesType)
|
||||||
t.add_field(11, 'u2f_counter', p.UVarintType)
|
t.add_field(11, 'u2f_counter', p.UVarintType)
|
||||||
Storage = t
|
Storage = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('Success')
|
t = p.MessageType('Success')
|
||||||
t.wire_type = const(2)
|
t.wire_type = const(2)
|
||||||
t.add_field(1, 'message', p.UnicodeType)
|
t.add_field(1, 'message', p.UnicodeType)
|
||||||
Success = t
|
Success = t
|
||||||
|
@ -12,4 +12,6 @@ t.add_field(4, 'lock_time', p.UVarintType)
|
|||||||
t.add_field(5, 'outputs', p.EmbeddedMessage(TxOutputType), flags=p.FLAG_REPEATED)
|
t.add_field(5, 'outputs', p.EmbeddedMessage(TxOutputType), flags=p.FLAG_REPEATED)
|
||||||
t.add_field(6, 'inputs_cnt', p.UVarintType)
|
t.add_field(6, 'inputs_cnt', p.UVarintType)
|
||||||
t.add_field(7, 'outputs_cnt', p.UVarintType)
|
t.add_field(7, 'outputs_cnt', p.UVarintType)
|
||||||
TransactionType = t
|
t.add_field(8, 'extra_data', p.BytesType)
|
||||||
|
t.add_field(9, 'extra_data_len', p.UVarintType)
|
||||||
|
TransactionType = t
|
||||||
|
@ -5,4 +5,4 @@ from .TransactionType import TransactionType
|
|||||||
t = p.MessageType('TxAck')
|
t = p.MessageType('TxAck')
|
||||||
t.wire_type = const(22)
|
t.wire_type = const(22)
|
||||||
t.add_field(1, 'tx', p.EmbeddedMessage(TransactionType))
|
t.add_field(1, 'tx', p.EmbeddedMessage(TransactionType))
|
||||||
TxAck = t
|
TxAck = t
|
||||||
|
@ -11,4 +11,4 @@ t.add_field(5, 'sequence', p.UVarintType, default=4294967295)
|
|||||||
t.add_field(6, 'script_type', p.UVarintType, default=0)
|
t.add_field(6, 'script_type', p.UVarintType, default=0)
|
||||||
t.add_field(7, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
t.add_field(7, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
||||||
t.add_field(8, 'amount', p.UVarintType)
|
t.add_field(8, 'amount', p.UVarintType)
|
||||||
TxInputType = t
|
TxInputType = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('TxOutputBinType')
|
t = p.MessageType('TxOutputBinType')
|
||||||
t.add_field(1, 'amount', p.UVarintType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'amount', p.UVarintType, flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(2, 'script_pubkey', p.BytesType, flags=p.FLAG_REQUIRED)
|
t.add_field(2, 'script_pubkey', p.BytesType, flags=p.FLAG_REQUIRED)
|
||||||
TxOutputBinType = t
|
TxOutputBinType = t
|
||||||
|
@ -9,4 +9,4 @@ t.add_field(3, 'amount', p.UVarintType, flags=p.FLAG_REQUIRED)
|
|||||||
t.add_field(4, 'script_type', p.UVarintType, flags=p.FLAG_REQUIRED)
|
t.add_field(4, 'script_type', p.UVarintType, flags=p.FLAG_REQUIRED)
|
||||||
t.add_field(5, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
t.add_field(5, 'multisig', p.EmbeddedMessage(MultisigRedeemScriptType))
|
||||||
t.add_field(6, 'op_return_data', p.BytesType)
|
t.add_field(6, 'op_return_data', p.BytesType)
|
||||||
TxOutputType = t
|
TxOutputType = t
|
||||||
|
@ -8,4 +8,4 @@ t.wire_type = const(21)
|
|||||||
t.add_field(1, 'request_type', p.UVarintType)
|
t.add_field(1, 'request_type', p.UVarintType)
|
||||||
t.add_field(2, 'details', p.EmbeddedMessage(TxRequestDetailsType))
|
t.add_field(2, 'details', p.EmbeddedMessage(TxRequestDetailsType))
|
||||||
t.add_field(3, 'serialized', p.EmbeddedMessage(TxRequestSerializedType))
|
t.add_field(3, 'serialized', p.EmbeddedMessage(TxRequestSerializedType))
|
||||||
TxRequest = t
|
TxRequest = t
|
||||||
|
@ -4,4 +4,6 @@ from micropython import const
|
|||||||
t = p.MessageType('TxRequestDetailsType')
|
t = p.MessageType('TxRequestDetailsType')
|
||||||
t.add_field(1, 'request_index', p.UVarintType)
|
t.add_field(1, 'request_index', p.UVarintType)
|
||||||
t.add_field(2, 'tx_hash', p.BytesType)
|
t.add_field(2, 'tx_hash', p.BytesType)
|
||||||
TxRequestDetailsType = t
|
t.add_field(3, 'extra_data_len', p.UVarintType)
|
||||||
|
t.add_field(4, 'extra_data_offset', p.UVarintType)
|
||||||
|
TxRequestDetailsType = t
|
||||||
|
@ -5,4 +5,4 @@ t = p.MessageType('TxRequestSerializedType')
|
|||||||
t.add_field(1, 'signature_index', p.UVarintType)
|
t.add_field(1, 'signature_index', p.UVarintType)
|
||||||
t.add_field(2, 'signature', p.BytesType)
|
t.add_field(2, 'signature', p.BytesType)
|
||||||
t.add_field(3, 'serialized_tx', p.BytesType)
|
t.add_field(3, 'serialized_tx', p.BytesType)
|
||||||
TxRequestSerializedType = t
|
TxRequestSerializedType = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('TxSize')
|
t = p.MessageType('TxSize')
|
||||||
t.wire_type = const(44)
|
t.wire_type = const(44)
|
||||||
t.add_field(1, 'tx_size', p.UVarintType)
|
t.add_field(1, 'tx_size', p.UVarintType)
|
||||||
TxSize = t
|
TxSize = t
|
||||||
|
@ -7,4 +7,4 @@ t.add_field(1, 'address', p.UnicodeType)
|
|||||||
t.add_field(2, 'signature', p.BytesType)
|
t.add_field(2, 'signature', p.BytesType)
|
||||||
t.add_field(3, 'message', p.BytesType)
|
t.add_field(3, 'message', p.BytesType)
|
||||||
t.add_field(4, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
t.add_field(4, 'coin_name', p.UnicodeType, default=u'Bitcoin')
|
||||||
VerifyMessage = t
|
VerifyMessage = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('WipeDevice')
|
t = p.MessageType('WipeDevice')
|
||||||
t.wire_type = const(5)
|
t.wire_type = const(5)
|
||||||
WipeDevice = t
|
WipeDevice = t
|
||||||
|
@ -4,4 +4,4 @@ from micropython import const
|
|||||||
t = p.MessageType('WordAck')
|
t = p.MessageType('WordAck')
|
||||||
t.wire_type = const(47)
|
t.wire_type = const(47)
|
||||||
t.add_field(1, 'word', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
t.add_field(1, 'word', p.UnicodeType, flags=p.FLAG_REQUIRED)
|
||||||
WordAck = t
|
WordAck = t
|
||||||
|
@ -3,4 +3,4 @@ import protobuf as p
|
|||||||
from micropython import const
|
from micropython import const
|
||||||
t = p.MessageType('WordRequest')
|
t = p.MessageType('WordRequest')
|
||||||
t.wire_type = const(46)
|
t.wire_type = const(46)
|
||||||
WordRequest = t
|
WordRequest = t
|
||||||
|
@ -140,7 +140,7 @@ def write_to_file(genpath, t, out):
|
|||||||
f = open(os.path.join(genpath, "%s.py" % t), 'w')
|
f = open(os.path.join(genpath, "%s.py" % t), 'w')
|
||||||
out = ["# Automatically generated by pb2py"] + out
|
out = ["# Automatically generated by pb2py"] + out
|
||||||
|
|
||||||
data = "\n".join(out)
|
data = "\n".join(out) + "\n"
|
||||||
|
|
||||||
f.write(data)
|
f.write(data)
|
||||||
f.close()
|
f.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user