You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/mocks/generated/trezorconfig.pyi

102 lines
2.4 KiB

from typing import *
# extmod/modtrezorconfig/modtrezorconfig.c
def init(
ui_wait_callback: Callable[[int, int, str], bool] = None
) -> None:
"""
Initializes the storage. Must be called before any other method is
called from this module!
"""
# extmod/modtrezorconfig/modtrezorconfig.c
5 years ago
def unlock(pin: int) -> bool:
"""
Attempts to unlock the storage with given PIN. Returns True on
success, False on failure.
"""
# extmod/modtrezorconfig/modtrezorconfig.c
def check_pin(pin: int) -> bool:
"""
Check the given PIN. Returns True on success, False on failure.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def lock() -> None:
"""
5 years ago
Locks the storage.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def has_pin() -> bool:
"""
Returns True if storage has a configured PIN, False otherwise.
"""
# extmod/modtrezorconfig/modtrezorconfig.c
5 years ago
def get_pin_rem() -> int:
"""
5 years ago
Returns the number of remaining PIN entry attempts.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def change_pin(pin: int, newpin: int) -> bool:
"""
Change PIN. Returns True on success, False on failure.
"""
# extmod/modtrezorconfig/modtrezorconfig.c
def get(app: int, key: int, public: bool = False) -> bytes:
"""
5 years ago
Gets the value of the given key for the given app (or None if not set).
Raises a RuntimeError if decryption or authentication of the stored
value fails.
"""
# extmod/modtrezorconfig/modtrezorconfig.c
def set(app: int, key: int, value: bytes, public: bool = False) -> None:
"""
Sets a value of given key for given app.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def delete(app: int, key: int, public: bool = False) -> bool:
"""
5 years ago
Deletes the given key of the given app.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def set_counter(
app: int, key: int, count: int, writable_locked: bool = False
) -> bool:
"""
5 years ago
Sets the given key of the given app as a counter with the given value.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def next_counter(app: int, key: int, writable_locked: bool = False) -> bool:
"""
Increments the counter stored under the given key of the given app and
returns the new value.
"""
5 years ago
# extmod/modtrezorconfig/modtrezorconfig.c
def wipe() -> None:
"""
Erases the whole config. Use with caution!
"""