mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-06 23:02:33 +00:00
45 lines
1.3 KiB
Python
45 lines
1.3 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 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),
|
|
}
|