monero-java icon indicating copy to clipboard operation
monero-java copied to clipboard

convert MoneroTx extra to string

Open t-900-a opened this issue 4 years ago • 2 comments

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?

t-900-a avatar Mar 19 '20 03:03 t-900-a

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 avatar Mar 19 '20 13:03 woodser

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 avatar Mar 19 '20 13:03 woodser

Closing, please re-open if still relevant.

woodser avatar Mar 26 '24 15:03 woodser