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/CardanoSignTx.py

45 lines
1.3 KiB

# Automatically generated by pb2py
# fmt: off
import protobuf as p
from .CardanoTxInputType import CardanoTxInputType
from .CardanoTxOutputType import CardanoTxOutputType
if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
except ImportError:
pass
class CardanoSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 303
def __init__(
self,
inputs: List[CardanoTxInputType] = None,
outputs: List[CardanoTxOutputType] = None,
protocol_magic: int = None,
fee: int = None,
ttl: int = None,
network_id: int = None,
) -> None:
self.inputs = inputs if inputs is not None else []
self.outputs = outputs if outputs is not None else []
self.protocol_magic = protocol_magic
self.fee = fee
self.ttl = ttl
self.network_id = network_id
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('inputs', CardanoTxInputType, p.FLAG_REPEATED),
2: ('outputs', CardanoTxOutputType, p.FLAG_REPEATED),
5: ('protocol_magic', p.UVarintType, 0),
6: ('fee', p.UVarintType, 0),
7: ('ttl', p.UVarintType, 0),
8: ('network_id', p.UVarintType, 0),
}