1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-12 16:30:56 +00:00
trezor-firmware/python/src/trezorlib/messages/DebugLinkState.py

66 lines
2.2 KiB
Python
Raw Normal View History

# Automatically generated by pb2py
# fmt: off
from .. import protobuf as p
from .HDNodeType import HDNodeType
2019-07-03 13:02:50 +00:00
if __debug__:
try:
2019-10-02 12:40:25 +00:00
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
2019-07-03 13:02:50 +00:00
except ImportError:
2019-10-02 12:40:25 +00:00
pass
2019-07-03 13:02:50 +00:00
class DebugLinkState(p.MessageType):
MESSAGE_WIRE_TYPE = 102
def __init__(
self,
2020-09-14 11:56:11 +00:00
*,
layout_lines: List[str] = None,
layout: bytes = None,
pin: str = None,
matrix: str = None,
mnemonic_secret: bytes = None,
node: HDNodeType = None,
passphrase_protection: bool = None,
reset_word: str = None,
reset_entropy: bytes = None,
recovery_fake_word: str = None,
recovery_word_pos: int = None,
reset_word_pos: int = None,
mnemonic_type: int = None,
) -> None:
2020-09-14 11:56:11 +00:00
self.layout_lines = layout_lines if layout_lines is not None else []
self.layout = layout
self.pin = pin
self.matrix = matrix
self.mnemonic_secret = mnemonic_secret
self.node = node
self.passphrase_protection = passphrase_protection
self.reset_word = reset_word
self.reset_entropy = reset_entropy
self.recovery_fake_word = recovery_fake_word
self.recovery_word_pos = recovery_word_pos
self.reset_word_pos = reset_word_pos
self.mnemonic_type = mnemonic_type
@classmethod
2019-07-03 13:02:50 +00:00
def get_fields(cls) -> Dict:
return {
2020-09-14 11:56:11 +00:00
1: ('layout', p.BytesType, None),
2: ('pin', p.UnicodeType, None),
3: ('matrix', p.UnicodeType, None),
4: ('mnemonic_secret', p.BytesType, None),
5: ('node', HDNodeType, None),
6: ('passphrase_protection', p.BoolType, None),
7: ('reset_word', p.UnicodeType, None),
8: ('reset_entropy', p.BytesType, None),
9: ('recovery_fake_word', p.UnicodeType, None),
10: ('recovery_word_pos', p.UVarintType, None),
11: ('reset_word_pos', p.UVarintType, None),
12: ('mnemonic_type', p.UVarintType, None),
13: ('layout_lines', p.UnicodeType, p.FLAG_REPEATED),
}