Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
def set_slip39_iteration_exponent(exponent: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_ITERATION_EXPONENT, exponent)
Пример #4
0
def set_slip39_group_count(group_count: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_COUNT, group_count)
Пример #5
0
def set_slip39_threshold(threshold: int) -> None:
    _require_progress()
    common.set_uint8(_NAMESPACE, _SLIP39_THRESHOLD, threshold)
Пример #6
0
def set_slip39_group_threshold(group_threshold: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_THRESHOLD, group_threshold)
Пример #7
0
def set_slip39_group_count(group_count: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_GROUP_COUNT, group_count)
Пример #8
0
def set_slip39_threshold(threshold: int) -> None:
    common.set_uint8(_NAMESPACE, _SLIP39_THRESHOLD, threshold)
Пример #9
0
def set_word_count(count: int) -> None:
    common.set_uint8(_NAMESPACE, _WORD_COUNT, count)