woodser / monero-java

Java library for using Monero
https://woodser.github.io/monero-java/javadocs/
MIT License
106 stars 39 forks source link

convert MoneroTx extra to string #23

Closed t-900-a closed 7 months ago

t-900-a commented 4 years ago

I saw this in the todo.txt, wondering if this is still on the radar? I'd like to complete it, but will need some direction. Not sure what to do with the int array. I thought it was hex, but hex has more than just integers. Also what are your guys's thoughts on adding a function to add a string to the TX_EXTRA_TAG_PADDING field within tx extra?

woodser commented 4 years ago

Here is a JavaScript utility which demonstrates converting a tx extra field to a string.

C++ utilities exist to modify and parse tx extra data. Any of these methods can be exposed in Java or JavaScript if they're useful.

Background reading on how tx extra data is encoded: https://cryptonote.org/cns/cns005.txt

woodser commented 4 years ago

This method creates an extra field which is passed in to tx creation.

Similar support could be added to the tx creation method used by the Java and JavaScript libraries, so you can pass your custom extra data with the send request.

woodser commented 7 months ago

Closing, please re-open if still relevant.