Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

Commit c8eb658

Browse files
committed
v17: Move method docs to module root
1 parent d28afac commit c8eb658

File tree

13 files changed

+173
-177
lines changed

13 files changed

+173
-177
lines changed

src/json/v17/blockchain/mod.rs

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,8 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the blockchain section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - blockchain.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1
6-
//!
7-
//! == Blockchain ==
8-
//!
9-
//! - [x] getbestblockhash
10-
//! - [x] getblock "blockhash" ( verbosity )
11-
//! - [x] getblockchaininfo
12-
//! - [ ] getblockcount
13-
//! - [ ] getblockhash height
14-
//! - [ ] getblockheader "hash" ( verbose )
15-
//! - [ ] getblockstats hash_or_height ( stats )
16-
//! - [ ] getchaintips
17-
//! - [ ] getchaintxstats ( nblocks blockhash )
18-
//! - [ ] getdifficulty
19-
//! - [ ] getmempoolancestors txid (verbose)
20-
//! - [ ] getmempooldescendants txid (verbose)
21-
//! - [ ] getmempoolentry txid
22-
//! - [ ] getmempoolinfo
23-
//! - [ ] getrawmempool ( verbose )
24-
//! - [ ] gettxout "txid" n ( include_mempool )
25-
//! - [ ] gettxoutproof ["txid",...] ( blockhash )
26-
//! - [ ] gettxoutsetinfo
27-
//! - [ ] preciousblock "blockhash"
28-
//! - [ ] pruneblockchain
29-
//! - [ ] savemempool
30-
//! - [ ] scantxoutset <action> ( <scanobjects> )
31-
//! - [ ] verifychain ( checklevel nblocks )
32-
//! - [ ] verifytxoutproof "proof"
5+
//! Types for methods found under the `== Blockchain ==` section of the API docs.
336
347
mod convert;
358

src/json/v17/control/convert.rs

Whitespace-only changes.

src/json/v17/control/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - control.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Control ==
8-
//!
9-
//! - [ ] getmemoryinfo ("mode")
10-
//! - [ ] help ( "command" )
11-
//! - [ ] logging ( <include> <exclude> )
12-
//! - [ ] stop
13-
//! - [ ] uptime
5+
//! Types for methods found under the `== Control ==` section of the API docs.

src/json/v17/generating/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - generating.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Generating ==
8-
//!
9-
//! - [ ] generate nblocks ( maxtries )
10-
//! - [ ] generatetoaddress nblocks address (maxtries)
5+
//! Types for methods found under the `== Generating ==` section of the API docs.
116
127
mod convert;
138

src/json/v17/mining/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - mining.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Mining ==
8-
//!
9-
//! - [ ] getblocktemplate ( TemplateRequest )
10-
//! - [ ] getmininginfo
11-
//! - [ ] getnetworkhashps ( nblocks height )
12-
//! - [ ] prioritisetransaction <txid> <dummy value> <fee delta>
13-
//! - [ ] submitblock "hexdata" ( "dummy" )
5+
//! Types for methods found under the `== Mining ==` section of the API docs.

src/json/v17/mod.rs

Lines changed: 155 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//!
55
//! These structs model the types returned by the JSON-RPC API and use stdlib types (or custom
66
//! types) and are specific to a specific to Bitcoin Core `v0.17.1`.
7+
//!
8+
//! A `x` marks methods that are implemented _and_ tested.
79
810
/// JSON-RPC types by API section.
911
pub mod blockchain;
@@ -16,26 +18,174 @@ pub mod util;
1618
pub mod wallet;
1719
pub mod zmq;
1820

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"`
2247
#[allow(unused_imports)] // TODO: Remove this.
2348
pub use blockchain::*;
49+
50+
/// == Control ==
51+
///
52+
/// - [ ] `getmemoryinfo ("mode")`
53+
/// - [ ] `help ( "command" )`
54+
/// - [ ] `logging ( <include> <exclude> )`
55+
/// - [ ] `stop`
56+
/// - [ ] `uptime`
2457
#[allow(unused_imports)] // TODO: Remove this.
2558
pub use control::*;
59+
60+
/// == Generating ==
61+
///
62+
/// - [ ] `generate nblocks ( maxtries )`
63+
/// - [ ] `generatetoaddress nblocks address (maxtries)`
2664
#[allow(unused_imports)] // TODO: Remove this.
2765
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" )`
2874
#[allow(unused_imports)] // TODO: Remove this.
2975
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`
3091
#[allow(unused_imports)] // TODO: Remove this.
3192
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 )`
32111
#[allow(unused_imports)] // TODO: Remove this.
33112
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"`
34121
#[allow(unused_imports)] // TODO: Remove this.
35122
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 )`
36184
#[allow(unused_imports)] // TODO: Remove this.
37185
pub use wallet::*;
38-
#[allow(unused_imports)] // TODO: Remove this.
39-
pub use wallet::*;
186+
187+
/// == Zmq ==
188+
///
189+
/// - [ ] `getzmqnotifications`
40190
#[allow(unused_imports)] // TODO: Remove this.
41191
pub use zmq::*;

src/json/v17/network/mod.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - network.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Network ==
8-
//!
9-
//! - [ ] addnode "node" "add|remove|onetry"
10-
//! - [ ] clearbanned
11-
//! - [ ] disconnectnode "[address]" [nodeid]
12-
//! - [ ] getaddednodeinfo ( "node" )
13-
//! - [ ] getconnectioncount
14-
//! - [ ] getnettotals
15-
//! - [x] getnetworkinfo
16-
//! - [ ] getpeerinfo
17-
//! - [ ] listbanned
18-
//! - [ ] ping
19-
//! - [ ] setban "subnet" "add|remove" (bantime) (absolute)
20-
//! - [ ] setnetworkactive true|false
5+
//! Types for methods found under the `== Network ==` section of the API docs.
216
227
mod convert;
238

src/json/v17/raw_transactions/convert.rs

Whitespace-only changes.

src/json/v17/raw_transactions/mod.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - raw transactions.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Rawtransactions ==
8-
//!
9-
//! - [ ] combinepsbt ["psbt",...]
10-
//! - [ ] combinerawtransaction ["hexstring",...]
11-
//! - [ ] converttopsbt "hexstring" ( permitsigdata iswitness )
12-
//! - [ ] createpsbt [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )
13-
//! - [ ] createrawtransaction [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )
14-
//! - [ ] decodepsbt "psbt"
15-
//! - [ ] decoderawtransaction "hexstring" ( iswitness )
16-
//! - [ ] decodescript "hexstring"
17-
//! - [ ] finalizepsbt "psbt" ( extract )
18-
//! - [ ] fundrawtransaction "hexstring" ( options iswitness )
19-
//! - [ ] getrawtransaction "txid" ( verbose "blockhash" )
20-
//! - [ ] sendrawtransaction "hexstring" ( allowhighfees )
21-
//! - [ ] signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )
22-
//! - [ ] signrawtransactionwithkey "hexstring" ["privatekey1",...] ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )
23-
//! - [ ] testmempoolaccept ["rawtxs"] ( allowhighfees )
5+
//! Types for methods found under the `== Rawtransactions ==` section of the API docs.

src/json/v17/util/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! Types for methods found under the wallet section of the API docs.
3+
//! The JSON-RPC API for Bitcoin Core v0.17.1 - util.
44
//!
5-
//! The JSON-RPC API for Bitcoin Core v0.17.1:
6-
//!
7-
//! == Util ==
8-
//!
9-
//! - [ ] createmultisig nrequired ["key",...] ( "address_type" )
10-
//! - [ ] estimatesmartfee conf_target ("estimate_mode")
11-
//! - [ ] signmessagewithprivkey "privkey" "message"
12-
//! - [ ] validateaddress "address"
13-
//! - [ ] verifymessage "address" "signature" "message"
5+
//! Types for methods found under the `== Util ==` section of the API docs.

0 commit comments

Comments
 (0)