Bitcoin-RPC-Client
view release on metacpan or search on metacpan
ex/example.pl view on Meta::CPAN
print "\n";
# 584240
# JSON Objects
# Let's say we want the timeframe value from getnetttotals
# https://developer.bitcoin.org/reference/rpc/getnettotals.html
#
#{
# "totalbytesrecv": 7137052851,
# "totalbytessent": 211648636140,
# "uploadtarget": {
# "timeframe": 86400,
# "target": 0
# }
#}
$nettot = $btc->getnettotals;
$timeframe = $nettot->{uploadtarget}->{timeframe};
print $timeframe;
print "\n";
# 86400
# JSON arrays
# Let's say we want the feerate_percentiles from getblockstats
# https://developer.bitcoin.org/reference/rpc/getblockstats.html
#{
# "avgfee": 8967,
# "avgfeerate": 28,
( run in 1.112 second using v1.01-cache-2.11-cpan-b16cb0d3907 )