diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index 7f5efbe..57b2811 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -1,174 +1,242 @@ // SPDX-License-Identifier: CC0-1.0 -//! Structs with standard types. -//! -//! These structs model the types returned by the JSON-RPC API and use stdlib types (or custom -//! types) and are specific to a specific to Bitcoin Core `v25`. -//! -//! **== Blockchain ==** -//! - [x] `getbestblockhash` -//! - [x] `getblock "blockhash" ( verbosity )` -//! - [x] `getblockchaininfo` -//! - [ ] `getblockcount` -//! - [ ] `getblockfilter "blockhash" ( "filtertype" )` -//! - [ ] `getblockfrompeer "blockhash" peer_id` -//! - [ ] `getblockhash height` -//! - [ ] `getblockheader "blockhash" ( verbose )` -//! - [ ] `getblockstats hash_or_height ( stats )` -//! - [ ] `getchaintips` -//! - [ ] `getchaintxstats ( nblocks "blockhash" )` -//! - [ ] `getdeploymentinfo ( "blockhash" )` -//! - [ ] `getdifficulty` -//! - [ ] `getmempoolancestors "txid" ( verbose )` -//! - [ ] `getmempooldescendants "txid" ( verbose )` -//! - [ ] `getmempoolentry "txid"` -//! - [ ] `getmempoolinfo` -//! - [ ] `getrawmempool ( verbose mempool_sequence )` -//! - [ ] `gettxout "txid" n ( include_mempool )` -//! - [ ] `gettxoutproof ["txid",...] ( "blockhash" )` -//! - [ ] `gettxoutsetinfo ( "hash_type" hash_or_height use_index )` -//! - [ ] `gettxspendingprevout [{"txid":"hex","vout":n},...]` -//! - [ ] `preciousblock "blockhash"` -//! - [ ] `pruneblockchain height` -//! - [ ] `savemempool` -//! - [ ] `scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" "options" )` -//! - [ ] `scantxoutset "action" ( [scanobjects,...] )` -//! - [ ] `verifychain ( checklevel nblocks )` -//! - [ ] `verifytxoutproof "proof"` -//! -//! **== Control ==** -//! - [ ] `getmemoryinfo ( "mode" )` -//! - [ ] `getrpcinfo` -//! - [ ] `help ( "command" )` -//! - [ ] `logging ( ["include_category",...] ["exclude_category",...] )` -//! - [x] `stop` -//! - [ ] `uptime` -//! -//! **== Mining ==** -//! - [ ] `getblocktemplate ( "template_request" )` -//! - [ ] `getmininginfo` -//! - [ ] `getnetworkhashps ( nblocks height )` -//! - [ ] `prioritisetransaction "txid" ( dummy ) fee_delta` -//! - [ ] `submitblock "hexdata" ( "dummy" )` -//! - [ ] `submitheader "hexdata"` -//! -//! **== Network ==** -//! - [ ] `addnode "node" "command"` -//! - [ ] `clearbanned` -//! - [ ] `disconnectnode ( "address" nodeid )` -//! - [ ] `getaddednodeinfo ( "node" )` -//! - [ ] `getconnectioncount` -//! - [ ] `getnettotals` -//! - [ ] `getnetworkinfo` -//! - [ ] `getnodeaddresses ( count "network" )` -//! - [ ] `getpeerinfo` -//! - [ ] `listbanned` -//! - [ ] `ping` -//! - [ ] `setban "subnet" "command" ( bantime absolute )` -//! - [ ] `setnetworkactive state` -//! -//! **== Rawtransactions ==** -//! - [ ] `analyzepsbt "psbt"` -//! - [ ] `combinepsbt ["psbt",...]` -//! - [ ] `combinerawtransaction ["hexstring",...]` -//! - [ ] `converttopsbt "hexstring" ( permitsigdata iswitness )` -//! - [ ] `createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )` -//! - [ ] `createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable )` -//! - [ ] `decodepsbt "psbt"` -//! - [ ] `decoderawtransaction "hexstring" ( iswitness )` -//! - [ ] `decodescript "hexstring"` -//! - [ ] `finalizepsbt "psbt" ( extract )` -//! - [ ] `fundrawtransaction "hexstring" ( options iswitness )` -//! - [ ] `getrawtransaction "txid" ( verbosity "blockhash" )` -//! - [ ] `joinpsbts ["psbt",...]` -//! - [ ] `sendrawtransaction "hexstring" ( maxfeerate maxburnamount )` -//! - [ ] `signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )` -//! - [ ] `testmempoolaccept ["rawtx",...] ( maxfeerate )` -//! - [ ] `utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )` -//! -//! **== Signer ==** -//! - [ ] `enumeratesigners` -//! -//! **== Util ==** -//! - [ ] `createmultisig nrequired ["key",...] ( "address_type" )` -//! - [ ] `deriveaddresses "descriptor" ( range )` -//! - [ ] `estimatesmartfee conf_target ( "estimate_mode" )` -//! - [ ] `getdescriptorinfo "descriptor"` -//! - [ ] `getindexinfo ( "index_name" )` -//! - [ ] `signmessagewithprivkey "privkey" "message"` -//! - [ ] `validateaddress "address"` -//! - [ ] `verifymessage "address" "signature" "message"` -//! -//! **== Wallet ==** -//! - [ ] `abandontransaction "txid"` -//! - [ ] `abortrescan` -//! - [ ] `addmultisigaddress nrequired ["key",...] ( "label" "address_type" )` -//! - [ ] `backupwallet "destination"` -//! - [ ] `bumpfee "txid" ( options )` -//! - [x] `createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer )` -//! - [ ] `dumpprivkey "address"` -//! - [ ] `dumpwallet "filename"` -//! - [ ] `encryptwallet "passphrase"` -//! - [ ] `getaddressesbylabel "label"` -//! - [ ] `getaddressinfo "address"` -//! - [x] `getbalance ( "dummy" minconf include_watchonly avoid_reuse )` -//! - [x] `getbalances` -//! - [x] `getnewaddress ( "label" "address_type" )` -//! - [ ] `getrawchangeaddress ( "address_type" )` -//! - [ ] `getreceivedbyaddress "address" ( minconf include_immature_coinbase )` -//! - [ ] `getreceivedbylabel "label" ( minconf include_immature_coinbase )` -//! - [x] `gettransaction "txid" ( include_watchonly verbose )` -//! - [ ] `getunconfirmedbalance` -//! - [ ] `getwalletinfo` -//! - [ ] `importaddress "address" ( "label" rescan p2sh )` -//! - [ ] `importdescriptors "requests"` -//! - [ ] `importmulti "requests" ( "options" )` -//! - [ ] `importprivkey "privkey" ( "label" rescan )` -//! - [ ] `importprunedfunds "rawtransaction" "txoutproof"` -//! - [ ] `importpubkey "pubkey" ( "label" rescan )` -//! - [ ] `importwallet "filename"` -//! - [ ] `keypoolrefill ( newsize )` -//! - [ ] `listaddressgroupings` -//! - [ ] `listdescriptors ( private )` -//! - [ ] `listlabels ( "purpose" )` -//! - [ ] `listlockunspent` -//! - [ ] `listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase )` -//! - [ ] `listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase )` -//! - [ ] `listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" )` -//! - [ ] `listtransactions ( "label" count skip include_watchonly )` -//! - [ ] `listunspent ( minconf maxconf ["address",...] include_unsafe query_options )` -//! - [ ] `listwalletdir` -//! - [ ] `listwallets` -//! - [x] `loadwallet "filename" ( load_on_startup )` -//! - [ ] `lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent )` -//! - [ ] `migratewallet ( "wallet_name" "passphrase" )` -//! - [ ] `newkeypool` -//! - [ ] `psbtbumpfee "txid" ( options )` -//! - [ ] `removeprunedfunds "txid"` -//! - [ ] `rescanblockchain ( start_height stop_height )` -//! - [ ] `restorewallet "wallet_name" "backup_file" ( load_on_startup )` -//! - [ ] `send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )` -//! - [ ] `sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options )` -//! - [ ] `sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )` -//! - [x] `sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )` -//! - [ ] `sethdseed ( newkeypool "seed" )` -//! - [ ] `setlabel "address" "label"` -//! - [ ] `settxfee amount` -//! - [ ] `setwalletflag "flag" ( value )` -//! - [ ] `signmessage "address" "message"` -//! - [ ] `signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )` -//! - [ ] `simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} )` -//! - [ ] `unloadwallet ( "wallet_name" load_on_startup )` -//! - [ ] `upgradewallet ( version )` -//! - [ ] `walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs )` -//! - [ ] `walletdisplayaddress "address"` -//! - [ ] `walletlock` -//! - [ ] `walletpassphrase "passphrase" timeout` -//! - [ ] `walletpassphrasechange "oldpassphrase" "newpassphrase"` -//! - [ ] `walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize )` -//! -//! **== Zmq ==** -//! - [ ] `getzmqnotifications` +//! # JSON-RPC types for Bitcoin Core `v0.25` +//! +//! 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 +//! types in the `model` module are version nonspecific and are strongly typed using `rust-bitcoin`. +//! +//! ### 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. +//! +//!
+//! Methods from the == Blockchain == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | getbestblockhash | done | +//! | getblock | done | +//! | getblockchaininfo | done | +//! | getblockcount | done | +//! | getblockfilter | todo | +//! | getblockfrompeer | todo | +//! | getblockhash | done | +//! | getblockheader | done | +//! | getblockstats | done (untested) | +//! | getchaintips | done | +//! | getchaintxstats | done | +//! | getdeploymentinfo | todo | +//! | getdifficulty | done | +//! | getmempoolancestors | done (untested) | +//! | getmempooldescendants | done (untested) | +//! | getmempoolentry | done | +//! | getmempoolinfo | done | +//! | getrawmempool | done | +//! | gettxout | done | +//! | gettxoutproof | omitted | +//! | gettxoutsetinfo | done | +//! | gettxspendingprevout | todo | +//! | preciousblock | omitted | +//! | pruneblockchain | omitted | +//! | savemempool | omitted | +//! | scanblocks | todo | +//! | scantxoutset | omitted | +//! | verifychain | omitted | +//! | verifytxoutproof | done | +//! +//!
+//! +//!
+//! Methods from the == Control == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | getmemoryinfo | done | +//! | getrpcinfo | todo | +//! | help | omitted | +//! | logging | done | +//! | stop | omitted | +//! | uptime | omitted | +//! +//!
+//! +//!
+//! Methods from the == Mining == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | getblocktemplate | todo | +//! | getmininginfo | todo | +//! | getnetworkhashps | todo | +//! | prioritisetransaction | todo | +//! | submitblock | todo | +//! | submitheader | todo | +//! +//!
+//! +//!
+//! Methods from the == Network == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | addnode | omitted | +//! | clearbanned | omitted | +//! | disconnectnode | omitted | +//! | getaddednodeinfo | done | +//! | getconnectioncount | omitted | +//! | getnettotals | done | +//! | getnetworkinfo | done | +//! | getnodeaddresses | todo | +//! | getpeerinfo | done | +//! | listbanned | omitted | +//! | ping | omitted | +//! | setban | omitted | +//! | setnetworkactive | omitted | +//! +//!
+//! +//!
+//! Methods from the == Rawtransactions == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | analyzepsbt | todo | +//! | combinepsbt | todo | +//! | combinerawtransaction | todo | +//! | converttopsbt | todo | +//! | createpsbt | todo | +//! | createrawtransaction | todo | +//! | decodepsbt | todo | +//! | decoderawtransaction | todo | +//! | decodescript | todo | +//! | finalizepsbt | todo | +//! | fundrawtransaction | todo | +//! | getrawtransaction | todo | +//! | joinpsbts | todo | +//! | sendrawtransaction | done (untested) | +//! | signrawtransactionwithkey | todo | +//! | testmempoolaccept | todo | +//! | utxoupdatepsbt | todo | +//! +//!
+//! +//!
+//! Methods from the == Signer == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | enumeratesigners | todo | +//! +//!
+//! +//!
+//! Methods from the == Util == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | createmultisig | omitted | +//! | deriveaddresses | todo | +//! | estimatesmartfee | omitted | +//! | getdescriptorinfo | todo | +//! | getindexinfo | todo | +//! | signmessagewithprivkey | omitted | +//! | validateaddress | omitted | +//! | verifymessage | omitted | +//! +//!
+//! +//!
+//! Methods from the == Wallet == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | abandontransaction | omitted | +//! | abortrescan | omitted | +//! | addmultisigaddress | done (untested) | +//! | backupwallet | omitted | +//! | bumpfee | done | +//! | createwallet | done | +//! | dumpprivkey | done | +//! | dumpwallet | done | +//! | encryptwallet | omitted | +//! | getaddressesbylabel | done | +//! | getaddressinfo | done (untested) | +//! | getbalance | done | +//! | getbalances | done | +//! | getnewaddress | done | +//! | getrawchangeaddress | done | +//! | getreceivedbyaddress | done | +//! | getreceivedbylabel | todo | +//! | gettransaction | done | +//! | getunconfirmedbalance | done (untested) | +//! | getwalletinfo | done (untested) | +//! | importaddress | omitted | +//! | importdescriptors | todo | +//! | importmulti | omitted | +//! | importprivkey | omitted | +//! | importprunedfunds | omitted | +//! | importpubkey | omitted | +//! | importwallet | omitted | +//! | keypoolrefill | omitted | +//! | listaddressgroupings | done (untested) | +//! | listdescriptors | todo | +//! | listlabels | done (untested) | +//! | listlockunspent | done (untested) | +//! | migratewallet | todo | +//! | newkeypool | todo | +//! | psbtbumpfee | todo | +//! | listreceivedbyaddress | done (untested) | +//! | listreceivedbylabel | todo | +//! | listsinceblock | done (untested) | +//! | listtransactions | done (untested) | +//! | listunspent | done (untested) | +//! | listwalletdir | todo | +//! | listwallets | done (untested) | +//! | loadwallet | done | +//! | lockunspent | omitted | +//! | removeprunedfunds | omitted | +//! | rescanblockchain | done (untested) | +//! | restorewallet | todo | +//! | send | todo | +//! | sendall | todo | +//! | sendmany | done (untested) | +//! | sendtoaddress | done | +//! | sethdseed | omitted | +//! | setlabel | todo | +//! | settxfee | omitted | +//! | setwalletflag | todo | +//! | signmessage | done (untested) | +//! | signrawtransactionwithwallet | done (untested) | +//! | simulaterawtransaction | todo | +//! | unloadwallet | omitted | +//! | upgradewallet | todo | +//! | walletcreatefundedpsbt | done (untested) | +//! | walletdisplayaddress | todo | +//! | walletlock | omitted | +//! | walletpassphrase | omitted | +//! | walletpassphrasechange | omitted | +//! | walletprocesspsbt | done (untested) | +//! +//!
+//! +//!
+//! Methods from the == Zmq == section +//! +//! | JSON-PRC Method Name | Status | +//! |:-----------------------------------|:---------------:| +//! | getzmqnotifications | done (untested) | +//! +//!
+//! +//! +//! **Items marked omitted were omitted because:** +//! +//! - Method does not return anything. +//! - Method returns a simple type (e.g. bool or integer). +//! - Method is deprecated. mod wallet; @@ -177,14 +245,29 @@ pub use self::wallet::{CreateWallet, LoadWallet}; #[doc(inline)] pub use crate::{ v17::{ - GenerateToAddress, GetBalance, GetBestBlockHash, GetBlockVerbosityOne, - GetBlockVerbosityZero, GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoNetwork, - GetNewAddress, GetTransaction, GetTransactionDetail, GetTxOut, SendRawTransaction, - TransactionCategory, + AddMultisigAddress, AddedNode, AddedNodeAddress, AddressInformation, Banned, BumpFee, + ChainTips, ChainTipsStatus, DumpPrivKey, DumpWallet, Generate, GenerateToAddress, + GetAddedNodeInfo, GetAddressInfo, GetAddressInfoEmbedded, GetAddressInfoLabel, + GetAddressesByLabel, GetBalance, GetBestBlockHash, GetBlockCount, GetBlockHash, + GetBlockHeader, GetBlockHeaderVerbose, GetBlockStats, GetBlockVerbosityOne, + GetBlockVerbosityZero, GetChainTips, GetChainTxStats, GetDifficulty, GetMemoryInfoStats, + GetMempoolAncestors, GetMempoolAncestorsVerbose, GetMempoolDescendants, + GetMempoolDescendantsVerbose, GetMempoolEntry, GetMempoolInfo, GetNetTotals, + GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork, + GetNewAddress, GetPeerInfo, GetRawChangeAddress, GetRawMempool, GetRawMempoolVerbose, + GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTxOut, GetTxOutSetInfo, + GetUnconfirmedBalance, GetWalletInfo, GetZmqNotifications, ListAddressGroupings, + ListAddressGroupingsItem, ListBanned, ListLabels, ListLockUnspent, ListLockUnspentItem, + ListReceivedByAddress, ListReceivedByAddressItem, ListSinceBlock, + ListSinceBlockTransaction, ListTransactions, ListTransactionsItem, ListUnspent, + ListUnspentItem, ListWallets, Locked, Logging, MempoolEntry, MempoolEntryFees, PeerInfo, + RescanBlockchain, ScriptPubkey, SendMany, SendRawTransaction, SendToAddress, SignErrorData, + SignMessage, SignRawTransactionWithWallet, SoftforkReject, TransactionCategory, + UploadTarget, Uptime, VerifyTxOutProof, WalletCreateFundedPsbt, WalletProcessPsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, GetBalancesMine, GetBalancesWatchOnly, GetBlockchainInfo, Softfork, SoftforkType, }, - v22::{SendToAddress, UnloadWallet}, + v21::UnloadWallet, }; diff --git a/verify/rpc-api-v25.txt b/verify/rpc-api-v25.txt new file mode 100644 index 0000000..85f8b4d --- /dev/null +++ b/verify/rpc-api-v25.txt @@ -0,0 +1,164 @@ +== Blockchain == +getbestblockhash +getblock "blockhash" ( verbosity ) +getblockchaininfo +getblockcount +getblockfilter "blockhash" ( "filtertype" ) +getblockfrompeer "blockhash" peer_id +getblockhash height +getblockheader "blockhash" ( verbose ) +getblockstats hash_or_height ( stats ) +getchaintips +getchaintxstats ( nblocks "blockhash" ) +getdeploymentinfo ( "blockhash" ) +getdifficulty +getmempoolancestors "txid" ( verbose ) +getmempooldescendants "txid" ( verbose ) +getmempoolentry "txid" +getmempoolinfo +getrawmempool ( verbose mempool_sequence ) +gettxout "txid" n ( include_mempool ) +gettxoutproof ["txid",...] ( "blockhash" ) +gettxoutsetinfo ( "hash_type" hash_or_height use_index ) +gettxspendingprevout [{"txid":"hex","vout":n},...] +preciousblock "blockhash" +pruneblockchain height +savemempool +scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" "options" ) +scantxoutset "action" ( [scanobjects,...] ) +verifychain ( checklevel nblocks ) +verifytxoutproof "proof" + +== Control == +getmemoryinfo ( "mode" ) +getrpcinfo +help ( "command" ) +logging ( ["include_category",...] ["exclude_category",...] ) +stop +uptime + +== Mining == +getblocktemplate ( "template_request" ) +getmininginfo +getnetworkhashps ( nblocks height ) +prioritisetransaction "txid" ( dummy ) fee_delta +submitblock "hexdata" ( "dummy" ) +submitheader "hexdata" + +== Network == +addnode "node" "command" +clearbanned +disconnectnode ( "address" nodeid ) +getaddednodeinfo ( "node" ) +getconnectioncount +getnettotals +getnetworkinfo +getnodeaddresses ( count "network" ) +getpeerinfo +listbanned +ping +setban "subnet" "command" ( bantime absolute ) +setnetworkactive state + +== Rawtransactions == +analyzepsbt "psbt" +combinepsbt ["psbt",...] +combinerawtransaction ["hexstring",...] +converttopsbt "hexstring" ( permitsigdata iswitness ) +createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable ) +createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable ) +decodepsbt "psbt" +decoderawtransaction "hexstring" ( iswitness ) +decodescript "hexstring" +finalizepsbt "psbt" ( extract ) +fundrawtransaction "hexstring" ( options iswitness ) +getrawtransaction "txid" ( verbosity "blockhash" ) +joinpsbts ["psbt",...] +sendrawtransaction "hexstring" ( maxfeerate maxburnamount ) +signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) +testmempoolaccept ["rawtx",...] ( maxfeerate ) +utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] ) + +== Signer == +enumeratesigners + +== Util == +createmultisig nrequired ["key",...] ( "address_type" ) +deriveaddresses "descriptor" ( range ) +estimatesmartfee conf_target ( "estimate_mode" ) +getdescriptorinfo "descriptor" +getindexinfo ( "index_name" ) +signmessagewithprivkey "privkey" "message" +validateaddress "address" +verifymessage "address" "signature" "message" + +== Wallet == +abandontransaction "txid" +abortrescan +addmultisigaddress nrequired ["key",...] ( "label" "address_type" ) +backupwallet "destination" +bumpfee "txid" ( options ) +createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer ) +dumpprivkey "address" +dumpwallet "filename" +encryptwallet "passphrase" +getaddressesbylabel "label" +getaddressinfo "address" +getbalance ( "dummy" minconf include_watchonly avoid_reuse ) +getbalances +getnewaddress ( "label" "address_type" ) +getrawchangeaddress ( "address_type" ) +getreceivedbyaddress "address" ( minconf include_immature_coinbase ) +getreceivedbylabel "label" ( minconf include_immature_coinbase ) +gettransaction "txid" ( include_watchonly verbose ) +getunconfirmedbalance +getwalletinfo +importaddress "address" ( "label" rescan p2sh ) +importdescriptors "requests" +importmulti "requests" ( "options" ) +importprivkey "privkey" ( "label" rescan ) +importprunedfunds "rawtransaction" "txoutproof" +importpubkey "pubkey" ( "label" rescan ) +importwallet "filename" +keypoolrefill ( newsize ) +listaddressgroupings +listdescriptors ( private ) +listlabels ( "purpose" ) +listlockunspent +listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" include_immature_coinbase ) +listreceivedbylabel ( minconf include_empty include_watchonly include_immature_coinbase ) +listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed include_change "label" ) +listtransactions ( "label" count skip include_watchonly ) +listunspent ( minconf maxconf ["address",...] include_unsafe query_options ) +listwalletdir +listwallets +loadwallet "filename" ( load_on_startup ) +lockunspent unlock ( [{"txid":"hex","vout":n},...] persistent ) +migratewallet ( "wallet_name" "passphrase" ) +newkeypool +psbtbumpfee "txid" ( options ) +removeprunedfunds "txid" +rescanblockchain ( start_height stop_height ) +restorewallet "wallet_name" "backup_file" ( load_on_startup ) +send [{"address":amount,...},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options ) +sendall ["address",{"address":amount,...},...] ( conf_target "estimate_mode" fee_rate options ) +sendmany ( "" ) {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose ) +sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose ) +sethdseed ( newkeypool "seed" ) +setlabel "address" "label" +settxfee amount +setwalletflag "flag" ( value ) +signmessage "address" "message" +signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) +simulaterawtransaction ( ["rawtx",...] {"include_watchonly":bool,...} ) +unloadwallet ( "wallet_name" load_on_startup ) +upgradewallet ( version ) +walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs ) +walletdisplayaddress "address" +walletlock +walletpassphrase "passphrase" timeout +walletpassphrasechange "oldpassphrase" "newpassphrase" +walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs finalize ) + +== Zmq == +getzmqnotifications diff --git a/verify/src/lib.rs b/verify/src/lib.rs index 627d463..5ce50da 100644 --- a/verify/src/lib.rs +++ b/verify/src/lib.rs @@ -35,6 +35,8 @@ pub enum Version { V23, /// Bitcoin Core v24. V24, + /// Bitcoin Core v25. + V25, } impl Version { @@ -49,6 +51,7 @@ impl Version { "v22" | "22" => Ok(Version::V22), "v23" | "23" => Ok(Version::V23), "v24" | "24" => Ok(Version::V24), + "v25" | "25" => Ok(Version::V25), other => Err(anyhow::Error::msg(format!("unknown version: '{}'", other))), } } @@ -66,6 +69,7 @@ impl fmt::Display for Version { V22 => "v22", V23 => "v23", V24 => "v24", + V25 => "v25", }; fmt::Display::fmt(&s, f) } diff --git a/verify/src/method/mod.rs b/verify/src/method/mod.rs index 6859b25..dcd7e0f 100644 --- a/verify/src/method/mod.rs +++ b/verify/src/method/mod.rs @@ -10,6 +10,7 @@ pub mod v21; pub mod v22; pub mod v23; pub mod v24; +pub mod v25; use crate::Version; @@ -26,6 +27,7 @@ pub fn all_methods(version: Version) -> Vec { V22 => v22::METHODS, V23 => v23::METHODS, V24 => v24::METHODS, + V25 => v25::METHODS, }; list.iter().map(|m| m.name.to_string()).collect() @@ -63,6 +65,7 @@ impl Method { V22 => v22::METHODS, V23 => v23::METHODS, V24 => v24::METHODS, + V25 => v25::METHODS, }; list.iter().find(|&method| method.name == name) diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs new file mode 100644 index 0000000..ef941d5 --- /dev/null +++ b/verify/src/method/v25.rs @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: CC0-1.0 + +//! JSON RPC methods provided by Bitcoin Core v25. + +use super::Method; + +/// Data for the JSON RPC methods provided by Bitcoin Core v25. +pub const METHODS: &[Method] = &[ + Method::new_modeled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"), + Method::new_modeled("getblock", "GetBlockVerbosityZero", "get_block"), // We only check one of the types. + Method::new_modeled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), + Method::new_modeled("getblockcount", "GetBlockCount", "get_block_count"), + Method::new_modeled("getblockfilter", "GetBlockFilter", "get_block_filter"), + Method::new_modeled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_modeled("getblockhash", "GetBlockHash", "get_block_hash"), + Method::new_modeled("getblockheader", "GetBlockHeader", "get_block_header"), + Method::new_modeled("getblockstats", "GetBlockStats", "get_block_stats"), + Method::new_modeled("getchaintips", "GetChainTips", "get_chain_tips"), + Method::new_modeled("getchaintxstats", "GetChainTxStats", "get_chain_tx_stats"), + Method::new_modeled("getdeploymentinfo", "GetDeploymentInfo", "get_deployment_info"), + Method::new_modeled("getdifficulty", "GetDifficulty", "get_difficulty"), + Method::new_modeled("getmempoolancestors", "GetMempoolAncestors", "get_mempool_ancestors"), + Method::new_modeled( + "getmempooldescendants", + "GetMempoolDescendants", + "get_mempool_descendants", + ), + Method::new_modeled("getmempoolentry", "GetMempoolEntry", "get_mempool_entry"), + Method::new_modeled("getmempoolinfo", "GetMempoolInfo", "get_mempool_info"), + Method::new_modeled("getrawmempool", "GetRawMempool", "get_raw_mempool"), + Method::new_modeled("gettxout", "GetTxOut", "get_tx_out"), + Method::new_modeled("gettxoutproof", "GetTxOutProof", "get_tx_out_proof"), + Method::new_modeled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"), + Method::new_modeled("gettxspendingprevout", "GetTxSpendingPrevout", "get_tx_spending_prevout"), + Method::new_nothing("preciousblock", "precious_block"), + Method::new_numeric("pruneblockchain", "prune_blockchain"), + Method::new_nothing("savemempool", "save_mempool"), + Method::new_modeled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modeled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), + Method::new_bool("verifychain", "verify_chain"), + Method::new_modeled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), + Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"), + Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"), + Method::new_string("help", "help"), + Method::new_no_model("logging", "Logging", "logging"), + Method::new_nothing("stop", "stop"), + Method::new_numeric("uptime", "uptime"), + Method::new_none("getblocktemplate", "get_block_template"), + Method::new_none("getmininginfo", "get_mining_info"), + Method::new_none("getnetworkhashps", "get_network_hashes_per_second"), + Method::new_bool("prioritisetransaction", "prioritise_transaction"), + Method::new_none("submitblock", "submit_block"), + Method::new_nothing("submitheader", "submit_header"), + Method::new_nothing("addnode", "add_node"), + Method::new_nothing("clearbanned", "clear_banned"), + Method::new_nothing("disconnectnode", "disconnect_node"), + Method::new_no_model("getaddednodeinfo", "GetAddedNodeInfo", "get_added_node_info"), + Method::new_numeric("getconnectioncount", "get_connection_count"), + Method::new_no_model("getnettotals", "GetNetTotals", "get_net_totals"), + Method::new_modeled("getnetworkinfo", "GetNetworkInfo", "get_network_info"), + Method::new_no_model("getnodeaddresses", "GetNodeAddresses", "get_node_addresses"), + Method::new_no_model("getpeerinfo", "GetPeerInfo", "get_peer_info"), + Method::new_string("listbanned", "list_banned"), // v17 docs seem wrong, says no return. + Method::new_nothing("ping", "ping"), + Method::new_nothing("setban", "set_ban"), + Method::new_nothing("setnetworkactive", "set_network_active"), + Method::new_modeled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"), + Method::new_none("combinepsbt", "combine_psbt"), + Method::new_none("combinerawtransaction", "combine_raw_transaction"), + Method::new_none("converttopsbt", "convert_to_psbt"), + Method::new_none("createpsbt", "create_psbt"), + Method::new_none("createrawtransaction", "create_raw_transaction"), + Method::new_none("decodepsbt", "decode_psbt"), + Method::new_none("decoderawtransaction", "decode_raw_transaction"), + Method::new_none("decodescript", "decode_script"), + Method::new_none("finalizepsbt", "finalize_psbt"), + Method::new_none("fundrawtransaction", "fund_raw_transaciton"), + Method::new_none("getrawtransaction", "get_raw_transaction"), + Method::new_modeled("joinpsbts", "JoinPsbts", "join_psbts"), + Method::new_modeled("sendrawtransaction", "SendRawTransaction", "send_raw_transaction"), + Method::new_none("signrawtransactionwithkey", "sign_raw_transaction_with_key"), + Method::new_none("testmempoolaccept", "test_mempool_accept"), + Method::new_modeled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), + Method::new_modeled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), + Method::new_modeled("createmultisig", "CreateMultisig", "create_multisig"), + Method::new_modeled("deriveaddresses", "DeriveAddresses", "derive_addresses"), + Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), + Method::new_no_model("getdescriptorinfo", "GetDescriptorInfo", "get_descriptor_info"), + Method::new_no_model("getindexinfo", "GetIndexInfo", "get_index_info"), + Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"), + Method::new_modeled("validateaddress", "ValidateAddress", "validate_address"), + Method::new_bool("verifymessage", "verify_message"), + Method::new_nothing("abandontransaction", "abandon_transaction"), + Method::new_nothing("abortrescan", "abort_rescan"), + Method::new_modeled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"), + Method::new_nothing("backupwallet", "backup_wallet"), + Method::new_modeled("bumpfee", "BumpFee", "bump_fee"), + Method::new_modeled("createwallet", "CreateWallet", "create_wallet"), + Method::new_modeled("dumpprivkey", "DumpPrivKey", "dump_priv_key"), + Method::new_modeled("dumpwallet", "DumpWallet", "dump_wallet"), + Method::new_nothing("encryptwallet", "encrypt_wallet"), + Method::new_modeled("getaddressesbylabel", "GetAddressesByLabel", "get_addresses_by_label"), + Method::new_modeled("getaddressinfo", "GetAddressInfo", "get_address_info"), + Method::new_modeled("getbalance", "GetBalance", "get_balance"), + Method::new_modeled("getbalances", "GetBalances", "get_balances"), + Method::new_modeled("getnewaddress", "GetNewAddress", "get_new_address"), + Method::new_modeled("getrawchangeaddress", "GetRawChangeAddress", "get_raw_change_address"), + Method::new_modeled("getreceivedbyaddress", "GetReceivedByAddress", "get_received_by_address"), + Method::new_modeled("getreceivedbylabel", "GetReceivedByLabel", "get_received_by_label"), + Method::new_modeled("gettransaction", "GetTransaction", "get_transaction"), + Method::new_modeled( + "getunconfirmedbalance", + "GetUnconfirmedBalance", + "get_unconfirmed_balance", + ), + Method::new_modeled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), + Method::new_nothing("importaddress", "import_address"), + Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), + Method::new_nothing("importmulti", "import_multi"), + Method::new_nothing("importprivkey", "import_priv_key"), + Method::new_nothing("importprunedfunds", "import_pruned_funds"), + Method::new_nothing("importpubkey", "import_pubkey"), + Method::new_nothing("importwallet", "import_walet"), + Method::new_nothing("keypoolrefill", "keypool_refill"), + Method::new_modeled("listaddressgroupings", "ListAddressGroupings", "list_address_groupings"), + Method::new_modeled("listdescriptors", "ListDescriptors", "list_descriptors"), + Method::new_modeled("listlabels", "ListLabels", "list_labels"), + Method::new_modeled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), + Method::new_modeled("migratewallet", "MigrateWallet", "migrate_wallet"), + Method::new_modeled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_modeled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), + Method::new_modeled( + "listreceivedbyaddress", + "ListReceivedByAddress", + "list_received_by_address", + ), + Method::new_modeled("listreceivedbylabel", "ListReceivedByLabel", "list_received_by_label"), + Method::new_modeled("listsinceblock", "ListSinceBlock", "list_since_block"), + Method::new_modeled("listtransactions", "ListTransactions", "list_transactions"), + Method::new_modeled("listunspent", "ListUnspent", "list_unspent"), + Method::new_no_model("listwalletdir", "ListWalletDir", "list_wallet_dir"), + Method::new_modeled("listwallets", "ListWallets", "list_wallets"), + Method::new_modeled("loadwallet", "LoadWallet", "load_wallet"), + Method::new_bool("lockunspent", "lock_unspent"), + Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), + Method::new_modeled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), + Method::new_modeled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_modeled("send", "Send", "send"), + Method::new_modeled("sendall", "SendAll", "send_all"), + Method::new_modeled("sendmany", "SendMany", "send_many"), + Method::new_modeled("sendtoaddress", "SendToAddress", "send_to_address"), + Method::new_nothing("sethdseed", "set_hd_seed"), + Method::new_nothing("setlabel", "set_label"), + Method::new_bool("settxfee", "set_tx_fee"), + Method::new_modeled("setwalletflag", "SetWalletFlag", "set_wallet_flag"), + Method::new_modeled("signmessage", "SignMessage", "sign_message"), + Method::new_modeled( + "signrawtransactionwithwallet", + "SignRawTransactionWithWallet", + "sign_raw_transaction_with_wallet", + ), + Method::new_modeled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), + Method::new_nothing("unloadwallet", "unload_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_modeled( + "walletcreatefundedpsbt", + "WalletCreateFundedPsbt", + "wallet_create_funded_psbt", + ), + Method::new_modeled("walletdisplayaddress", "WalletDisplayAddress", "wallet_display_address"), + Method::new_nothing("walletlock", "wallet_lock"), + Method::new_nothing("walletpassphrase", "wallet_passphrase"), + Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"), + Method::new_modeled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"), + Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"), +];