You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/trezor/messages/StellarPathPaymentOp.py

48 lines
1.5 KiB

# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .StellarAssetType import StellarAssetType
if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
except ImportError:
pass
class StellarPathPaymentOp(p.MessageType):
MESSAGE_WIRE_TYPE = 212
def __init__(
self,
*,
paths: List[StellarAssetType] = None,
source_account: str = None,
send_asset: StellarAssetType = None,
send_max: int = None,
destination_account: str = None,
destination_asset: StellarAssetType = None,
destination_amount: int = None,
) -> None:
self.paths = paths if paths is not None else []
self.source_account = source_account
self.send_asset = send_asset
self.send_max = send_max
self.destination_account = destination_account
self.destination_asset = destination_asset
self.destination_amount = destination_amount
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('source_account', p.UnicodeType, None),
2: ('send_asset', StellarAssetType, None),
3: ('send_max', p.SVarintType, None),
4: ('destination_account', p.UnicodeType, None),
5: ('destination_asset', StellarAssetType, None),
6: ('destination_amount', p.SVarintType, None),
7: ('paths', StellarAssetType, p.FLAG_REPEATED),
}