in resdb_driver/transaction.py [0:0]
def __init__(self, fulfillment, public_keys=None, amount=1):
"""! Create an instance of a :class:`~.Output`.
Args:
@param fulfillment (:class:`cryptoconditions.Fulfillment`): A
Fulfillment to extract a Condition from.
@param public_keys (:obj:`list` of :obj:`str`, optional): A list of
owners before a Transaction was confirmed.
@param amount (int): The amount of Assets to be locked with this
Output.
@exception TypeError: if `public_keys` is not instance of `list`.
"""
if not isinstance(public_keys, list) and public_keys is not None:
raise TypeError("`public_keys` must be a list instance or None")
if not isinstance(amount, int):
raise TypeError("`amount` must be an int")
if amount < 1:
raise AmountError("`amount` must be greater than 0")
if amount > self.MAX_AMOUNT:
raise AmountError("`amount` must be <= %s" % self.MAX_AMOUNT)
self.fulfillment = fulfillment
self.amount = amount
self.public_keys = public_keys