# Automatically generated by pb2py # fmt: off from .. import protobuf as p if __debug__: try: from typing import Dict, List # noqa: F401 from typing_extensions import Literal # noqa: F401 EnumTypeAmountUnit = Literal[0, 1, 2, 3] except ImportError: pass class SignTx(p.MessageType): MESSAGE_WIRE_TYPE = 15 def __init__( self, *, outputs_count: int, inputs_count: int, coin_name: str = "Bitcoin", version: int = 1, lock_time: int = 0, expiry: int = None, overwintered: bool = None, version_group_id: int = None, timestamp: int = None, branch_id: int = None, amount_unit: EnumTypeAmountUnit = 0, ) -> None: self.outputs_count = outputs_count self.inputs_count = inputs_count self.coin_name = coin_name self.version = version self.lock_time = lock_time self.expiry = expiry self.overwintered = overwintered self.version_group_id = version_group_id self.timestamp = timestamp self.branch_id = branch_id self.amount_unit = amount_unit @classmethod def get_fields(cls) -> Dict: return { 1: ('outputs_count', p.UVarintType, p.FLAG_REQUIRED), 2: ('inputs_count', p.UVarintType, p.FLAG_REQUIRED), 3: ('coin_name', p.UnicodeType, "Bitcoin"), # default=Bitcoin 4: ('version', p.UVarintType, 1), # default=1 5: ('lock_time', p.UVarintType, 0), # default=0 6: ('expiry', p.UVarintType, None), 7: ('overwintered', p.BoolType, None), 8: ('version_group_id', p.UVarintType, None), 9: ('timestamp', p.UVarintType, None), 10: ('branch_id', p.UVarintType, None), 11: ('amount_unit', p.EnumType("AmountUnit", (0, 1, 2, 3)), 0), # default=BITCOIN }