Entries returned by wallet in get_payments(), get_transactions_in() and get_transactions_out() are payments (or transfers), each of them meaning "Amount X moved from address A to address B".
Transactions may contain multiple payments/transfers. Therefore, Transfer or Payment classes should not inherit from Transaction. Set membership is not inheritance.
Proposal:
Payment as a base class with txid attribute (transaction id/hash) which is a str() representation
IncomingPayment(Payment) and OutgoingPayment(Payment) returned by wallet, having extra attributes
Transaction as a separate class with txid and blob. Is returned by transfer(), can be submitted to daemon, in future can be retrieved from daemon as well.
Entries returned by wallet in
get_payments()
,get_transactions_in()
andget_transactions_out()
are payments (or transfers), each of them meaning "Amount X moved from address A to address B".Transactions may contain multiple payments/transfers. Therefore,
Transfer
orPayment
classes should not inherit fromTransaction
. Set membership is not inheritance.Proposal:
Payment
as a base class withtxid
attribute (transaction id/hash) which is astr()
representationIncomingPayment(Payment)
andOutgoingPayment(Payment)
returned by wallet, having extra attributesTransaction
as a separate class withtxid
andblob
. Is returned bytransfer()
, can be submitted to daemon, in future can be retrieved from daemon as well.TBA