def set_slip39_iteration_exponent(exponent: int) -> None: """ The device's actual SLIP-39 iteration exponent used in passphrase derivation. Not to be confused with recovery.iteration_exponent, which is stored only during the recovery process and it is copied here upon success. """ common.set_uint8(_NAMESPACE, _SLIP39_ITERATION_EXPONENT, exponent)
def store_mnemonic_secret( secret: bytes, backup_type: EnumTypeBackupType, needs_backup: bool = False, no_backup: bool = False, ) -> None: set_version(common.STORAGE_VERSION_CURRENT) common.set(_NAMESPACE, _MNEMONIC_SECRET, secret) common.set_uint8(_NAMESPACE, _BACKUP_TYPE, backup_type) common.set_true_or_delete(_NAMESPACE, _NO_BACKUP, no_backup) if not no_backup: common.set_true_or_delete(_NAMESPACE, _NEEDS_BACKUP, needs_backup)
def set_safety_check_level(level: StorageSafetyCheckLevel) -> None: if level not in (SAFETY_CHECK_LEVEL_STRICT, SAFETY_CHECK_LEVEL_PROMPT): raise ValueError common.set_uint8(_NAMESPACE, _SAFETY_CHECK_LEVEL, level)
def set_slip39_group_count(group_count: int) -> None: _require_progress() common.set_uint8(_NAMESPACE, _SLIP39_GROUP_COUNT, group_count)
def set_slip39_iteration_exponent(exponent: int) -> None: _require_progress() common.set_uint8(_NAMESPACE, _SLIP39_ITERATION_EXPONENT, exponent)