Blockchain/Client/RPC/Omni.pm

filter: Statementstmt 66.6% 14 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 75.0% 3 / 4 totaltotal 63.6% 21 / 33 CC 1 SCAR 4.1
CC
1
Cov
67%
jsonrpc
2.0
get_transaction
2.0
get_detailed_transaction
2.0
CRAP 1.5
« Blockchain/Client/RPC/ETH.pm ↑ Summary Blockchain/BTC.pm »
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.002';
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 0 ▶sub jsonrpc { return undef }
Subroutine jsonrpc: not called CC=1 SCAR=6.9
Pod undocumented
37  
38 =head2 get_transaction
39  
40 https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md#omni_gettransaction
41  
42 =over 4
43  
44 =back
45  
46 L<Future>
47  
48 =cut
49  
50 sub get_transaction {
51 0 ▶ my ($self, @params) = @_;
Subroutine get_transaction: not called CC=1 SCAR=6.9
Pod documented
52 0 return $self->_request('omni_gettransaction', @params);
53 }
54  
55 =head2 get_detailed_transaction
56  
57 https://bitcoin-rpc.github.io/en/doc/0.17.99/rpc/wallet/gettransaction/
58  
59 =cut
60  
61 sub get_detailed_transaction {
62 0 ▶ my ($self, @params) = @_;
Subroutine get_detailed_transaction: not called CC=1 SCAR=6.9
Pod documented
63 0 return $self->_request('gettransaction', @params);
64 }
65  
66 =head2 list_by_addresses
67  
68 https://bitcoin-rpc.github.io/en/doc/0.17.99/rpc/wallet/listreceivedbyaddress/
69  
70 =cut
71  
72 sub list_by_addresses {
73 0 ▶ my ($self, $address) = @_;
Subroutine list_by_addresses: not called CC=1 SCAR=6.9
Pod documented
74 0 return $self->_request("listreceivedbyaddress", 1, \0, \0, $address);
75 }
76  
77 1 1;
78  
« Blockchain/Client/RPC/ETH.pm ↑ Summary Blockchain/BTC.pm »