1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-02 04:18:20 +00:00
trezor-firmware/python/trezorlib/messages/CardanoSignTx.py
matejcik cf396e3661 python: return generated files to git
This separates the regeneration step from the build/install step.
This is to simplify bootstrapping: trezorlib is needed in several
build/test steps, and bound to be needed in more. It should be
usable and installable straight from the checkout.
2019-05-17 15:09:58 +02:00

38 lines
1.1 KiB
Python

# Automatically generated by pb2py
# fmt: off
from .. import protobuf as p
from .CardanoTxInputType import CardanoTxInputType
from .CardanoTxOutputType import CardanoTxOutputType
if __debug__:
try:
from typing import List
except ImportError:
List = None # type: ignore
class CardanoSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 303
def __init__(
self,
inputs: List[CardanoTxInputType] = None,
outputs: List[CardanoTxOutputType] = None,
transactions_count: int = None,
protocol_magic: int = None,
) -> None:
self.inputs = inputs if inputs is not None else []
self.outputs = outputs if outputs is not None else []
self.transactions_count = transactions_count
self.protocol_magic = protocol_magic
@classmethod
def get_fields(cls):
return {
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
3: ('transactions_count', p.UVarintType, 0),
5: ('protocol_magic', p.UVarintType, 0),
}