From dac0a252bde3dcd8c8554044474c352a8c43181b Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 18 Oct 2016 14:32:37 +0200 Subject: [PATCH] regenerate mocks --- mocks/trezor/config.py | 2 +- mocks/trezor/crypto/HDNode.py | 4 ++-- mocks/trezor/crypto/bip32.py | 6 ++++++ mocks/trezor/ui/display.py | 9 +-------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/mocks/trezor/config.py b/mocks/trezor/config.py index d9dc6f5d3..37033d5d4 100644 --- a/mocks/trezor/config.py +++ b/mocks/trezor/config.py @@ -6,7 +6,7 @@ def get(app: int, key: int) -> bytes: ''' # ../extmod/modtrezorconfig/modtrezorconfig.c -def set(app: int, key: int) -> bool: +def set(app: int, key: int, value: bytes) -> None: ''' Sets a value of given key for given app. Returns True on success. diff --git a/mocks/trezor/crypto/HDNode.py b/mocks/trezor/crypto/HDNode.py index cbd15a273..5065dd873 100644 --- a/mocks/trezor/crypto/HDNode.py +++ b/mocks/trezor/crypto/HDNode.py @@ -12,13 +12,13 @@ def derive_path(path: list) -> None: ''' # ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h -def serialize_public(version: int) -> str: +def serialize_public() -> str: ''' Serialize the public info from HD node to base58 string. ''' # ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h -def serialize_private(version: int) -> str: +def serialize_private() -> str: ''' Serialize the private info HD node to base58 string. ''' diff --git a/mocks/trezor/crypto/bip32.py b/mocks/trezor/crypto/bip32.py index e0b774ff7..9f09cad7c 100644 --- a/mocks/trezor/crypto/bip32.py +++ b/mocks/trezor/crypto/bip32.py @@ -1,4 +1,10 @@ +# ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h +def deserialize(value: str) -> HDNode: + ''' + Construct a BIP0032 HD node from a base58-serialized value. + ''' + # ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h def from_seed(seed: bytes, curve_name: str) -> HDNode: ''' diff --git a/mocks/trezor/ui/display.py b/mocks/trezor/ui/display.py index 94bf908fc..24ca48de1 100644 --- a/mocks/trezor/ui/display.py +++ b/mocks/trezor/ui/display.py @@ -24,13 +24,6 @@ def bar_radius(x: int, y: int, w: int, h: int, fgcolor: int, bgcolor: int=None, Background is set to bgcolor and corners are drawn with radius radius. ''' -# ../extmod/modtrezorui/modtrezorui-display.h -def blit(x: int, y: int, w: int, h: int, data: bytes) -> None: - ''' - Renders rectangle at position (x,y = upper left corner) with width w and height h with data. - The data needs to have the correct format. - ''' - # ../extmod/modtrezorui/modtrezorui-display.h def image(x: int, y: int, image: bytes) -> None: ''' @@ -111,7 +104,7 @@ def offset(xy: tuple=None) -> tuple: ''' # ../extmod/modtrezorui/modtrezorui-display.h -def raw(reg: int, data: bytes) -> None: +def raw(reg: int, data: bytes=None) -> None: ''' Performs a raw command on the display. Read the datasheet to learn more. '''