4
4
//!
5
5
//! These structs model the types returned by the JSON-RPC API and use stdlib types (or custom
6
6
//! types) and are specific to a specific to Bitcoin Core `v0.17.1`.
7
+ //!
8
+ //! A `x` marks methods that are implemented _and_ tested.
7
9
8
10
/// JSON-RPC types by API section.
9
11
pub mod blockchain;
@@ -16,26 +18,174 @@ pub mod util;
16
18
pub mod wallet;
17
19
pub mod zmq;
18
20
19
- // Re-export everything to make usage more ergonomic.
20
- #[ allow( unused_imports) ] // TODO: Remove this.
21
- pub use blockchain:: * ;
21
+ /// == Blockchain ==
22
+ ///
23
+ /// - [x] `getbestblockhash`
24
+ /// - [x] `getblock "blockhash" ( verbosity )`
25
+ /// - [x] `getblockchaininfo`
26
+ /// - [ ] `getblockcount`
27
+ /// - [ ] `getblockhash height`
28
+ /// - [ ] `getblockheader "hash" ( verbose )`
29
+ /// - [ ] `getblockstats hash_or_height ( stats )`
30
+ /// - [ ] `getchaintips`
31
+ /// - [ ] `getchaintxstats ( nblocks blockhash )`
32
+ /// - [ ] `getdifficulty`
33
+ /// - [ ] `getmempoolancestors txid (verbose)`
34
+ /// - [ ] `getmempooldescendants txid (verbose)`
35
+ /// - [ ] `getmempoolentry txid`
36
+ /// - [ ] `getmempoolinfo`
37
+ /// - [ ] `getrawmempool ( verbose )`
38
+ /// - [ ] `gettxout "txid" n ( include_mempool )`
39
+ /// - [ ] `gettxoutproof ["txid",...] ( blockhash )`
40
+ /// - [ ] `gettxoutsetinfo`
41
+ /// - [ ] `preciousblock "blockhash"`
42
+ /// - [ ] `pruneblockchain`
43
+ /// - [ ] `savemempool`
44
+ /// - [ ] `scantxoutset <action> ( <scanobjects> )`
45
+ /// - [ ] `verifychain ( checklevel nblocks )`
46
+ /// - [ ] `verifytxoutproof "proof"`
22
47
#[ allow( unused_imports) ] // TODO: Remove this.
23
48
pub use blockchain:: * ;
49
+
50
+ /// == Control ==
51
+ ///
52
+ /// - [ ] `getmemoryinfo ("mode")`
53
+ /// - [ ] `help ( "command" )`
54
+ /// - [ ] `logging ( <include> <exclude> )`
55
+ /// - [ ] `stop`
56
+ /// - [ ] `uptime`
24
57
#[ allow( unused_imports) ] // TODO: Remove this.
25
58
pub use control:: * ;
59
+
60
+ /// == Generating ==
61
+ ///
62
+ /// - [ ] `generate nblocks ( maxtries )`
63
+ /// - [ ] `generatetoaddress nblocks address (maxtries)`
26
64
#[ allow( unused_imports) ] // TODO: Remove this.
27
65
pub use generating:: * ;
66
+
67
+ /// == Mining ==
68
+ ///
69
+ /// - [ ] `getblocktemplate ( TemplateRequest )`
70
+ /// - [ ] `getmininginfo`
71
+ /// - [ ] `getnetworkhashps ( nblocks height )`
72
+ /// - [ ] `prioritisetransaction <txid> <dummy value> <fee delta>`
73
+ /// - [ ] `submitblock "hexdata" ( "dummy" )`
28
74
#[ allow( unused_imports) ] // TODO: Remove this.
29
75
pub use mining:: * ;
76
+
77
+ /// == Network ==
78
+ ///
79
+ /// - [ ] `addnode "node" "add|remove|onetry"`
80
+ /// - [ ] `clearbanned`
81
+ /// - [ ] `disconnectnode "\[address\]" \[nodeid\]`
82
+ /// - [ ] `getaddednodeinfo ( "node" )`
83
+ /// - [ ] `getconnectioncount`
84
+ /// - [ ] `getnettotals`
85
+ /// - [x] `getnetworkinfo`
86
+ /// - [ ] `getpeerinfo`
87
+ /// - [ ] `listbanned`
88
+ /// - [ ] `ping`
89
+ /// - [ ] `setban "subnet" "add|remove" (bantime) (absolute)`
90
+ /// - [ ] `setnetworkactive true|false`
30
91
#[ allow( unused_imports) ] // TODO: Remove this.
31
92
pub use network:: * ;
93
+
94
+ /// == Rawtransactions ==
95
+ ///
96
+ /// - [ ] `combinepsbt ["psbt",...]`
97
+ /// - [ ] `combinerawtransaction ["hexstring",...]`
98
+ /// - [ ] `converttopsbt "hexstring" ( permitsigdata iswitness )`
99
+ /// - [ ] `createpsbt [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )`
100
+ /// - [ ] `createrawtransaction [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )`
101
+ /// - [ ] `decodepsbt "psbt"`
102
+ /// - [ ] `decoderawtransaction "hexstring" ( iswitness )`
103
+ /// - [ ] `decodescript "hexstring"`
104
+ /// - [ ] `finalizepsbt "psbt" ( extract )`
105
+ /// - [ ] `fundrawtransaction "hexstring" ( options iswitness )`
106
+ /// - [ ] `getrawtransaction "txid" ( verbose "blockhash" )`
107
+ /// - [ ] `sendrawtransaction "hexstring" ( allowhighfees )`
108
+ /// - [ ] `signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )`
109
+ /// - [ ] `signrawtransactionwithkey "hexstring" ["privatekey1",...] ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )`
110
+ /// - [ ] `testmempoolaccept ["rawtxs"] ( allowhighfees )`
32
111
#[ allow( unused_imports) ] // TODO: Remove this.
33
112
pub use raw_transactions:: * ;
113
+
114
+ /// == Util ==
115
+ ///
116
+ /// - [ ] `createmultisig nrequired ["key",...] ( "address_type" )`
117
+ /// - [ ] `estimatesmartfee conf_target ("estimate_mode")`
118
+ /// - [ ] `signmessagewithprivkey "privkey" "message"`
119
+ /// - [ ] `validateaddress "address"`
120
+ /// - [ ] `verifymessage "address" "signature" "message"`
34
121
#[ allow( unused_imports) ] // TODO: Remove this.
35
122
pub use util:: * ;
123
+
124
+ /// == Wallet ==
125
+ ///
126
+ /// - [ ] `abandontransaction "txid"`
127
+ /// - [ ] `abortrescan`
128
+ /// - [ ] `addmultisigaddress nrequired ["key",...] ( "label" "address_type" )`
129
+ /// - [ ] `backupwallet "destination"`
130
+ /// - [ ] `bumpfee "txid" ( options )`
131
+ /// - [x] `createwallet "wallet_name" ( disable_private_keys )`
132
+ /// - [ ] `dumpprivkey "address"`
133
+ /// - [ ] `dumpwallet "filename"`
134
+ /// - [ ] `encryptwallet "passphrase"`
135
+ /// - [ ] `getaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
136
+ /// - [ ] `getaccountaddress (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
137
+ /// - [ ] `getaddressbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
138
+ /// - [ ] `getaddressesbylabel "label"`
139
+ /// - [ ] `getaddressinfo "address"`
140
+ /// - [x] `getbalance ( "(dummy)" minconf include_watchonly )`
141
+ /// - [x] `getnewaddress ( "label" "address_type" )`
142
+ /// - [ ] `getrawchangeaddress ( "address_type" )`
143
+ /// - [ ] `getreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
144
+ /// - [ ] `getreceivedbyaddress "address" ( minconf )`
145
+ /// - [ ] `gettransaction "txid" ( include_watchonly )`
146
+ /// - [ ] `getunconfirmedbalance`
147
+ /// - [ ] `getwalletinfo`
148
+ /// - [ ] `importaddress "address" ( "label" rescan p2sh )`
149
+ /// - [ ] `importmulti "requests" ( "options" )`
150
+ /// - [ ] `importprivkey "privkey" ( "label" ) ( rescan )`
151
+ /// - [ ] `importprunedfunds`
152
+ /// - [ ] `importpubkey "pubkey" ( "label" rescan )`
153
+ /// - [ ] `importwallet "filename"`
154
+ /// - [ ] `keypoolrefill ( newsize )`
155
+ /// - [ ] `listaccounts (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
156
+ /// - [ ] `listaddressgroupings`
157
+ /// - [ ] `listlabels ( "purpose" )`
158
+ /// - [ ] `listlockunspent`
159
+ /// - [ ] `listreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
160
+ /// - [ ] `listreceivedbyaddress ( minconf include_empty include_watchonly address_filter )`
161
+ /// - [ ] `listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )`
162
+ /// - [ ] `listtransactions (label count skip include_watchonly)`
163
+ /// - [ ] `listunspent ( minconf maxconf ["addresses",...] [include_unsafe] [query_options])`
164
+ /// - [ ] `listwallets`
165
+ /// - [x] `loadwallet "filename"`
166
+ /// - [ ] `lockunspent unlock ([{"txid":"txid","vout":n},...])`
167
+ /// - [ ] `move (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
168
+ /// - [ ] `removeprunedfunds "txid"`
169
+ /// - [ ] `rescanblockchain ("start_height") ("stop_height")`
170
+ /// - [ ] `sendfrom (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
171
+ /// - [ ] `sendmany "" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")`
172
+ /// - [x] `sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")`
173
+ /// - [ ] `setaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
174
+ /// - [ ] `sethdseed ( "newkeypool" "seed" )`
175
+ /// - [ ] `settxfee amount`
176
+ /// - [ ] `signmessage "address" "message"`
177
+ /// - [ ] `signrawtransactionwithwallet "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )`
178
+ /// - [ ] `unloadwallet ( "wallet_name" )`
179
+ /// - [ ] `walletcreatefundedpsbt [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable ) ( options bip32derivs )`
180
+ /// - [ ] `walletlock`
181
+ /// - [ ] `walletpassphrase "passphrase" timeout`
182
+ /// - [ ] `walletpassphrasechange "oldpassphrase" "newpassphrase"`
183
+ /// - [ ] `walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )`
36
184
#[ allow( unused_imports) ] // TODO: Remove this.
37
185
pub use wallet:: * ;
38
- #[ allow( unused_imports) ] // TODO: Remove this.
39
- pub use wallet:: * ;
186
+
187
+ /// == Zmq ==
188
+ ///
189
+ /// - [ ] `getzmqnotifications`
40
190
#[ allow( unused_imports) ] // TODO: Remove this.
41
191
pub use zmq:: * ;
0 commit comments