Author

Topic: How to write messages into the blockchain? (Read 3199 times)

hero member
Activity: 700
Merit: 500
February 22, 2015, 08:35:46 AM
#8
i've actually wondered this , but not much enough to google it , thanks for the help guis Smiley
legendary
Activity: 3472
Merit: 4801
February 20, 2015, 05:47:41 PM
#7
You're going to need a service like this: http://www.cryptograffiti.info/ for your purpose.

Thanks, but I would like to know how to do it myself

About 10 seconds with the Google search engine turned up the following:

In python you could specify the OP_RETURN value as follows:

Code:
from binascii import unhexlify

msg = 'your message of max 40 chars'
# convert msg to OP_RETURN script in hexadecimal
hexed = "6a%x%s" % (len(msg), msg.encode('hex'))
# convert to binary encoding
script = unhexlify(hexed)
Set the value of the output to 0.0, replace the transaction script with the binary part above.

Do not forget to add enough fee and send the remainder to your change address.

If you can't figure out how to use an internet search engine, it is very unlikely that you'll be able to figure out how to write a program that will allow you to build raw bitcoin transactions.
legendary
Activity: 3472
Merit: 4801
February 20, 2015, 05:44:33 PM
#6
This transaction here:

https://blockchain.info/tx/8a754f417dfda84d8fa8a27d67560fd4a0d13c54d3f617ccabae3a473d308208?show_adv=true

I know it has the text:

"The Congress shall have Power... To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries;"

But I don't see it when I click "show scripts & coinbase"

You are mistaken.

Currently the protocol doesn't support OP_RETURN messages that are longer than 40 bytes.  If you want to encode that message in plain text, it would require more than 200 bytes.

Perhaps that transaction encodes a hash of the text?  Or perhaps it has the text encoded in some form such that it is not plain text?
newbie
Activity: 4
Merit: 0
February 20, 2015, 05:41:47 PM
#5
You're going to need a service like this: http://www.cryptograffiti.info/ for your purpose.

Thanks, but I would like to know how to do it myself
newbie
Activity: 4
Merit: 0
February 20, 2015, 05:33:44 PM
#4

You would need to create your own raw transactions with the message already encoded.


How to do that?


Quote from: Glimanora
or blockchain.info?

View the transaction with the block explorer.  Make sure you click the "show scripts & coinbase" link.


This transaction here:

https://blockchain.info/tx/8a754f417dfda84d8fa8a27d67560fd4a0d13c54d3f617ccabae3a473d308208?show_adv=true

I know it has the text:

"The Congress shall have Power... To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries;"

But I don't see it when I click "show scripts & coinbase"
legendary
Activity: 1512
Merit: 1012
February 20, 2015, 05:31:08 PM
#3
You're going to need a service like this: http://www.cryptograffiti.info/ for your purpose.
legendary
Activity: 3472
Merit: 4801
February 20, 2015, 05:20:25 PM
#2
I heard recently that its possible to write plain text messages in the blockchain.

How can one do that? Can someone explain me how can I do that using bitcoin-qt?

User level functionality to do this does not yet exist in Bitcoin-Qt (and perhaps never will).

You would need to create your own raw transactions with the message already encoded.  Then you can use Bitcoin-Qt to broadcast the raw transaction if you like.

And how can I read my message and others? using bitcoin-qt

User level functionality to do this does not yet exist in Bitcoin-Qt (and perhaps never will).

From the console in the debug window you could issue the command getrawtransaction if you know the transaction ID.

or blockchain.info?

View the transaction with the block explorer.  Make sure you click the "show scripts & coinbase" link.
newbie
Activity: 4
Merit: 0
February 20, 2015, 04:46:29 PM
#1
I heard recently that its possible to write plain text messages in the blockchain.

How can one do that? Can someone explain me how can I do that using bitcoin-qt?

And how can I read my message and others? using bitcoin-qt or blockchain.info?

Thanks
Jump to: