0

Disclaimer: This is my first ever post. Please let me know if I didn't follow the guidelines for asking a question. Thank you all.

I have stumbled upon this issue with other questions but none answered a proper way to add some kind of sender-based data to be added in the extra field of a monero transaction.

Some suggested editing the monero source code and some say to use paymentID. However, with paymentID being obsolete now, I want a way to add data to the field without any restriction knowing that I won't exceed the block size of course.

If the only way is to edit the source code of monero, I had a look at the structure of the code (especially monero-wallet-rpc) and I was wondering what I can change to provide that functionality. I know I will have to change something too in the wallet-cli or the daemon but I'm still exploring.

Any guidance towards solving the problem of having the ability to add bytes to extra that are sender specified would be much appreciated.

1
1

Only the old, long-form, unencrypted payment IDs are obsolete. You can still use the short (8 byte) encrypted payment IDs.

You create/attach encrypted payment IDs by using the command integrated_address:

help integrated_address 

Command usage: 
  integrated_address [device] [<payment_id> | <address>]

Command description: 
  Encode a payment ID into an integrated address for the current wallet public address (no argument uses a random payment ID), or decode an integrated address to standard address and payment ID

Replacing <payment_id> with the 8 hex bytes you want to use. The result will be an integrated address with an embedded encrypted payment ID. E.g.

integrated_address deadbeeffacefeed

More information can be found: https://web.getmonero.org/resources/moneropedia/paymentid.html

3
  • I'm aware that I can use short payment IDs to create integrated addresses. What I meant by restrictions in my question is the limitation of number of bytes to use. I want to use up to 32 bytes. I want to be able to store a SHA-256 hash or something of that sort. Maybe I didn't make that clear enough.
    – amnzaza
    Apr 15 '20 at 17:19
  • Without manually editing/constructing the tx, the only way to add extra data easily is via encrypted payment IDs. For adding 32 bytes, other potential ways could be simply splitting your 32 bytes over 4 integrated addresses or burning some funds to a fake output key.
    – jtgrassie
    Apr 17 '20 at 19:41
  • I'm currently looking into ways of manually editing the tx. But thanks for the suggestion of splitting the message digest into 4. I might use that if nothing else works.
    – amnzaza
    Apr 18 '20 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.