1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-25 07:48:10 +00:00
trezor-firmware/trezorlib/messages/StellarPathPaymentOp.py

40 lines
1.3 KiB
Python
Raw Normal View History

2018-04-16 13:44:53 +00:00
# Automatically generated by pb2py
from .. import protobuf as p
if __debug__:
try:
from typing import List
except ImportError:
List = None
2018-04-16 13:44:53 +00:00
from .StellarAssetType import StellarAssetType
class StellarPathPaymentOp(p.MessageType):
MESSAGE_WIRE_TYPE = 212
2018-04-16 13:44:53 +00:00
FIELDS = {
1: ('source_account', p.BytesType, 0),
2: ('send_asset', StellarAssetType, 0),
3: ('send_max', p.SVarintType, 0),
2018-04-16 13:44:53 +00:00
4: ('destination_account', p.BytesType, 0),
5: ('destination_asset', StellarAssetType, 0),
6: ('destination_amount', p.SVarintType, 0),
2018-04-16 13:44:53 +00:00
7: ('paths', StellarAssetType, p.FLAG_REPEATED),
}
def __init__(
self,
source_account: bytes = None,
send_asset: StellarAssetType = None,
send_max: int = None,
destination_account: bytes = None,
destination_asset: StellarAssetType = None,
destination_amount: int = None,
paths: List[StellarAssetType] = None
) -> None:
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
self.paths = paths if paths is not None else []