2019-05-14 14:22:23 +00:00
|
|
|
# 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:
|
|
|
|
from typing import Dict, List, Optional
|
|
|
|
except ImportError:
|
|
|
|
Dict, List, Optional = None, None, None # type: ignore
|
|
|
|
|
2019-05-14 14:22:23 +00:00
|
|
|
|
|
|
|
class LoadDevice(p.MessageType):
|
|
|
|
MESSAGE_WIRE_TYPE = 13
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
2019-07-24 10:35:37 +00:00
|
|
|
mnemonics: List[str] = None,
|
2019-05-14 14:22:23 +00:00
|
|
|
node: HDNodeType = None,
|
|
|
|
pin: str = None,
|
|
|
|
passphrase_protection: bool = None,
|
|
|
|
language: str = None,
|
|
|
|
label: str = None,
|
|
|
|
skip_checksum: bool = None,
|
|
|
|
u2f_counter: int = None,
|
|
|
|
) -> None:
|
2019-07-24 10:35:37 +00:00
|
|
|
self.mnemonics = mnemonics if mnemonics is not None else []
|
2019-05-14 14:22:23 +00:00
|
|
|
self.node = node
|
|
|
|
self.pin = pin
|
|
|
|
self.passphrase_protection = passphrase_protection
|
|
|
|
self.language = language
|
|
|
|
self.label = label
|
|
|
|
self.skip_checksum = skip_checksum
|
|
|
|
self.u2f_counter = u2f_counter
|
|
|
|
|
|
|
|
@classmethod
|
2019-07-03 13:02:50 +00:00
|
|
|
def get_fields(cls) -> Dict:
|
2019-05-14 14:22:23 +00:00
|
|
|
return {
|
2019-07-24 10:35:37 +00:00
|
|
|
1: ('mnemonics', p.UnicodeType, p.FLAG_REPEATED),
|
2019-05-14 14:22:23 +00:00
|
|
|
2: ('node', HDNodeType, 0),
|
|
|
|
3: ('pin', p.UnicodeType, 0),
|
|
|
|
4: ('passphrase_protection', p.BoolType, 0),
|
|
|
|
5: ('language', p.UnicodeType, 0), # default=english
|
|
|
|
6: ('label', p.UnicodeType, 0),
|
|
|
|
7: ('skip_checksum', p.BoolType, 0),
|
|
|
|
8: ('u2f_counter', p.UVarintType, 0),
|
|
|
|
}
|