Author

Topic: How to read alt-coin difficulty (Read 1401 times)

sr. member
Activity: 346
Merit: 255
October 31, 2013, 07:19:36 AM
#4
Actually found a far better way to do it directly from Linux script using curl:

Code:
curl --silent --user user:pass --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://:/ | ./jq '.result | .difficulty')

The output is then piped to jq (a json parser) and the difficulty values extracted ^_^

Hope someone else finds that useful Smiley
sr. member
Activity: 346
Merit: 255
October 30, 2013, 11:46:48 AM
#3
Thanks all for your feedback, I got Java to parse the JSON from CoinChoose in the end  Cheesy

Cheers for the suggestions!

FR
hero member
Activity: 826
Merit: 500
October 29, 2013, 02:23:46 PM
#2
For bitcoin it would be "bitcoind getdifficulty"

Try litecoin get difficulty

You would to code that into your code/call

I may be 100% wrong not a coder
sr. member
Activity: 346
Merit: 255
October 29, 2013, 11:10:58 AM
#1
Hi Everyone

I am looking for a quick way to allow a Linux script to get hold of the current network difficulty from a LiteCoin wallet - I have
looked at RPC calls et al but have as of yet not found a (semi-simple) solution.

Has anyone got any suggestions?

Many thanks

FR
Jump to: