Client/API.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 11 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Bitcoin::RPC::Client::API;
2  
3 use strict;
4 use warnings;
5  
6 our $VERSION = '0.06';
7  
8 our @methods = (
9 #==Blockchain}
10 qq{getbestblockhash},
11 qq{getblock},
12 qq{getblockchaininfo},
13 qq{getblockcount},
14 qq{getblockhash},
15 qq{getblockheader},
16 qq{getchaintips},
17 qq{getdifficulty},
18 qq{getmempoolinfo},
19 qq{getrawmempool},
20 qq{gettxout},
21 qq{gettxoutproof},
22 qq{gettxoutsetinfo},
23 qq{verifychain},
24 qq{verifytxoutproof},
25 #==Control}
26 qq{getinfo},
27 qq{help},
28 qq{stop},
29 #==Generating}
30 qq{generate},
31 qq{getgenerate},
32 qq{setgenerate},
33 #==Mining}
34 qq{getblocktemplate},
35 qq{getmininginfo},
36 qq{getnetworkhashps},
37 qq{prioritisetransaction},
38 qq{submitblock},
39 #==Network}
40 qq{addnode},
41 qq{clearbanned},
42 qq{disconnectnode},
43 qq{getaddednodeinfo},
44 qq{getconnectioncount},
45 qq{getnettotals},
46 qq{getnetworkinfo},
47 qq{getpeerinfo},
48 qq{listbanned},
49 qq{ping},
50 qq{setban},
51 #==Rawtransactions}
52 qq{createrawtransaction},
53 qq{decoderawtransaction},
54 qq{decodescript},
55 qq{fundrawtransaction},
56 qq{getrawtransaction},
57 qq{sendrawtransaction},
58 qq{signrawtransaction},
59 #==Util}
60 qq{createmultisig},
61 qq{estimatefee},
62 qq{estimatepriority},
63 qq{estimatesmartfee},
64 qq{estimatesmartpriority},
65 qq{validateaddress},
66 qq{verifymessage},
67 #==Wallet}
68 qq{abandontransaction},
69 qq{addmultisigaddress},
70 qq{backupwallet},
71 qq{dumpprivkey},
72 qq{dumpwallet},
73 qq{encryptwallet},
74 qq{getaccount},
75 qq{getaccountaddress},
76 qq{getaddressesbyaccount},
77 qq{getbalance},
78 qq{getnewaddress},
79 qq{getrawchangeaddress},
80 qq{getreceivedbyaccount},
81 qq{getreceivedbyaddress},
82 qq{gettransaction},
83 qq{getunconfirmedbalance},
84 qq{getwalletinfo},
85 qq{importaddress},
86 qq{importprivkey},
87 qq{importpubkey},
88 qq{importwallet},
89 qq{keypoolrefill},
90 qq{listaccounts},
91 qq{listaddressgroupings},
92 qq{listlockunspent},
93 qq{listreceivedbyaccount},
94 qq{listreceivedbyaddress},
95 qq{listsinceblock},
96 qq{listtransactions},
97 qq{listunspent},
98 qq{lockunspent},
99 qq{move},
100 qq{sendfrom},
101 qq{sendmany},
102 qq{sendtoaddress},
103 qq{setaccount},
104 qq{settxfee},
105 qq{signmessage},
106 );
107  
108 our @help = (
109 #== Blockchain ==}
110 qq{getbestblockhash},
111 qq{getblock "hash" ( verbose )},
112 qq{getblockchaininfo},
113 qq{getblockcount},
114 qq{getblockhash index},
115 qq{getblockheader "hash" ( verbose )},
116 qq{getchaintips},
117 qq{getdifficulty},
118 qq{getmempoolinfo},
119 qq{getrawmempool ( verbose )},
120 qq{gettxout "txid" n ( includemempool )},
121 qq{gettxoutproof ["txid",...] ( blockhash )},
122 qq{gettxoutsetinfo},
123 qq{verifychain ( checklevel numblocks )},
124 qq{verifytxoutproof "proof"},
125 #== Control ==}
126 qq{getinfo},
127 qq{help ( "command" )},
128 qq{stop},
129 #== Generating ==}
130 qq{generate numblocks},
131 qq{getgenerate},
132 qq{setgenerate generate ( genproclimit )},
133 #== Mining ==}
134 qq{getblocktemplate ( "jsonrequestobject" )},
135 qq{getmininginfo},
136 qq{getnetworkhashps ( blocks height )},
137 qq{prioritisetransaction <txid> <priority delta> <fee delta>},
138 qq{submitblock "hexdata" ( "jsonparametersobject" )},
139 #== Network ==}
140 qq{addnode "node" "add|remove|onetry"},
141 qq{clearbanned},
142 qq{disconnectnode "node" },
143 qq{getaddednodeinfo dns ( "node" )},
144 qq{getconnectioncount},
145 qq{getnettotals},
146 qq{getnetworkinfo},
147 qq{getpeerinfo},
148 qq{listbanned},
149 qq{ping},
150 qq{setban "ip(/netmask)" "add|remove" (bantime) (absolute)},
151 #== Rawtransactions ==}
152 qq{createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime )},
153 qq{decoderawtransaction "hexstring"},
154 qq{decodescript "hex"},
155 qq{fundrawtransaction "hexstring" includeWatching},
156 qq{getrawtransaction "txid" ( verbose )},
157 qq{sendrawtransaction "hexstring" ( allowhighfees )},
158 qq{signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )},
159 #== Util ==}
160 qq{createmultisig nrequired ["key",...]},
161 qq{estimatefee nblocks},
162 qq{estimatepriority nblocks},
163 qq{estimatesmartfee nblocks},
164 qq{estimatesmartpriority nblocks},
165 qq{validateaddress "bitcoinaddress"},
166 qq{verifymessage "bitcoinaddress" "signature" "message"},
167 #== Wallet ==}
168 qq{abandontransaction "txid"},
169 qq{addmultisigaddress nrequired ["key",...] ( "account" )},
170 qq{backupwallet "destination"},
171 qq{dumpprivkey "bitcoinaddress"},
172 qq{dumpwallet "filename"},
173 qq{encryptwallet "passphrase"},
174 qq{getaccount "bitcoinaddress"},
175 qq{getaccountaddress "account"},
176 qq{getaddressesbyaccount "account"},
177 qq{getbalance ( "account" minconf includeWatchonly )},
178 qq{getnewaddress ( "account" )},
179 qq{getrawchangeaddress},
180 qq{getreceivedbyaccount "account" ( minconf )},
181 qq{getreceivedbyaddress "bitcoinaddress" ( minconf )},
182 qq{gettransaction "txid" ( includeWatchonly )},
183 qq{getunconfirmedbalance},
184 qq{getwalletinfo},
185 qq{importaddress "address" ( "label" rescan p2sh )},
186 qq{importprivkey "bitcoinprivkey" ( "label" rescan )},
187 qq{importpubkey "pubkey" ( "label" rescan )},
188 qq{importwallet "filename"},
189 qq{keypoolrefill ( newsize )},
190 qq{listaccounts ( minconf includeWatchonly)},
191 qq{listaddressgroupings},
192 qq{listlockunspent},
193 qq{listreceivedbyaccount ( minconf includeempty includeWatchonly)},
194 qq{listreceivedbyaddress ( minconf includeempty includeWatchonly)},
195 qq{listsinceblock ( "blockhash" target-confirmations includeWatchonly)},
196 qq{listtransactions ( "account" count from includeWatchonly)},
197 qq{listunspent ( minconf maxconf ["address",...] )},
198 qq{lockunspent unlock [{"txid":"txid","vout":n},...]},
199 qq{move "fromaccount" "toaccount" amount ( minconf "comment" )},
200 qq{sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" )},
201 qq{sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] )},
202 qq{sendtoaddress "bitcoinaddress" amount ( "comment" "comment-to" subtractfeefromamount )},
203 qq{setaccount "bitcoinaddress" "account"},
204 qq{settxfee amount},
205 qq{signmessage "bitcoinaddress" "message"},
206 );
207  
208 =pod
209  
210 =head1 NAME
211  
212 Bitcoin::RPC::Client::API - Bitcoin Core API RPCs
213  
214 =head1 SYNOPSIS
215  
216 use Bitcoin::RPC::Client::API;
217  
218 # print all avaiable API calls
219 foreach $method (@Bitcoin::RPC::Client::API::methods) {
220 print $method;
221 }
222  
223 =head1 DESCRIPTION
224  
225 A module that has lists of API commands and their syntax.
226 Generated from $ bitcoin-cli help
227 https://bitcoin.org/en/developer-reference
228  
229 =head1 AUTHOR
230  
231 Wesley Hinds wesley.hinds@gmail.com
232  
233 =head1 AVAILABILITY
234  
235 The latest branch is avaiable from Github.
236  
237 https://github.com/whindsx/Bitcoin-RPC-Client.git
238  
239 =head1 LICENSE AND COPYRIGHT
240  
241 Copyright 2016 Wesley Hinds.
242  
243 This program is free software; you can redistribute it and/or modify it
244 under the terms of the the Artistic License (2.0). You may obtain a
245 copy of the full license at:
246  
247 L<http://www.perlfoundation.org/artistic_license_2_0>
248  
249 Any use, modification, and distribution of the Standard or Modified
250 Versions is governed by this Artistic License. By using, modifying or
251 distributing the Package, you accept this license. Do not use, modify,
252 or distribute the Package, if you do not accept this license.
253  
254 If your Modified Version has been derived from a Modified Version made
255 by someone other than you, you are nevertheless required to ensure that
256 your Modified Version complies with the requirements of this license.
257  
258 This license does not grant you the right to use any trademark, service
259 mark, tradename, or logo of the Copyright Holder.
260  
261 This license includes the non-exclusive, worldwide, free-of-charge
262 patent license to make, have made, use, offer to sell, sell, import and
263 otherwise transfer the Package with respect to any patent claims
264 licensable by the Copyright Holder that are necessarily infringed by the
265 Package. If you institute patent litigation (including a cross-claim or
266 counterclaim) against any party alleging that the Package constitutes
267 direct or contributory patent infringement, then this Artistic License
268 to you shall terminate on the date that such litigation is filed.
269  
270 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
271 AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
272 THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
273 PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
274 YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
275 CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
276 CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
277 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
278  
279  
280 =cut