| 1 | package Net::Async::Blockchain::Client::RPC::Omni; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | our $VERSION = '0.001'; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Net::Async::Blockchain::Client::RPC::Omni - Async Omnicore RPC Client. | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | my $loop = IO::Async::Loop->new(); | ||
| 15 | |||
| 16 | $loop->add( | ||
| 17 | my $http_client = Net::Async::Blockchain::Client::RPC::Omni->new(endpoint => 'http://127.0.0.1:8332', timeout => 100, rpc_user => 'test', rpc_password => 'test') | ||
| 18 | ); | ||
| 19 | |||
| 20 | my $response = $http_client->get_transaction('txid...')->get; | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | Omnicore based RPC calls | ||
| 25 | |||
| 26 | =over 4 | ||
| 27 | |||
| 28 | =back | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | 1 | ▶ | no indirect; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 33 | |||
| 34 | 1 | ▶ | use parent qw(Net::Async::Blockchain::Client::RPC::BTC); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | |||
| 36 | =head2 get_transaction | ||
| 37 | |||
| 38 | https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md#omni_gettransaction | ||
| 39 | |||
| 40 | =over 4 | ||
| 41 | |||
| 42 | =back | ||
| 43 | |||
| 44 | L<Future> | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | sub get_transaction { | ||
| 49 | 0 | ▶ | my ($self, @params) = @_; |
|
Subroutine
get_transaction: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 50 | 0 | return $self->_request('omni_gettransaction', @params); | |
| 51 | } | ||
| 52 | |||
| 53 | =head2 get_detailed_transaction | ||
| 54 | |||
| 55 | https://bitcoin-rpc.github.io/en/doc/0.17.99/rpc/wallet/gettransaction/ | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | sub get_detailed_transaction { | ||
| 60 | 0 | ▶ | my ($self, @params) = @_; |
|
Subroutine
get_detailed_transaction: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 61 | 0 | return $self->_request('gettransaction', @params); | |
| 62 | } | ||
| 63 | |||
| 64 | =head2 list_by_addresses | ||
| 65 | |||
| 66 | https://bitcoin-rpc.github.io/en/doc/0.17.99/rpc/wallet/listreceivedbyaddress/ | ||
| 67 | |||
| 68 | =cut | ||
| 69 | |||
| 70 | sub list_by_addresses { | ||
| 71 | 0 | ▶ | my ($self, $address) = @_; |
|
Subroutine
list_by_addresses: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 72 | 0 | return $self->_request("listreceivedbyaddress", 1, \0, \0, $address); | |
| 73 | } | ||
| 74 | |||
| 75 | 1 | 1; | |
| 76 | |||