1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-24 14:20:57 +00:00

messages: add types

This commit is contained in:
Jan Pochyla 2019-07-03 15:02:50 +02:00
parent 3af75c0b8b
commit 86e16bbf31
468 changed files with 2722 additions and 699 deletions
common/protob
core/src/trezor/messages
Address.pyApplyFlags.pyApplySettings.pyBackupDevice.pyButtonAck.pyButtonRequest.pyCancel.pyCardanoAddress.pyCardanoGetAddress.pyCardanoGetPublicKey.pyCardanoPublicKey.pyCardanoSignTx.pyCardanoSignedTx.pyCardanoTxAck.pyCardanoTxInputType.pyCardanoTxOutputType.pyCardanoTxRequest.pyChangePin.pyCipherKeyValue.pyCipheredKeyValue.pyClearSession.pyDebugLinkDecision.pyDebugLinkGetState.pyDebugLinkState.pyDebugMoneroDiagAck.pyDebugMoneroDiagRequest.pyECDHSessionKey.pyEntropy.pyEntropyAck.pyEntropyRequest.pyEosActionBuyRam.pyEosActionBuyRamBytes.pyEosActionCommon.pyEosActionDelegate.pyEosActionDeleteAuth.pyEosActionLinkAuth.pyEosActionNewAccount.pyEosActionRefund.pyEosActionSellRam.pyEosActionTransfer.pyEosActionUndelegate.pyEosActionUnknown.pyEosActionUnlinkAuth.pyEosActionUpdateAuth.pyEosActionVoteProducer.pyEosAsset.pyEosAuthorization.pyEosAuthorizationAccount.pyEosAuthorizationKey.pyEosAuthorizationWait.pyEosGetPublicKey.pyEosPermissionLevel.pyEosPublicKey.pyEosSignTx.pyEosSignedTx.pyEosTxActionAck.pyEosTxActionRequest.pyEosTxHeader.pyEthereumAddress.pyEthereumGetAddress.pyEthereumGetPublicKey.pyEthereumMessageSignature.pyEthereumPublicKey.pyEthereumSignMessage.pyEthereumSignTx.pyEthereumTxAck.pyEthereumTxRequest.pyEthereumVerifyMessage.pyFailure.pyFeatures.pyGetAddress.pyGetECDHSessionKey.pyGetEntropy.pyGetFeatures.pyGetPublicKey.pyHDNodePathType.pyHDNodeType.pyIdentityType.pyInitialize.pyLiskAddress.pyLiskDelegateType.pyLiskGetAddress.pyLiskGetPublicKey.pyLiskMessageSignature.pyLiskMultisignatureType.pyLiskPublicKey.pyLiskSignMessage.pyLiskSignTx.pyLiskSignatureType.pyLiskSignedTx.pyLiskTransactionAsset.pyLiskTransactionCommon.pyLiskVerifyMessage.pyLoadDevice.pyMessageSignature.pyMoneroAccountPublicAddress.pyMoneroAddress.pyMoneroExportedKeyImage.pyMoneroGetAddress.py

View File

@ -214,7 +214,7 @@ class Descriptor:
def create_fields_method(self, fields): def create_fields_method(self, fields):
# fmt: off # fmt: off
yield " @classmethod" yield " @classmethod"
yield " def get_fields(cls):" yield " def get_fields(cls) -> Dict:"
yield " return {" yield " return {"
for field in fields: for field in fields:
comments = [] comments = []
@ -255,13 +255,12 @@ class Descriptor:
yield from self.process_message_imports(fields) yield from self.process_message_imports(fields)
if any(field.repeated for field in fields): yield ""
yield "" yield "if __debug__:"
yield "if __debug__:" yield " try:"
yield " try:" yield " from typing import Dict, List, Optional"
yield " from typing import List" yield " except ImportError:"
yield " except ImportError:" yield " Dict, List, Optional = None, None, None # type: ignore"
yield " List = None # type: ignore"
yield "" yield ""
yield "" yield ""

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Address(p.MessageType): class Address(p.MessageType):
MESSAGE_WIRE_TYPE = 30 MESSAGE_WIRE_TYPE = 30
@ -13,7 +19,7 @@ class Address(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.UnicodeType, 0), # required 1: ('address', p.UnicodeType, 0), # required
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ApplyFlags(p.MessageType): class ApplyFlags(p.MessageType):
MESSAGE_WIRE_TYPE = 28 MESSAGE_WIRE_TYPE = 28
@ -13,7 +19,7 @@ class ApplyFlags(p.MessageType):
self.flags = flags self.flags = flags
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('flags', p.UVarintType, 0), 1: ('flags', p.UVarintType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ApplySettings(p.MessageType): class ApplySettings(p.MessageType):
MESSAGE_WIRE_TYPE = 25 MESSAGE_WIRE_TYPE = 25
@ -25,7 +31,7 @@ class ApplySettings(p.MessageType):
self.display_rotation = display_rotation self.display_rotation = display_rotation
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('language', p.UnicodeType, 0), 1: ('language', p.UnicodeType, 0),
2: ('label', p.UnicodeType, 0), 2: ('label', p.UnicodeType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class BackupDevice(p.MessageType): class BackupDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 34 MESSAGE_WIRE_TYPE = 34

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ButtonAck(p.MessageType): class ButtonAck(p.MessageType):
MESSAGE_WIRE_TYPE = 27 MESSAGE_WIRE_TYPE = 27

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ButtonRequest(p.MessageType): class ButtonRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 26 MESSAGE_WIRE_TYPE = 26
@ -15,7 +21,7 @@ class ButtonRequest(p.MessageType):
self.data = data self.data = data
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('code', p.UVarintType, 0), 1: ('code', p.UVarintType, 0),
2: ('data', p.UnicodeType, 0), 2: ('data', p.UnicodeType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Cancel(p.MessageType): class Cancel(p.MessageType):
MESSAGE_WIRE_TYPE = 20 MESSAGE_WIRE_TYPE = 20

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CardanoAddress(p.MessageType): class CardanoAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 308 MESSAGE_WIRE_TYPE = 308
@ -13,7 +19,7 @@ class CardanoAddress(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.UnicodeType, 0), 1: ('address', p.UnicodeType, 0),
} }

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CardanoGetAddress(p.MessageType): class CardanoGetAddress(p.MessageType):
@ -21,7 +21,7 @@ class CardanoGetAddress(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CardanoGetPublicKey(p.MessageType): class CardanoGetPublicKey(p.MessageType):
@ -21,7 +21,7 @@ class CardanoGetPublicKey(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .HDNodeType import HDNodeType from .HDNodeType import HDNodeType
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CardanoPublicKey(p.MessageType): class CardanoPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 306 MESSAGE_WIRE_TYPE = 306
@ -17,7 +23,7 @@ class CardanoPublicKey(p.MessageType):
self.node = node self.node = node
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('xpub', p.UnicodeType, 0), 1: ('xpub', p.UnicodeType, 0),
2: ('node', HDNodeType, 0), 2: ('node', HDNodeType, 0),

View File

@ -7,9 +7,9 @@ from .CardanoTxOutputType import CardanoTxOutputType
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CardanoSignTx(p.MessageType): class CardanoSignTx(p.MessageType):
@ -28,7 +28,7 @@ class CardanoSignTx(p.MessageType):
self.protocol_magic = protocol_magic self.protocol_magic = protocol_magic
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED), 1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED), 2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CardanoSignedTx(p.MessageType): class CardanoSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 310 MESSAGE_WIRE_TYPE = 310
@ -15,7 +21,7 @@ class CardanoSignedTx(p.MessageType):
self.tx_body = tx_body self.tx_body = tx_body
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('tx_hash', p.BytesType, 0), 1: ('tx_hash', p.BytesType, 0),
2: ('tx_body', p.BytesType, 0), 2: ('tx_body', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CardanoTxAck(p.MessageType): class CardanoTxAck(p.MessageType):
MESSAGE_WIRE_TYPE = 309 MESSAGE_WIRE_TYPE = 309
@ -13,7 +19,7 @@ class CardanoTxAck(p.MessageType):
self.transaction = transaction self.transaction = transaction
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('transaction', p.BytesType, 0), 1: ('transaction', p.BytesType, 0),
} }

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CardanoTxInputType(p.MessageType): class CardanoTxInputType(p.MessageType):
@ -24,7 +24,7 @@ class CardanoTxInputType(p.MessageType):
self.type = type self.type = type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('prev_hash', p.BytesType, 0), 2: ('prev_hash', p.BytesType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CardanoTxOutputType(p.MessageType): class CardanoTxOutputType(p.MessageType):
@ -22,7 +22,7 @@ class CardanoTxOutputType(p.MessageType):
self.amount = amount self.amount = amount
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.UnicodeType, 0), 1: ('address', p.UnicodeType, 0),
2: ('address_n', p.UVarintType, p.FLAG_REPEATED), 2: ('address_n', p.UVarintType, p.FLAG_REPEATED),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CardanoTxRequest(p.MessageType): class CardanoTxRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 304 MESSAGE_WIRE_TYPE = 304
@ -17,7 +23,7 @@ class CardanoTxRequest(p.MessageType):
self.tx_body = tx_body self.tx_body = tx_body
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('tx_index', p.UVarintType, 0), 1: ('tx_index', p.UVarintType, 0),
2: ('tx_hash', p.BytesType, 0), 2: ('tx_hash', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ChangePin(p.MessageType): class ChangePin(p.MessageType):
MESSAGE_WIRE_TYPE = 4 MESSAGE_WIRE_TYPE = 4
@ -13,7 +19,7 @@ class ChangePin(p.MessageType):
self.remove = remove self.remove = remove
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('remove', p.BoolType, 0), 1: ('remove', p.BoolType, 0),
} }

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class CipherKeyValue(p.MessageType): class CipherKeyValue(p.MessageType):
@ -31,7 +31,7 @@ class CipherKeyValue(p.MessageType):
self.iv = iv self.iv = iv
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class CipheredKeyValue(p.MessageType): class CipheredKeyValue(p.MessageType):
MESSAGE_WIRE_TYPE = 48 MESSAGE_WIRE_TYPE = 48
@ -13,7 +19,7 @@ class CipheredKeyValue(p.MessageType):
self.value = value self.value = value
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('value', p.BytesType, 0), 1: ('value', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ClearSession(p.MessageType): class ClearSession(p.MessageType):
MESSAGE_WIRE_TYPE = 24 MESSAGE_WIRE_TYPE = 24

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class DebugLinkDecision(p.MessageType): class DebugLinkDecision(p.MessageType):
MESSAGE_WIRE_TYPE = 100 MESSAGE_WIRE_TYPE = 100
@ -17,7 +23,7 @@ class DebugLinkDecision(p.MessageType):
self.input = input self.input = input
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('yes_no', p.BoolType, 0), 1: ('yes_no', p.BoolType, 0),
2: ('up_down', p.BoolType, 0), 2: ('up_down', p.BoolType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class DebugLinkGetState(p.MessageType): class DebugLinkGetState(p.MessageType):
MESSAGE_WIRE_TYPE = 101 MESSAGE_WIRE_TYPE = 101

View File

@ -4,6 +4,12 @@ import protobuf as p
from .HDNodeType import HDNodeType from .HDNodeType import HDNodeType
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class DebugLinkState(p.MessageType): class DebugLinkState(p.MessageType):
MESSAGE_WIRE_TYPE = 102 MESSAGE_WIRE_TYPE = 102
@ -37,7 +43,7 @@ class DebugLinkState(p.MessageType):
self.mnemonic_type = mnemonic_type self.mnemonic_type = mnemonic_type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('layout', p.BytesType, 0), 1: ('layout', p.BytesType, 0),
2: ('pin', p.UnicodeType, 0), 2: ('pin', p.UnicodeType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class DebugMoneroDiagAck(p.MessageType): class DebugMoneroDiagAck(p.MessageType):
@ -29,7 +29,7 @@ class DebugMoneroDiagAck(p.MessageType):
self.data2 = data2 self.data2 = data2
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('ins', p.UVarintType, 0), 1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0), 2: ('p1', p.UVarintType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class DebugMoneroDiagRequest(p.MessageType): class DebugMoneroDiagRequest(p.MessageType):
@ -29,7 +29,7 @@ class DebugMoneroDiagRequest(p.MessageType):
self.data2 = data2 self.data2 = data2
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('ins', p.UVarintType, 0), 1: ('ins', p.UVarintType, 0),
2: ('p1', p.UVarintType, 0), 2: ('p1', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class ECDHSessionKey(p.MessageType): class ECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 62 MESSAGE_WIRE_TYPE = 62
@ -13,7 +19,7 @@ class ECDHSessionKey(p.MessageType):
self.session_key = session_key self.session_key = session_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('session_key', p.BytesType, 0), 1: ('session_key', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Entropy(p.MessageType): class Entropy(p.MessageType):
MESSAGE_WIRE_TYPE = 10 MESSAGE_WIRE_TYPE = 10
@ -13,7 +19,7 @@ class Entropy(p.MessageType):
self.entropy = entropy self.entropy = entropy
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('entropy', p.BytesType, 0), # required 1: ('entropy', p.BytesType, 0), # required
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EntropyAck(p.MessageType): class EntropyAck(p.MessageType):
MESSAGE_WIRE_TYPE = 36 MESSAGE_WIRE_TYPE = 36
@ -13,7 +19,7 @@ class EntropyAck(p.MessageType):
self.entropy = entropy self.entropy = entropy
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('entropy', p.BytesType, 0), 1: ('entropy', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EntropyRequest(p.MessageType): class EntropyRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 35 MESSAGE_WIRE_TYPE = 35

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAsset import EosAsset from .EosAsset import EosAsset
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionBuyRam(p.MessageType): class EosActionBuyRam(p.MessageType):
@ -18,7 +24,7 @@ class EosActionBuyRam(p.MessageType):
self.quantity = quantity self.quantity = quantity
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('payer', p.UVarintType, 0), 1: ('payer', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0), 2: ('receiver', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionBuyRamBytes(p.MessageType): class EosActionBuyRamBytes(p.MessageType):
@ -16,7 +22,7 @@ class EosActionBuyRamBytes(p.MessageType):
self.bytes = bytes self.bytes = bytes
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('payer', p.UVarintType, 0), 1: ('payer', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0), 2: ('receiver', p.UVarintType, 0),

View File

@ -6,9 +6,9 @@ from .EosPermissionLevel import EosPermissionLevel
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosActionCommon(p.MessageType): class EosActionCommon(p.MessageType):
@ -24,7 +24,7 @@ class EosActionCommon(p.MessageType):
self.authorization = authorization if authorization is not None else [] self.authorization = authorization if authorization is not None else []
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('name', p.UVarintType, 0), 2: ('name', p.UVarintType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAsset import EosAsset from .EosAsset import EosAsset
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionDelegate(p.MessageType): class EosActionDelegate(p.MessageType):
@ -22,7 +28,7 @@ class EosActionDelegate(p.MessageType):
self.transfer = transfer self.transfer = transfer
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('sender', p.UVarintType, 0), 1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0), 2: ('receiver', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionDeleteAuth(p.MessageType): class EosActionDeleteAuth(p.MessageType):
@ -14,7 +20,7 @@ class EosActionDeleteAuth(p.MessageType):
self.permission = permission self.permission = permission
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0), 2: ('permission', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionLinkAuth(p.MessageType): class EosActionLinkAuth(p.MessageType):
@ -18,7 +24,7 @@ class EosActionLinkAuth(p.MessageType):
self.requirement = requirement self.requirement = requirement
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('code', p.UVarintType, 0), 2: ('code', p.UVarintType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAuthorization import EosAuthorization from .EosAuthorization import EosAuthorization
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionNewAccount(p.MessageType): class EosActionNewAccount(p.MessageType):
@ -20,7 +26,7 @@ class EosActionNewAccount(p.MessageType):
self.active = active self.active = active
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('creator', p.UVarintType, 0), 1: ('creator', p.UVarintType, 0),
2: ('name', p.UVarintType, 0), 2: ('name', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionRefund(p.MessageType): class EosActionRefund(p.MessageType):
@ -12,7 +18,7 @@ class EosActionRefund(p.MessageType):
self.owner = owner self.owner = owner
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('owner', p.UVarintType, 0), 1: ('owner', p.UVarintType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionSellRam(p.MessageType): class EosActionSellRam(p.MessageType):
@ -14,7 +20,7 @@ class EosActionSellRam(p.MessageType):
self.bytes = bytes self.bytes = bytes
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('bytes', p.UVarintType, 0), 2: ('bytes', p.UVarintType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAsset import EosAsset from .EosAsset import EosAsset
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionTransfer(p.MessageType): class EosActionTransfer(p.MessageType):
@ -20,7 +26,7 @@ class EosActionTransfer(p.MessageType):
self.memo = memo self.memo = memo
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('sender', p.UVarintType, 0), 1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0), 2: ('receiver', p.UVarintType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAsset import EosAsset from .EosAsset import EosAsset
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionUndelegate(p.MessageType): class EosActionUndelegate(p.MessageType):
@ -20,7 +26,7 @@ class EosActionUndelegate(p.MessageType):
self.cpu_quantity = cpu_quantity self.cpu_quantity = cpu_quantity
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('sender', p.UVarintType, 0), 1: ('sender', p.UVarintType, 0),
2: ('receiver', p.UVarintType, 0), 2: ('receiver', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionUnknown(p.MessageType): class EosActionUnknown(p.MessageType):
@ -14,7 +20,7 @@ class EosActionUnknown(p.MessageType):
self.data_chunk = data_chunk self.data_chunk = data_chunk
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('data_size', p.UVarintType, 0), 1: ('data_size', p.UVarintType, 0),
2: ('data_chunk', p.BytesType, 0), 2: ('data_chunk', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionUnlinkAuth(p.MessageType): class EosActionUnlinkAuth(p.MessageType):
@ -16,7 +22,7 @@ class EosActionUnlinkAuth(p.MessageType):
self.type = type self.type = type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('code', p.UVarintType, 0), 2: ('code', p.UVarintType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosAuthorization import EosAuthorization from .EosAuthorization import EosAuthorization
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosActionUpdateAuth(p.MessageType): class EosActionUpdateAuth(p.MessageType):
@ -20,7 +26,7 @@ class EosActionUpdateAuth(p.MessageType):
self.auth = auth self.auth = auth
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', p.UVarintType, 0), 1: ('account', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0), 2: ('permission', p.UVarintType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosActionVoteProducer(p.MessageType): class EosActionVoteProducer(p.MessageType):
@ -22,7 +22,7 @@ class EosActionVoteProducer(p.MessageType):
self.producers = producers if producers is not None else [] self.producers = producers if producers is not None else []
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('voter', p.UVarintType, 0), 1: ('voter', p.UVarintType, 0),
2: ('proxy', p.UVarintType, 0), 2: ('proxy', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosAsset(p.MessageType): class EosAsset(p.MessageType):
@ -14,7 +20,7 @@ class EosAsset(p.MessageType):
self.symbol = symbol self.symbol = symbol
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('amount', p.SVarintType, 0), 1: ('amount', p.SVarintType, 0),
2: ('symbol', p.UVarintType, 0), 2: ('symbol', p.UVarintType, 0),

View File

@ -8,9 +8,9 @@ from .EosAuthorizationWait import EosAuthorizationWait
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosAuthorization(p.MessageType): class EosAuthorization(p.MessageType):
@ -28,7 +28,7 @@ class EosAuthorization(p.MessageType):
self.waits = waits if waits is not None else [] self.waits = waits if waits is not None else []
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('threshold', p.UVarintType, 0), 1: ('threshold', p.UVarintType, 0),
2: ('keys', EosAuthorizationKey, p.FLAG_REPEATED), 2: ('keys', EosAuthorizationKey, p.FLAG_REPEATED),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .EosPermissionLevel import EosPermissionLevel from .EosPermissionLevel import EosPermissionLevel
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosAuthorizationAccount(p.MessageType): class EosAuthorizationAccount(p.MessageType):
@ -16,7 +22,7 @@ class EosAuthorizationAccount(p.MessageType):
self.weight = weight self.weight = weight
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('account', EosPermissionLevel, 0), 1: ('account', EosPermissionLevel, 0),
2: ('weight', p.UVarintType, 0), 2: ('weight', p.UVarintType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosAuthorizationKey(p.MessageType): class EosAuthorizationKey(p.MessageType):
@ -24,7 +24,7 @@ class EosAuthorizationKey(p.MessageType):
self.weight = weight self.weight = weight
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('type', p.UVarintType, 0), 1: ('type', p.UVarintType, 0),
2: ('key', p.BytesType, 0), 2: ('key', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosAuthorizationWait(p.MessageType): class EosAuthorizationWait(p.MessageType):
@ -14,7 +20,7 @@ class EosAuthorizationWait(p.MessageType):
self.weight = weight self.weight = weight
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('wait_sec', p.UVarintType, 0), 1: ('wait_sec', p.UVarintType, 0),
2: ('weight', p.UVarintType, 0), 2: ('weight', p.UVarintType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosGetPublicKey(p.MessageType): class EosGetPublicKey(p.MessageType):
@ -21,7 +21,7 @@ class EosGetPublicKey(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosPermissionLevel(p.MessageType): class EosPermissionLevel(p.MessageType):
@ -14,7 +20,7 @@ class EosPermissionLevel(p.MessageType):
self.permission = permission self.permission = permission
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('actor', p.UVarintType, 0), 1: ('actor', p.UVarintType, 0),
2: ('permission', p.UVarintType, 0), 2: ('permission', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosPublicKey(p.MessageType): class EosPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 601 MESSAGE_WIRE_TYPE = 601
@ -15,7 +21,7 @@ class EosPublicKey(p.MessageType):
self.raw_public_key = raw_public_key self.raw_public_key = raw_public_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('wif_public_key', p.UnicodeType, 0), 1: ('wif_public_key', p.UnicodeType, 0),
2: ('raw_public_key', p.BytesType, 0), 2: ('raw_public_key', p.BytesType, 0),

View File

@ -6,9 +6,9 @@ from .EosTxHeader import EosTxHeader
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EosSignTx(p.MessageType): class EosSignTx(p.MessageType):
@ -27,7 +27,7 @@ class EosSignTx(p.MessageType):
self.num_actions = num_actions self.num_actions = num_actions
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('chain_id', p.BytesType, 0), 2: ('chain_id', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosSignedTx(p.MessageType): class EosSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 605 MESSAGE_WIRE_TYPE = 605
@ -13,7 +19,7 @@ class EosSignedTx(p.MessageType):
self.signature = signature self.signature = signature
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('signature', p.UnicodeType, 0), 1: ('signature', p.UnicodeType, 0),
} }

View File

@ -18,6 +18,12 @@ from .EosActionUnlinkAuth import EosActionUnlinkAuth
from .EosActionUpdateAuth import EosActionUpdateAuth from .EosActionUpdateAuth import EosActionUpdateAuth
from .EosActionVoteProducer import EosActionVoteProducer from .EosActionVoteProducer import EosActionVoteProducer
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosTxActionAck(p.MessageType): class EosTxActionAck(p.MessageType):
MESSAGE_WIRE_TYPE = 604 MESSAGE_WIRE_TYPE = 604
@ -57,7 +63,7 @@ class EosTxActionAck(p.MessageType):
self.unknown = unknown self.unknown = unknown
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('common', EosActionCommon, 0), 1: ('common', EosActionCommon, 0),
2: ('transfer', EosActionTransfer, 0), 2: ('transfer', EosActionTransfer, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosTxActionRequest(p.MessageType): class EosTxActionRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 603 MESSAGE_WIRE_TYPE = 603
@ -13,7 +19,7 @@ class EosTxActionRequest(p.MessageType):
self.data_size = data_size self.data_size = data_size
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('data_size', p.UVarintType, 0), 1: ('data_size', p.UVarintType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EosTxHeader(p.MessageType): class EosTxHeader(p.MessageType):
@ -22,7 +28,7 @@ class EosTxHeader(p.MessageType):
self.delay_sec = delay_sec self.delay_sec = delay_sec
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('expiration', p.UVarintType, 0), # required 1: ('expiration', p.UVarintType, 0), # required
2: ('ref_block_num', p.UVarintType, 0), # required 2: ('ref_block_num', p.UVarintType, 0), # required

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumAddress(p.MessageType): class EthereumAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 57 MESSAGE_WIRE_TYPE = 57
@ -15,7 +21,7 @@ class EthereumAddress(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('old_address', p.BytesType, 0), 1: ('old_address', p.BytesType, 0),
2: ('address', p.UnicodeType, 0), 2: ('address', p.UnicodeType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EthereumGetAddress(p.MessageType): class EthereumGetAddress(p.MessageType):
@ -21,7 +21,7 @@ class EthereumGetAddress(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EthereumGetPublicKey(p.MessageType): class EthereumGetPublicKey(p.MessageType):
@ -21,7 +21,7 @@ class EthereumGetPublicKey(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumMessageSignature(p.MessageType): class EthereumMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 66 MESSAGE_WIRE_TYPE = 66
@ -15,7 +21,7 @@ class EthereumMessageSignature(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),
3: ('address', p.UnicodeType, 0), 3: ('address', p.UnicodeType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .HDNodeType import HDNodeType from .HDNodeType import HDNodeType
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumPublicKey(p.MessageType): class EthereumPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 451 MESSAGE_WIRE_TYPE = 451
@ -17,7 +23,7 @@ class EthereumPublicKey(p.MessageType):
self.xpub = xpub self.xpub = xpub
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('node', HDNodeType, 0), 1: ('node', HDNodeType, 0),
2: ('xpub', p.UnicodeType, 0), 2: ('xpub', p.UnicodeType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EthereumSignMessage(p.MessageType): class EthereumSignMessage(p.MessageType):
@ -21,7 +21,7 @@ class EthereumSignMessage(p.MessageType):
self.message = message self.message = message
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), 2: ('message', p.BytesType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class EthereumSignTx(p.MessageType): class EthereumSignTx(p.MessageType):
@ -37,7 +37,7 @@ class EthereumSignTx(p.MessageType):
self.tx_type = tx_type self.tx_type = tx_type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumTxAck(p.MessageType): class EthereumTxAck(p.MessageType):
MESSAGE_WIRE_TYPE = 60 MESSAGE_WIRE_TYPE = 60
@ -13,7 +19,7 @@ class EthereumTxAck(p.MessageType):
self.data_chunk = data_chunk self.data_chunk = data_chunk
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('data_chunk', p.BytesType, 0), 1: ('data_chunk', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumTxRequest(p.MessageType): class EthereumTxRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 59 MESSAGE_WIRE_TYPE = 59
@ -19,7 +25,7 @@ class EthereumTxRequest(p.MessageType):
self.signature_s = signature_s self.signature_s = signature_s
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('data_length', p.UVarintType, 0), 1: ('data_length', p.UVarintType, 0),
2: ('signature_v', p.UVarintType, 0), 2: ('signature_v', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class EthereumVerifyMessage(p.MessageType): class EthereumVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 65 MESSAGE_WIRE_TYPE = 65
@ -17,7 +23,7 @@ class EthereumVerifyMessage(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),
3: ('message', p.BytesType, 0), 3: ('message', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Failure(p.MessageType): class Failure(p.MessageType):
MESSAGE_WIRE_TYPE = 3 MESSAGE_WIRE_TYPE = 3
@ -15,7 +21,7 @@ class Failure(p.MessageType):
self.message = message self.message = message
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('code', p.UVarintType, 0), 1: ('code', p.UVarintType, 0),
2: ('message', p.UnicodeType, 0), 2: ('message', p.UnicodeType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Features(p.MessageType): class Features(p.MessageType):
MESSAGE_WIRE_TYPE = 17 MESSAGE_WIRE_TYPE = 17
@ -65,7 +71,7 @@ class Features(p.MessageType):
self.no_backup = no_backup self.no_backup = no_backup
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('vendor', p.UnicodeType, 0), 1: ('vendor', p.UnicodeType, 0),
2: ('major_version', p.UVarintType, 0), 2: ('major_version', p.UVarintType, 0),

View File

@ -6,9 +6,9 @@ from .MultisigRedeemScriptType import MultisigRedeemScriptType
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class GetAddress(p.MessageType): class GetAddress(p.MessageType):
@ -29,7 +29,7 @@ class GetAddress(p.MessageType):
self.script_type = script_type self.script_type = script_type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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

View File

@ -4,6 +4,12 @@ import protobuf as p
from .IdentityType import IdentityType from .IdentityType import IdentityType
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class GetECDHSessionKey(p.MessageType): class GetECDHSessionKey(p.MessageType):
MESSAGE_WIRE_TYPE = 61 MESSAGE_WIRE_TYPE = 61
@ -19,7 +25,7 @@ class GetECDHSessionKey(p.MessageType):
self.ecdsa_curve_name = ecdsa_curve_name self.ecdsa_curve_name = ecdsa_curve_name
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('identity', IdentityType, 0), 1: ('identity', IdentityType, 0),
2: ('peer_public_key', p.BytesType, 0), 2: ('peer_public_key', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class GetEntropy(p.MessageType): class GetEntropy(p.MessageType):
MESSAGE_WIRE_TYPE = 9 MESSAGE_WIRE_TYPE = 9
@ -13,7 +19,7 @@ class GetEntropy(p.MessageType):
self.size = size self.size = size
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('size', p.UVarintType, 0), # required 1: ('size', p.UVarintType, 0), # required
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class GetFeatures(p.MessageType): class GetFeatures(p.MessageType):
MESSAGE_WIRE_TYPE = 55 MESSAGE_WIRE_TYPE = 55

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class GetPublicKey(p.MessageType): class GetPublicKey(p.MessageType):
@ -27,7 +27,7 @@ class GetPublicKey(p.MessageType):
self.script_type = script_type self.script_type = script_type
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -6,9 +6,9 @@ from .HDNodeType import HDNodeType
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class HDNodePathType(p.MessageType): class HDNodePathType(p.MessageType):
@ -22,7 +22,7 @@ class HDNodePathType(p.MessageType):
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('node', HDNodeType, 0), # required 1: ('node', HDNodeType, 0), # required
2: ('address_n', p.UVarintType, p.FLAG_REPEATED), 2: ('address_n', p.UVarintType, p.FLAG_REPEATED),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class HDNodeType(p.MessageType): class HDNodeType(p.MessageType):
@ -22,7 +28,7 @@ class HDNodeType(p.MessageType):
self.public_key = public_key self.public_key = public_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('depth', p.UVarintType, 0), # required 1: ('depth', p.UVarintType, 0), # required
2: ('fingerprint', p.UVarintType, 0), # required 2: ('fingerprint', p.UVarintType, 0), # required

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class IdentityType(p.MessageType): class IdentityType(p.MessageType):
@ -22,7 +28,7 @@ class IdentityType(p.MessageType):
self.index = index self.index = index
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('proto', p.UnicodeType, 0), 1: ('proto', p.UnicodeType, 0),
2: ('user', p.UnicodeType, 0), 2: ('user', p.UnicodeType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class Initialize(p.MessageType): class Initialize(p.MessageType):
MESSAGE_WIRE_TYPE = 0 MESSAGE_WIRE_TYPE = 0
@ -15,7 +21,7 @@ class Initialize(p.MessageType):
self.skip_passphrase = skip_passphrase self.skip_passphrase = skip_passphrase
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('state', p.BytesType, 0), 1: ('state', p.BytesType, 0),
2: ('skip_passphrase', p.BoolType, 0), 2: ('skip_passphrase', p.BoolType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskAddress(p.MessageType): class LiskAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 115 MESSAGE_WIRE_TYPE = 115
@ -13,7 +19,7 @@ class LiskAddress(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.UnicodeType, 0), 1: ('address', p.UnicodeType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskDelegateType(p.MessageType): class LiskDelegateType(p.MessageType):
@ -12,7 +18,7 @@ class LiskDelegateType(p.MessageType):
self.username = username self.username = username
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('username', p.UnicodeType, 0), 1: ('username', p.UnicodeType, 0),
} }

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskGetAddress(p.MessageType): class LiskGetAddress(p.MessageType):
@ -21,7 +21,7 @@ class LiskGetAddress(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskGetPublicKey(p.MessageType): class LiskGetPublicKey(p.MessageType):
@ -21,7 +21,7 @@ class LiskGetPublicKey(p.MessageType):
self.show_display = show_display self.show_display = show_display
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskMessageSignature(p.MessageType): class LiskMessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 119 MESSAGE_WIRE_TYPE = 119
@ -15,7 +21,7 @@ class LiskMessageSignature(p.MessageType):
self.signature = signature self.signature = signature
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('public_key', p.BytesType, 0), 1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskMultisignatureType(p.MessageType): class LiskMultisignatureType(p.MessageType):
@ -22,7 +22,7 @@ class LiskMultisignatureType(p.MessageType):
self.keys_group = keys_group if keys_group is not None else [] self.keys_group = keys_group if keys_group is not None else []
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('min', p.UVarintType, 0), 1: ('min', p.UVarintType, 0),
2: ('life_time', p.UVarintType, 0), 2: ('life_time', p.UVarintType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskPublicKey(p.MessageType): class LiskPublicKey(p.MessageType):
MESSAGE_WIRE_TYPE = 122 MESSAGE_WIRE_TYPE = 122
@ -13,7 +19,7 @@ class LiskPublicKey(p.MessageType):
self.public_key = public_key self.public_key = public_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('public_key', p.BytesType, 0), 1: ('public_key', p.BytesType, 0),
} }

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskSignMessage(p.MessageType): class LiskSignMessage(p.MessageType):
@ -21,7 +21,7 @@ class LiskSignMessage(p.MessageType):
self.message = message self.message = message
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('message', p.BytesType, 0), 2: ('message', p.BytesType, 0),

View File

@ -6,9 +6,9 @@ from .LiskTransactionCommon import LiskTransactionCommon
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskSignTx(p.MessageType): class LiskSignTx(p.MessageType):
@ -23,7 +23,7 @@ class LiskSignTx(p.MessageType):
self.transaction = transaction self.transaction = transaction
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED), 1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('transaction', LiskTransactionCommon, 0), 2: ('transaction', LiskTransactionCommon, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskSignatureType(p.MessageType): class LiskSignatureType(p.MessageType):
@ -12,7 +18,7 @@ class LiskSignatureType(p.MessageType):
self.public_key = public_key self.public_key = public_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('public_key', p.BytesType, 0), 1: ('public_key', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskSignedTx(p.MessageType): class LiskSignedTx(p.MessageType):
MESSAGE_WIRE_TYPE = 117 MESSAGE_WIRE_TYPE = 117
@ -13,7 +19,7 @@ class LiskSignedTx(p.MessageType):
self.signature = signature self.signature = signature
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('signature', p.BytesType, 0), 1: ('signature', p.BytesType, 0),
} }

View File

@ -8,9 +8,9 @@ from .LiskSignatureType import LiskSignatureType
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class LiskTransactionAsset(p.MessageType): class LiskTransactionAsset(p.MessageType):
@ -30,7 +30,7 @@ class LiskTransactionAsset(p.MessageType):
self.data = data self.data = data
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('signature', LiskSignatureType, 0), 1: ('signature', LiskSignatureType, 0),
2: ('delegate', LiskDelegateType, 0), 2: ('delegate', LiskDelegateType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .LiskTransactionAsset import LiskTransactionAsset from .LiskTransactionAsset import LiskTransactionAsset
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskTransactionCommon(p.MessageType): class LiskTransactionCommon(p.MessageType):
@ -30,7 +36,7 @@ class LiskTransactionCommon(p.MessageType):
self.asset = asset self.asset = asset
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('type', p.UVarintType, 0), 1: ('type', p.UVarintType, 0),
2: ('amount', p.UVarintType, 0), # default=0 2: ('amount', p.UVarintType, 0), # default=0

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LiskVerifyMessage(p.MessageType): class LiskVerifyMessage(p.MessageType):
MESSAGE_WIRE_TYPE = 120 MESSAGE_WIRE_TYPE = 120
@ -17,7 +23,7 @@ class LiskVerifyMessage(p.MessageType):
self.message = message self.message = message
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('public_key', p.BytesType, 0), 1: ('public_key', p.BytesType, 0),
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),

View File

@ -4,6 +4,12 @@ import protobuf as p
from .HDNodeType import HDNodeType from .HDNodeType import HDNodeType
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class LoadDevice(p.MessageType): class LoadDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 13 MESSAGE_WIRE_TYPE = 13
@ -29,7 +35,7 @@ class LoadDevice(p.MessageType):
self.u2f_counter = u2f_counter self.u2f_counter = u2f_counter
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('mnemonic', p.UnicodeType, 0), 1: ('mnemonic', p.UnicodeType, 0),
2: ('node', HDNodeType, 0), 2: ('node', HDNodeType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class MessageSignature(p.MessageType): class MessageSignature(p.MessageType):
MESSAGE_WIRE_TYPE = 40 MESSAGE_WIRE_TYPE = 40
@ -15,7 +21,7 @@ class MessageSignature(p.MessageType):
self.signature = signature self.signature = signature
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.UnicodeType, 0), 1: ('address', p.UnicodeType, 0),
2: ('signature', p.BytesType, 0), 2: ('signature', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class MoneroAccountPublicAddress(p.MessageType): class MoneroAccountPublicAddress(p.MessageType):
@ -14,7 +20,7 @@ class MoneroAccountPublicAddress(p.MessageType):
self.view_public_key = view_public_key self.view_public_key = view_public_key
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('spend_public_key', p.BytesType, 0), 1: ('spend_public_key', p.BytesType, 0),
2: ('view_public_key', p.BytesType, 0), 2: ('view_public_key', p.BytesType, 0),

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class MoneroAddress(p.MessageType): class MoneroAddress(p.MessageType):
MESSAGE_WIRE_TYPE = 541 MESSAGE_WIRE_TYPE = 541
@ -13,7 +19,7 @@ class MoneroAddress(p.MessageType):
self.address = address self.address = address
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('address', p.BytesType, 0), 1: ('address', p.BytesType, 0),
} }

View File

@ -2,6 +2,12 @@
# fmt: off # fmt: off
import protobuf as p import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional
except ImportError:
Dict, List, Optional = None, None, None # type: ignore
class MoneroExportedKeyImage(p.MessageType): class MoneroExportedKeyImage(p.MessageType):
@ -14,7 +20,7 @@ class MoneroExportedKeyImage(p.MessageType):
self.blob = blob self.blob = blob
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
1: ('iv', p.BytesType, 0), 1: ('iv', p.BytesType, 0),
3: ('blob', p.BytesType, 0), 3: ('blob', p.BytesType, 0),

View File

@ -4,9 +4,9 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import List from typing import Dict, List, Optional
except ImportError: except ImportError:
List = None # type: ignore Dict, List, Optional = None, None, None # type: ignore
class MoneroGetAddress(p.MessageType): class MoneroGetAddress(p.MessageType):
@ -29,7 +29,7 @@ class MoneroGetAddress(p.MessageType):
self.payment_id = payment_id self.payment_id = payment_id
@classmethod @classmethod
def get_fields(cls): def get_fields(cls) -> Dict:
return { return {
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),

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