|
|
|
@ -8,6 +8,7 @@ if __debug__:
|
|
|
|
|
from typing_extensions import Literal # noqa: F401
|
|
|
|
|
EnumTypeCapability = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
|
|
|
|
EnumTypeBackupType = Literal[0, 1, 2]
|
|
|
|
|
EnumTypeSafetyCheckLevel = Literal[0, 1]
|
|
|
|
|
except ImportError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@ -51,6 +52,7 @@ class Features(p.MessageType):
|
|
|
|
|
wipe_code_protection: bool = None,
|
|
|
|
|
session_id: bytes = None,
|
|
|
|
|
passphrase_always_on_device: bool = None,
|
|
|
|
|
safety_checks: EnumTypeSafetyCheckLevel = None,
|
|
|
|
|
) -> None:
|
|
|
|
|
self.vendor = vendor
|
|
|
|
|
self.major_version = major_version
|
|
|
|
@ -86,6 +88,7 @@ class Features(p.MessageType):
|
|
|
|
|
self.wipe_code_protection = wipe_code_protection
|
|
|
|
|
self.session_id = session_id
|
|
|
|
|
self.passphrase_always_on_device = passphrase_always_on_device
|
|
|
|
|
self.safety_checks = safety_checks
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def get_fields(cls) -> Dict:
|
|
|
|
@ -124,4 +127,5 @@ class Features(p.MessageType):
|
|
|
|
|
34: ('wipe_code_protection', p.BoolType, 0),
|
|
|
|
|
35: ('session_id', p.BytesType, 0),
|
|
|
|
|
36: ('passphrase_always_on_device', p.BoolType, 0),
|
|
|
|
|
37: ('safety_checks', p.EnumType("SafetyCheckLevel", (0, 1)), 0),
|
|
|
|
|
}
|
|
|
|
|