0

I use sendrawtransaction to submitt my transaction and I want to put comment or comment-to in transaction like sendtoaddress fields that store in the wallet and not sent with transactions. I think the "data": "hex" field in createrawtransaction is for this, but I can not use that.

I use the following list as recipients field in createrawtransaction, but I get error: bitcoinrpc.authproxy.JSONRPCException: -8: Invalid parameter, key-value pair must contain exactly one key

 [{'mowMh2bocyV97NUP9vqVsuCPcJ2XhJUuoH': Decimal('0.000123'),
 '2NAJPzU1pVTcNABNrdrD336eRWRrbKBBuSe': Decimal('0.03149347')},
 {'data': 'happy birthday'}]

How to use that? Is there any good idea to do this?

1 Answer 1

0

data is meant for OP_RETURN outputs.

You cannot add comments using sendrawtransaction.

2
  • Do you have any idea to put comment?
    – H.Mohseni
    Commented Sep 15, 2019 at 11:47
  • Use sendtoaddress, or keep a map of txid:comment in an outside database. Commented Sep 15, 2019 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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