Net::Async::Blockchain::ETH - Ethereum based subscription.
my $loop = IO::Async::Loop->new; $loop->add( my $eth_client = Net::Async::Blockchain::ETH->new( subscription_url => "ws://127.0.0.1:8546", blockchain_code => 'Ethereum', ) ); $eth_client->subscribe("blocks")->each(sub { print shift->{hash} })->get;
Ethereum subscription using websocket node client
Actual subscription ID, this ID is received every time when a subscription is created.
An hexadecimal string
Returns the current instance for Net::Async::Blockchain::Client::Websocket if not created create a new one.
Net::Async::Blockchain::Client::Websocket
Connect to the websocket port and subscribe to the implemented subscription: - https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB#create-subscription
subscription string subscription name
subscription
Ryu::Source
blockchain_code, configure, subscription_msg_timeout, subscription_response, subscription_timeout, subscription_url
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
To install Net::Async::Blockchain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::Blockchain
CPAN shell
perl -MCPAN -e shell install Net::Async::Blockchain
For more information on module installation, please visit the detailed CPAN module installation guide.