Skip to content

Commit

Permalink
Merge #8: types: Tabulate the v17 docs
Browse files Browse the repository at this point in the history
429023c types: Tabulate the v17 docs (Tobin C. Harding)

Pull request description:

  Make the docs easier to read in HTML by using drop down menus and tabulating the method name and status. If docs were able to be sexy then these ones right here.

ACKs for top commit:
  apoelstra:
    ACK 429023c; successfully ran local tests; nice

Tree-SHA512: 03868e03860ca0fe597378ed2236bef0287893f23eb858b10e314f1ac83169484bacbd0416ccbd95442d693667151ab540bbf624be2382d9a5d5c47f5de436ad
  • Loading branch information
apoelstra committed Nov 27, 2024
2 parents d98ef88 + 429023c commit 8174e21
Showing 1 changed file with 212 additions and 157 deletions.
369 changes: 212 additions & 157 deletions types/src/v17/mod.rs
Original file line number Diff line number Diff line change
@@ -1,167 +1,222 @@
// SPDX-License-Identifier: CC0-1.0

//! JSON-RPC types for `bitcoind v0.17.1`.
//! # JSON-RPC types for Bitcoin Core `v0.17.1`
//!
//! These structs are shaped for the JSON data returned by the JSON-RPC API. They use stdlib types
//! (or custom types) and where necessary implement an `into_model` function to convert the type to
//! a [`crate::model`] type of the same name. The types in this module are version specific, the
//! a [`crate::model`] type of the same name. The types in this module are version specific. The
//! types in the `model` module are version nonspecific and are strongly typed using `rust-bitcoin`.
//!
//! ## Key:
//!
//! - `[ ]` Not yet done.
//! - `[i]` Implemented but not yet tested (includes `into_model`).
//! - `[x]` Implemented _and_ tested.
//! - `[-]` Intentionally not done, typically for one of the following reasons:
//! - Method does not return anything.
//! - Method returns a simple type (e.g. bool or integer).
//! - Method is deprecated.
// TODO: After all the `[i]` is gone (ie testing done) remove the backticks.
//!
//! **== Blockchain ==**
//! - `[x]` `getbestblockhash`
//! - `[x]` `getblock "blockhash" ( verbosity ) `
//! - `[x]` `getblockchaininfo`
//! - `[x]` `getblockcount`
//! - `[x]` `getblockhash height`
//! - `[x]` `getblockheader "hash" ( verbose )`
//! - `[x]` `getblockstats hash_or_height ( stats )`
//! - `[x]` `getchaintips`
//! - `[x]` `getchaintxstats ( nblocks blockhash )`
//! - `[x]` `getdifficulty`
//! - `[i]` `getmempoolancestors txid (verbose)`
//! - `[i]` `getmempooldescendants txid (verbose)`
//! - `[i]` `getmempoolentry txid`
//! - `[i]` `getmempoolinfo`
//! - `[i]` `getrawmempool ( verbose )`
//! - `[i]` `gettxout "txid" n ( include_mempool )`
//! - `[i]` `gettxoutproof ["txid",...] ( blockhash )`
//! - `[i]` `gettxoutsetinfo`
//! - `[-]` `preciousblock "blockhash"`
//! - `[-]` `pruneblockchain`
//! - `[-]` `savemempool`
//! - `[-]` `scantxoutset <action> ( <scanobjects> )`
//! - `[-]` `verifychain ( checklevel nblocks )`
//! - `[i]` `verifytxoutproof "proof"`
//!
//! **== Control ==**
//! - `[x]` `getmemoryinfo ("mode")`
//! - `[-]` `help ( "command" )`
//! - `[x]` `logging ( <include> <exclude> )`
//! - `[x]` `stop`
//! - `[x]` `uptime`
//!
//! **== Generating ==**
//! - `[x]` `generate nblocks ( maxtries )`
//! - `[x]` `generatetoaddress nblocks address (maxtries)`
//!
//! **== Mining ==**
//! - `[ ]` `getblocktemplate ( TemplateRequest )`
//! - `[ ]` `getmininginfo`
//! - `[ ]` `getnetworkhashps ( nblocks height )`
//! - `[ ]` `prioritisetransaction <txid> <dummy value> <fee delta>`
//! - `[ ]` `submitblock "hexdata" ( "dummy" )`
//!
//! **== Network ==**
//! - `[-]` `addnode "node" "add|remove|onetry"`
//! - `[-]` `clearbanned`
//! - `[-]` `disconnectnode "[address]" [nodeid]`
//! - `[x]` `getaddednodeinfo ( "node" )`
//! - `[-]` `getconnectioncount`
//! - `[x]` `getnettotals`
//! - `[x]` `getnetworkinfo`
//! - `[x]` `getpeerinfo`
//! - `[-]` `listbanned`
//! - `[-]` `ping`
//! - `[-]` `setban "subnet" "add|remove" (bantime) (absolute)`
//! - `[-]` `setnetworkactive true|false`
//!
//! **== Rawtransactions ==**
//! - `[ ]` `combinepsbt ["psbt",...]`
//! - `[ ]` `combinerawtransaction ["hexstring",...]`
//! - `[ ]` `converttopsbt "hexstring" ( permitsigdata iswitness )`
//! - `[ ]` `createpsbt [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )`
//! - `[ ]` `createrawtransaction [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable )`
//! - `[ ]` `decodepsbt "psbt"`
//! - `[ ]` `decoderawtransaction "hexstring" ( iswitness )`
//! - `[ ]` `decodescript "hexstring"`
//! - `[ ]` `finalizepsbt "psbt" ( extract )`
//! - `[ ]` `fundrawtransaction "hexstring" ( options iswitness )`
//! - `[ ]` `getrawtransaction "txid" ( verbose "blockhash" )`
//! - `[i]` `sendrawtransaction "hexstring" ( allowhighfees )`
//! - `[ ]` `signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )`
//! - `[ ]` `signrawtransactionwithkey "hexstring" ["privatekey1",...] ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )`
//! - `[ ]` `testmempoolaccept ["rawtxs"] ( allowhighfees )`
//!
//! **== Util ==**
//! - `[ ]` `createmultisig nrequired ["key",...] ( "address_type" )`
//! - `[ ]` `estimatesmartfee conf_target ("estimate_mode")`
//! - `[ ]` `signmessagewithprivkey "privkey" "message"`
//! - `[ ]` `validateaddress "address"`
//! - `[ ]` `verifymessage "address" "signature" "message"`
//!
//! **== Wallet ==**
//! - `[-]` `abandontransaction "txid"`
//! - `[-]` `abortrescan`
//! - `[x]` `addmultisigaddress nrequired ["key",...] ( "label" "address_type" )`
//! - `[-]` `backupwallet "destination"`
//! - `[x]` `bumpfee "txid" ( options ) `
//! - `[x]` `createwallet "wallet_name" ( disable_private_keys )`
//! - `[x]` `dumpprivkey "address"`
//! - `[x]` `dumpwallet "filename"`
//! - `[-]` `encryptwallet "passphrase"`
//! - `[-]` `getaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[-]` `getaccountaddress (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[-]` `getaddressbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[x]` `getaddressesbylabel "label"`
//! - `[x]` `getaddressinfo "address"`
//! - `[x]` `getbalance ( "(dummy)" minconf include_watchonly )`
//! - `[x]` `getnewaddress ( "label" "address_type" )`
//! - `[x]` `getrawchangeaddress ( "address_type" )`
//! - `[-]` `getreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[i]` `getreceivedbyaddress "address" ( minconf )`
//! - `[x]` `gettransaction "txid" ( include_watchonly )`
//! - `[i]` `getunconfirmedbalance`
//! - `[i]` `getwalletinfo`
//! - `[-]` `importaddress "address" ( "label" rescan p2sh )`
//! - `[-]` `importmulti "requests" ( "options" )`
//! - `[-]` `importprivkey "privkey" ( "label" ) ( rescan )`
//! - `[-]` `importprunedfunds`
//! - `[-]` `importpubkey "pubkey" ( "label" rescan )`
//! - `[-]` `importwallet "filename"`
//! - `[-]` `keypoolrefill ( newsize )`
//! - `[-]` `listaccounts (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[i]` `listaddressgroupings`
//! - `[i]` `listlabels ( "purpose" )`
//! - `[i]` `listlockunspent`
//! - `[-]` `listreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[i]` `listreceivedbyaddress ( minconf include_empty include_watchonly address_filter )`
//! - `[i]` `listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )`
//! - `[i]` `listtransactions (label count skip include_watchonly)`
//! - `[i]` `listunspent ( minconf maxconf ["addresses",...] [include_unsafe] [query_options])`
//! - `[i]` `listwallets`
//! - `[x]` `loadwallet "filename"`
//! - `[-]` `lockunspent unlock ([{"txid":"txid","vout":n},...])`
//! - `[-]` `move (Deprecated, will be removed in V0.18. To use this command, start bitcboind with -deprecatedrpc=accounts)`
//! - `[-]` `removeprunedfunds "txid"`
//! - `[x]` `rescanblockchain ("start_height") ("stop_height")`
//! - `[-]` `sendfrom (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[i]` `sendmany "" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")`
//! - `[x]` `sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")`
//! - `[-]` `setaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)`
//! - `[-]` `sethdseed ( "newkeypool" "seed" )`
//! - `[-]` `settxfee amount`
//! - `[i]` `signmessage "address" "message"`
//! - `[i]` `signrawtransactionwithwallet "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )`
//! - `[-]` `unloadwallet ( "wallet_name" )`
//! - `[i]` `walletcreatefundedpsbt [{"txid":"id","vout":n},...] [{"address":amount},{"data":"hex"},...] ( locktime ) ( replaceable ) ( options bip32derivs )`
//! - `[-]` `walletlock`
//! - `[-]` `walletpassphrase "passphrase" timeout`
//! - `[-]` `walletpassphrasechange "oldpassphrase" "newpassphrase"`
//! - `[i]` `walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )`
//!
//! **== Zmq ==**
//! - `[i]` `getzmqnotifications`
//! ### Method name and implementation status
//!
//! Every JSON-RPC method supported by this version of Bitcoin Core is listed below along with its
//! current implementation status.
//!
//! <details>
//! <summary> Methods from the == Blockchain == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | getbestblockhash | done |
//! | getblock | done |
//! | getblockchaininfo | done |
//! | getblockcount | done |
//! | getblockhash | done |
//! | getblockheader | done |
//! | getblockstats | done |
//! | getchaintips | done |
//! | getchaintxstats | done |
//! | getdifficulty | done |
//! | getmempoolancestors | done (untested) |
//! | getmempooldescendants | done (untested) |
//! | getmempoolentry | done (untested) |
//! | getmempoolinfo | done (untested) |
//! | getrawmempool | done (untested) |
//! | gettxout | done (untested) |
//! | gettxoutproof | done (untested) |
//! | gettxoutsetinfo | done (untested) |
//! | preciousblock | omitted |
//! | pruneblockchain | omitted |
//! | savemempool | omitted |
//! | scantxoutset | omitted |
//! | verifychain | omitted |
//! | verifytxoutproof | done (untested) |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Control == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | getmemoryinfo | done |
//! | help | omitted |
//! | logging | done |
//! | stop | omitted |
//! | uptime | omitted |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Generating == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | generate | done |
//! | generatetoaddress | done |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Mining == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | getblocktemplate | todo |
//! | getmininginfo | todo |
//! | getnetworkhashps | todo |
//! | prioritisetransaction | todo |
//! | submitblock | todo |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Network == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | addnode | omitted |
//! | clearbanned | omitted |
//! | disconnectnode | omitted |
//! | getaddednodeinfo | done |
//! | getconnectioncount | omitted |
//! | getnettotals | done |
//! | getnetworkinfo | done |
//! | getpeerinfo | done |
//! | listbanned | omitted |
//! | ping | omitted |
//! | setban | omitted |
//! | setnetworkactive | omitted |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Rawtransactions == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | combinepsbt | todo |
//! | combinerawtransaction | todo |
//! | converttopsbt | todo |
//! | createpsbt | todo |
//! | createrawtransaction | todo |
//! | decodepsbt | todo |
//! | decoderawtransaction | todo |
//! | decodescript | todo |
//! | finalizepsbt | todo |
//! | fundrawtransaction | todo |
//! | getrawtransaction | todo |
//! | sendrawtransaction | done (untested) |
//! | signrawtransaction | todo |
//! | signrawtransactionwithkey | todo |
//! | testmempoolaccept | todo |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Util == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | createmultisig | omitted |
//! | estimatesmartfee | omitted |
//! | signmessagewithprivkey | omitted |
//! | validateaddress | omitted |
//! | verifymessage | omitted |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Wallet == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | abandontransaction | omitted |
//! | abortrescan | omitted |
//! | addmultisigaddress | done |
//! | backupwallet | omitted |
//! | bumpfee | done |
//! | createwallet | done |
//! | dumpprivkey | done |
//! | dumpwallet | done |
//! | encryptwallet | omitted |
//! | getaccount | omitted |
//! | getaccountaddress | omitted |
//! | getaddressbyaccount | omitted |
//! | getaddressesbylabel | done |
//! | getaddressinfo | done |
//! | getbalance | done |
//! | getnewaddress | done |
//! | getrawchangeaddress | done |
//! | getreceivedbyaccount | omitted |
//! | getreceivedbyaddress | done (untested) |
//! | gettransaction | done |
//! | getunconfirmedbalance | done (untested) |
//! | getwalletinfo | done (untested) |
//! | importaddress | omitted |
//! | importmulti | omitted |
//! | importprivkey | omitted |
//! | importprunedfunds | omitted |
//! | importpubkey | omitted |
//! | importwallet | omitted |
//! | keypoolrefill | omitted |
//! | listaccounts | omitted |
//! | listaddressgroupings | done (untested) |
//! | listlabels | done (untested) |
//! | listlockunspent | done (untested) |
//! | listreceivedbyaccount | omitted |
//! | listreceivedbyaddress | done (untested) |
//! | listsinceblock | done (untested) |
//! | listtransactions | done (untested) |
//! | listunspent | done (untested) |
//! | listwallets | done (untested) |
//! | loadwallet | done |
//! | lockunspent | omitted |
//! | move | omitted |
//! | removeprunedfunds | omitted |
//! | rescanblockchain | done |
//! | sendfrom | omitted |
//! | sendmany | done (untested) |
//! | sendtoaddress | done |
//! | setaccount | omitted |
//! | sethdseed | omitted |
//! | settxfee | omitted |
//! | signmessage | done (untested) |
//! | signrawtransactionwithwallet | done (untested) |
//! | unloadwallet | omitted |
//! | walletcreatefundedpsbt | done (untested) |
//! | walletlock | omitted |
//! | walletpassphrase | omitted |
//! | walletpassphrasechange | omitted |
//! | walletprocesspsbt | done (untested) |
//!
//! </details>
//!
//! <details>
//! <summary> Methods from the == Zmq == section </summary>
//!
//! | JSON-PRC Method Name | Status |
//! |:-----------------------------------|:---------------:|
//! | getzmqnotifications` | done (untested) |
//!
//! </details>
//!
//!
//! **Items marked omitted were omitted because:**
//!
//! - Method does not return anything.
//! - Method returns a simple type (e.g. bool or integer).
//! - Method is deprecated.

// JSON-RPC types by API section.
mod blockchain;
Expand Down

0 comments on commit 8174e21

Please sign in to comment.