Merge pull request #130 from Goosie/patch-9

Update 06_5_Sending_a_Transaction_with_Data.md
This commit is contained in:
Shannon Appelcline 2020-06-16 08:33:54 -10:00 committed by GitHub
commit 0569270c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,8 @@ $ changeaddress=$(bitcoin-cli getrawchangeaddress)
You can now write a new rawtransaction with two outputs: one is your change address to get back (most of) your money, the other is a data address, which is the `bitcoin-cli` term for an OP_RETURN. You can now write a new rawtransaction with two outputs: one is your change address to get back (most of) your money, the other is a data address, which is the `bitcoin-cli` term for an OP_RETURN.
``` ```
$ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "data": "'$op_return_data'", "'$changeaddress'": 0.8995 }''') $ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "data": "'$op_return_data'", "'$changeaddress'": 0.8995 }''')
``` ```#this end in an error: Error parsing JSON:{ "data": "transactie
Here's what that transaction actually looks like: Here's what that transaction actually looks like:
``` ```