4
2
This might be a possible duplicate with this.
I want to know a proper way to insert additional string with OP_RETURN and retrieve the transaction from block chain and decode it accordingly.
Thank you
4
2
This might be a possible duplicate with this.
I want to know a proper way to insert additional string with OP_RETURN and retrieve the transaction from block chain and decode it accordingly.
Thank you
6
Essentially, one of the output scripts should be
OP_RETURN <the data you want to add>
That's it.
Let me give an example. Say you want to add the string "Melons." to the blockchain.
4d656c6f6e732e074d656c6f6e732e6a074d656c6f6e732eThat's... trickier. Bitcoin is not optimized for searching the metadata of transactions.
Possibilities:
bitcointools.
So to find the data again, we should traverse through the blockchain, find OP_RETURN patterns, grab associated data, index them ..., right? – anhldbk – 2017-02-07T15:27:47.093