Group
Extension

Matches 7

Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC.pod ( view source; MetaCPAN )
* C<params> (any parameter required by the RPC call)

=back

L<Future> - node response as decoded json

=head1 INHERITED METHODS

=over 4

=item L<IO::Async::Notifier>

L<add_child|IO::Async::Notifier
Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC/ETH.pm ( view source; MetaCPAN )
;

use parent qw(Net::Async::Blockchain::Client::RPC);

sub jsonrpc { return '2.0' }

=head2 call

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call

=over 4

=back

L<Future>

=cut

sub call {
st('eth_call', @params);
}

=head2 get_transaction_receipt

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt

=over 4

=back

L<Future>

=cut

sub get_transaction_receipt {
   
('eth_getTransactionReceipt', @params);
}

=head2 accounts

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_accounts

=over 4

=back

L<Future>

=cut

sub accounts {
    my ($self) = @_;
    return
Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC/BTC.pm ( view source; MetaCPAN )
em * C<txid> The transaction id

=item * C<verbose> If false, return a string, otherwise return a json object

=item * C<blockhash> The block in which to look for the transaction

=back

L<Future> - r
 block hash

=item * C<verbosity> 0 for hex-encoded data, 1 for a JSON object, 2 for JSON object with transaction data, and 3 for JSON object with transaction data including prevout information for in
lidateaddress/

=over 4

=item * C<address> - the bitcoin address to validate

=back

L<Future> - json {isvalid  : true|false, ...}

=cut

sub validate_address {
    my ($self, @params) = @_;
    retu
Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC.pm ( view source; MetaCPAN )
=back

=cut

no indirect;

use Future::AsyncAwait;
use Net::Async::HTTP;
use JSON::MaybeUTF8 qw(encode_json_utf8 decode_json_utf8);
use IO::Async::Notifier;

use parent qw(IO::Async::Notifier);

use c
ded json

=cut

async sub _request {
    my ($self, $method, @params) = @_;

    my $obj = {
        id     => 1,
        method => $method,
        params => [@params],
    };

    # for Geth JSON-RP
be exactly "jsonrpc": "2.0"
    $obj->{jsonrpc} = $self->jsonrpc if $self->can('jsonrpc');

    my @post_params = ($self->endpoint, encode_json_utf8($obj), content_type => 'application/json');

    # 
Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC/ETH.pod ( view source; MetaCPAN )


https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call

=over 4

=back

L<Future>

=head2 get_transaction_receipt

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt

=over 4
s

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_accounts

=over 4

=back

L<Future>

=head2 get_block_by_hash

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbyhash

=over 4

=back


https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbynumber

=over 4

=back

L<Future>

=head2 get_last_block

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber

=over 4

=back

Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/RPC/BTC.pod ( view source; MetaCPAN )
em * C<txid> The transaction id

=item * C<verbose> If false, return a string, otherwise return a json object

=item * C<blockhash> The block in which to look for the transaction

=back

L<Future> - r
 block hash

=item * C<verbosity> 0 for hex-encoded data, 1 for a JSON object, 2 for JSON object with transaction data, and 3 for JSON object with transaction data including prevout information for in
lidateaddress/

=over 4

=item * C<address> - the bitcoin address to validate

=back

L<Future> - json {isvalid  : true|false, ...}

=head2 get_last_block

https://bitcoincore.org/en/doc/24.0.0/rpc/bl
Net-Async-Blockchain ( D/DE/DERIV/Net-Async-Blockchain-0.005.tar.gz, DERIV, 2024; MetaCPAN )
Net-Async-Blockchain/lib/Net/Async/Blockchain/Client/Websocket.pm ( view source; MetaCPAN )
rning them asynchronously.

=over 4

=back

=cut

no indirect;

use URI;
use JSON::MaybeUTF8 qw(encode_json_utf8 decode_json_utf8);
use Protocol::WebSocket::Request;
use Ryu::Async;
use curry;
use Fut
               my ($self, undef, $frame) = @_;
                        $self->source->emit(decode_json_utf8($frame));
                    }
                ),
                on_ping_frame => $self->$
client request
    my $request_call = {
        id      => 1,
        method  => $method,
        jsonrpc => '2.0',
        params  => [@params],
    };

    await $self->websocket_client->connect(
  

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.