Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: ”Argument list too long“ for decoderawtransaction
by
theymos
on 25/06/2016, 05:08:55 UTC
⭐ Merited by TheArchaeologist (1)
The bottom of help decoderawtransaction shows you how to execute the command using JSON-RPC via curl:

Code:
curl --user myusername --data-binary \
'{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;'\
 http://127.0.0.1:8332/

You can put the {"jsonrpc":... stuff into a file (omit the single quotes) named for example TEMPFILE and then change the command to:
Code:
curl --user myusername --data-binary @TEMPFILE -H 'content-type: text/plain;' http://127.0.0.1:8332/

This requires that you set an RPC user and password in your bitcoin.conf. Change "myusername" above to your actual RPC user.

Since the data is in a file and never passed through the shell, I think that this should work, though I haven't tested it.