NAME
Net::Async::Blockchain::BTC - Bitcoin based subscription.
SYNOPSIS
my $loop = IO::Async::Loop->new;
$loop->add(
my $btc_client = Net::Async::Blockchain::BTC->new(
subscription_url => "tcp://127.0.0.1:28332",
blockchain_code => 'Bitcoin',
)
);
$btc_client->subscribe("blocks")->each(sub { print shift->{hash} })->get;
DESCRIPTION
Bitcoin subscription using ZMQ from the bitcoin based blockchain nodes
zmq_client
Returns the current instance for Net::Async::Blockchain::Client::ZMQ if not created create a new one.
Net::Async::Blockchain::Client::ZMQ
subscribe
Connect to the ZMQ port and subscribe to the implemented subscription: https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md#usage
subscription
string subscription name
INHERITED METHODS
- Net::Async::Blockchain
-
blockchain_code, configure, subscription_msg_timeout, subscription_response, subscription_timeout, subscription_url
- IO::Async::Notifier
-
add_child, adopt_future, adopted_futures, can_event, children, configure_unknown, debug_printf, get_loop, invoke_error, invoke_event, loop, make_event_cb, maybe_invoke_event, maybe_make_event_cb, new, notifier_name, parent, remove_child, remove_from_parent