/reference/rpc/getbalance.html
$balance = $btc->getbalance("*", 1, JSON::true);
print $balance;
print "\n";
# Getting data when JSON/hash is returned from getblockchaininfo
# https://developer.bi
info = $btc->getblockchaininfo;
$blocks = $info->{blocks};
print $blocks;
print "\n";
# 584240
# JSON Objects
# Let's say we want the timeframe value from getnetttotals
# https://developer.bitcoi
tals;
$timeframe = $nettot->{uploadtarget}->{timeframe};
print $timeframe;
print "\n";
# 86400
# JSON arrays
# Let's say we want the feerate_percentiles from getblockstats
# https://developer.bit
.008;
use strict;
use warnings;
use Moo;
use JSON::RPC::Legacy::Client;
our $VERSION = '0.12';
has jsonrpc => (is => "lazy", default => sub { "JSON::RPC::Legacy::Client"->new });
has user =>
en
if ($self->wallet) {
$url .= "/wallet/" . $self->wallet;
}
my $client = $self->jsonrpc;
# Set timeout because bitcoin is slow
$client->ua->timeout($self->timeout);
# Set
e =~ s/\s+//g;
$_[0] = $cookie;
}
1;
=pod
=head1 NAME
Bitcoin::RPC::Client - Bitcoin Core JSON RPC Client
=head1 SYNOPSIS
use Bitcoin::RPC::Client;
# Create Bitcoin::RPC::Client objec