2017-06-14 17:27:02 +00:00
|
|
|
from typing import *
|
2017-06-14 15:41:45 +00:00
|
|
|
|
|
|
|
# extmod/modtrezorconfig/modtrezorconfig.c
|
2017-06-20 11:24:12 +00:00
|
|
|
def init(self) -> None:
|
2017-06-14 15:41:45 +00:00
|
|
|
'''
|
2017-06-20 11:24:12 +00:00
|
|
|
Initializes the storage. Must be called before any other method is called from this module!
|
2017-06-14 15:41:45 +00:00
|
|
|
'''
|
|
|
|
|
2017-06-20 11:24:12 +00:00
|
|
|
# extmod/modtrezorconfig/modtrezorconfig.c
|
|
|
|
def get(app: int, key: int) -> bytes:
|
|
|
|
'''
|
|
|
|
Gets a value of given key for given app (or empty bytes if not set).
|
|
|
|
'''
|
2017-06-14 15:41:45 +00:00
|
|
|
|
2017-06-20 11:24:12 +00:00
|
|
|
# extmod/modtrezorconfig/modtrezorconfig.c
|
|
|
|
def set(app: int, key: int, value: bytes) -> None:
|
|
|
|
'''
|
|
|
|
Sets a value of given key for given app.
|
|
|
|
'''
|
2017-06-14 15:41:45 +00:00
|
|
|
|
2017-06-20 11:24:12 +00:00
|
|
|
# extmod/modtrezorconfig/modtrezorconfig.c
|
|
|
|
def wipe(self) -> None:
|
|
|
|
'''
|
|
|
|
Erases the whole config. Use with caution!
|
|
|
|
'''
|