NAME
Net::Async::Blockchain::TRX - Tron based subscription.
SYNOPSIS
my $loop = IO::Async::Loop->new;
$loop->add(
my $trx_client = Net::Async::Blockchain::TRX->new(
subscription_url => "tcp://127.0.0.1:5555",
blockchain_code => 'Tron',
)
);
$trx_client->subscribe("blocks")->each(sub { print shift->{hash} })->get;
DESCRIPTION
Tron subscription using ZMQ from the tron 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://tronprotocol.github.io/documentation-en/architecture/event/#using-java-trons-built-in-message-queue-for-event-subscription
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