2017-12-12 15:40:11 +00:00
|
|
|
# Automatically generated by pb2py
|
|
|
|
from .. import protobuf as p
|
2018-05-09 15:14:44 +00:00
|
|
|
if __debug__:
|
|
|
|
try:
|
|
|
|
from typing import List
|
|
|
|
except ImportError:
|
|
|
|
List = None
|
2017-12-12 15:40:11 +00:00
|
|
|
from .TransactionType import TransactionType
|
2018-01-12 11:54:06 +00:00
|
|
|
from .TxInputType import TxInputType
|
2017-12-12 15:40:11 +00:00
|
|
|
from .TxOutputType import TxOutputType
|
|
|
|
|
|
|
|
|
|
|
|
class SimpleSignTx(p.MessageType):
|
2018-05-09 15:14:44 +00:00
|
|
|
MESSAGE_WIRE_TYPE = 16
|
2017-12-12 15:40:11 +00:00
|
|
|
FIELDS = {
|
|
|
|
1: ('inputs', TxInputType, p.FLAG_REPEATED),
|
|
|
|
2: ('outputs', TxOutputType, p.FLAG_REPEATED),
|
|
|
|
3: ('transactions', TransactionType, p.FLAG_REPEATED),
|
|
|
|
4: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
|
|
|
|
5: ('version', p.UVarintType, 0), # default=1
|
|
|
|
6: ('lock_time', p.UVarintType, 0), # default=0
|
2018-06-05 14:02:51 +00:00
|
|
|
7: ('expiry', p.UVarintType, 0),
|
|
|
|
8: ('overwintered', p.BoolType, 0),
|
2017-12-12 15:40:11 +00:00
|
|
|
}
|
2018-05-09 15:14:44 +00:00
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
inputs: List[TxInputType] = None,
|
|
|
|
outputs: List[TxOutputType] = None,
|
|
|
|
transactions: List[TransactionType] = None,
|
|
|
|
coin_name: str = None,
|
|
|
|
version: int = None,
|
2018-06-05 14:02:51 +00:00
|
|
|
lock_time: int = None,
|
|
|
|
expiry: int = None,
|
|
|
|
overwintered: bool = None
|
2018-05-09 15:14:44 +00:00
|
|
|
) -> None:
|
|
|
|
self.inputs = inputs if inputs is not None else []
|
|
|
|
self.outputs = outputs if outputs is not None else []
|
|
|
|
self.transactions = transactions if transactions is not None else []
|
|
|
|
self.coin_name = coin_name
|
|
|
|
self.version = version
|
|
|
|
self.lock_time = lock_time
|
2018-06-05 14:02:51 +00:00
|
|
|
self.expiry = expiry
|
|
|
|
self.overwintered = overwintered
|