mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
tests: add partial pylint support
This commit is contained in:
parent
59421d4b3a
commit
845a3a7e0d
3
Makefile
3
Makefile
@ -47,6 +47,9 @@ test: ## run unit tests
|
|||||||
testpy: ## run selected unit tests from python-trezor
|
testpy: ## run selected unit tests from python-trezor
|
||||||
cd tests ; ./run_tests_python_trezor.sh
|
cd tests ; ./run_tests_python_trezor.sh
|
||||||
|
|
||||||
|
pylint: ## run pylint on application sources
|
||||||
|
pylint --rcfile=pylint.rc -E $(shell find src -name *.py)
|
||||||
|
|
||||||
## build commands:
|
## build commands:
|
||||||
|
|
||||||
build: build_boardloader build_bootloader build_firmware build_unix build_cross ## build all
|
build: build_boardloader build_bootloader build_firmware build_unix build_cross ## build all
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
def const(c):
|
def const(c):
|
||||||
pass
|
return c
|
||||||
|
|
||||||
def mem_info(verbose=None):
|
def mem_info(verbose=None):
|
||||||
pass
|
pass
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
def hexlify(data, sep=None):
|
def hexlify(data, sep=None):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def unhexlify(data):
|
def unhexlify(data):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def a2b_base64(data):
|
def a2b_base64(data):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def b2a_base64(data):
|
def b2a_base64(data):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
|
def crc32(data, crc=None):
|
||||||
|
return 0
|
||||||
|
37
mocks/uctypes.py
Normal file
37
mocks/uctypes.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
ARRAY = 0
|
||||||
|
NATIVE = 0
|
||||||
|
LITTLE_ENDIAN = 0
|
||||||
|
BIG_ENDIAN = 0
|
||||||
|
VOID = 0
|
||||||
|
UINT8 = 0
|
||||||
|
INT8 = 0
|
||||||
|
UINT16 = 0
|
||||||
|
INT16 = 0
|
||||||
|
UINT32 = 0
|
||||||
|
INT32 = 0
|
||||||
|
UINT64 = 0
|
||||||
|
INT64 = 0
|
||||||
|
BFUINT8 = 0
|
||||||
|
BFINT8 = 0
|
||||||
|
BFUINT16 = 0
|
||||||
|
BFINT16 = 0
|
||||||
|
BFUINT32 = 0
|
||||||
|
BFINT32 = 0
|
||||||
|
BF_POS = 0
|
||||||
|
BF_LEN = 0
|
||||||
|
FLOAT32 = 0
|
||||||
|
|
||||||
|
def struct(addr, descriptor, layout_type=NATIVE):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def sizeof(struct):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def addressof(obj):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def bytes_at(addr, size):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def bytearray_at(addr, size):
|
||||||
|
return 0
|
@ -1,14 +1,14 @@
|
|||||||
def calcsize(fmt):
|
def calcsize(fmt):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def pack(fmt, *args):
|
def pack(fmt, *args):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def pack_info(fmt, buffer, offset, *args):
|
def pack_info(fmt, buffer, offset, *args):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def unpack(fmt, data):
|
def unpack(fmt, data):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def unpack_from(fmt, data, offset=0):
|
def unpack_from(fmt, data, offset=0):
|
||||||
pass
|
return 0
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
def localtime(secs=None):
|
def localtime(secs=None):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def ticks_ms():
|
def ticks_ms():
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def mktime():
|
def mktime():
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def sleep(seconds):
|
def sleep(seconds):
|
||||||
pass
|
pass
|
||||||
@ -17,16 +17,19 @@ def sleep_us(us):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def ticks_ms():
|
def ticks_ms():
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def ticks_us():
|
def ticks_us():
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def ticks_cpu():
|
def ticks_cpu():
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
|
def ticks_add(ticks_in, delta_in):
|
||||||
|
return 0
|
||||||
|
|
||||||
def ticks_diff(old, new):
|
def ticks_diff(old, new):
|
||||||
pass
|
return 0
|
||||||
|
|
||||||
def time():
|
def time():
|
||||||
pass
|
return 0
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
from micropython import const
|
||||||
|
|
||||||
import uctypes
|
import uctypes
|
||||||
import ustruct
|
import ustruct
|
||||||
import utime
|
import utime
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
from micropython import const
|
||||||
|
|
||||||
import trezor.main
|
import trezor.main
|
||||||
from trezor import msg
|
from trezor import msg
|
||||||
from trezor import ui
|
from trezor import ui
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Address(p.MessageType):
|
class Address(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ApplySettings(p.MessageType):
|
class ApplySettings(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ButtonAck(p.MessageType):
|
class ButtonAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ButtonRequest(p.MessageType):
|
class ButtonRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
Other = const(1)
|
Other = const(1)
|
||||||
FeeOverThreshold = const(2)
|
FeeOverThreshold = const(2)
|
||||||
ConfirmOutput = const(3)
|
ConfirmOutput = const(3)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Cancel(p.MessageType):
|
class Cancel(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ChangePin(p.MessageType):
|
class ChangePin(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class CipherKeyValue(p.MessageType):
|
class CipherKeyValue(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class CipheredKeyValue(p.MessageType):
|
class CipheredKeyValue(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ClearSession(p.MessageType):
|
class ClearSession(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class CoinType(p.MessageType):
|
class CoinType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkDecision(p.MessageType):
|
class DebugLinkDecision(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkFlashErase(p.MessageType):
|
class DebugLinkFlashErase(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkGetState(p.MessageType):
|
class DebugLinkGetState(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkLog(p.MessageType):
|
class DebugLinkLog(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkMemory(p.MessageType):
|
class DebugLinkMemory(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkMemoryRead(p.MessageType):
|
class DebugLinkMemoryRead(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkMemoryWrite(p.MessageType):
|
class DebugLinkMemoryWrite(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodeType import HDNodeType
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DebugLinkStop(p.MessageType):
|
class DebugLinkStop(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DecryptMessage(p.MessageType):
|
class DecryptMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class DecryptedMessage(p.MessageType):
|
class DecryptedMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ECDHSessionKey(p.MessageType):
|
class ECDHSessionKey(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EncryptMessage(p.MessageType):
|
class EncryptMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EncryptedMessage(p.MessageType):
|
class EncryptedMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Entropy(p.MessageType):
|
class Entropy(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EntropyAck(p.MessageType):
|
class EntropyAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EntropyRequest(p.MessageType):
|
class EntropyRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EstimateTxSize(p.MessageType):
|
class EstimateTxSize(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EthereumAddress(p.MessageType):
|
class EthereumAddress(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EthereumGetAddress(p.MessageType):
|
class EthereumGetAddress(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EthereumSignTx(p.MessageType):
|
class EthereumSignTx(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EthereumTxAck(p.MessageType):
|
class EthereumTxAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class EthereumTxRequest(p.MessageType):
|
class EthereumTxRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Failure(p.MessageType):
|
class Failure(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
UnexpectedMessage = const(1)
|
UnexpectedMessage = const(1)
|
||||||
ButtonExpected = const(2)
|
ButtonExpected = const(2)
|
||||||
SyntaxError = const(3)
|
SyntaxError = const(3)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .CoinType import CoinType
|
from .CoinType import CoinType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class FirmwareErase(p.MessageType):
|
class FirmwareErase(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class FirmwareRequest(p.MessageType):
|
class FirmwareRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class FirmwareUpload(p.MessageType):
|
class FirmwareUpload(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .IdentityType import IdentityType
|
from .IdentityType import IdentityType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class GetEntropy(p.MessageType):
|
class GetEntropy(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class GetFeatures(p.MessageType):
|
class GetFeatures(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class GetPublicKey(p.MessageType):
|
class GetPublicKey(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodeType import HDNodeType
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class HDNodeType(p.MessageType):
|
class HDNodeType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class IdentityType(p.MessageType):
|
class IdentityType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Initialize(p.MessageType):
|
class Initialize(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
SPENDADDRESS = const(0)
|
SPENDADDRESS = const(0)
|
||||||
SPENDMULTISIG = const(1)
|
SPENDMULTISIG = const(1)
|
||||||
EXTERNAL = const(2)
|
EXTERNAL = const(2)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodeType import HDNodeType
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class MessageSignature(p.MessageType):
|
class MessageSignature(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
Initialize = const(0)
|
Initialize = const(0)
|
||||||
Ping = const(1)
|
Ping = const(1)
|
||||||
Success = const(2)
|
Success = const(2)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodePathType import HDNodePathType
|
from .HDNodePathType import HDNodePathType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
PAYTOADDRESS = const(0)
|
PAYTOADDRESS = const(0)
|
||||||
PAYTOSCRIPTHASH = const(1)
|
PAYTOSCRIPTHASH = const(1)
|
||||||
PAYTOMULTISIG = const(2)
|
PAYTOMULTISIG = const(2)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class PassphraseAck(p.MessageType):
|
class PassphraseAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class PassphraseRequest(p.MessageType):
|
class PassphraseRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class PinMatrixAck(p.MessageType):
|
class PinMatrixAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class PinMatrixRequest(p.MessageType):
|
class PinMatrixRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
Current = const(1)
|
Current = const(1)
|
||||||
NewFirst = const(2)
|
NewFirst = const(2)
|
||||||
NewSecond = const(3)
|
NewSecond = const(3)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Ping(p.MessageType):
|
class Ping(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodeType import HDNodeType
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class RecoveryDevice(p.MessageType):
|
class RecoveryDevice(p.MessageType):
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
ScrambledWords = const(0)
|
ScrambledWords = const(0)
|
||||||
Matrix = const(1)
|
Matrix = const(1)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
TXINPUT = const(0)
|
TXINPUT = const(0)
|
||||||
TXOUTPUT = const(1)
|
TXOUTPUT = const(1)
|
||||||
TXMETA = const(2)
|
TXMETA = const(2)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class ResetDevice(p.MessageType):
|
class ResetDevice(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class SetU2FCounter(p.MessageType):
|
class SetU2FCounter(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .IdentityType import IdentityType
|
from .IdentityType import IdentityType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class SignMessage(p.MessageType):
|
class SignMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class SignTx(p.MessageType):
|
class SignTx(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class SignedIdentity(p.MessageType):
|
class SignedIdentity(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .TxInputType import TxInputType
|
from .TxInputType import TxInputType
|
||||||
from .TxOutputType import TxOutputType
|
from .TxOutputType import TxOutputType
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .HDNodeType import HDNodeType
|
from .HDNodeType import HDNodeType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class Success(p.MessageType):
|
class Success(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .TxInputType import TxInputType
|
from .TxInputType import TxInputType
|
||||||
from .TxOutputBinType import TxOutputBinType
|
from .TxOutputBinType import TxOutputBinType
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .TransactionType import TransactionType
|
from .TransactionType import TransactionType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class TxOutputBinType(p.MessageType):
|
class TxOutputBinType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
from .TxRequestDetailsType import TxRequestDetailsType
|
from .TxRequestDetailsType import TxRequestDetailsType
|
||||||
from .TxRequestSerializedType import TxRequestSerializedType
|
from .TxRequestSerializedType import TxRequestSerializedType
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class TxRequestDetailsType(p.MessageType):
|
class TxRequestDetailsType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class TxRequestSerializedType(p.MessageType):
|
class TxRequestSerializedType(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class TxSize(p.MessageType):
|
class TxSize(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class VerifyMessage(p.MessageType):
|
class VerifyMessage(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class WipeDevice(p.MessageType):
|
class WipeDevice(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class WordAck(p.MessageType):
|
class WordAck(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
import protobuf as p
|
import protobuf as p
|
||||||
|
|
||||||
class WordRequest(p.MessageType):
|
class WordRequest(p.MessageType):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
Plain = const(0)
|
Plain = const(0)
|
||||||
Matrix9 = const(1)
|
Matrix9 = const(1)
|
||||||
Matrix6 = const(2)
|
Matrix6 = const(2)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
WordRequest = const(46)
|
WordRequest = const(46)
|
||||||
DebugLinkMemoryWrite = const(112)
|
DebugLinkMemoryWrite = const(112)
|
||||||
ButtonAck = const(27)
|
ButtonAck = const(27)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
from micropython import const
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import math
|
import math
|
||||||
import utime
|
import utime
|
||||||
|
@ -2,7 +2,7 @@ from micropython import const
|
|||||||
from trezor import ui, res
|
from trezor import ui, res
|
||||||
from trezor.crypto import random
|
from trezor.crypto import random
|
||||||
from trezor.ui import display
|
from trezor.ui import display
|
||||||
from treozr.ui.button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
from trezor.ui.button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
||||||
|
|
||||||
|
|
||||||
def digit_area(i):
|
def digit_area(i):
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user