mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-27 16:48:09 +00:00
messages: add types
This commit is contained in:
parent
3af75c0b8b
commit
86e16bbf31
@ -214,7 +214,7 @@ class Descriptor:
|
||||
def create_fields_method(self, fields):
|
||||
# fmt: off
|
||||
yield " @classmethod"
|
||||
yield " def get_fields(cls):"
|
||||
yield " def get_fields(cls) -> Dict:"
|
||||
yield " return {"
|
||||
for field in fields:
|
||||
comments = []
|
||||
@ -255,13 +255,12 @@ class Descriptor:
|
||||
|
||||
yield from self.process_message_imports(fields)
|
||||
|
||||
if any(field.repeated for field in fields):
|
||||
yield ""
|
||||
yield "if __debug__:"
|
||||
yield " try:"
|
||||
yield " from typing import List"
|
||||
yield " except ImportError:"
|
||||
yield " List = None # type: ignore"
|
||||
yield ""
|
||||
yield "if __debug__:"
|
||||
yield " try:"
|
||||
yield " from typing import Dict, List, Optional"
|
||||
yield " except ImportError:"
|
||||
yield " Dict, List, Optional = None, None, None # type: ignore"
|
||||
|
||||
yield ""
|
||||
yield ""
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 30
|
||||
@ -13,7 +19,7 @@ class Address(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, 0), # required
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 28
|
||||
@ -13,7 +19,7 @@ class ApplyFlags(p.MessageType):
|
||||
self.flags = flags
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('flags', p.UVarintType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 25
|
||||
@ -25,7 +31,7 @@ class ApplySettings(p.MessageType):
|
||||
self.display_rotation = display_rotation
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('language', p.UnicodeType, 0),
|
||||
2: ('label', p.UnicodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 34
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 27
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 26
|
||||
@ -15,7 +21,7 @@ class ButtonRequest(p.MessageType):
|
||||
self.data = data
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('code', p.UVarintType, 0),
|
||||
2: ('data', p.UnicodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 20
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 308
|
||||
@ -13,7 +19,7 @@ class CardanoAddress(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, 0),
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CardanoGetAddress(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class CardanoGetAddress(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CardanoGetPublicKey(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class CardanoGetPublicKey(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 306
|
||||
@ -17,7 +23,7 @@ class CardanoPublicKey(p.MessageType):
|
||||
self.node = node
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('xpub', p.UnicodeType, 0),
|
||||
2: ('node', HDNodeType, 0),
|
||||
|
@ -7,9 +7,9 @@ from .CardanoTxOutputType import CardanoTxOutputType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CardanoSignTx(p.MessageType):
|
||||
@ -28,7 +28,7 @@ class CardanoSignTx(p.MessageType):
|
||||
self.protocol_magic = protocol_magic
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
|
||||
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 310
|
||||
@ -15,7 +21,7 @@ class CardanoSignedTx(p.MessageType):
|
||||
self.tx_body = tx_body
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('tx_hash', p.BytesType, 0),
|
||||
2: ('tx_body', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 309
|
||||
@ -13,7 +19,7 @@ class CardanoTxAck(p.MessageType):
|
||||
self.transaction = transaction
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('transaction', p.BytesType, 0),
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CardanoTxInputType(p.MessageType):
|
||||
@ -24,7 +24,7 @@ class CardanoTxInputType(p.MessageType):
|
||||
self.type = type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('prev_hash', p.BytesType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CardanoTxOutputType(p.MessageType):
|
||||
@ -22,7 +22,7 @@ class CardanoTxOutputType(p.MessageType):
|
||||
self.amount = amount
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, 0),
|
||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 304
|
||||
@ -17,7 +23,7 @@ class CardanoTxRequest(p.MessageType):
|
||||
self.tx_body = tx_body
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('tx_index', p.UVarintType, 0),
|
||||
2: ('tx_hash', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 4
|
||||
@ -13,7 +19,7 @@ class ChangePin(p.MessageType):
|
||||
self.remove = remove
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('remove', p.BoolType, 0),
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class CipherKeyValue(p.MessageType):
|
||||
@ -31,7 +31,7 @@ class CipherKeyValue(p.MessageType):
|
||||
self.iv = iv
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('key', p.UnicodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 48
|
||||
@ -13,7 +19,7 @@ class CipheredKeyValue(p.MessageType):
|
||||
self.value = value
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('value', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 24
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 100
|
||||
@ -17,7 +23,7 @@ class DebugLinkDecision(p.MessageType):
|
||||
self.input = input
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('yes_no', p.BoolType, 0),
|
||||
2: ('up_down', p.BoolType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 101
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 102
|
||||
@ -37,7 +43,7 @@ class DebugLinkState(p.MessageType):
|
||||
self.mnemonic_type = mnemonic_type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('layout', p.BytesType, 0),
|
||||
2: ('pin', p.UnicodeType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class DebugMoneroDiagAck(p.MessageType):
|
||||
@ -29,7 +29,7 @@ class DebugMoneroDiagAck(p.MessageType):
|
||||
self.data2 = data2
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('ins', p.UVarintType, 0),
|
||||
2: ('p1', p.UVarintType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class DebugMoneroDiagRequest(p.MessageType):
|
||||
@ -29,7 +29,7 @@ class DebugMoneroDiagRequest(p.MessageType):
|
||||
self.data2 = data2
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('ins', p.UVarintType, 0),
|
||||
2: ('p1', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 62
|
||||
@ -13,7 +19,7 @@ class ECDHSessionKey(p.MessageType):
|
||||
self.session_key = session_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('session_key', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 10
|
||||
@ -13,7 +19,7 @@ class Entropy(p.MessageType):
|
||||
self.entropy = entropy
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('entropy', p.BytesType, 0), # required
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 36
|
||||
@ -13,7 +19,7 @@ class EntropyAck(p.MessageType):
|
||||
self.entropy = entropy
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('entropy', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 35
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -18,7 +24,7 @@ class EosActionBuyRam(p.MessageType):
|
||||
self.quantity = quantity
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('payer', p.UVarintType, 0),
|
||||
2: ('receiver', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -16,7 +22,7 @@ class EosActionBuyRamBytes(p.MessageType):
|
||||
self.bytes = bytes
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('payer', p.UVarintType, 0),
|
||||
2: ('receiver', p.UVarintType, 0),
|
||||
|
@ -6,9 +6,9 @@ from .EosPermissionLevel import EosPermissionLevel
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosActionCommon(p.MessageType):
|
||||
@ -24,7 +24,7 @@ class EosActionCommon(p.MessageType):
|
||||
self.authorization = authorization if authorization is not None else []
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('name', p.UVarintType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -22,7 +28,7 @@ class EosActionDelegate(p.MessageType):
|
||||
self.transfer = transfer
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('sender', p.UVarintType, 0),
|
||||
2: ('receiver', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosActionDeleteAuth(p.MessageType):
|
||||
self.permission = permission
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('permission', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -18,7 +24,7 @@ class EosActionLinkAuth(p.MessageType):
|
||||
self.requirement = requirement
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('code', p.UVarintType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -20,7 +26,7 @@ class EosActionNewAccount(p.MessageType):
|
||||
self.active = active
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('creator', p.UVarintType, 0),
|
||||
2: ('name', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -12,7 +18,7 @@ class EosActionRefund(p.MessageType):
|
||||
self.owner = owner
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('owner', p.UVarintType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosActionSellRam(p.MessageType):
|
||||
self.bytes = bytes
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('bytes', p.UVarintType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -20,7 +26,7 @@ class EosActionTransfer(p.MessageType):
|
||||
self.memo = memo
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('sender', p.UVarintType, 0),
|
||||
2: ('receiver', p.UVarintType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -20,7 +26,7 @@ class EosActionUndelegate(p.MessageType):
|
||||
self.cpu_quantity = cpu_quantity
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('sender', p.UVarintType, 0),
|
||||
2: ('receiver', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosActionUnknown(p.MessageType):
|
||||
self.data_chunk = data_chunk
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_size', p.UVarintType, 0),
|
||||
2: ('data_chunk', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -16,7 +22,7 @@ class EosActionUnlinkAuth(p.MessageType):
|
||||
self.type = type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('code', p.UVarintType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -20,7 +26,7 @@ class EosActionUpdateAuth(p.MessageType):
|
||||
self.auth = auth
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', p.UVarintType, 0),
|
||||
2: ('permission', p.UVarintType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosActionVoteProducer(p.MessageType):
|
||||
@ -22,7 +22,7 @@ class EosActionVoteProducer(p.MessageType):
|
||||
self.producers = producers if producers is not None else []
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('voter', p.UVarintType, 0),
|
||||
2: ('proxy', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosAsset(p.MessageType):
|
||||
self.symbol = symbol
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('amount', p.SVarintType, 0),
|
||||
2: ('symbol', p.UVarintType, 0),
|
||||
|
@ -8,9 +8,9 @@ from .EosAuthorizationWait import EosAuthorizationWait
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosAuthorization(p.MessageType):
|
||||
@ -28,7 +28,7 @@ class EosAuthorization(p.MessageType):
|
||||
self.waits = waits if waits is not None else []
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('threshold', p.UVarintType, 0),
|
||||
2: ('keys', EosAuthorizationKey, p.FLAG_REPEATED),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -16,7 +22,7 @@ class EosAuthorizationAccount(p.MessageType):
|
||||
self.weight = weight
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('account', EosPermissionLevel, 0),
|
||||
2: ('weight', p.UVarintType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosAuthorizationKey(p.MessageType):
|
||||
@ -24,7 +24,7 @@ class EosAuthorizationKey(p.MessageType):
|
||||
self.weight = weight
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, 0),
|
||||
2: ('key', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosAuthorizationWait(p.MessageType):
|
||||
self.weight = weight
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('wait_sec', p.UVarintType, 0),
|
||||
2: ('weight', p.UVarintType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosGetPublicKey(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class EosGetPublicKey(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class EosPermissionLevel(p.MessageType):
|
||||
self.permission = permission
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('actor', p.UVarintType, 0),
|
||||
2: ('permission', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 601
|
||||
@ -15,7 +21,7 @@ class EosPublicKey(p.MessageType):
|
||||
self.raw_public_key = raw_public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('wif_public_key', p.UnicodeType, 0),
|
||||
2: ('raw_public_key', p.BytesType, 0),
|
||||
|
@ -6,9 +6,9 @@ from .EosTxHeader import EosTxHeader
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EosSignTx(p.MessageType):
|
||||
@ -27,7 +27,7 @@ class EosSignTx(p.MessageType):
|
||||
self.num_actions = num_actions
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('chain_id', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 605
|
||||
@ -13,7 +19,7 @@ class EosSignedTx(p.MessageType):
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.UnicodeType, 0),
|
||||
}
|
||||
|
@ -18,6 +18,12 @@ from .EosActionUnlinkAuth import EosActionUnlinkAuth
|
||||
from .EosActionUpdateAuth import EosActionUpdateAuth
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 604
|
||||
@ -57,7 +63,7 @@ class EosTxActionAck(p.MessageType):
|
||||
self.unknown = unknown
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('common', EosActionCommon, 0),
|
||||
2: ('transfer', EosActionTransfer, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 603
|
||||
@ -13,7 +19,7 @@ class EosTxActionRequest(p.MessageType):
|
||||
self.data_size = data_size
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_size', p.UVarintType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -22,7 +28,7 @@ class EosTxHeader(p.MessageType):
|
||||
self.delay_sec = delay_sec
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('expiration', p.UVarintType, 0), # required
|
||||
2: ('ref_block_num', p.UVarintType, 0), # required
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 57
|
||||
@ -15,7 +21,7 @@ class EthereumAddress(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('old_address', p.BytesType, 0),
|
||||
2: ('address', p.UnicodeType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EthereumGetAddress(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class EthereumGetAddress(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EthereumGetPublicKey(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class EthereumGetPublicKey(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 66
|
||||
@ -15,7 +21,7 @@ class EthereumMessageSignature(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('signature', p.BytesType, 0),
|
||||
3: ('address', p.UnicodeType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 451
|
||||
@ -17,7 +23,7 @@ class EthereumPublicKey(p.MessageType):
|
||||
self.xpub = xpub
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, 0),
|
||||
2: ('xpub', p.UnicodeType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EthereumSignMessage(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class EthereumSignMessage(p.MessageType):
|
||||
self.message = message
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('message', p.BytesType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class EthereumSignTx(p.MessageType):
|
||||
@ -37,7 +37,7 @@ class EthereumSignTx(p.MessageType):
|
||||
self.tx_type = tx_type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('nonce', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 60
|
||||
@ -13,7 +19,7 @@ class EthereumTxAck(p.MessageType):
|
||||
self.data_chunk = data_chunk
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_chunk', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 59
|
||||
@ -19,7 +25,7 @@ class EthereumTxRequest(p.MessageType):
|
||||
self.signature_s = signature_s
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('data_length', p.UVarintType, 0),
|
||||
2: ('signature_v', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 65
|
||||
@ -17,7 +23,7 @@ class EthereumVerifyMessage(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
2: ('signature', p.BytesType, 0),
|
||||
3: ('message', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 3
|
||||
@ -15,7 +21,7 @@ class Failure(p.MessageType):
|
||||
self.message = message
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('code', p.UVarintType, 0),
|
||||
2: ('message', p.UnicodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 17
|
||||
@ -65,7 +71,7 @@ class Features(p.MessageType):
|
||||
self.no_backup = no_backup
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('vendor', p.UnicodeType, 0),
|
||||
2: ('major_version', p.UVarintType, 0),
|
||||
|
@ -6,9 +6,9 @@ from .MultisigRedeemScriptType import MultisigRedeemScriptType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class GetAddress(p.MessageType):
|
||||
@ -29,7 +29,7 @@ class GetAddress(p.MessageType):
|
||||
self.script_type = script_type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 61
|
||||
@ -19,7 +25,7 @@ class GetECDHSessionKey(p.MessageType):
|
||||
self.ecdsa_curve_name = ecdsa_curve_name
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('identity', IdentityType, 0),
|
||||
2: ('peer_public_key', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 9
|
||||
@ -13,7 +19,7 @@ class GetEntropy(p.MessageType):
|
||||
self.size = size
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('size', p.UVarintType, 0), # required
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 55
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class GetPublicKey(p.MessageType):
|
||||
@ -27,7 +27,7 @@ class GetPublicKey(p.MessageType):
|
||||
self.script_type = script_type
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('ecdsa_curve_name', p.UnicodeType, 0),
|
||||
|
@ -6,9 +6,9 @@ from .HDNodeType import HDNodeType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class HDNodePathType(p.MessageType):
|
||||
@ -22,7 +22,7 @@ class HDNodePathType(p.MessageType):
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('node', HDNodeType, 0), # required
|
||||
2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -22,7 +28,7 @@ class HDNodeType(p.MessageType):
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('depth', p.UVarintType, 0), # required
|
||||
2: ('fingerprint', p.UVarintType, 0), # required
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -22,7 +28,7 @@ class IdentityType(p.MessageType):
|
||||
self.index = index
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('proto', p.UnicodeType, 0),
|
||||
2: ('user', p.UnicodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 0
|
||||
@ -15,7 +21,7 @@ class Initialize(p.MessageType):
|
||||
self.skip_passphrase = skip_passphrase
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('state', p.BytesType, 0),
|
||||
2: ('skip_passphrase', p.BoolType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 115
|
||||
@ -13,7 +19,7 @@ class LiskAddress(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -12,7 +18,7 @@ class LiskDelegateType(p.MessageType):
|
||||
self.username = username
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('username', p.UnicodeType, 0),
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskGetAddress(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class LiskGetAddress(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskGetPublicKey(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class LiskGetPublicKey(p.MessageType):
|
||||
self.show_display = show_display
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 119
|
||||
@ -15,7 +21,7 @@ class LiskMessageSignature(p.MessageType):
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, 0),
|
||||
2: ('signature', p.BytesType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskMultisignatureType(p.MessageType):
|
||||
@ -22,7 +22,7 @@ class LiskMultisignatureType(p.MessageType):
|
||||
self.keys_group = keys_group if keys_group is not None else []
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('min', p.UVarintType, 0),
|
||||
2: ('life_time', p.UVarintType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 122
|
||||
@ -13,7 +19,7 @@ class LiskPublicKey(p.MessageType):
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, 0),
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskSignMessage(p.MessageType):
|
||||
@ -21,7 +21,7 @@ class LiskSignMessage(p.MessageType):
|
||||
self.message = message
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('message', p.BytesType, 0),
|
||||
|
@ -6,9 +6,9 @@ from .LiskTransactionCommon import LiskTransactionCommon
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskSignTx(p.MessageType):
|
||||
@ -23,7 +23,7 @@ class LiskSignTx(p.MessageType):
|
||||
self.transaction = transaction
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('transaction', LiskTransactionCommon, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -12,7 +18,7 @@ class LiskSignatureType(p.MessageType):
|
||||
self.public_key = public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 117
|
||||
@ -13,7 +19,7 @@ class LiskSignedTx(p.MessageType):
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', p.BytesType, 0),
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ from .LiskSignatureType import LiskSignatureType
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class LiskTransactionAsset(p.MessageType):
|
||||
@ -30,7 +30,7 @@ class LiskTransactionAsset(p.MessageType):
|
||||
self.data = data
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('signature', LiskSignatureType, 0),
|
||||
2: ('delegate', LiskDelegateType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
|
||||
@ -30,7 +36,7 @@ class LiskTransactionCommon(p.MessageType):
|
||||
self.asset = asset
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('type', p.UVarintType, 0),
|
||||
2: ('amount', p.UVarintType, 0), # default=0
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 120
|
||||
@ -17,7 +23,7 @@ class LiskVerifyMessage(p.MessageType):
|
||||
self.message = message
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('public_key', p.BytesType, 0),
|
||||
2: ('signature', p.BytesType, 0),
|
||||
|
@ -4,6 +4,12 @@ import protobuf as p
|
||||
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 13
|
||||
@ -29,7 +35,7 @@ class LoadDevice(p.MessageType):
|
||||
self.u2f_counter = u2f_counter
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('mnemonic', p.UnicodeType, 0),
|
||||
2: ('node', HDNodeType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 40
|
||||
@ -15,7 +21,7 @@ class MessageSignature(p.MessageType):
|
||||
self.signature = signature
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.UnicodeType, 0),
|
||||
2: ('signature', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class MoneroAccountPublicAddress(p.MessageType):
|
||||
self.view_public_key = view_public_key
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('spend_public_key', p.BytesType, 0),
|
||||
2: ('view_public_key', p.BytesType, 0),
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
MESSAGE_WIRE_TYPE = 541
|
||||
@ -13,7 +19,7 @@ class MoneroAddress(p.MessageType):
|
||||
self.address = address
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address', p.BytesType, 0),
|
||||
}
|
||||
|
@ -2,6 +2,12 @@
|
||||
# fmt: off
|
||||
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):
|
||||
|
||||
@ -14,7 +20,7 @@ class MoneroExportedKeyImage(p.MessageType):
|
||||
self.blob = blob
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('iv', p.BytesType, 0),
|
||||
3: ('blob', p.BytesType, 0),
|
||||
|
@ -4,9 +4,9 @@ import protobuf as p
|
||||
|
||||
if __debug__:
|
||||
try:
|
||||
from typing import List
|
||||
from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
List = None # type: ignore
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
|
||||
|
||||
class MoneroGetAddress(p.MessageType):
|
||||
@ -29,7 +29,7 @@ class MoneroGetAddress(p.MessageType):
|
||||
self.payment_id = payment_id
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls):
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||
2: ('show_display', p.BoolType, 0),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user