1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-15 18:00:59 +00:00

src/trezor/messages: regenerate messages

This commit is contained in:
Pavol Rusnak 2018-05-24 15:41:57 +02:00
parent 7b06a802bb
commit 5885cb867e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
149 changed files with 853 additions and 1040 deletions

View File

@ -3,15 +3,13 @@ import protobuf as p
class Address(p.MessageType):
MESSAGE_WIRE_TYPE = 30
FIELDS = {
1: ('address', p.UnicodeType, 0), # required
}
MESSAGE_WIRE_TYPE = 30
def __init__(
self,
address: str = None,
**kwargs,
):
address: str = None
) -> None:
self.address = address
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class ApplyFlags(p.MessageType):
MESSAGE_WIRE_TYPE = 28
FIELDS = {
1: ('flags', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 28
def __init__(
self,
flags: int = None,
**kwargs,
):
flags: int = None
) -> None:
self.flags = flags
p.MessageType.__init__(self, **kwargs)

View File

@ -3,6 +3,7 @@ import protobuf as p
class ApplySettings(p.MessageType):
MESSAGE_WIRE_TYPE = 25
FIELDS = {
1: ('language', p.UnicodeType, 0),
2: ('label', p.UnicodeType, 0),
@ -11,7 +12,6 @@ class ApplySettings(p.MessageType):
5: ('passphrase_source', p.UVarintType, 0),
6: ('auto_lock_delay_ms', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 25
def __init__(
self,
@ -20,13 +20,11 @@ class ApplySettings(p.MessageType):
use_passphrase: bool = None,
homescreen: bytes = None,
passphrase_source: int = None,
auto_lock_delay_ms: int = None,
**kwargs,
):
auto_lock_delay_ms: int = None
) -> None:
self.language = language
self.label = label
self.use_passphrase = use_passphrase
self.homescreen = homescreen
self.passphrase_source = passphrase_source
self.auto_lock_delay_ms = auto_lock_delay_ms
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class BackupDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 34
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class ButtonAck(p.MessageType):
MESSAGE_WIRE_TYPE = 27
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class ButtonRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 26
FIELDS = {
1: ('code', p.UVarintType, 0),
2: ('data', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 26
def __init__(
self,
code: int = None,
data: str = None,
**kwargs,
):
data: str = None
) -> None:
self.code = code
self.data = data
p.MessageType.__init__(self, **kwargs)

View File

@ -1,17 +1,15 @@
# Automatically generated by pb2py
from micropython import const
Other = const(1)
FeeOverThreshold = const(2)
ConfirmOutput = const(3)
ResetDevice = const(4)
ConfirmWord = const(5)
WipeDevice = const(6)
ProtectCall = const(7)
SignTx = const(8)
FirmwareCheck = const(9)
Address = const(10)
PublicKey = const(11)
MnemonicWordCount = const(12)
MnemonicInput = const(13)
PassphraseType = const(14)
Other = 1
FeeOverThreshold = 2
ConfirmOutput = 3
ResetDevice = 4
ConfirmWord = 5
WipeDevice = 6
ProtectCall = 7
SignTx = 8
FirmwareCheck = 9
Address = 10
PublicKey = 11
MnemonicWordCount = 12
MnemonicInput = 13
PassphraseType = 14

View File

@ -4,9 +4,3 @@ import protobuf as p
class Cancel(p.MessageType):
MESSAGE_WIRE_TYPE = 20
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class ChangePin(p.MessageType):
MESSAGE_WIRE_TYPE = 4
FIELDS = {
1: ('remove', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 4
def __init__(
self,
remove: bool = None,
**kwargs,
):
remove: bool = None
) -> None:
self.remove = remove
p.MessageType.__init__(self, **kwargs)

View File

@ -1,8 +1,14 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class CipherKeyValue(p.MessageType):
MESSAGE_WIRE_TYPE = 23
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('key', p.UnicodeType, 0),
@ -12,24 +18,21 @@ class CipherKeyValue(p.MessageType):
6: ('ask_on_decrypt', p.BoolType, 0),
7: ('iv', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 23
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
key: str = None,
value: bytes = None,
encrypt: bool = None,
ask_on_encrypt: bool = None,
ask_on_decrypt: bool = None,
iv: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
iv: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.key = key
self.value = value
self.encrypt = encrypt
self.ask_on_encrypt = ask_on_encrypt
self.ask_on_decrypt = ask_on_decrypt
self.iv = iv
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class CipheredKeyValue(p.MessageType):
MESSAGE_WIRE_TYPE = 48
FIELDS = {
1: ('value', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 48
def __init__(
self,
value: bytes = None,
**kwargs,
):
value: bytes = None
) -> None:
self.value = value
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class ClearSession(p.MessageType):
MESSAGE_WIRE_TYPE = 24
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class CosiCommit(p.MessageType):
MESSAGE_WIRE_TYPE = 71
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 71
def __init__(
self,
address_n: list = None,
data: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
data: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.data = data
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class CosiCommitment(p.MessageType):
MESSAGE_WIRE_TYPE = 72
FIELDS = {
1: ('commitment', p.BytesType, 0),
2: ('pubkey', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 72
def __init__(
self,
commitment: bytes = None,
pubkey: bytes = None,
**kwargs,
):
pubkey: bytes = None
) -> None:
self.commitment = commitment
self.pubkey = pubkey
p.MessageType.__init__(self, **kwargs)

View File

@ -1,26 +1,29 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class CosiSign(p.MessageType):
MESSAGE_WIRE_TYPE = 73
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('data', p.BytesType, 0),
3: ('global_commitment', p.BytesType, 0),
4: ('global_pubkey', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 73
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
data: bytes = None,
global_commitment: bytes = None,
global_pubkey: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
global_pubkey: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.data = data
self.global_commitment = global_commitment
self.global_pubkey = global_pubkey
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class CosiSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 74
FIELDS = {
1: ('signature', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 74
def __init__(
self,
signature: bytes = None,
**kwargs,
):
signature: bytes = None
) -> None:
self.signature = signature
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class DebugLinkDecision(p.MessageType):
MESSAGE_WIRE_TYPE = 100
FIELDS = {
1: ('yes_no', p.BoolType, 0),
2: ('up_down', p.BoolType, 0),
3: ('input', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 100
def __init__(
self,
yes_no: bool = None,
up_down: bool = None,
input: str = None,
**kwargs,
):
input: str = None
) -> None:
self.yes_no = yes_no
self.up_down = up_down
self.input = input
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class DebugLinkFlashErase(p.MessageType):
MESSAGE_WIRE_TYPE = 113
FIELDS = {
1: ('sector', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 113
def __init__(
self,
sector: int = None,
**kwargs,
):
sector: int = None
) -> None:
self.sector = sector
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class DebugLinkGetState(p.MessageType):
MESSAGE_WIRE_TYPE = 101
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class DebugLinkLog(p.MessageType):
MESSAGE_WIRE_TYPE = 104
FIELDS = {
1: ('level', p.UVarintType, 0),
2: ('bucket', p.UnicodeType, 0),
3: ('text', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 104
def __init__(
self,
level: int = None,
bucket: str = None,
text: str = None,
**kwargs,
):
text: str = None
) -> None:
self.level = level
self.bucket = bucket
self.text = text
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class DebugLinkMemory(p.MessageType):
MESSAGE_WIRE_TYPE = 111
FIELDS = {
1: ('memory', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 111
def __init__(
self,
memory: bytes = None,
**kwargs,
):
memory: bytes = None
) -> None:
self.memory = memory
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class DebugLinkMemoryRead(p.MessageType):
MESSAGE_WIRE_TYPE = 110
FIELDS = {
1: ('address', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 110
def __init__(
self,
address: int = None,
length: int = None,
**kwargs,
):
length: int = None
) -> None:
self.address = address
self.length = length
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class DebugLinkMemoryWrite(p.MessageType):
MESSAGE_WIRE_TYPE = 112
FIELDS = {
1: ('address', p.UVarintType, 0),
2: ('memory', p.BytesType, 0),
3: ('flash', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 112
def __init__(
self,
address: int = None,
memory: bytes = None,
flash: bool = None,
**kwargs,
):
flash: bool = None
) -> None:
self.address = address
self.memory = memory
self.flash = flash
p.MessageType.__init__(self, **kwargs)

View File

@ -4,6 +4,7 @@ from .HDNodeType import HDNodeType
class DebugLinkState(p.MessageType):
MESSAGE_WIRE_TYPE = 102
FIELDS = {
1: ('layout', p.BytesType, 0),
2: ('pin', p.UnicodeType, 0),
@ -17,7 +18,6 @@ class DebugLinkState(p.MessageType):
10: ('recovery_word_pos', p.UVarintType, 0),
11: ('reset_word_pos', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 102
def __init__(
self,
@ -31,9 +31,8 @@ class DebugLinkState(p.MessageType):
reset_entropy: bytes = None,
recovery_fake_word: str = None,
recovery_word_pos: int = None,
reset_word_pos: int = None,
**kwargs,
):
reset_word_pos: int = None
) -> None:
self.layout = layout
self.pin = pin
self.matrix = matrix
@ -45,4 +44,3 @@ class DebugLinkState(p.MessageType):
self.recovery_fake_word = recovery_fake_word
self.recovery_word_pos = recovery_word_pos
self.reset_word_pos = reset_word_pos
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class DebugLinkStop(p.MessageType):
MESSAGE_WIRE_TYPE = 103
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -1,26 +1,29 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class DecryptMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 51
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('nonce', p.BytesType, 0),
3: ('message', p.BytesType, 0),
4: ('hmac', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 51
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
nonce: bytes = None,
message: bytes = None,
hmac: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
hmac: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.nonce = nonce
self.message = message
self.hmac = hmac
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class DecryptedMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 52
FIELDS = {
1: ('message', p.BytesType, 0),
2: ('address', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 52
def __init__(
self,
message: bytes = None,
address: str = None,
**kwargs,
):
address: str = None
) -> None:
self.message = message
self.address = address
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class ECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 62
FIELDS = {
1: ('session_key', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 62
def __init__(
self,
session_key: bytes = None,
**kwargs,
):
session_key: bytes = None
) -> None:
self.session_key = session_key
p.MessageType.__init__(self, **kwargs)

View File

@ -1,8 +1,14 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class EncryptMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 49
FIELDS = {
1: ('pubkey', p.BytesType, 0),
2: ('message', p.BytesType, 0),
@ -10,20 +16,17 @@ class EncryptMessage(p.MessageType):
4: ('address_n', p.UVarintType, p.FLAG_REPEATED),
5: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
}
MESSAGE_WIRE_TYPE = 49
def __init__(
self,
pubkey: bytes = None,
message: bytes = None,
display_only: bool = None,
address_n: list = None,
coin_name: str = None,
**kwargs,
):
address_n: List[int] = None,
coin_name: str = None
) -> None:
self.pubkey = pubkey
self.message = message
self.display_only = display_only
self.address_n = [] if address_n is None else address_n
self.address_n = address_n if address_n is not None else []
self.coin_name = coin_name
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class EncryptedMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 50
FIELDS = {
1: ('nonce', p.BytesType, 0),
2: ('message', p.BytesType, 0),
3: ('hmac', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 50
def __init__(
self,
nonce: bytes = None,
message: bytes = None,
hmac: bytes = None,
**kwargs,
):
hmac: bytes = None
) -> None:
self.nonce = nonce
self.message = message
self.hmac = hmac
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class Entropy(p.MessageType):
MESSAGE_WIRE_TYPE = 10
FIELDS = {
1: ('entropy', p.BytesType, 0), # required
}
MESSAGE_WIRE_TYPE = 10
def __init__(
self,
entropy: bytes = None,
**kwargs,
):
entropy: bytes = None
) -> None:
self.entropy = entropy
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class EntropyAck(p.MessageType):
MESSAGE_WIRE_TYPE = 36
FIELDS = {
1: ('entropy', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 36
def __init__(
self,
entropy: bytes = None,
**kwargs,
):
entropy: bytes = None
) -> None:
self.entropy = entropy
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class EntropyRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 35
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class EstimateTxSize(p.MessageType):
MESSAGE_WIRE_TYPE = 43
FIELDS = {
1: ('outputs_count', p.UVarintType, 0), # required
2: ('inputs_count', p.UVarintType, 0), # required
3: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
}
MESSAGE_WIRE_TYPE = 43
def __init__(
self,
outputs_count: int = None,
inputs_count: int = None,
coin_name: str = None,
**kwargs,
):
coin_name: str = None
) -> None:
self.outputs_count = outputs_count
self.inputs_count = inputs_count
self.coin_name = coin_name
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class EthereumAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 57
FIELDS = {
1: ('address', p.BytesType, 0), # required
}
MESSAGE_WIRE_TYPE = 57
def __init__(
self,
address: bytes = None,
**kwargs,
):
address: bytes = None
) -> None:
self.address = address
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class EthereumGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 56
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 56
def __init__(
self,
address_n: list = None,
show_display: bool = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
show_display: bool = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class EthereumMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 66
FIELDS = {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 66
def __init__(
self,
address: bytes = None,
signature: bytes = None,
**kwargs,
):
signature: bytes = None
) -> None:
self.address = address
self.signature = signature
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class EthereumSignMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 64
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), # required
}
MESSAGE_WIRE_TYPE = 64
def __init__(
self,
address_n: list = None,
message: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
message: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.message = message
p.MessageType.__init__(self, **kwargs)

View File

@ -1,8 +1,14 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class EthereumSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 58
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('nonce', p.BytesType, 0),
@ -15,11 +21,10 @@ class EthereumSignTx(p.MessageType):
9: ('chain_id', p.UVarintType, 0),
10: ('tx_type', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 58
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
nonce: bytes = None,
gas_price: bytes = None,
gas_limit: bytes = None,
@ -28,10 +33,9 @@ class EthereumSignTx(p.MessageType):
data_initial_chunk: bytes = None,
data_length: int = None,
chain_id: int = None,
tx_type: int = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
tx_type: int = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.nonce = nonce
self.gas_price = gas_price
self.gas_limit = gas_limit
@ -41,4 +45,3 @@ class EthereumSignTx(p.MessageType):
self.data_length = data_length
self.chain_id = chain_id
self.tx_type = tx_type
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class EthereumTxAck(p.MessageType):
MESSAGE_WIRE_TYPE = 60
FIELDS = {
1: ('data_chunk', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 60
def __init__(
self,
data_chunk: bytes = None,
**kwargs,
):
data_chunk: bytes = None
) -> None:
self.data_chunk = data_chunk
p.MessageType.__init__(self, **kwargs)

View File

@ -3,24 +3,22 @@ import protobuf as p
class EthereumTxRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 59
FIELDS = {
1: ('data_length', p.UVarintType, 0),
2: ('signature_v', p.UVarintType, 0),
3: ('signature_r', p.BytesType, 0),
4: ('signature_s', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 59
def __init__(
self,
data_length: int = None,
signature_v: int = None,
signature_r: bytes = None,
signature_s: bytes = None,
**kwargs,
):
signature_s: bytes = None
) -> None:
self.data_length = data_length
self.signature_v = signature_v
self.signature_r = signature_r
self.signature_s = signature_s
p.MessageType.__init__(self, **kwargs)

View File

@ -3,21 +3,19 @@ import protobuf as p
class EthereumVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 65
FIELDS = {
1: ('address', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 65
def __init__(
self,
address: bytes = None,
signature: bytes = None,
message: bytes = None,
**kwargs,
):
message: bytes = None
) -> None:
self.address = address
self.signature = signature
self.message = message
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class Failure(p.MessageType):
MESSAGE_WIRE_TYPE = 3
FIELDS = {
1: ('code', p.UVarintType, 0),
2: ('message', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 3
def __init__(
self,
code: int = None,
message: str = None,
**kwargs,
):
message: str = None
) -> None:
self.code = code
self.message = message
p.MessageType.__init__(self, **kwargs)

View File

@ -1,16 +1,14 @@
# Automatically generated by pb2py
from micropython import const
UnexpectedMessage = const(1)
ButtonExpected = const(2)
DataError = const(3)
ActionCancelled = const(4)
PinExpected = const(5)
PinCancelled = const(6)
PinInvalid = const(7)
InvalidSignature = const(8)
ProcessError = const(9)
NotEnoughFunds = const(10)
NotInitialized = const(11)
PinMismatch = const(12)
FirmwareError = const(99)
UnexpectedMessage = 1
ButtonExpected = 2
DataError = 3
ActionCancelled = 4
PinExpected = 5
PinCancelled = 6
PinInvalid = 7
InvalidSignature = 8
ProcessError = 9
NotEnoughFunds = 10
NotInitialized = 11
PinMismatch = 12
FirmwareError = 99

View File

@ -3,6 +3,7 @@ import protobuf as p
class Features(p.MessageType):
MESSAGE_WIRE_TYPE = 17
FIELDS = {
1: ('vendor', p.UnicodeType, 0),
2: ('major_version', p.UVarintType, 0),
@ -31,7 +32,6 @@ class Features(p.MessageType):
26: ('fw_vendor_keys', p.BytesType, 0),
27: ('unfinished_backup', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 17
def __init__(
self,
@ -60,9 +60,8 @@ class Features(p.MessageType):
fw_patch: int = None,
fw_vendor: str = None,
fw_vendor_keys: bytes = None,
unfinished_backup: bool = None,
**kwargs,
):
unfinished_backup: bool = None
) -> None:
self.vendor = vendor
self.major_version = major_version
self.minor_version = minor_version
@ -89,4 +88,3 @@ class Features(p.MessageType):
self.fw_vendor = fw_vendor
self.fw_vendor_keys = fw_vendor_keys
self.unfinished_backup = unfinished_backup
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class FirmwareErase(p.MessageType):
MESSAGE_WIRE_TYPE = 6
FIELDS = {
1: ('length', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 6
def __init__(
self,
length: int = None,
**kwargs,
):
length: int = None
) -> None:
self.length = length
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class FirmwareRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 8
FIELDS = {
1: ('offset', p.UVarintType, 0),
2: ('length', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 8
def __init__(
self,
offset: int = None,
length: int = None,
**kwargs,
):
length: int = None
) -> None:
self.offset = offset
self.length = length
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class FirmwareUpload(p.MessageType):
MESSAGE_WIRE_TYPE = 7
FIELDS = {
1: ('payload', p.BytesType, 0), # required
2: ('hash', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 7
def __init__(
self,
payload: bytes = None,
hash: bytes = None,
**kwargs,
):
hash: bytes = None
) -> None:
self.payload = payload
self.hash = hash
p.MessageType.__init__(self, **kwargs)

View File

@ -1,9 +1,15 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .MultisigRedeemScriptType import MultisigRedeemScriptType
class GetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 29
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
@ -11,20 +17,17 @@ class GetAddress(p.MessageType):
4: ('multisig', MultisigRedeemScriptType, 0),
5: ('script_type', p.UVarintType, 0), # default=0
}
MESSAGE_WIRE_TYPE = 29
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
coin_name: str = None,
show_display: bool = None,
multisig: MultisigRedeemScriptType = None,
script_type: int = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
script_type: int = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.coin_name = coin_name
self.show_display = show_display
self.multisig = multisig
self.script_type = script_type
p.MessageType.__init__(self, **kwargs)

View File

@ -4,21 +4,19 @@ from .IdentityType import IdentityType
class GetECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 61
FIELDS = {
1: ('identity', IdentityType, 0),
2: ('peer_public_key', p.BytesType, 0),
3: ('ecdsa_curve_name', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 61
def __init__(
self,
identity: IdentityType = None,
peer_public_key: bytes = None,
ecdsa_curve_name: str = None,
**kwargs,
):
ecdsa_curve_name: str = None
) -> None:
self.identity = identity
self.peer_public_key = peer_public_key
self.ecdsa_curve_name = ecdsa_curve_name
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class GetEntropy(p.MessageType):
MESSAGE_WIRE_TYPE = 9
FIELDS = {
1: ('size', p.UVarintType, 0), # required
}
MESSAGE_WIRE_TYPE = 9
def __init__(
self,
size: int = None,
**kwargs,
):
size: int = None
) -> None:
self.size = size
p.MessageType.__init__(self, **kwargs)

View File

@ -4,9 +4,3 @@ import protobuf as p
class GetFeatures(p.MessageType):
MESSAGE_WIRE_TYPE = 55
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -1,26 +1,29 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class GetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 11
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('ecdsa_curve_name', p.UnicodeType, 0),
3: ('show_display', p.BoolType, 0),
4: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
}
MESSAGE_WIRE_TYPE = 11
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
ecdsa_curve_name: str = None,
show_display: bool = None,
coin_name: str = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
coin_name: str = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.ecdsa_curve_name = ecdsa_curve_name
self.show_display = show_display
self.coin_name = coin_name
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .HDNodeType import HDNodeType
@ -12,9 +17,7 @@ class HDNodePathType(p.MessageType):
def __init__(
self,
node: HDNodeType = None,
address_n: list = None,
**kwargs,
):
address_n: List[int] = None
) -> None:
self.node = node
self.address_n = [] if address_n is None else address_n
p.MessageType.__init__(self, **kwargs)
self.address_n = address_n if address_n is not None else []

View File

@ -19,13 +19,11 @@ class HDNodeType(p.MessageType):
child_num: int = None,
chain_code: bytes = None,
private_key: bytes = None,
public_key: bytes = None,
**kwargs,
):
public_key: bytes = None
) -> None:
self.depth = depth
self.fingerprint = fingerprint
self.child_num = child_num
self.chain_code = chain_code
self.private_key = private_key
self.public_key = public_key
p.MessageType.__init__(self, **kwargs)

View File

@ -19,13 +19,11 @@ class IdentityType(p.MessageType):
host: str = None,
port: str = None,
path: str = None,
index: int = None,
**kwargs,
):
index: int = None
) -> None:
self.proto = proto
self.user = user
self.host = host
self.port = port
self.path = path
self.index = index
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class Initialize(p.MessageType):
MESSAGE_WIRE_TYPE = 0
FIELDS = {
1: ('state', p.BytesType, 0),
2: ('skip_passphrase', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 0
def __init__(
self,
state: bytes = None,
skip_passphrase: bool = None,
**kwargs,
):
skip_passphrase: bool = None
) -> None:
self.state = state
self.skip_passphrase = skip_passphrase
p.MessageType.__init__(self, **kwargs)

View File

@ -1,8 +1,6 @@
# Automatically generated by pb2py
from micropython import const
SPENDADDRESS = const(0)
SPENDMULTISIG = const(1)
EXTERNAL = const(2)
SPENDWITNESS = const(3)
SPENDP2SHWITNESS = const(4)
SPENDADDRESS = 0
SPENDMULTISIG = 1
EXTERNAL = 2
SPENDWITNESS = 3
SPENDP2SHWITNESS = 4

View File

@ -3,15 +3,13 @@ import protobuf as p
class LiskAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 115
FIELDS = {
1: ('address', p.UnicodeType, 0),
}
MESSAGE_WIRE_TYPE = 115
def __init__(
self,
address: str = None,
**kwargs,
):
address: str = None
) -> None:
self.address = address
p.MessageType.__init__(self, **kwargs)

View File

@ -9,8 +9,6 @@ class LiskDelegateType(p.MessageType):
def __init__(
self,
username: str = None,
**kwargs,
):
username: str = None
) -> None:
self.username = username
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class LiskGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 114
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 114
def __init__(
self,
address_n: list = None,
show_display: bool = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
show_display: bool = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class LiskGetPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 121
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('show_display', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 121
def __init__(
self,
address_n: list = None,
show_display: bool = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
show_display: bool = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class LiskMultisignatureType(p.MessageType):
@ -13,10 +18,8 @@ class LiskMultisignatureType(p.MessageType):
self,
min: int = None,
life_time: int = None,
keys_group: list = None,
**kwargs,
):
keys_group: List[str] = None
) -> None:
self.min = min
self.life_time = life_time
self.keys_group = [] if keys_group is None else keys_group
p.MessageType.__init__(self, **kwargs)
self.keys_group = keys_group if keys_group is not None else []

View File

@ -3,15 +3,13 @@ import protobuf as p
class LiskPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 122
FIELDS = {
1: ('public_key', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 122
def __init__(
self,
public_key: bytes = None,
**kwargs,
):
public_key: bytes = None
) -> None:
self.public_key = public_key
p.MessageType.__init__(self, **kwargs)

View File

@ -1,21 +1,24 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .LiskTransactionCommon import LiskTransactionCommon
class LiskSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 116
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('transaction', LiskTransactionCommon, 0),
}
MESSAGE_WIRE_TYPE = 116
def __init__(
self,
address_n: list = None,
transaction: LiskTransactionCommon = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
address_n: List[int] = None,
transaction: LiskTransactionCommon = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.transaction = transaction
p.MessageType.__init__(self, **kwargs)

View File

@ -9,8 +9,6 @@ class LiskSignatureType(p.MessageType):
def __init__(
self,
public_key: bytes = None,
**kwargs,
):
public_key: bytes = None
) -> None:
self.public_key = public_key
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class LiskSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 117
FIELDS = {
1: ('signature', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 117
def __init__(
self,
signature: bytes = None,
**kwargs,
):
signature: bytes = None
) -> None:
self.signature = signature
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .LiskDelegateType import LiskDelegateType
from .LiskMultisignatureType import LiskMultisignatureType
from .LiskSignatureType import LiskSignatureType
@ -18,14 +23,12 @@ class LiskTransactionAsset(p.MessageType):
self,
signature: LiskSignatureType = None,
delegate: LiskDelegateType = None,
votes: list = None,
votes: List[str] = None,
multisignature: LiskMultisignatureType = None,
data: str = None,
**kwargs,
):
data: str = None
) -> None:
self.signature = signature
self.delegate = delegate
self.votes = [] if votes is None else votes
self.votes = votes if votes is not None else []
self.multisignature = multisignature
self.data = data
p.MessageType.__init__(self, **kwargs)

View File

@ -26,9 +26,8 @@ class LiskTransactionCommon(p.MessageType):
requester_public_key: bytes = None,
signature: bytes = None,
timestamp: int = None,
asset: LiskTransactionAsset = None,
**kwargs,
):
asset: LiskTransactionAsset = None
) -> None:
self.type = type
self.amount = amount
self.fee = fee
@ -38,4 +37,3 @@ class LiskTransactionCommon(p.MessageType):
self.signature = signature
self.timestamp = timestamp
self.asset = asset
p.MessageType.__init__(self, **kwargs)

View File

@ -1,11 +1,9 @@
# Automatically generated by pb2py
from micropython import const
Transfer = const(0)
RegisterSecondPassphrase = const(1)
RegisterDelegate = const(2)
CastVotes = const(3)
RegisterMultisignatureAccount = const(4)
CreateDapp = const(5)
TransferIntoDapp = const(6)
TransferOutOfDapp = const(7)
Transfer = 0
RegisterSecondPassphrase = 1
RegisterDelegate = 2
CastVotes = 3
RegisterMultisignatureAccount = 4
CreateDapp = 5
TransferIntoDapp = 6
TransferOutOfDapp = 7

View File

@ -4,6 +4,7 @@ from .HDNodeType import HDNodeType
class LoadDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 13
FIELDS = {
1: ('mnemonic', p.UnicodeType, 0),
2: ('node', HDNodeType, 0),
@ -14,7 +15,6 @@ class LoadDevice(p.MessageType):
7: ('skip_checksum', p.BoolType, 0),
8: ('u2f_counter', p.UVarintType, 0),
}
MESSAGE_WIRE_TYPE = 13
def __init__(
self,
@ -25,9 +25,8 @@ class LoadDevice(p.MessageType):
language: str = None,
label: str = None,
skip_checksum: bool = None,
u2f_counter: int = None,
**kwargs,
):
u2f_counter: int = None
) -> None:
self.mnemonic = mnemonic
self.node = node
self.pin = pin
@ -36,4 +35,3 @@ class LoadDevice(p.MessageType):
self.label = label
self.skip_checksum = skip_checksum
self.u2f_counter = u2f_counter
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class MessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 40
FIELDS = {
1: ('address', p.UnicodeType, 0),
2: ('signature', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 40
def __init__(
self,
address: str = None,
signature: bytes = None,
**kwargs,
):
signature: bytes = None
) -> None:
self.address = address
self.signature = signature
p.MessageType.__init__(self, **kwargs)

View File

@ -1,110 +1,108 @@
# Automatically generated by pb2py
from micropython import const
Initialize = const(0)
Ping = const(1)
Success = const(2)
Failure = const(3)
ChangePin = const(4)
WipeDevice = const(5)
FirmwareErase = const(6)
FirmwareUpload = const(7)
FirmwareRequest = const(8)
GetEntropy = const(9)
Entropy = const(10)
GetPublicKey = const(11)
PublicKey = const(12)
LoadDevice = const(13)
ResetDevice = const(14)
SignTx = const(15)
SimpleSignTx = const(16)
Features = const(17)
PinMatrixRequest = const(18)
PinMatrixAck = const(19)
Cancel = const(20)
TxRequest = const(21)
TxAck = const(22)
CipherKeyValue = const(23)
ClearSession = const(24)
ApplySettings = const(25)
ButtonRequest = const(26)
ButtonAck = const(27)
ApplyFlags = const(28)
GetAddress = const(29)
Address = const(30)
SelfTest = const(32)
BackupDevice = const(34)
EntropyRequest = const(35)
EntropyAck = const(36)
SignMessage = const(38)
VerifyMessage = const(39)
MessageSignature = const(40)
PassphraseRequest = const(41)
PassphraseAck = const(42)
PassphraseStateRequest = const(77)
PassphraseStateAck = const(78)
EstimateTxSize = const(43)
TxSize = const(44)
RecoveryDevice = const(45)
WordRequest = const(46)
WordAck = const(47)
CipheredKeyValue = const(48)
EncryptMessage = const(49)
EncryptedMessage = const(50)
DecryptMessage = const(51)
DecryptedMessage = const(52)
SignIdentity = const(53)
SignedIdentity = const(54)
GetFeatures = const(55)
EthereumGetAddress = const(56)
EthereumAddress = const(57)
EthereumSignTx = const(58)
EthereumTxRequest = const(59)
EthereumTxAck = const(60)
GetECDHSessionKey = const(61)
ECDHSessionKey = const(62)
SetU2FCounter = const(63)
EthereumSignMessage = const(64)
EthereumVerifyMessage = const(65)
EthereumMessageSignature = const(66)
NEMGetAddress = const(67)
NEMAddress = const(68)
NEMSignTx = const(69)
NEMSignedTx = const(70)
CosiCommit = const(71)
CosiCommitment = const(72)
CosiSign = const(73)
CosiSignature = const(74)
NEMDecryptMessage = const(75)
NEMDecryptedMessage = const(76)
DebugLinkDecision = const(100)
DebugLinkGetState = const(101)
DebugLinkState = const(102)
DebugLinkStop = const(103)
DebugLinkLog = const(104)
DebugLinkMemoryRead = const(110)
DebugLinkMemory = const(111)
DebugLinkMemoryWrite = const(112)
DebugLinkFlashErase = const(113)
LiskGetAddress = const(114)
LiskAddress = const(115)
LiskSignTx = const(116)
LiskSignedTx = const(117)
LiskGetPublicKey = const(121)
LiskPublicKey = const(122)
StellarGetPublicKey = const(200)
StellarPublicKey = const(201)
StellarSignTx = const(202)
StellarTxOpRequest = const(203)
StellarCreateAccountOp = const(210)
StellarPaymentOp = const(211)
StellarPathPaymentOp = const(212)
StellarManageOfferOp = const(213)
StellarCreatePassiveOfferOp = const(214)
StellarSetOptionsOp = const(215)
StellarChangeTrustOp = const(216)
StellarAllowTrustOp = const(217)
StellarAccountMergeOp = const(218)
StellarManageDataOp = const(220)
StellarBumpSequenceOp = const(221)
StellarSignedTx = const(230)
Initialize = 0
Ping = 1
Success = 2
Failure = 3
ChangePin = 4
WipeDevice = 5
FirmwareErase = 6
FirmwareUpload = 7
FirmwareRequest = 8
GetEntropy = 9
Entropy = 10
GetPublicKey = 11
PublicKey = 12
LoadDevice = 13
ResetDevice = 14
SignTx = 15
SimpleSignTx = 16
Features = 17
PinMatrixRequest = 18
PinMatrixAck = 19
Cancel = 20
TxRequest = 21
TxAck = 22
CipherKeyValue = 23
ClearSession = 24
ApplySettings = 25
ButtonRequest = 26
ButtonAck = 27
ApplyFlags = 28
GetAddress = 29
Address = 30
SelfTest = 32
BackupDevice = 34
EntropyRequest = 35
EntropyAck = 36
SignMessage = 38
VerifyMessage = 39
MessageSignature = 40
PassphraseRequest = 41
PassphraseAck = 42
PassphraseStateRequest = 77
PassphraseStateAck = 78
EstimateTxSize = 43
TxSize = 44
RecoveryDevice = 45
WordRequest = 46
WordAck = 47
CipheredKeyValue = 48
EncryptMessage = 49
EncryptedMessage = 50
DecryptMessage = 51
DecryptedMessage = 52
SignIdentity = 53
SignedIdentity = 54
GetFeatures = 55
EthereumGetAddress = 56
EthereumAddress = 57
EthereumSignTx = 58
EthereumTxRequest = 59
EthereumTxAck = 60
GetECDHSessionKey = 61
ECDHSessionKey = 62
SetU2FCounter = 63
EthereumSignMessage = 64
EthereumVerifyMessage = 65
EthereumMessageSignature = 66
NEMGetAddress = 67
NEMAddress = 68
NEMSignTx = 69
NEMSignedTx = 70
CosiCommit = 71
CosiCommitment = 72
CosiSign = 73
CosiSignature = 74
NEMDecryptMessage = 75
NEMDecryptedMessage = 76
DebugLinkDecision = 100
DebugLinkGetState = 101
DebugLinkState = 102
DebugLinkStop = 103
DebugLinkLog = 104
DebugLinkMemoryRead = 110
DebugLinkMemory = 111
DebugLinkMemoryWrite = 112
DebugLinkFlashErase = 113
LiskGetAddress = 114
LiskAddress = 115
LiskSignTx = 116
LiskSignedTx = 117
LiskGetPublicKey = 121
LiskPublicKey = 122
StellarGetPublicKey = 200
StellarPublicKey = 201
StellarSignTx = 202
StellarTxOpRequest = 203
StellarCreateAccountOp = 210
StellarPaymentOp = 211
StellarPathPaymentOp = 212
StellarManageOfferOp = 213
StellarCreatePassiveOfferOp = 214
StellarSetOptionsOp = 215
StellarChangeTrustOp = 216
StellarAllowTrustOp = 217
StellarAccountMergeOp = 218
StellarManageDataOp = 220
StellarBumpSequenceOp = 221
StellarSignedTx = 230

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .HDNodePathType import HDNodePathType
@ -12,12 +17,10 @@ class MultisigRedeemScriptType(p.MessageType):
def __init__(
self,
pubkeys: list = None,
signatures: list = None,
m: int = None,
**kwargs,
):
self.pubkeys = [] if pubkeys is None else pubkeys
self.signatures = [] if signatures is None else signatures
pubkeys: List[HDNodePathType] = None,
signatures: List[bytes] = None,
m: int = None
) -> None:
self.pubkeys = pubkeys if pubkeys is not None else []
self.signatures = signatures if signatures is not None else []
self.m = m
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class NEMAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 68
FIELDS = {
1: ('address', p.UnicodeType, 0), # required
}
MESSAGE_WIRE_TYPE = 68
def __init__(
self,
address: str = None,
**kwargs,
):
address: str = None
) -> None:
self.address = address
p.MessageType.__init__(self, **kwargs)

View File

@ -1,20 +1,23 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .NEMCosignatoryModification import NEMCosignatoryModification
class NEMAggregateModification(p.MessageType):
FIELDS = {
1: ('modifications', NEMCosignatoryModification, p.FLAG_REPEATED),
2: ('relative_change', p.Sint32Type, 0),
2: ('relative_change', p.SVarintType, 0),
}
def __init__(
self,
modifications: list = None,
relative_change: int = None,
**kwargs,
):
self.modifications = [] if modifications is None else modifications
modifications: List[NEMCosignatoryModification] = None,
relative_change: int = None
) -> None:
self.modifications = modifications if modifications is not None else []
self.relative_change = relative_change
p.MessageType.__init__(self, **kwargs)

View File

@ -11,9 +11,7 @@ class NEMCosignatoryModification(p.MessageType):
def __init__(
self,
type: int = None,
public_key: bytes = None,
**kwargs,
):
public_key: bytes = None
) -> None:
self.type = type
self.public_key = public_key
p.MessageType.__init__(self, **kwargs)

View File

@ -1,26 +1,29 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class NEMDecryptMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 75
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('network', p.UVarintType, 0),
3: ('public_key', p.BytesType, 0),
4: ('payload', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 75
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
network: int = None,
public_key: bytes = None,
payload: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
payload: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.network = network
self.public_key = public_key
self.payload = payload
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class NEMDecryptedMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 76
FIELDS = {
1: ('payload', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 76
def __init__(
self,
payload: bytes = None,
**kwargs,
):
payload: bytes = None
) -> None:
self.payload = payload
p.MessageType.__init__(self, **kwargs)

View File

@ -1,23 +1,26 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class NEMGetAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 67
FIELDS = {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('network', p.UVarintType, 0),
3: ('show_display', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 67
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
network: int = None,
show_display: bool = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
show_display: bool = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.network = network
self.show_display = show_display
p.MessageType.__init__(self, **kwargs)

View File

@ -11,9 +11,7 @@ class NEMImportanceTransfer(p.MessageType):
def __init__(
self,
mode: int = None,
public_key: bytes = None,
**kwargs,
):
public_key: bytes = None
) -> None:
self.mode = mode
self.public_key = public_key
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,3 @@
# Automatically generated by pb2py
from micropython import const
ImportanceTransfer_Activate = const(1)
ImportanceTransfer_Deactivate = const(2)
ImportanceTransfer_Activate = 1
ImportanceTransfer_Deactivate = 2

View File

@ -1,5 +1,3 @@
# Automatically generated by pb2py
from micropython import const
CosignatoryModification_Add = const(1)
CosignatoryModification_Delete = const(2)
CosignatoryModification_Add = 1
CosignatoryModification_Delete = 2

View File

@ -13,10 +13,8 @@ class NEMMosaic(p.MessageType):
self,
namespace: str = None,
mosaic: str = None,
quantity: int = None,
**kwargs,
):
quantity: int = None
) -> None:
self.namespace = namespace
self.mosaic = mosaic
self.quantity = quantity
p.MessageType.__init__(self, **kwargs)

View File

@ -14,10 +14,8 @@ class NEMMosaicCreation(p.MessageType):
self,
definition: NEMMosaicDefinition = None,
sink: str = None,
fee: int = None,
**kwargs,
):
fee: int = None
) -> None:
self.definition = definition
self.sink = sink
self.fee = fee
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class NEMMosaicDefinition(p.MessageType):
@ -37,9 +42,8 @@ class NEMMosaicDefinition(p.MessageType):
mutable_supply: bool = None,
transferable: bool = None,
description: str = None,
networks: list = None,
**kwargs,
):
networks: List[int] = None
) -> None:
self.name = name
self.ticker = ticker
self.namespace = namespace
@ -54,5 +58,4 @@ class NEMMosaicDefinition(p.MessageType):
self.mutable_supply = mutable_supply
self.transferable = transferable
self.description = description
self.networks = [] if networks is None else networks
p.MessageType.__init__(self, **kwargs)
self.networks = networks if networks is not None else []

View File

@ -1,5 +1,3 @@
# Automatically generated by pb2py
from micropython import const
MosaicLevy_Absolute = const(1)
MosaicLevy_Percentile = const(2)
MosaicLevy_Absolute = 1
MosaicLevy_Percentile = 2

View File

@ -15,11 +15,9 @@ class NEMMosaicSupplyChange(p.MessageType):
namespace: str = None,
mosaic: str = None,
type: int = None,
delta: int = None,
**kwargs,
):
delta: int = None
) -> None:
self.namespace = namespace
self.mosaic = mosaic
self.type = type
self.delta = delta
p.MessageType.__init__(self, **kwargs)

View File

@ -15,11 +15,9 @@ class NEMProvisionNamespace(p.MessageType):
namespace: str = None,
parent: str = None,
sink: str = None,
fee: int = None,
**kwargs,
):
fee: int = None
) -> None:
self.namespace = namespace
self.parent = parent
self.sink = sink
self.fee = fee
p.MessageType.__init__(self, **kwargs)

View File

@ -10,6 +10,7 @@ from .NEMTransfer import NEMTransfer
class NEMSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 69
FIELDS = {
1: ('transaction', NEMTransactionCommon, 0),
2: ('multisig', NEMTransactionCommon, 0),
@ -21,7 +22,6 @@ class NEMSignTx(p.MessageType):
8: ('aggregate_modification', NEMAggregateModification, 0),
9: ('importance_transfer', NEMImportanceTransfer, 0),
}
MESSAGE_WIRE_TYPE = 69
def __init__(
self,
@ -33,9 +33,8 @@ class NEMSignTx(p.MessageType):
mosaic_creation: NEMMosaicCreation = None,
supply_change: NEMMosaicSupplyChange = None,
aggregate_modification: NEMAggregateModification = None,
importance_transfer: NEMImportanceTransfer = None,
**kwargs,
):
importance_transfer: NEMImportanceTransfer = None
) -> None:
self.transaction = transaction
self.multisig = multisig
self.transfer = transfer
@ -45,4 +44,3 @@ class NEMSignTx(p.MessageType):
self.supply_change = supply_change
self.aggregate_modification = aggregate_modification
self.importance_transfer = importance_transfer
p.MessageType.__init__(self, **kwargs)

View File

@ -3,18 +3,16 @@ import protobuf as p
class NEMSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 70
FIELDS = {
1: ('data', p.BytesType, 0),
2: ('signature', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 70
def __init__(
self,
data: bytes = None,
signature: bytes = None,
**kwargs,
):
signature: bytes = None
) -> None:
self.data = data
self.signature = signature
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,3 @@
# Automatically generated by pb2py
from micropython import const
SupplyChange_Increase = const(1)
SupplyChange_Decrease = const(2)
SupplyChange_Increase = 1
SupplyChange_Decrease = 2

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
class NEMTransactionCommon(p.MessageType):
@ -14,18 +19,16 @@ class NEMTransactionCommon(p.MessageType):
def __init__(
self,
address_n: list = None,
address_n: List[int] = None,
network: int = None,
timestamp: int = None,
fee: int = None,
deadline: int = None,
signer: bytes = None,
**kwargs,
):
self.address_n = [] if address_n is None else address_n
signer: bytes = None
) -> None:
self.address_n = address_n if address_n is not None else []
self.network = network
self.timestamp = timestamp
self.fee = fee
self.deadline = deadline
self.signer = signer
p.MessageType.__init__(self, **kwargs)

View File

@ -1,5 +1,10 @@
# Automatically generated by pb2py
import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
from .NEMMosaic import NEMMosaic
@ -18,12 +23,10 @@ class NEMTransfer(p.MessageType):
amount: int = None,
payload: bytes = None,
public_key: bytes = None,
mosaics: list = None,
**kwargs,
):
mosaics: List[NEMMosaic] = None
) -> None:
self.recipient = recipient
self.amount = amount
self.payload = payload
self.public_key = public_key
self.mosaics = [] if mosaics is None else mosaics
p.MessageType.__init__(self, **kwargs)
self.mosaics = mosaics if mosaics is not None else []

View File

@ -1,9 +1,7 @@
# Automatically generated by pb2py
from micropython import const
PAYTOADDRESS = const(0)
PAYTOSCRIPTHASH = const(1)
PAYTOMULTISIG = const(2)
PAYTOOPRETURN = const(3)
PAYTOWITNESS = const(4)
PAYTOP2SHWITNESS = const(5)
PAYTOADDRESS = 0
PAYTOSCRIPTHASH = 1
PAYTOMULTISIG = 2
PAYTOOPRETURN = 3
PAYTOWITNESS = 4
PAYTOP2SHWITNESS = 5

View File

@ -3,18 +3,16 @@ import protobuf as p
class PassphraseAck(p.MessageType):
MESSAGE_WIRE_TYPE = 42
FIELDS = {
1: ('passphrase', p.UnicodeType, 0),
2: ('state', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 42
def __init__(
self,
passphrase: str = None,
state: bytes = None,
**kwargs,
):
state: bytes = None
) -> None:
self.passphrase = passphrase
self.state = state
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class PassphraseRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 41
FIELDS = {
1: ('on_device', p.BoolType, 0),
}
MESSAGE_WIRE_TYPE = 41
def __init__(
self,
on_device: bool = None,
**kwargs,
):
on_device: bool = None
) -> None:
self.on_device = on_device
p.MessageType.__init__(self, **kwargs)

View File

@ -1,6 +1,4 @@
# Automatically generated by pb2py
from micropython import const
ASK = const(0)
DEVICE = const(1)
HOST = const(2)
ASK = 0
DEVICE = 1
HOST = 2

View File

@ -4,9 +4,3 @@ import protobuf as p
class PassphraseStateAck(p.MessageType):
MESSAGE_WIRE_TYPE = 78
def __init__(
self,
**kwargs,
):
p.MessageType.__init__(self, **kwargs)

View File

@ -3,15 +3,13 @@ import protobuf as p
class PassphraseStateRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 77
FIELDS = {
1: ('state', p.BytesType, 0),
}
MESSAGE_WIRE_TYPE = 77
def __init__(
self,
state: bytes = None,
**kwargs,
):
state: bytes = None
) -> None:
self.state = state
p.MessageType.__init__(self, **kwargs)

Some files were not shown because too many files have changed in this diff Show More