2019-05-14 14:22:23 +00:00
|
|
|
# Automatically generated by pb2py
|
|
|
|
# fmt: off
|
|
|
|
from .. import protobuf as p
|
|
|
|
|
|
|
|
from .LiskTransactionAsset import LiskTransactionAsset
|
|
|
|
|
2019-07-03 13:02:50 +00:00
|
|
|
if __debug__:
|
|
|
|
try:
|
|
|
|
from typing import Dict, List, Optional
|
2019-08-02 17:06:01 +00:00
|
|
|
from typing_extensions import Literal # noqa: F401
|
|
|
|
EnumTypeLiskTransactionType = Literal[0, 1, 2, 3, 4, 5, 6, 7]
|
2019-07-03 13:02:50 +00:00
|
|
|
except ImportError:
|
|
|
|
Dict, List, Optional = None, None, None # type: ignore
|
2019-08-02 17:06:01 +00:00
|
|
|
EnumTypeLiskTransactionType = None # type: ignore
|
2019-07-03 13:02:50 +00:00
|
|
|
|
2019-05-14 14:22:23 +00:00
|
|
|
|
|
|
|
class LiskTransactionCommon(p.MessageType):
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
2019-08-02 17:06:01 +00:00
|
|
|
type: EnumTypeLiskTransactionType = None,
|
2019-05-14 14:22:23 +00:00
|
|
|
amount: int = None,
|
|
|
|
fee: int = None,
|
|
|
|
recipient_id: str = None,
|
|
|
|
sender_public_key: bytes = None,
|
|
|
|
requester_public_key: bytes = None,
|
|
|
|
signature: bytes = None,
|
|
|
|
timestamp: int = None,
|
|
|
|
asset: LiskTransactionAsset = None,
|
|
|
|
) -> None:
|
|
|
|
self.type = type
|
|
|
|
self.amount = amount
|
|
|
|
self.fee = fee
|
|
|
|
self.recipient_id = recipient_id
|
|
|
|
self.sender_public_key = sender_public_key
|
|
|
|
self.requester_public_key = requester_public_key
|
|
|
|
self.signature = signature
|
|
|
|
self.timestamp = timestamp
|
|
|
|
self.asset = asset
|
|
|
|
|
|
|
|
@classmethod
|
2019-07-03 13:02:50 +00:00
|
|
|
def get_fields(cls) -> Dict:
|
2019-05-14 14:22:23 +00:00
|
|
|
return {
|
2019-08-02 17:06:01 +00:00
|
|
|
1: ('type', p.EnumType("LiskTransactionType", (0, 1, 2, 3, 4, 5, 6, 7)), 0),
|
2019-05-14 14:22:23 +00:00
|
|
|
2: ('amount', p.UVarintType, 0), # default=0
|
|
|
|
3: ('fee', p.UVarintType, 0),
|
|
|
|
4: ('recipient_id', p.UnicodeType, 0),
|
|
|
|
5: ('sender_public_key', p.BytesType, 0),
|
|
|
|
6: ('requester_public_key', p.BytesType, 0),
|
|
|
|
7: ('signature', p.BytesType, 0),
|
|
|
|
8: ('timestamp', p.UVarintType, 0),
|
|
|
|
9: ('asset', LiskTransactionAsset, 0),
|
|
|
|
}
|