user51602: I want to create a OP_RETURN script on bitcoin core console. Not using GUI, i.e. available on proofofexistence.com , Just as we create raw transaction and then sign it and then broadcast it, I am curious about how to create OP_RETURN script. Anyone here can give reference or want to share their knowledge? Step by step explanation would be much appreciated.

user48884: createrawtransaction has an option for data. That will create an OP_RETURN output with whatever hex-encoded data you want in it. So you would have a createrawtransaction command that looks something like this:
createrawtransaction '[]' '{"data":"deadbeef"}'


51602: <p>I want to create a OP_RETURN script on bitcoin core console. Not using GUI, i.e. available on proofofexistence.com , Just as we create raw transaction and then sign it and then broadcast it, I am curious about how to create OP_RETURN script. Anyone here can give reference or want to share their knowledge? Step by step explanation would be much appreciated.</p>
 48884: <p><code>createrawtransaction</code> has an option for <code>data</code>. That will create an OP_RETURN output with whatever hex-encoded data you want in it. So you would have a <code>createrawtransaction</code> command that looks something like this:</p>

<pre><code>createrawtransaction '[]' '{"data":"deadbeef"}'
</code></pre>
