monero-ecosystem / monero-python

A comprehensive Python module for handling Monero cryptocurrency
BSD 3-Clause "New" or "Revised" License
246 stars 80 forks source link

Adding support for one-time outputs #78

Closed jeffro256 closed 3 years ago

jeffro256 commented 3 years ago

This PR adds a OneTimeOutput class to represent the one-time pubic outputs (stealth addresses) on the blockchain that are created as the result of every transaction and which are the inputs to every transaction except for miner transactions. I have also added an output_indices attribute and an outputs property to the Transaction class. The output_indices attribute is now populated in the _do_get_transactions method in monero.backends.jsonrpc from the RPC response from get_transactions. The outputs property of Transaction can then be used to retreive available information on the one-time outputs created from the transaction. I added one unit test in "tests/test_transaction.py" to demonstrate this functionality.

jeffro256 commented 3 years ago

I have a branch of this branch called get_outs which you can view on my repo page which, if this branch is merged, I will request another PR. It adds a method outs to Daemon and JSONRPCDaemon which is the "/get_outs" analogue to block and transactions.

emesik commented 3 years ago

Sorry for being late with this but I need some more time to review it. Will do it on a spare day soon.

jeffro256 commented 3 years ago

Howdy! I still intend for this PR to happen, but it is incompatible with the one I just requested, which I think will make future development easier. I will work on the branch conflicts and get back to you.