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): class Address(p.MessageType):
MESSAGE_WIRE_TYPE = 30
FIELDS = { FIELDS = {
1: ('address', p.UnicodeType, 0), # required 1: ('address', p.UnicodeType, 0), # required
} }
MESSAGE_WIRE_TYPE = 30
def __init__( def __init__(
self, self,
address: str = None, address: str = None
**kwargs, ) -> None:
):
self.address = address self.address = address
p.MessageType.__init__(self, **kwargs)

View File

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

View File

@ -3,6 +3,7 @@ import protobuf as p
class ApplySettings(p.MessageType): class ApplySettings(p.MessageType):
MESSAGE_WIRE_TYPE = 25
FIELDS = { FIELDS = {
1: ('language', p.UnicodeType, 0), 1: ('language', p.UnicodeType, 0),
2: ('label', p.UnicodeType, 0), 2: ('label', p.UnicodeType, 0),
@ -11,7 +12,6 @@ class ApplySettings(p.MessageType):
5: ('passphrase_source', p.UVarintType, 0), 5: ('passphrase_source', p.UVarintType, 0),
6: ('auto_lock_delay_ms', p.UVarintType, 0), 6: ('auto_lock_delay_ms', p.UVarintType, 0),
} }
MESSAGE_WIRE_TYPE = 25
def __init__( def __init__(
self, self,
@ -20,13 +20,11 @@ class ApplySettings(p.MessageType):
use_passphrase: bool = None, use_passphrase: bool = None,
homescreen: bytes = None, homescreen: bytes = None,
passphrase_source: int = None, passphrase_source: int = None,
auto_lock_delay_ms: int = None, auto_lock_delay_ms: int = None
**kwargs, ) -> None:
):
self.language = language self.language = language
self.label = label self.label = label
self.use_passphrase = use_passphrase self.use_passphrase = use_passphrase
self.homescreen = homescreen self.homescreen = homescreen
self.passphrase_source = passphrase_source self.passphrase_source = passphrase_source
self.auto_lock_delay_ms = auto_lock_delay_ms 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): class BackupDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 34 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): class ButtonAck(p.MessageType):
MESSAGE_WIRE_TYPE = 27 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): class ButtonRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 26
FIELDS = { FIELDS = {
1: ('code', p.UVarintType, 0), 1: ('code', p.UVarintType, 0),
2: ('data', p.UnicodeType, 0), 2: ('data', p.UnicodeType, 0),
} }
MESSAGE_WIRE_TYPE = 26
def __init__( def __init__(
self, self,
code: int = None, code: int = None,
data: str = None, data: str = None
**kwargs, ) -> None:
):
self.code = code self.code = code
self.data = data self.data = data
p.MessageType.__init__(self, **kwargs)

View File

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

View File

@ -4,9 +4,3 @@ import protobuf as p
class Cancel(p.MessageType): class Cancel(p.MessageType):
MESSAGE_WIRE_TYPE = 20 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): class ChangePin(p.MessageType):
MESSAGE_WIRE_TYPE = 4
FIELDS = { FIELDS = {
1: ('remove', p.BoolType, 0), 1: ('remove', p.BoolType, 0),
} }
MESSAGE_WIRE_TYPE = 4
def __init__( def __init__(
self, self,
remove: bool = None, remove: bool = None
**kwargs, ) -> None:
):
self.remove = remove self.remove = remove
p.MessageType.__init__(self, **kwargs)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,3 @@ import protobuf as p
class DebugLinkGetState(p.MessageType): class DebugLinkGetState(p.MessageType):
MESSAGE_WIRE_TYPE = 101 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): class DebugLinkLog(p.MessageType):
MESSAGE_WIRE_TYPE = 104
FIELDS = { FIELDS = {
1: ('level', p.UVarintType, 0), 1: ('level', p.UVarintType, 0),
2: ('bucket', p.UnicodeType, 0), 2: ('bucket', p.UnicodeType, 0),
3: ('text', p.UnicodeType, 0), 3: ('text', p.UnicodeType, 0),
} }
MESSAGE_WIRE_TYPE = 104
def __init__( def __init__(
self, self,
level: int = None, level: int = None,
bucket: str = None, bucket: str = None,
text: str = None, text: str = None
**kwargs, ) -> None:
):
self.level = level self.level = level
self.bucket = bucket self.bucket = bucket
self.text = text self.text = text
p.MessageType.__init__(self, **kwargs)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,3 @@ import protobuf as p
class EntropyRequest(p.MessageType): class EntropyRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 35 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): class EstimateTxSize(p.MessageType):
MESSAGE_WIRE_TYPE = 43
FIELDS = { FIELDS = {
1: ('outputs_count', p.UVarintType, 0), # required 1: ('outputs_count', p.UVarintType, 0), # required
2: ('inputs_count', p.UVarintType, 0), # required 2: ('inputs_count', p.UVarintType, 0), # required
3: ('coin_name', p.UnicodeType, 0), # default='Bitcoin' 3: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
} }
MESSAGE_WIRE_TYPE = 43
def __init__( def __init__(
self, self,
outputs_count: int = None, outputs_count: int = None,
inputs_count: int = None, inputs_count: int = None,
coin_name: str = None, coin_name: str = None
**kwargs, ) -> None:
):
self.outputs_count = outputs_count self.outputs_count = outputs_count
self.inputs_count = inputs_count self.inputs_count = inputs_count
self.coin_name = coin_name self.coin_name = coin_name
p.MessageType.__init__(self, **kwargs)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,21 +4,19 @@ from .IdentityType import IdentityType
class GetECDHSessionKey(p.MessageType): class GetECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 61
FIELDS = { FIELDS = {
1: ('identity', IdentityType, 0), 1: ('identity', IdentityType, 0),
2: ('peer_public_key', p.BytesType, 0), 2: ('peer_public_key', p.BytesType, 0),
3: ('ecdsa_curve_name', p.UnicodeType, 0), 3: ('ecdsa_curve_name', p.UnicodeType, 0),
} }
MESSAGE_WIRE_TYPE = 61
def __init__( def __init__(
self, self,
identity: IdentityType = None, identity: IdentityType = None,
peer_public_key: bytes = None, peer_public_key: bytes = None,
ecdsa_curve_name: str = None, ecdsa_curve_name: str = None
**kwargs, ) -> None:
):
self.identity = identity self.identity = identity
self.peer_public_key = peer_public_key self.peer_public_key = peer_public_key
self.ecdsa_curve_name = ecdsa_curve_name 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): class GetEntropy(p.MessageType):
MESSAGE_WIRE_TYPE = 9
FIELDS = { FIELDS = {
1: ('size', p.UVarintType, 0), # required 1: ('size', p.UVarintType, 0), # required
} }
MESSAGE_WIRE_TYPE = 9
def __init__( def __init__(
self, self,
size: int = None, size: int = None
**kwargs, ) -> None:
):
self.size = size self.size = size
p.MessageType.__init__(self, **kwargs)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,9 +4,3 @@ import protobuf as p
class PassphraseStateAck(p.MessageType): class PassphraseStateAck(p.MessageType):
MESSAGE_WIRE_TYPE = 78 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): class PassphraseStateRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 77
FIELDS = { FIELDS = {
1: ('state', p.BytesType, 0), 1: ('state', p.BytesType, 0),
} }
MESSAGE_WIRE_TYPE = 77
def __init__( def __init__(
self, self,
state: bytes = None, state: bytes = None
**kwargs, ) -> None:
):
self.state = state self.state = state
p.MessageType.__init__(self, **kwargs)

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