2019-05-14 14:22:23 +00:00
|
|
|
# Automatically generated by pb2py
|
|
|
|
# fmt: off
|
|
|
|
from .. import protobuf as p
|
|
|
|
|
2019-07-03 13:02:50 +00:00
|
|
|
if __debug__:
|
|
|
|
try:
|
2019-10-02 12:40:25 +00:00
|
|
|
from typing import Dict, List # noqa: F401
|
2019-08-02 17:06:01 +00:00
|
|
|
from typing_extensions import Literal # noqa: F401
|
2019-07-03 13:02:50 +00:00
|
|
|
except ImportError:
|
2019-10-02 12:40:25 +00:00
|
|
|
pass
|
2019-07-03 13:02:50 +00:00
|
|
|
|
2019-05-14 14:22:23 +00:00
|
|
|
|
|
|
|
class SignTx(p.MessageType):
|
|
|
|
MESSAGE_WIRE_TYPE = 15
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
outputs_count: int = None,
|
|
|
|
inputs_count: int = None,
|
|
|
|
coin_name: str = None,
|
|
|
|
version: int = None,
|
|
|
|
lock_time: int = None,
|
|
|
|
expiry: int = None,
|
2020-06-30 07:43:01 +00:00
|
|
|
_overwintered: bool = None,
|
2019-05-14 14:22:23 +00:00
|
|
|
version_group_id: int = None,
|
|
|
|
timestamp: int = None,
|
|
|
|
branch_id: int = None,
|
|
|
|
) -> 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
|
2020-06-30 07:43:01 +00:00
|
|
|
self._overwintered = _overwintered
|
2019-05-14 14:22:23 +00:00
|
|
|
self.version_group_id = version_group_id
|
|
|
|
self.timestamp = timestamp
|
|
|
|
self.branch_id = branch_id
|
|
|
|
|
|
|
|
@classmethod
|
2019-07-03 13:02:50 +00:00
|
|
|
def get_fields(cls) -> Dict:
|
2019-05-14 14:22:23 +00:00
|
|
|
return {
|
|
|
|
1: ('outputs_count', p.UVarintType, 0), # required
|
|
|
|
2: ('inputs_count', p.UVarintType, 0), # required
|
|
|
|
3: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
|
|
|
|
4: ('version', p.UVarintType, 0), # default=1
|
|
|
|
5: ('lock_time', p.UVarintType, 0), # default=0
|
|
|
|
6: ('expiry', p.UVarintType, 0),
|
2020-06-30 07:43:01 +00:00
|
|
|
7: ('_overwintered', p.BoolType, 0),
|
2019-05-14 14:22:23 +00:00
|
|
|
8: ('version_group_id', p.UVarintType, 0),
|
|
|
|
9: ('timestamp', p.UVarintType, 0),
|
|
|
|
10: ('branch_id', p.UVarintType, 0),
|
|
|
|
}
|