diff --git a/bitcoind/Cargo.toml b/bitcoind/Cargo.toml
index 42b6bcf86..d52ef95fe 100644
--- a/bitcoind/Cargo.toml
+++ b/bitcoind/Cargo.toml
@@ -44,9 +44,10 @@ default = ["0_17_2"]
download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "bitreq", "zip"]
-latest = ["30_2"]
+latest = ["31_0"]
# We support all minor releases of the latest four versions.
+31_0 = ["30_2"]
30_2 = ["30_0"]
# Skip v30.1 due to wallet migration bug.
30_0 = ["29_0"]
diff --git a/bitcoind/sha256/bitcoin-core-31.0-SHA256SUMS b/bitcoind/sha256/bitcoin-core-31.0-SHA256SUMS
new file mode 100644
index 000000000..ee4cc99f1
--- /dev/null
+++ b/bitcoind/sha256/bitcoin-core-31.0-SHA256SUMS
@@ -0,0 +1,28 @@
+91917647aaf50965fc834e048256fce17e8f5590658c7e8de2879fb66cdc9a73 bitcoin-31.0-aarch64-linux-gnu-debug.tar.gz
+4de1d568dedd48604f75132421bc0abeca432639589b49a3909c81db3a813112 bitcoin-31.0-aarch64-linux-gnu.tar.gz
+fc17562b66707d0c8d1863af0cd40d7c6818a8d7d7b360b8d43276b1593924d9 bitcoin-31.0-arm-linux-gnueabihf-debug.tar.gz
+8c19d007bfc73502625095ea4073af3a98ceb722d500556ab173bac5bcadd0d6 bitcoin-31.0-arm-linux-gnueabihf.tar.gz
+a2d7a13b4da53d4a3e4c517f3a0269e2429813417bb320d3b268993cfdc545d0 bitcoin-31.0-arm64-apple-darwin.tar.gz
+fc119a34915daac57e5fbdf181c9295d862d6843d52a9380e39dc0d0ac69cf20 bitcoin-31.0-arm64-apple-darwin.zip
+955563c720b4d5fc22a11d4b102940d605f1cb9eb0b564f50deb606412c631e5 bitcoin-31.0-arm64-apple-darwin-codesigning.tar.gz
+48d34a140aeaacd63a4bd37c24ed1876df4b077c98a7e0dd9a4483d1032839f4 bitcoin-31.0-arm64-apple-darwin-unsigned.tar.gz
+b639946d343114cca5d87b218aaece04d0d111374b725d90dffc7e2d1d3b99f5 bitcoin-31.0-arm64-apple-darwin-unsigned.zip
+7e45bab1787af974307fc077e6688d3eaab6788f3ad0e3a65d8cc9e428c41219 bitcoin-31.0-codesignatures-31.0.tar.gz
+0ba0ef5eea3aefd96cc1774be274c3d594812cfac0988809d706738bb067b3e3 bitcoin-31.0.tar.gz
+efe3e7d0383d54e5d79ac47911be0100b99872fa5205510a2a22d1194a0212d8 bitcoin-31.0-powerpc64-linux-gnu-debug.tar.gz
+1d9c865aa0ccf675fc068e79d9fa57a5a70b59132fca38bb322a7d44ce2f0ff2 bitcoin-31.0-powerpc64-linux-gnu.tar.gz
+acd0e38f4bb99c7c3024e494ca218d3ae67ec4a8b3b7ae556a8292353fe308b5 bitcoin-31.0-riscv64-linux-gnu-debug.tar.gz
+7ece4ea365bba9b2008b27f0717ef6a518598a572edaa2815e775faadc53c136 bitcoin-31.0-riscv64-linux-gnu.tar.gz
+56824dd705bc2a3b22d42e8aa02ed53498d491ff7c2c8aa96831333871887ead bitcoin-31.0-x86_64-apple-darwin.tar.gz
+8e230f36a2020072763adf742b20d95348cb20aaa0b0a918ca44ecdc83ac4efd bitcoin-31.0-x86_64-apple-darwin.zip
+fccf54f31bd58a3f834add05fa5df36520313d936445c556be8f71ccf314b658 bitcoin-31.0-x86_64-apple-darwin-codesigning.tar.gz
+d1d0174f07cf87d9af4318f7072350510fa0f1bf8d3d3b1ee7143ad5967b6bdf bitcoin-31.0-x86_64-apple-darwin-unsigned.tar.gz
+b8d9b9915a1871ee12a3a9883fd47860028454fcd192864735f2e0d3a88b4735 bitcoin-31.0-x86_64-apple-darwin-unsigned.zip
+96e3506195c5cc2ea9ca72fb2ddcbcf5246dd0db0d21d726f3c98eaf0c6b9078 bitcoin-31.0-x86_64-linux-gnu-debug.tar.gz
+d3e4c58a35b1d0a97a457462c94f55501ad167c660c245cb1ffa565641c65074 bitcoin-31.0-x86_64-linux-gnu.tar.gz
+1893e819d7554ca43e6e812dc642bd1fb4570a4077b07a03180ad1041e74e223 bitcoin-31.0-win64-setup.exe
+82fd2c504a0f20a31d4d13bd407783d6fc7bf17622d0ce85228a9b92694e03f0 bitcoin-31.0-win64.zip
+62baf547357029ac557d6fbbe91742c4ba6c1461c19ed4fab5131d4300b74d93 bitcoin-31.0-win64-codesigning.tar.gz
+df3f8c2f6ce8fde8d2661d3c01f5265f90f938019d52e2f94acf2a9001af70ae bitcoin-31.0-win64-debug.zip
+ad31d4d82a0ddcf1340a447575ca958ee664656ca2e77282737898e1b8209ec8 bitcoin-31.0-win64-setup-unsigned.exe
+5ecd365b53a2896850178f90302375480933e6c85ef81bb8abe8675fd44e1d9c bitcoin-31.0-win64-unsigned.zip
diff --git a/bitcoind/src/client_versions.rs b/bitcoind/src/client_versions.rs
index 93194eb36..b82fcb20f 100644
--- a/bitcoind/src/client_versions.rs
+++ b/bitcoind/src/client_versions.rs
@@ -6,7 +6,10 @@
#![allow(unused_imports)] // Not all users need the json types.
-#[cfg(feature = "30_0")]
+#[cfg(feature = "31_0")]
+pub use corepc_client::{client_sync::v31::*, types::v31 as vtype};
+
+#[cfg(all(feature = "30_0", not(feature = "31_0")))]
pub use corepc_client::{client_sync::v30::*, types::v30 as vtype};
#[cfg(all(feature = "29_0", not(feature = "30_0")))]
@@ -63,6 +66,7 @@ pub use corepc_client::{client_sync::v17::*, types::v17 as vtype};
/// This is meaningless but we need it otherwise we can't get far enough into
/// the build process to trigger the `compile_error!` in `./versions.rs`.
#[cfg(all(
+ not(feature = "31_0"),
not(feature = "30_0"),
not(feature = "29_0"),
not(feature = "28_2"),
diff --git a/bitcoind/src/versions.rs b/bitcoind/src/versions.rs
index bebac6833..820e03133 100644
--- a/bitcoind/src/versions.rs
+++ b/bitcoind/src/versions.rs
@@ -1,6 +1,7 @@
// An explicit version of Bitcoin Core must be selected by enabling some feature.
// We check this here instead of in `lib.rs` because this file is included in `build.rs`.
#[cfg(all(
+ not(feature = "31_0"),
not(feature = "30_2"),
not(feature = "30_0"),
not(feature = "29_0"),
@@ -23,8 +24,11 @@
))]
compile_error!("enable a feature in order to select the version of Bitcoin Core to use");
-#[cfg(feature = "30_2")]
+#[cfg(feature = "31_0")]
#[allow(dead_code)] // Triggers in --all-features builds.
+pub const VERSION: &str = "31.0";
+
+#[cfg(all(feature = "30_2", not(feature = "31_0")))]
pub const VERSION: &str = "30.2";
#[cfg(all(feature = "30_0", not(feature = "30_2")))]
@@ -81,26 +85,6 @@ pub const VERSION: &str = "0.18.1";
#[cfg(all(feature = "0_17_2", not(feature = "0_18_1")))]
pub const VERSION: &str = "0.17.2";
-/// This is meaningless but we need it otherwise we can't get far enough into
-/// the build process to trigger the `compile_error!` in `./versions.rs`.
-#[cfg(all(
- not(feature = "30_0"),
- not(feature = "29_0"),
- not(feature = "28_2"),
- not(feature = "28_1"),
- not(feature = "28_0"),
- not(feature = "27_2"),
- not(feature = "27_1"),
- not(feature = "27_0"),
- not(feature = "26_2"),
- not(feature = "25_2"),
- not(feature = "24_2"),
- not(feature = "23_2"),
- not(feature = "22_1"),
- not(feature = "0_21_2"),
- not(feature = "0_20_2"),
- not(feature = "0_19_1"),
- not(feature = "0_18_1"),
- not(feature = "0_17_2")
-))]
+// This makes the build error more succinct if someone tries to build with --no-default-features.
+#[cfg(not(feature = "0_17_2"))]
pub const VERSION: &str = "never-used";
diff --git a/client/src/client_sync/mod.rs b/client/src/client_sync/mod.rs
index baaf3f8ba..38dd11702 100644
--- a/client/src/client_sync/mod.rs
+++ b/client/src/client_sync/mod.rs
@@ -17,6 +17,7 @@ pub mod v27;
pub mod v28;
pub mod v29;
pub mod v30;
+pub mod v31;
use std::fs::File;
use std::io::{BufRead, BufReader};
diff --git a/client/src/client_sync/v31/mod.rs b/client/src/client_sync/v31/mod.rs
new file mode 100644
index 000000000..8af9f0f6e
--- /dev/null
+++ b/client/src/client_sync/v31/mod.rs
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: CC0-1.0
+
+//! A JSON-RPC client for testing against Bitcoin Core `v31`.
+//!
+//! We ignore option arguments unless they effect the shape of the returned JSON data.
+
+use std::collections::BTreeMap;
+use std::path::Path;
+
+use bitcoin::address::{Address, NetworkChecked};
+use bitcoin::{sign_message, Amount, Block, BlockHash, PublicKey, Txid};
+use serde_json::json;
+
+use crate::client_sync::into_json;
+use crate::types::v31::*;
+
+#[rustfmt::skip] // Keep public re-exports separate.
+pub use crate::client_sync::{
+ v17::{
+ AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, WalletCreateFundedPsbtInput,
+ FeeEstimateMode,
+ },
+ v21::ImportDescriptorsRequest,
+ v23::AddressType,
+ v29::{TemplateRequest, TemplateRules}
+};
+
+crate::define_jsonrpc_bitreq_client!("v31");
+crate::impl_client_check_expected_server_version!({ [310000] });
+
+// == Blockchain ==
+crate::impl_client_v29__dump_tx_out_set!();
+crate::impl_client_v17__get_best_block_hash!();
+crate::impl_client_v29__get_block!();
+crate::impl_client_v17__get_blockchain_info!();
+crate::impl_client_v17__get_block_count!();
+crate::impl_client_v19__get_block_filter!();
+crate::impl_client_v23__get_block_from_peer!();
+crate::impl_client_v17__get_block_hash!();
+crate::impl_client_v17__get_block_header!();
+crate::impl_client_v17__get_block_stats!();
+crate::impl_client_v26__get_chain_states!();
+crate::impl_client_v17__get_chain_tips!();
+crate::impl_client_v17__get_chain_tx_stats!();
+crate::impl_client_v23__get_deployment_info!();
+crate::impl_client_v30__get_descriptor_activity!();
+crate::impl_client_v17__get_difficulty!();
+crate::impl_client_v17__get_mempool_ancestors!();
+crate::impl_client_v17__get_mempool_descendants!();
+crate::impl_client_v17__get_mempool_entry!();
+crate::impl_client_v17__get_mempool_info!();
+crate::impl_client_v21__get_raw_mempool!();
+crate::impl_client_v17__get_tx_out!();
+crate::impl_client_v17__get_tx_out_proof!();
+crate::impl_client_v26__get_tx_out_set_info!();
+crate::impl_client_v24__get_tx_spending_prevout!();
+crate::impl_client_v26__import_mempool!();
+crate::impl_client_v26__load_tx_out_set!();
+crate::impl_client_v17__precious_block!();
+crate::impl_client_v17__prune_blockchain!();
+crate::impl_client_v23__save_mempool!();
+crate::impl_client_v25__scan_blocks!();
+crate::impl_client_v17__scan_tx_out_set!();
+crate::impl_client_v17__verify_chain!();
+crate::impl_client_v17__verify_tx_out_proof!();
+crate::impl_client_v17__estimate_raw_fee!();
+crate::impl_client_v17__wait_for_block!();
+crate::impl_client_v17__wait_for_block_height!();
+crate::impl_client_v17__wait_for_new_block!();
+
+// == Control ==
+crate::impl_client_v17__get_memory_info!();
+crate::impl_client_v18__get_rpc_info!();
+crate::impl_client_v17__help!();
+crate::impl_client_v17__logging!();
+crate::impl_client_v17__stop!();
+crate::impl_client_v17__uptime!();
+
+// == Generating ==
+crate::impl_client_v25__generate_block!();
+crate::impl_client_v17__generate_to_address!();
+crate::impl_client_v20__generate_to_descriptor!();
+crate::impl_client_v17__invalidate_block!();
+
+// == Hidden ==
+crate::impl_client_v27__add_connection!();
+crate::impl_client_v21__add_peer_address!();
+crate::impl_client_v29__get_orphan_txs!();
+crate::impl_client_v29__get_orphan_txs_verbosity_1!();
+crate::impl_client_v29__get_orphan_txs_verbosity_2!();
+crate::impl_client_v26__get_raw_addrman!();
+crate::impl_client_v20__mock_scheduler!();
+crate::impl_client_v17__reconsider_block!();
+crate::impl_client_v17__sync_with_validation_interface_queue!();
+
+// == Mining ==
+crate::impl_client_v17__get_block_template!();
+crate::impl_client_v17__get_mining_info!();
+crate::impl_client_v17__get_network_hashes_per_second!();
+crate::impl_client_v26__get_prioritised_transactions!();
+crate::impl_client_v17__prioritise_transaction!();
+crate::impl_client_v17__submit_block!();
+crate::impl_client_v18__submit_header!();
+
+// == Network ==
+crate::impl_client_v17__add_node!();
+crate::impl_client_v17__clear_banned!();
+crate::impl_client_v17__disconnect_node!();
+crate::impl_client_v17__get_added_node_info!();
+crate::impl_client_v26__get_addr_man_info!();
+crate::impl_client_v17__get_connection_count!();
+crate::impl_client_v17__get_net_totals!();
+crate::impl_client_v17__get_network_info!();
+crate::impl_client_v18__get_node_addresses!();
+crate::impl_client_v17__get_peer_info!();
+crate::impl_client_v17__list_banned!();
+crate::impl_client_v17__ping!();
+crate::impl_client_v17__set_ban!();
+crate::impl_client_v17__set_network_active!();
+
+// == Rawtransactions ==
+crate::impl_client_v18__analyze_psbt!();
+crate::impl_client_v17__combine_psbt!();
+crate::impl_client_v17__combine_raw_transaction!();
+crate::impl_client_v17__convert_to_psbt!();
+crate::impl_client_v17__create_psbt!();
+crate::impl_client_v17__create_raw_transaction!();
+crate::impl_client_v17__decode_psbt!();
+crate::impl_client_v17__decode_raw_transaction!();
+crate::impl_client_v17__decode_script!();
+crate::impl_client_v17__finalize_psbt!();
+crate::impl_client_v17__fund_raw_transaction!();
+crate::impl_client_v17__get_raw_transaction!();
+crate::impl_client_v18__join_psbts!();
+crate::impl_client_v17__send_raw_transaction!();
+crate::impl_client_v17__sign_raw_transaction!();
+crate::impl_client_v17__sign_raw_transaction_with_key!();
+crate::impl_client_v28__submit_package!();
+crate::impl_client_v17__test_mempool_accept!();
+crate::impl_client_v18__utxo_update_psbt!();
+
+// == Signer ==
+crate::impl_client_v22__enumerate_signers!();
+
+// == Util ==
+crate::impl_client_v17__create_multisig!();
+crate::impl_client_v29__derive_addresses!();
+crate::impl_client_v17__estimate_smart_fee!();
+crate::impl_client_v18__get_descriptor_info!();
+crate::impl_client_v21__get_index_info!();
+crate::impl_client_v17__sign_message_with_priv_key!();
+crate::impl_client_v17__validate_address!();
+crate::impl_client_v17__verify_message!();
+
+// == Wallet ==
+crate::impl_client_v17__abandon_transaction!();
+crate::impl_client_v17__abort_rescan!();
+crate::impl_client_v17__backup_wallet!();
+crate::impl_client_v17__bump_fee!();
+crate::impl_client_v22__create_wallet!();
+crate::impl_client_v23__create_wallet!();
+crate::impl_client_v28__create_wallet_descriptor!();
+crate::impl_client_v17__encrypt_wallet!();
+crate::impl_client_v17__get_addresses_by_label!();
+crate::impl_client_v17__get_address_info!();
+crate::impl_client_v17__get_balance!();
+crate::impl_client_v19__get_balances!();
+crate::impl_client_v28__get_hd_keys!();
+crate::impl_client_v18__get_received_by_label!();
+crate::impl_client_v17__get_new_address!();
+crate::impl_client_v17__get_raw_change_address!();
+crate::impl_client_v17__get_received_by_address!();
+crate::impl_client_v17__get_transaction!();
+crate::impl_client_v17__get_wallet_info!();
+crate::impl_client_v21__import_descriptors!();
+crate::impl_client_v17__import_pruned_funds!();
+crate::impl_client_v17__key_pool_refill!();
+crate::impl_client_v17__list_address_groupings!();
+crate::impl_client_v22__list_descriptors!();
+crate::impl_client_v18__list_received_by_label!();
+crate::impl_client_v17__list_labels!();
+crate::impl_client_v17__list_lock_unspent!();
+crate::impl_client_v17__list_received_by_address!();
+crate::impl_client_v17__list_since_block!();
+crate::impl_client_v17__list_transactions!();
+crate::impl_client_v17__list_unspent!();
+crate::impl_client_v18__list_wallet_dir!();
+crate::impl_client_v17__list_wallets!();
+crate::impl_client_v22__load_wallet!();
+crate::impl_client_v17__lock_unspent!();
+crate::impl_client_v24__migrate_wallet!();
+crate::impl_client_v21__psbt_bump_fee!();
+crate::impl_client_v17__remove_pruned_funds!();
+crate::impl_client_v17__rescan_blockchain!();
+crate::impl_client_v23__restore_wallet!();
+crate::impl_client_v21__send!();
+crate::impl_client_v24__send_all!();
+crate::impl_client_v17__send_many!();
+crate::impl_client_v21__send_many_verbose!();
+crate::impl_client_v17__send_to_address!();
+crate::impl_client_v19__set_wallet_flag!();
+crate::impl_client_v17__sign_message!();
+crate::impl_client_v17__sign_raw_transaction_with_wallet!();
+crate::impl_client_v24__simulate_raw_transaction!();
+crate::impl_client_v21__unload_wallet!();
+crate::impl_client_v17__wallet_create_funded_psbt!();
+crate::impl_client_v22__wallet_display_address!();
+crate::impl_client_v17__wallet_lock!();
+crate::impl_client_v17__wallet_passphrase!();
+crate::impl_client_v17__wallet_passphrase_change!();
+crate::impl_client_v17__wallet_process_psbt!();
+
+// == Zmq ==
+crate::impl_client_v17__get_zmq_notifications!();
diff --git a/contrib/templates/bitcoind_aliases b/contrib/templates/bitcoind_aliases
index 9d61f433b..941355a4a 100644
--- a/contrib/templates/bitcoind_aliases
+++ b/contrib/templates/bitcoind_aliases
@@ -15,6 +15,7 @@ alias bt27='/opt/bitcoin-27.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpasswor
alias bt28='/opt/bitcoin-28.1/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=28149'
alias bt29='/opt/bitcoin-29.0/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=29049'
alias bt30='/opt/bitcoin-30.0/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=30049'
+alias bt31='/opt/bitcoin-31.0/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=31049'
# Test aliases for different Bitcoin Core versions
@@ -32,3 +33,4 @@ alias test27='BITCOIND_EXE=/opt/bitcoin-27.2/bin/bitcoind cargo test --features=
alias test28='BITCOIND_EXE=/opt/bitcoin-28.1/bin/bitcoind cargo test --features="28_1"'
alias test29='BITCOIND_EXE=/opt/bitcoin-29.0/bin/bitcoind cargo test --features="29_0"'
alias test30='BITCOIND_EXE=/opt/bitcoin-30.0/bin/bitcoind cargo test --features="30_0"'
+alias test31='BITCOIND_EXE=/opt/bitcoin-31.0/bin/bitcoind cargo test --features="31_0"'
diff --git a/contrib/templates/run-bitcoind.conf b/contrib/templates/run-bitcoind.conf
index 9642cc337..8f4f45348 100644
--- a/contrib/templates/run-bitcoind.conf
+++ b/contrib/templates/run-bitcoind.conf
@@ -12,3 +12,4 @@ v27 27.2 272 /opt/bitcoin-27.2/bin/bitcoind
v28 28.1 281 /opt/bitcoin-28.1/bin/bitcoind
v29 29.0 290 /opt/bitcoin-29.0/bin/bitcoind
v30 30.0 300 /opt/bitcoin-30.0/bin/bitcoind
+v31 31.0 310 /opt/bitcoin-31.0/bin/bitcoind
diff --git a/types/src/lib.rs b/types/src/lib.rs
index dc5b96ec6..bcaff3952 100644
--- a/types/src/lib.rs
+++ b/types/src/lib.rs
@@ -31,6 +31,7 @@ pub mod v27;
pub mod v28;
pub mod v29;
pub mod v30;
+pub mod v31;
// JSON types that model _all_ `bitcoind` versions.
pub mod model;
diff --git a/types/src/v31/mod.rs b/types/src/v31/mod.rs
new file mode 100644
index 000000000..c89e6fbeb
--- /dev/null
+++ b/types/src/v31/mod.rs
@@ -0,0 +1,360 @@
+// SPDX-License-Identifier: CC0-1.0
+
+//! # JSON-RPC types for Bitcoin Core `v31`
+//!
+//! 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 the
+//! type it returns and any implementation notes.
+//!
+//! Key to 'Returns' column:
+//!
+//! * version: method returns a version specific type but has no model type.
+//! * version + model: method returns a version specific type and can be converted to a model type.
+//! * returns foo: method returns a foo (e.g. string, boolean, or nothing).
+//! * omitted: method intentionally unsupported with no plans of adding support.
+//!
+//! If a method has UNTESTED then there is no integration test yet for it.
+//!
+//!
+//! Methods from the == Blockchain == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | dumptxoutset | version + model | TODO |
+//! | getbestblockhash | version + model | TODO |
+//! | getblock | version + model | TODO |
+//! | getblockchaininfo | version + model | TODO |
+//! | getblockcount | version + model | TODO |
+//! | getblockfilter | version + model | TODO |
+//! | getblockfrompeer | returns nothing | TODO |
+//! | getblockhash | version + model | TODO |
+//! | getblockheader | version + model | TODO |
+//! | getblockstats | version + model | TODO |
+//! | getchainstates | version + model | TODO |
+//! | getchaintips | version + model | TODO |
+//! | getchaintxstats | version + model | TODO |
+//! | getdeploymentinfo | version + model | TODO |
+//! | getdescriptoractivity | version + model | TODO |
+//! | getdifficulty | version + model | TODO |
+//! | getmempoolancestors | version + model | TODO |
+//! | getmempoolcluster | version + model | TODO |
+//! | getmempooldescendants | version + model | TODO |
+//! | getmempoolentry | version + model | TODO |
+//! | getmempoolfeeratediagram | version + model | TODO |
+//! | getmempoolinfo | version + model | TODO |
+//! | getrawmempool | version + model | TODO |
+//! | gettxout | version + model | TODO |
+//! | gettxoutproof | returns string | TODO |
+//! | gettxoutsetinfo | version + model | TODO |
+//! | gettxspendingprevout | version + model | TODO |
+//! | importmempool | returns nothing | TODO |
+//! | loadtxoutset | version + model | TODO |
+//! | preciousblock | returns nothing | TODO |
+//! | pruneblockchain | version | TODO |
+//! | savemempool | version | TODO |
+//! | scanblocks | version + model | TODO |
+//! | scantxoutset | version + model | TODO |
+//! | verifychain | version | TODO |
+//! | verifytxoutproof | version + model | TODO |
+//! | waitforblock | version + model | TODO |
+//! | waitforblockheight | version + model | TODO |
+//! | waitfornewblock | version + model | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Control == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | getmemoryinfo | version | TODO |
+//! | getrpcinfo | version | TODO |
+//! | help | returns string | TODO |
+//! | logging | version | TODO |
+//! | stop | returns string | TODO |
+//! | uptime | returns numeric | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Mining == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | getblocktemplate | version + model | TODO |
+//! | getmininginfo | version + model | TODO |
+//! | getnetworkhashps | returns boolean | TODO |
+//! | getprioritisedtransactions | version + model | TODO |
+//! | prioritisetransaction | returns boolean | TODO |
+//! | submitblock | returns nothing | TODO |
+//! | submitheader | returns nothing | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Network == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | abortprivatebroadcast | version + model | TODO |
+//! | addnode | returns nothing | TODO |
+//! | clearbanned | returns nothing | TODO |
+//! | disconnectnode | returns nothing | TODO |
+//! | getaddednodeinfo | version | TODO |
+//! | getaddrmaninfo | version | TODO |
+//! | getconnectioncount | version | TODO |
+//! | getnettotals | version | TODO |
+//! | getnetworkinfo | version + model | TODO |
+//! | getnodeaddresses | version | TODO |
+//! | getpeerinfo | version | TODO |
+//! | getprivatebroadcastinfo | version + model | TODO |
+//! | listbanned | version | TODO |
+//! | ping | returns nothing | TODO |
+//! | setban | returns nothing | TODO |
+//! | setnetworkactive | version | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Rawtransactions == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | analyzepsbt | version + model | TODO |
+//! | combinepsbt | version + model | TODO |
+//! | combinerawtransaction | version + model | TODO |
+//! | converttopsbt | version + model | TODO |
+//! | createpsbt | version + model | TODO |
+//! | createrawtransaction | version + model | TODO |
+//! | decodepsbt | version + model | TODO |
+//! | descriptorprocesspsbt | returns boolean | TODO |
+//! | decoderawtransaction | version + model | TODO |
+//! | decodescript | version + model | TODO |
+//! | finalizepsbt | version + model | TODO |
+//! | fundrawtransaction | version + model | TODO |
+//! | getrawtransaction | version + model | TODO |
+//! | joinpsbts | version + model | TODO |
+//! | sendrawtransaction | version + model | TODO |
+//! | signrawtransactionwithkey | version + model | TODO |
+//! | submitpackage | version + model | TODO |
+//! | testmempoolaccept | version + model | TODO |
+//! | utxoupdatepsbt | version + model | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Signer == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | enumeratesigners | version | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Util == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | createmultisig | version + model | TODO |
+//! | deriveaddresses | version + model | TODO |
+//! | estimatesmartfee | version + model | TODO |
+//! | getdescriptorinfo | version | TODO |
+//! | getindexinfo | version | TODO |
+//! | signmessagewithprivkey | version + model | TODO |
+//! | validateaddress | version + model | TODO |
+//! | verifymessage | version | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Wallet == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | abandontransaction | returns nothing | TODO |
+//! | abortrescan | version | TODO |
+//! | backupwallet | returns nothing | TODO |
+//! | bumpfee | version + model | TODO |
+//! | createwallet | version + model | TODO |
+//! | createwalletdescriptor | version | TODO |
+//! | encryptwallet | version | TODO |
+//! | getaddressesbylabel | version + model | TODO |
+//! | getaddressinfo | version + model | TODO |
+//! | getbalance | version + model | TODO |
+//! | getbalances | version + model | TODO |
+//! | gethdkeys | version + model | TODO |
+//! | getnewaddress | version + model | TODO |
+//! | getrawchangeaddress | version + model | TODO |
+//! | getreceivedbyaddress | version + model | TODO |
+//! | getreceivedbylabel | version + model | TODO |
+//! | gettransaction | version + model | TODO |
+//! | getwalletinfo | version + model | TODO |
+//! | importdescriptors | version | TODO |
+//! | importprunedfunds | returns nothing | TODO |
+//! | keypoolrefill | returns nothing | TODO |
+//! | listaddressgroupings | version + model | TODO |
+//! | listdescriptors | version | TODO |
+//! | listlabels | version | TODO |
+//! | listlockunspent | version + model | TODO |
+//! | migratewallet | version | TODO |
+//! | psbtbumpfee | version + model | TODO |
+//! | listreceivedbyaddress | version + model | TODO |
+//! | listreceivedbylabel | version + model | TODO |
+//! | listsinceblock | version + model | TODO |
+//! | listtransactions | version + model | TODO |
+//! | listunspent | version + model | TODO |
+//! | listwalletdir | version | TODO |
+//! | listwallets | version + model | TODO |
+//! | loadwallet | version + model | TODO |
+//! | lockunspent | version | TODO |
+//! | removeprunedfunds | returns nothing | TODO |
+//! | rescanblockchain | version + model | TODO |
+//! | restorewallet | version | TODO |
+//! | send | version + model | TODO |
+//! | sendall | version + model | TODO |
+//! | sendmany | version + model | TODO |
+//! | sendtoaddress | version + model | TODO |
+//! | setlabel | returns nothing | TODO |
+//! | setwalletflag | version | TODO |
+//! | signmessage | version + model | TODO |
+//! | signrawtransactionwithwallet | version + model | TODO |
+//! | simulaterawtransaction | version + model | TODO |
+//! | unloadwallet | returns nothing | TODO |
+//! | walletcreatefundedpsbt | version + model | TODO |
+//! | walletdisplayaddress | version + model | TODO |
+//! | walletlock | returns nothing | TODO |
+//! | walletpassphrase | returns nothing | TODO |
+//! | walletpassphrasechange | returns nothing | TODO |
+//! | walletprocesspsbt | version + model | TODO |
+//!
+//!
+//!
+//!
+//! Methods from the == Zmq == section
+//!
+//! | JSON-RPC Method Name | Returns | Notes |
+//! |:-----------------------------------|:---------------:|:--------------------------------------:|
+//! | getzmqnotifications | version | TODO |
+//!
+//!
+
+#[doc(inline)]
+pub use crate::{
+ v17::{
+ AbortRescan, AddedNode, AddedNodeAddress, AddressInformation, AddressPurpose,
+ Bip125Replaceable, Bip32DerivError, BlockTemplateTransaction,
+ BlockTemplateTransactionError, BumpFee, BumpFeeError, ChainTips, ChainTipsError,
+ ChainTipsStatus, CombinePsbt, CombineRawTransaction, ConvertToPsbt, CreateMultisigError,
+ CreatePsbt, CreateRawTransaction, DecodeRawTransaction, EncryptWallet, EstimateRawFee,
+ EstimateRawFeeError, EstimateSmartFee, FinalizePsbt, FinalizePsbtError, FundRawTransaction,
+ FundRawTransactionError, Generate, GenerateToAddress, GetAddedNodeInfo,
+ GetAddressInfoEmbeddedError, GetAddressesByLabel, GetBalance, GetBestBlockHash,
+ GetBlockCount, GetBlockHash, GetBlockStatsError, GetBlockTemplate, GetBlockTemplateError,
+ GetBlockVerboseZero, GetChainTips, GetChainTxStatsError, GetConnectionCount, GetDifficulty,
+ GetMemoryInfoStats, GetMempoolInfoError, GetNetTotals, GetNetworkInfoAddress,
+ GetNetworkInfoError, GetNetworkInfoNetwork, GetNewAddress, GetRawChangeAddress,
+ GetRawMempool, GetRawTransaction, GetRawTransactionVerbose, GetRawTransactionVerboseError,
+ GetReceivedByAddress, GetTransactionDetailError, GetTxOut, GetTxOutError,
+ ListAddressGroupings, ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels,
+ ListLockUnspent, ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddressError,
+ ListUnspentItemError, ListWallets, LockUnspent, Locked, NumericError,
+ PartialSignatureError, PruneBlockchain, RawFeeDetail, RawFeeRange, RawTransactionError,
+ RawTransactionInput, RawTransactionOutput, RescanBlockchain, ScanTxOutSetAbort,
+ ScanTxOutSetError, ScanTxOutSetStatus, ScriptType, SendRawTransaction, SendToAddress,
+ SetNetworkActive, SignFail, SignFailError, SignMessage, SignMessageWithPrivKey,
+ SignRawTransaction, SignRawTransactionError, SignRawTransactionWithKey,
+ SignRawTransactionWithWallet, TransactionCategory, UploadTarget, ValidateAddress,
+ ValidateAddressError, VerifyChain, VerifyMessage, VerifyTxOutProof, WaitForBlock,
+ WaitForBlockError, WaitForBlockHeight, WaitForBlockHeightError, WaitForNewBlock,
+ WaitForNewBlockError, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WitnessUtxo,
+ WitnessUtxoError,
+ },
+ v18::{
+ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing,
+ AnalyzePsbtInputMissingError, DeriveAddresses, GetAddressInfoError, GetReceivedByLabel,
+ GetZmqNotifications, JoinPsbts, JsonRpcError, ListReceivedByAddress,
+ ListReceivedByAddressItem, ListReceivedByLabel, ListReceivedByLabelError,
+ ListReceivedByLabelItem, UtxoUpdatePsbt,
+ },
+ v19::{
+ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalancesMine,
+ GetBalancesWatchOnly, GetBlockFilter, GetBlockFilterError, GetChainTxStats, GetRpcInfo,
+ MapMempoolEntryError, MempoolEntryError, MempoolEntryFees, MempoolEntryFeesError,
+ SetWalletFlag, Softfork, SoftforkType,
+ },
+ v20::GenerateToDescriptor,
+ v21::{
+ AddPeerAddress, GetIndexInfo, GetIndexInfoName, GetRawMempoolSequence, ImportDescriptors,
+ ImportDescriptorsResult, PsbtBumpFee, PsbtBumpFeeError, Send, SendError, SendMany,
+ SendManyVerbose,
+ },
+ v22::{
+ AddConnection, Banned, EnumerateSigners, GetNodeAddresses, ListBanned, NodeAddress,
+ ScriptPubKey, Signers, WalletDisplayAddress,
+ },
+ v23::{
+ Bip9Info, Bip9Statistics, CreateMultisig, DecodeScript, DecodeScriptError,
+ DecodeScriptSegwit, DeploymentInfo, GetDeploymentInfo, GetDeploymentInfoError,
+ RestoreWallet, SaveMempool,
+ },
+ v24::{
+ GetMempoolAncestors, GetMempoolAncestorsVerbose, GetMempoolDescendants,
+ GetMempoolDescendantsVerbose, GetMempoolEntry, GetRawMempoolVerbose, GetTransactionDetail,
+ GetTxSpendingPrevout, GetTxSpendingPrevoutError, GetTxSpendingPrevoutItem, ListUnspent,
+ ListUnspentItem, MempoolEntry, MigrateWallet, SendAll, SendAllError,
+ SimulateRawTransaction,
+ },
+ v25::{
+ DescriptorInfo, GenerateBlock, GenerateBlockError, GetBlockStats, ListDescriptors,
+ MempoolAcceptanceError, ScanBlocksAbort, ScanBlocksStartError, ScanBlocksStatus,
+ TestMempoolAcceptError,
+ },
+ v26::{
+ AddrManInfoNetwork, CreateWallet, DescriptorProcessPsbt, DescriptorProcessPsbtError,
+ DumpTxOutSet, DumpTxOutSetError, GetAddrManInfo, GetBalances, GetBalancesError,
+ GetPeerInfo, GetTransactionError, GetTxOutSetInfo, GetTxOutSetInfoBlockInfo,
+ GetTxOutSetInfoError, GetTxOutSetInfoUnspendables, LoadTxOutSet, LoadTxOutSetError,
+ LoadWallet, PeerInfo, ScanBlocksStart, UnloadWallet, WalletProcessPsbt,
+ WalletProcessPsbtError,
+ },
+ v27::{GetPrioritisedTransactions, PrioritisedTransaction},
+ v28::{
+ CreateWalletDescriptor, GetAddressInfo, GetAddressInfoEmbedded, GetHdKeys, GetHdKeysError,
+ GetNetworkInfo, GetRawAddrMan, GetTransaction, HdKey, HdKeyDescriptor, ListSinceBlock,
+ ListSinceBlockError, ListTransactions, Logging, RawAddrManEntry, ScanTxOutSetStart,
+ ScanTxOutSetUnspent, SubmitPackage, SubmitPackageError, SubmitPackageTxResult,
+ SubmitPackageTxResultError, SubmitPackageTxResultFees, SubmitPackageTxResultFeesError,
+ TransactionItem, TransactionItemError,
+ },
+ v29::{
+ ActivityEntry, ChainState, DeriveAddressesMultipath, GetBlockHeader, GetBlockHeaderError,
+ GetBlockHeaderVerbose, GetBlockHeaderVerboseError, GetBlockVerboseOne,
+ GetBlockVerboseOneError, GetBlockVerboseThree, GetBlockVerboseThreeError,
+ GetBlockVerboseThreePrevout, GetBlockVerboseThreeTransaction, GetBlockVerboseTwo,
+ GetBlockVerboseTwoError, GetBlockVerboseTwoTransaction, GetBlockchainInfo,
+ GetBlockchainInfoError, GetChainStates, GetChainStatesError, GetDescriptorActivity,
+ GetDescriptorActivityError, GetDescriptorInfo, GetOrphanTxsError,
+ GetOrphanTxsVerboseOneEntryError, GetOrphanTxsVerboseTwoEntryError,
+ GetRawTransactionVerboseWithPrevout, MempoolAcceptance, MempoolAcceptanceFees,
+ NextBlockInfo, NextBlockInfoError, RawTransactionInputWithPrevout, ReceiveActivity,
+ SpendActivity, TestMempoolAccept,
+ },
+ v30::{
+ ControlBlocksError, DecodePsbt, DecodePsbtError, GetMempoolInfo, GetMiningInfo,
+ GetMiningInfoError, GetOrphanTxs, GetOrphanTxsVerboseOne, GetOrphanTxsVerboseOneEntry,
+ GetOrphanTxsVerboseTwo, GetOrphanTxsVerboseTwoEntry, GetWalletInfo, GetWalletInfoError,
+ GetWalletInfoScanning, GlobalXpub, GlobalXpubError, LastProcessedBlock,
+ LastProcessedBlockError, ListWalletDir, ListWalletDirWallet, Musig2PartialSig,
+ Musig2ParticipantPubKeys, Musig2Pubnonce, Proprietary, PsbtInput, PsbtInputError,
+ PsbtOutput, PsbtOutputError, TaprootBip32Deriv, TaprootBip32DerivsError, TaprootLeaf,
+ TaprootLeafError, TaprootScript, TaprootScriptError, TaprootScriptPathSig,
+ TaprootScriptPathSigError,
+ },
+};
diff --git a/verify/rpc-api-v31.txt b/verify/rpc-api-v31.txt
new file mode 100644
index 000000000..4ef691ad0
--- /dev/null
+++ b/verify/rpc-api-v31.txt
@@ -0,0 +1,169 @@
+== Blockchain ==
+dumptxoutset "path" ( "type" {"rollback":n,...} )
+getbestblockhash
+getblock "blockhash" ( verbosity )
+getblockchaininfo
+getblockcount
+getblockfilter "blockhash" ( "filtertype" )
+getblockfrompeer "blockhash" peer_id
+getblockhash height
+getblockheader "blockhash" ( verbose )
+getblockstats hash_or_height ( stats )
+getchainstates
+getchaintips
+getchaintxstats ( nblocks "blockhash" )
+getdeploymentinfo ( "blockhash" )
+getdescriptoractivity ["blockhash",...] [scanobjects,...] ( include_mempool )
+getdifficulty
+getmempoolancestors "txid" ( verbose )
+getmempoolcluster "txid"
+getmempooldescendants "txid" ( verbose )
+getmempoolentry "txid"
+getmempoolfeeratediagram
+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},...]
+importmempool "filepath" ( options )
+loadtxoutset "path"
+preciousblock "blockhash"
+pruneblockchain height
+savemempool
+scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options )
+scantxoutset "action" ( [scanobjects,...] )
+verifychain ( checklevel nblocks )
+verifytxoutproof "proof"
+waitforblock "blockhash" ( timeout )
+waitforblockheight height ( timeout )
+waitfornewblock ( timeout "current_tip" )
+
+== Control ==
+getmemoryinfo ( "mode" )
+getrpcinfo
+help ( "command" )
+logging ( ["include_category",...] ["exclude_category",...] )
+stop
+uptime
+
+== Mining ==
+getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"}
+getmininginfo
+getnetworkhashps ( nblocks height )
+getprioritisedtransactions
+prioritisetransaction "txid" ( dummy ) fee_delta
+submitblock "hexdata" ( "dummy" )
+submitheader "hexdata"
+
+== Network ==
+abortprivatebroadcast "txid"
+addnode "node" "command" ( v2transport )
+clearbanned
+disconnectnode ( "address" nodeid )
+getaddednodeinfo ( "node" )
+getaddrmaninfo
+getconnectioncount
+getnettotals
+getnetworkinfo
+getnodeaddresses ( count "network" )
+getpeerinfo
+getprivatebroadcastinfo
+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 version )
+createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount,...},{"data":"hex"},...] ( locktime replaceable version )
+decodepsbt "psbt"
+decoderawtransaction "hexstring" ( iswitness )
+decodescript "hexstring"
+descriptorprocesspsbt "psbt" ["",{"desc":"str","range":n or [n,n]},...] ( "sighashtype" bip32derivs finalize )
+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" )
+submitpackage ["rawtx",...] ( maxfeerate maxburnamount )
+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
+backupwallet "destination"
+bumpfee "txid" ( options )
+createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer )
+createwalletdescriptor "type" ( {"internal":bool,"hdkey":"str",...} )
+encryptwallet "passphrase"
+getaddressesbylabel "label"
+getaddressinfo "address"
+getbalance ( "dummy" minconf include_watchonly avoid_reuse )
+getbalances
+gethdkeys ( {"active_only":bool,"private":bool,...} )
+getnewaddress ( "label" "address_type" )
+getrawchangeaddress ( "address_type" )
+getreceivedbyaddress "address" ( minconf include_immature_coinbase )
+getreceivedbylabel "label" ( minconf include_immature_coinbase )
+gettransaction "txid" ( include_watchonly verbose )
+getwalletinfo
+importdescriptors requests
+importprunedfunds "rawtransaction" "txoutproof"
+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" )
+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 version )
+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 )
+setlabel "address" "label"
+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 )
+walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n,"weight":n},...] ) [{"address":amount,...},{"data":"hex"},...] ( locktime options bip32derivs version )
+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 03c3d23fa..ab921522c 100644
--- a/verify/src/lib.rs
+++ b/verify/src/lib.rs
@@ -48,6 +48,8 @@ pub enum Version {
V29,
/// Bitcoin Core v30.
V30,
+ /// Bitcoin Core v31.
+ V31,
}
impl Version {
@@ -68,6 +70,7 @@ impl Version {
"v28" | "28" => Ok(Version::V28),
"v29" | "29" => Ok(Version::V29),
"v30" | "30" => Ok(Version::V30),
+ "v31" | "31" => Ok(Version::V31),
other => Err(anyhow::Error::msg(format!("unknown version: '{}'", other))),
}
}
@@ -91,6 +94,7 @@ impl fmt::Display for Version {
V28 => "v28",
V29 => "v29",
V30 => "v30",
+ V31 => "v31",
};
fmt::Display::fmt(&s, f)
}
diff --git a/verify/src/main.rs b/verify/src/main.rs
index fc5aa7b35..f04a16421 100644
--- a/verify/src/main.rs
+++ b/verify/src/main.rs
@@ -21,7 +21,7 @@ use verify::{method, model, reexports, ssot, Version};
// TODO: Enable running from any directory, currently errors if run from `src/`.
// TODO: Add a --quiet option.
-const VERSIONS: [Version; 14] = [
+const VERSIONS: [Version; 15] = [
Version::V17,
Version::V18,
Version::V19,
@@ -36,6 +36,7 @@ const VERSIONS: [Version; 14] = [
Version::V28,
Version::V29,
Version::V30,
+ Version::V31,
];
fn main() -> Result<()> {
diff --git a/verify/src/method/mod.rs b/verify/src/method/mod.rs
index b4527afe8..77ccf0253 100644
--- a/verify/src/method/mod.rs
+++ b/verify/src/method/mod.rs
@@ -16,6 +16,7 @@ pub mod v27;
pub mod v28;
pub mod v29;
pub mod v30;
+pub mod v31;
use crate::Version;
@@ -38,6 +39,7 @@ pub fn all_methods(version: Version) -> Vec {
V28 => v28::METHODS,
V29 => v29::METHODS,
V30 => v30::METHODS,
+ V31 => v31::METHODS,
};
list.iter().map(|m| m.name.to_string()).collect()
@@ -81,6 +83,7 @@ impl Method {
V28 => v28::METHODS,
V29 => v29::METHODS,
V30 => v30::METHODS,
+ V31 => v31::METHODS,
};
list.iter().find(|&method| method.name == name)
diff --git a/verify/src/method/v31.rs b/verify/src/method/v31.rs
new file mode 100644
index 000000000..51dc8c3d2
--- /dev/null
+++ b/verify/src/method/v31.rs
@@ -0,0 +1,229 @@
+// SPDX-License-Identifier: CC0-1.0
+
+//! JSON RPC methods provided by Bitcoin Core v31.
+
+use super::Method;
+
+/// Data for the JSON RPC methods provided by Bitcoin Core v31.
+pub const METHODS: &[Method] = &[
+ // blockchain
+ Method::new_modelled("dumptxoutset", "DumpTxOutSet", "dump_tx_out_set"),
+ Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
+ Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
+ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
+ Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"),
+ Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"),
+ Method::new_nothing("getblockfrompeer", "get_block_from_peer"),
+ Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"),
+ Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"),
+ Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"),
+ Method::new_modelled("getchainstates", "GetChainStates", "get_chain_states"),
+ Method::new_modelled("getchaintips", "GetChainTips", "get_chain_tips"),
+ Method::new_modelled("getchaintxstats", "GetChainTxStats", "get_chain_tx_stats"),
+ Method::new_modelled("getdeploymentinfo", "GetDeploymentInfo", "get_deployment_info"),
+ Method::new_modelled(
+ "getdescriptoractivity",
+ "GetDescriptorActivity",
+ "get_descriptor_activity",
+ ),
+ Method::new_modelled("getdifficulty", "GetDifficulty", "get_difficulty"),
+ Method::new_modelled("getmempoolancestors", "GetMempoolAncestors", "get_mempool_ancestors"),
+ Method::new_modelled("getmempoolcluster", "GetMempoolCluster", "get_mempool_cluster"),
+ Method::new_modelled(
+ "getmempooldescendants",
+ "GetMempoolDescendants",
+ "get_mempool_descendants",
+ ),
+ Method::new_modelled("getmempoolentry", "GetMempoolEntry", "get_mempool_entry"),
+ Method::new_modelled(
+ "getmempoolfeeratediagram",
+ "GetMempoolFeerateDiagram",
+ "get_mempool_feerate_diagram",
+ ),
+ Method::new_modelled("getmempoolinfo", "GetMempoolInfo", "get_mempool_info"),
+ Method::new_modelled("getrawmempool", "GetRawMempool", "get_raw_mempool"),
+ Method::new_modelled("gettxout", "GetTxOut", "get_tx_out"),
+ Method::new_string("gettxoutproof", "get_tx_out_proof"),
+ Method::new_modelled("gettxoutsetinfo", "GetTxOutSetInfo", "get_tx_out_set_info"),
+ Method::new_modelled("gettxspendingprevout", "GetTxSpendingPrevout", "get_tx_spending_prevout"),
+ Method::new_nothing("importmempool", "import_mempool"),
+ Method::new_modelled("loadtxoutset", "LoadTxOutSet", "load_tx_out_set"),
+ Method::new_nothing("preciousblock", "precious_block"),
+ Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"),
+ Method::new_no_model("savemempool", "SaveMempool", "save_mempool"),
+ Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"),
+ Method::new_modelled("scantxoutset", "ScanTxOutSetStart", "scan_tx_out_set"),
+ Method::new_no_model("verifychain", "VerifyChain", "verify_chain"),
+ Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
+ Method::new_modelled("waitforblock", "WaitForBlock", "wait_for_block"),
+ Method::new_modelled("waitforblockheight", "WaitForBlockHeight", "wait_for_block_height"),
+ Method::new_modelled("waitfornewblock", "WaitForNewBlock", "wait_for_new_block"),
+ // control
+ 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"),
+ // mining
+ Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
+ Method::new_modelled("getmininginfo", "GetMiningInfo", "get_mining_info"),
+ Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
+ Method::new_modelled(
+ "getprioritisedtransactions",
+ "GetPrioritisedTransactions",
+ "get_prioritised_transactions",
+ ),
+ Method::new_bool("prioritisetransaction", "prioritise_transaction"),
+ Method::new_nothing("submitblock", "submit_block"),
+ Method::new_nothing("submitheader", "submit_header"),
+ // network
+ Method::new_modelled(
+ "abortprivatebroadcast",
+ "AbortPrivateBroadcast",
+ "abort_private_broadcast",
+ ),
+ 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_no_model("getaddrmaninfo", "GetAddrManInfo", "get_addr_man_info"),
+ Method::new_no_model("getconnectioncount", "GetConnectionCount", "get_connection_count"),
+ Method::new_no_model("getnettotals", "GetNetTotals", "get_net_totals"),
+ Method::new_modelled("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_modelled(
+ "getprivatebroadcastinfo",
+ "GetPrivateBroadcastInfo",
+ "get_private_broadcast_info",
+ ),
+ Method::new_no_model("listbanned", "ListBanned", "list_banned"),
+ Method::new_nothing("ping", "ping"),
+ Method::new_nothing("setban", "set_ban"),
+ Method::new_no_model("setnetworkactive", "SetNetworkActive", "set_network_active"),
+ // raw transactions
+ Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
+ Method::new_modelled("combinepsbt", "CombinePsbt", "combine_psbt"),
+ Method::new_modelled(
+ "combinerawtransaction",
+ "CombineRawTransaction",
+ "combine_raw_transaction",
+ ),
+ Method::new_modelled("converttopsbt", "ConvertToPsbt", "convert_to_psbt"),
+ Method::new_modelled("createpsbt", "CreatePsbt", "create_psbt"),
+ Method::new_modelled("createrawtransaction", "CreateRawTransaction", "create_raw_transaction"),
+ Method::new_modelled("decodepsbt", "DecodePsbt", "decode_psbt"),
+ Method::new_modelled("decoderawtransaction", "DecodeRawTransaction", "decode_raw_transaction"),
+ Method::new_modelled("decodescript", "DecodeScript", "decode_script"),
+ Method::new_modelled(
+ "descriptorprocesspsbt",
+ "DescriptorProcessPsbt",
+ "descriptor_process_psbt",
+ ),
+ Method::new_modelled("finalizepsbt", "FinalizePsbt", "finalize_psbt"),
+ Method::new_modelled("fundrawtransaction", "FundRawTransaction", "fund_raw_transaction"),
+ Method::new_modelled("getrawtransaction", "GetRawTransaction", "get_raw_transaction"),
+ Method::new_modelled("joinpsbts", "JoinPsbts", "join_psbts"),
+ Method::new_modelled("sendrawtransaction", "SendRawTransaction", "send_raw_transaction"),
+ Method::new_modelled(
+ "signrawtransactionwithkey",
+ "SignRawTransaction",
+ "sign_raw_transaction_with_key",
+ ),
+ Method::new_modelled("submitpackage", "SubmitPackage", "submit_package"),
+ Method::new_modelled("testmempoolaccept", "TestMempoolAccept", "test_mempool_accept"),
+ Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"),
+ Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"),
+ Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"),
+ Method::new_modelled("estimatesmartfee", "EstimateSmartFee", "estimate_smart_fee"),
+ Method::new_no_model("getdescriptorinfo", "GetDescriptorInfo", "get_descriptor_info"),
+ Method::new_no_model("getindexinfo", "GetIndexInfo", "get_index_info"),
+ Method::new_modelled(
+ "signmessagewithprivkey",
+ "SignMessageWithPrivKey",
+ "sign_message_with_priv_key",
+ ),
+ Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
+ Method::new_bool("verifymessage", "verify_message"),
+ // signer
+ Method::new_no_model("enumeratesigners", "EnumerateSigners", "enumerate_signers"),
+ // wallet
+ Method::new_nothing("abandontransaction", "abandon_transaction"),
+ Method::new_no_model("abortrescan", "AbortRescan", "abort_rescan"),
+ Method::new_nothing("backupwallet", "backup_wallet"),
+ Method::new_modelled("bumpfee", "BumpFee", "bump_fee"),
+ Method::new_modelled("createwallet", "CreateWallet", "create_wallet"),
+ Method::new_no_model(
+ "createwalletdescriptor",
+ "CreateWalletDescriptor",
+ "create_wallet_descriptor",
+ ),
+ Method::new_no_model("encryptwallet", "EncryptWallet", "encrypt_wallet"),
+ Method::new_modelled("getaddressesbylabel", "GetAddressesByLabel", "get_addresses_by_label"),
+ Method::new_modelled("getaddressinfo", "GetAddressInfo", "get_address_info"),
+ Method::new_modelled("getbalance", "GetBalance", "get_balance"),
+ Method::new_modelled("getbalances", "GetBalances", "get_balances"),
+ Method::new_modelled("gethdkeys", "GetHdKeys", "get_hd_keys"),
+ Method::new_modelled("getnewaddress", "GetNewAddress", "get_new_address"),
+ Method::new_modelled("getrawchangeaddress", "GetRawChangeAddress", "get_raw_change_address"),
+ Method::new_modelled("getreceivedbyaddress", "GetReceivedByAddress", "get_received_by_address"),
+ Method::new_modelled("getreceivedbylabel", "GetReceivedByLabel", "get_received_by_label"),
+ Method::new_modelled("gettransaction", "GetTransaction", "get_transaction"),
+ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"),
+ Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"),
+ Method::new_nothing("importprunedfunds", "import_pruned_funds"),
+ Method::new_nothing("keypoolrefill", "keypool_refill"),
+ Method::new_modelled("listaddressgroupings", "ListAddressGroupings", "list_address_groupings"),
+ Method::new_no_model("listdescriptors", "ListDescriptors", "list_descriptors"),
+ Method::new_no_model("listlabels", "ListLabels", "list_labels"),
+ Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"),
+ Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"),
+ Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"),
+ Method::new_modelled(
+ "listreceivedbyaddress",
+ "ListReceivedByAddress",
+ "list_received_by_address",
+ ),
+ Method::new_modelled("listreceivedbylabel", "ListReceivedByLabel", "list_received_by_label"),
+ Method::new_modelled("listsinceblock", "ListSinceBlock", "list_since_block"),
+ Method::new_modelled("listtransactions", "ListTransactions", "list_transactions"),
+ Method::new_modelled("listunspent", "ListUnspent", "list_unspent"),
+ Method::new_no_model("listwalletdir", "ListWalletDir", "list_wallet_dir"),
+ Method::new_modelled("listwallets", "ListWallets", "list_wallets"),
+ Method::new_modelled("loadwallet", "LoadWallet", "load_wallet"),
+ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"),
+ Method::new_nothing("removeprunedfunds", "remove_pruned_funds"),
+ Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"),
+ Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"),
+ Method::new_modelled("send", "Send", "send"),
+ Method::new_modelled("sendall", "SendAll", "send_all"),
+ Method::new_modelled("sendmany", "SendMany", "send_many"),
+ Method::new_modelled("sendtoaddress", "SendToAddress", "send_to_address"),
+ Method::new_nothing("setlabel", "set_label"),
+ Method::new_no_model("setwalletflag", "SetWalletFlag", "set_wallet_flag"),
+ Method::new_modelled("signmessage", "SignMessage", "sign_message"),
+ Method::new_modelled(
+ "signrawtransactionwithwallet",
+ "SignRawTransaction",
+ "sign_raw_transaction_with_wallet",
+ ),
+ Method::new_modelled(
+ "simulaterawtransaction",
+ "SimulateRawTransaction",
+ "simulate_raw_transaction",
+ ),
+ Method::new_nothing("unloadwallet", "unload_wallet"),
+ Method::new_modelled(
+ "walletcreatefundedpsbt",
+ "WalletCreateFundedPsbt",
+ "wallet_create_funded_psbt",
+ ),
+ Method::new_modelled("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_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
+ // zmq
+ Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
+];
diff --git a/verify/src/reexports.rs b/verify/src/reexports.rs
index 65f64ed58..9d44f2459 100644
--- a/verify/src/reexports.rs
+++ b/verify/src/reexports.rs
@@ -43,13 +43,8 @@ pub fn check_type_reexports(version: Version) -> Result<()> {
let mut missing = Vec::new();
// Checks every type defined in this version is publicly re-exported.
- let version_defs = match definitions.get(&version_name) {
- Some(defs) => defs,
- None => {
- let msg = format!("no definitions found for version {}", version_name);
- return Err(anyhow::anyhow!(msg));
- }
- };
+ let empty = BTreeMap::new();
+ let version_defs = definitions.get(&version_name).unwrap_or(&empty);
for type_name in version_defs.keys() {
let exported = export_map