1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

mocks: regenerate

This commit is contained in:
Jan Pochyla 2017-06-12 18:02:32 +02:00
parent fbf7be27cd
commit e937afcce8
7 changed files with 31 additions and 37 deletions

View File

@ -12,13 +12,13 @@ def derive_path(path: list) -> None:
'''
# extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
def serialize_public() -> str:
def serialize_public(version: int) -> str:
'''
Serialize the public info from HD node to base58 string.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
def serialize_private() -> str:
def serialize_private(version: int) -> str:
'''
Serialize the private info HD node to base58 string.
'''

View File

@ -1,6 +1,6 @@
# extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
def deserialize(value: str) -> HDNode:
def deserialize(value:str, version_public: int, version_private: int) -> HDNode:
'''
Construct a BIP0032 HD node from a base58-serialized value.
'''

View File

@ -5,20 +5,8 @@ def blake2b(data: bytes=None, key: bytes=None) -> Blake2b:
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha3-256.h
def sha3_256(data: bytes=None) -> Sha3_256:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha512.h
def sha512(data: bytes=None) -> Sha512:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha256.h
def sha256(data: bytes=None) -> Sha256:
# extmod/modtrezorcrypto/modtrezorcrypto-blake2s.h
def blake2s(data: bytes=None, key: bytes=None) -> Blake2s:
'''
Creates a hash context object.
'''
@ -29,20 +17,32 @@ def ripemd160(data: bytes=None) -> Ripemd160:
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h
def sha3_512(data: bytes=None) -> Sha3_512:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha1.h
def sha1(data: bytes=None) -> Sha1:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-blake2s.h
def blake2s(data: bytes=None, key: bytes=None) -> Blake2s:
# extmod/modtrezorcrypto/modtrezorcrypto-sha256.h
def sha256(data: bytes=None) -> Sha256:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha3-256.h
def sha3_256(data: bytes=None) -> Sha3_256:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h
def sha3_512(data: bytes=None) -> Sha3_512:
'''
Creates a hash context object.
'''
# extmod/modtrezorcrypto/modtrezorcrypto-sha512.h
def sha512(data: bytes=None) -> Sha512:
'''
Creates a hash context object.
'''

View File

@ -1,6 +0,0 @@
# extmod/modtrezordebug/modtrezordebug.c
def memaccess(address: int, length: int) -> bytes:
'''
Creates a bytes object that can be used to access certain memory location.
'''

View File

@ -1,18 +1,18 @@
# extmod/modtrezormsg/modtrezormsg.c
def set_interfaces(ifaces: list/tuple) -> None:
def init_usb(usb_info, usb_ifaces) -> None:
'''
Configures USB interfaces with a list/tuple of (usage_page, ...)
Registers passed interfaces and initializes the USB stack
'''
# extmod/modtrezormsg/modtrezormsg.c
def get_interfaces() -> tuple:
def deinit_usb() -> None:
'''
Reads a tuple (of usage pages) of configured USB interfaces
Cleans up the USB stack
'''
# extmod/modtrezormsg/modtrezormsg.c
def send(usage_page: int, message: bytes) -> int:
def send(iface: int, message: bytes) -> int:
'''
Sends message using USB HID (device) or UDP (emulator).
'''

View File

@ -39,7 +39,7 @@ def icon(x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None:
'''
# extmod/modtrezorui/modtrezorui-display.h
def print(text: str, fgcolor: int, bgcolor: int) -> None:
def print(text: str) -> None:
'''
Renders text using 5x8 bitmap font (using special text mode)
'''