Skip to content

Commit e64104b

Browse files
authored
Merge pull request #140 from tcharding/04-30-method-files
verify: Comment sections
2 parents cc15214 + a9c3282 commit e64104b

File tree

10 files changed

+84
-6
lines changed

10 files changed

+84
-6
lines changed

verify/src/method/v19.rs

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::Method;
66

77
/// Data for the JSON RPC methods provided by Bitcoin Core v19.
88
pub const METHODS: &[Method] = &[
9+
// blockchain
910
Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
1011
Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
1112
Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
@@ -36,18 +37,22 @@ pub const METHODS: &[Method] = &[
3637
Method::new_bool("verifychain", "verify_chain"),
3738
Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
3839
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
40+
// control
3941
Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"),
4042
Method::new_string("help", "help"),
4143
Method::new_no_model("logging", "Logging", "logging"),
4244
Method::new_nothing("stop", "stop"),
4345
Method::new_numeric("uptime", "uptime"),
46+
// generating
4447
Method::new_modelled("generatetoaddress", "GenerateToAddress", "generate_to_address"),
48+
// mining
4549
Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
4650
Method::new_no_model("getmininginfo", "GetMiningInfo", "get_mining_info"),
4751
Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
4852
Method::new_bool("prioritisetransaction", "prioritise_transaction"),
4953
Method::new_nothing("submitblock", "submit_block"),
5054
Method::new_nothing("submitheader", "submit_header"),
55+
// network
5156
Method::new_nothing("addnode", "add_node"),
5257
Method::new_nothing("clearbanned", "clear_banned"),
5358
Method::new_nothing("disconnectnode", "disconnect_node"),
@@ -61,6 +66,7 @@ pub const METHODS: &[Method] = &[
6166
Method::new_nothing("ping", "ping"),
6267
Method::new_nothing("setban", "set_ban"),
6368
Method::new_nothing("setnetworkactive", "set_network_active"),
69+
// raw transactions
6470
Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
6571
Method::new_nothing("combinepsbt", "combine_psbt"),
6672
Method::new_nothing("combinerawtransaction", "combine_raw_transaction"),
@@ -78,13 +84,15 @@ pub const METHODS: &[Method] = &[
7884
Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"),
7985
Method::new_nothing("testmempoolaccept", "test_mempool_accept"),
8086
Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"),
87+
// util
8188
Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"),
8289
Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"),
8390
Method::new_nothing("estimatesmartfee", "estimate_smart_fee"),
8491
Method::new_no_model("getdescriptorinfo", "GetDescriptorInfo", "get_descriptor_info"),
8592
Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"),
8693
Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
8794
Method::new_bool("verifymessage", "verify_message"),
95+
// wallet
8896
Method::new_nothing("abandontransaction", "abandon_transaction"),
8997
Method::new_nothing("abortrescan", "abort_rescan"),
9098
Method::new_modelled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"),
@@ -156,5 +164,6 @@ pub const METHODS: &[Method] = &[
156164
Method::new_nothing("walletpassphrase", "wallet_passphrase"),
157165
Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"),
158166
Method::new_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
167+
// zmq
159168
Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
160169
];

verify/src/method/v20.rs

+9
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::Method;
66

77
/// Data for the JSON RPC methods provided by Bitcoin Core v20.
88
pub const METHODS: &[Method] = &[
9+
// blockchain
910
Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
1011
Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
1112
Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
@@ -36,19 +37,23 @@ pub const METHODS: &[Method] = &[
3637
Method::new_bool("verifychain", "verify_chain"),
3738
Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
3839
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
40+
// control
3941
Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"),
4042
Method::new_string("help", "help"),
4143
Method::new_no_model("logging", "Logging", "logging"),
4244
Method::new_nothing("stop", "stop"),
4345
Method::new_numeric("uptime", "uptime"),
46+
// generating
4447
Method::new_modelled("generatetoaddress", "GenerateToAddress", "generate_to_address"),
4548
Method::new_modelled("generatetodescriptor", "GenerateToDescriptor", "generate_to_descriptor"),
49+
// mining
4650
Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
4751
Method::new_no_model("getmininginfo", "GetMiningInfo", "get_mining_info"),
4852
Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
4953
Method::new_bool("prioritisetransaction", "prioritise_transaction"),
5054
Method::new_nothing("submitblock", "submit_block"),
5155
Method::new_nothing("submitheader", "submit_header"),
56+
// network
5257
Method::new_nothing("addnode", "add_node"),
5358
Method::new_nothing("clearbanned", "clear_banned"),
5459
Method::new_nothing("disconnectnode", "disconnect_node"),
@@ -62,6 +67,7 @@ pub const METHODS: &[Method] = &[
6267
Method::new_nothing("ping", "ping"),
6368
Method::new_nothing("setban", "set_ban"),
6469
Method::new_nothing("setnetworkactive", "set_network_active"),
70+
// raw transactions
6571
Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
6672
Method::new_nothing("combinepsbt", "combine_psbt"),
6773
Method::new_nothing("combinerawtransaction", "combine_raw_transaction"),
@@ -79,13 +85,15 @@ pub const METHODS: &[Method] = &[
7985
Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"),
8086
Method::new_nothing("testmempoolaccept", "test_mempool_accept"),
8187
Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"),
88+
// util
8289
Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"),
8390
Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"),
8491
Method::new_nothing("estimatesmartfee", "estimate_smart_fee"),
8592
Method::new_no_model("getdescriptorinfo", "GetDescriptorInfo", "get_descriptor_info"),
8693
Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"),
8794
Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
8895
Method::new_bool("verifymessage", "verify_message"),
96+
// wallet
8997
Method::new_nothing("abandontransaction", "abandon_transaction"),
9098
Method::new_nothing("abortrescan", "abort_rescan"),
9199
Method::new_modelled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"),
@@ -157,5 +165,6 @@ pub const METHODS: &[Method] = &[
157165
Method::new_nothing("walletpassphrase", "wallet_passphrase"),
158166
Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"),
159167
Method::new_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
168+
// zmq
160169
Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
161170
];

verify/src/method/v21.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::Method;
66

77
/// Data for the JSON RPC methods provided by Bitcoin Core v21.
88
pub const METHODS: &[Method] = &[
9+
// blockchain
910
Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
1011
Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
1112
Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
@@ -35,21 +36,25 @@ pub const METHODS: &[Method] = &[
3536
Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"),
3637
Method::new_bool("verifychain", "verify_chain"),
3738
Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
38-
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
39+
// control
3940
Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"),
41+
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
4042
Method::new_string("help", "help"),
4143
Method::new_no_model("logging", "Logging", "logging"),
4244
Method::new_nothing("stop", "stop"),
4345
Method::new_numeric("uptime", "uptime"),
46+
// generating
4447
Method::new_modelled("generateblock", "GenerateBlock", "generate_block"),
4548
Method::new_modelled("generatetoaddress", "GenerateToAddress", "generate_to_address"),
4649
Method::new_modelled("generatetodescriptor", "GenerateToDescriptor", "generate_to_descriptor"),
50+
// mining
4751
Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
4852
Method::new_no_model("getmininginfo", "GetMiningInfo", "get_mining_info"),
4953
Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
5054
Method::new_bool("prioritisetransaction", "prioritise_transaction"),
5155
Method::new_nothing("submitblock", "submit_block"),
5256
Method::new_nothing("submitheader", "submit_header"),
57+
// network
5358
Method::new_nothing("addnode", "add_node"),
5459
Method::new_nothing("clearbanned", "clear_banned"),
5560
Method::new_nothing("disconnectnode", "disconnect_node"),
@@ -63,6 +68,7 @@ pub const METHODS: &[Method] = &[
6368
Method::new_nothing("ping", "ping"),
6469
Method::new_nothing("setban", "set_ban"),
6570
Method::new_nothing("setnetworkactive", "set_network_active"),
71+
// raw transactions
6672
Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
6773
Method::new_nothing("combinepsbt", "combine_psbt"),
6874
Method::new_nothing("combinerawtransaction", "combine_raw_transaction"),
@@ -80,6 +86,7 @@ pub const METHODS: &[Method] = &[
8086
Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"),
8187
Method::new_nothing("testmempoolaccept", "test_mempool_accept"),
8288
Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"),
89+
// util
8390
Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"),
8491
Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"),
8592
Method::new_nothing("estimatesmartfee", "estimate_smart_fee"),
@@ -88,6 +95,7 @@ pub const METHODS: &[Method] = &[
8895
Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"),
8996
Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
9097
Method::new_bool("verifymessage", "verify_message"),
98+
// wallet
9199
Method::new_nothing("abandontransaction", "abandon_transaction"),
92100
Method::new_nothing("abortrescan", "abort_rescan"),
93101
Method::new_modelled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"),
@@ -163,5 +171,6 @@ pub const METHODS: &[Method] = &[
163171
Method::new_nothing("walletpassphrase", "wallet_passphrase"),
164172
Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"),
165173
Method::new_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
174+
// zmq
166175
Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
167176
];

verify/src/method/v22.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::Method;
66

77
/// Data for the JSON RPC methods provided by Bitcoin Core v22.
88
pub const METHODS: &[Method] = &[
9+
// blockchain
910
Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
1011
Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
1112
Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
@@ -35,21 +36,25 @@ pub const METHODS: &[Method] = &[
3536
Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"),
3637
Method::new_bool("verifychain", "verify_chain"),
3738
Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
38-
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
39+
// control
3940
Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"),
41+
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
4042
Method::new_string("help", "help"),
4143
Method::new_no_model("logging", "Logging", "logging"),
4244
Method::new_nothing("stop", "stop"),
4345
Method::new_numeric("uptime", "uptime"),
46+
// generating
4447
Method::new_modelled("generateblock", "GenerateBlock", "generate_block"),
4548
Method::new_modelled("generatetoaddress", "GenerateToAddress", "generate_to_address"),
4649
Method::new_modelled("generatetodescriptor", "GenerateToDescriptor", "generate_to_descriptor"),
50+
// mining
4751
Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
4852
Method::new_no_model("getmininginfo", "GetMiningInfo", "get_mining_info"),
4953
Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
5054
Method::new_bool("prioritisetransaction", "prioritise_transaction"),
5155
Method::new_nothing("submitblock", "submit_block"),
5256
Method::new_nothing("submitheader", "submit_header"),
57+
// network
5358
Method::new_nothing("addnode", "add_node"),
5459
Method::new_nothing("clearbanned", "clear_banned"),
5560
Method::new_nothing("disconnectnode", "disconnect_node"),
@@ -63,6 +68,7 @@ pub const METHODS: &[Method] = &[
6368
Method::new_nothing("ping", "ping"),
6469
Method::new_nothing("setban", "set_ban"),
6570
Method::new_nothing("setnetworkactive", "set_network_active"),
71+
// raw transactions
6672
Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
6773
Method::new_nothing("combinepsbt", "combine_psbt"),
6874
Method::new_nothing("combinerawtransaction", "combine_raw_transaction"),
@@ -80,7 +86,9 @@ pub const METHODS: &[Method] = &[
8086
Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"),
8187
Method::new_nothing("testmempoolaccept", "test_mempool_accept"),
8288
Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"),
89+
// signer
8390
Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"),
91+
// util
8492
Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"),
8593
Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"),
8694
Method::new_nothing("estimatesmartfee", "estimate_smart_fee"),
@@ -89,6 +97,7 @@ pub const METHODS: &[Method] = &[
8997
Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"),
9098
Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
9199
Method::new_bool("verifymessage", "verify_message"),
100+
// wallet
92101
Method::new_nothing("abandontransaction", "abandon_transaction"),
93102
Method::new_nothing("abortrescan", "abort_rescan"),
94103
Method::new_modelled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"),
@@ -166,5 +175,6 @@ pub const METHODS: &[Method] = &[
166175
Method::new_nothing("walletpassphrase", "wallet_passphrase"),
167176
Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"),
168177
Method::new_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
178+
// zmq
169179
Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
170180
];

verify/src/method/v23.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::Method;
66

77
/// Data for the JSON RPC methods provided by Bitcoin Core v23.
88
pub const METHODS: &[Method] = &[
9+
// blockchain
910
Method::new_modelled("getbestblockhash", "GetBestBlockHash", "get_best_block_hash"),
1011
Method::new_modelled("getblock", "GetBlockVerboseZero", "get_block"), // We only check one of the types.
1112
Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"),
@@ -37,18 +38,21 @@ pub const METHODS: &[Method] = &[
3738
Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"),
3839
Method::new_bool("verifychain", "verify_chain"),
3940
Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"),
40-
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
41+
// control
4142
Method::new_no_model("getmemoryinfo", "GetMemoryInfoStats", "get_memory_info"),
43+
Method::new_no_model("getrpcinfo", "GetRpcInfo", "get_rpc_info"),
4244
Method::new_string("help", "help"),
4345
Method::new_no_model("logging", "Logging", "logging"),
4446
Method::new_nothing("stop", "stop"),
4547
Method::new_numeric("uptime", "uptime"),
48+
// mining
4649
Method::new_modelled("getblocktemplate", "GetBlockTemplate", "get_block_template"),
4750
Method::new_no_model("getmininginfo", "GetMiningInfo", "get_mining_info"),
4851
Method::new_nothing("getnetworkhashps", "get_network_hashes_per_second"),
4952
Method::new_bool("prioritisetransaction", "prioritise_transaction"),
5053
Method::new_nothing("submitblock", "submit_block"),
5154
Method::new_nothing("submitheader", "submit_header"),
55+
// network
5256
Method::new_nothing("addnode", "add_node"),
5357
Method::new_nothing("clearbanned", "clear_banned"),
5458
Method::new_nothing("disconnectnode", "disconnect_node"),
@@ -62,6 +66,7 @@ pub const METHODS: &[Method] = &[
6266
Method::new_nothing("ping", "ping"),
6367
Method::new_nothing("setban", "set_ban"),
6468
Method::new_nothing("setnetworkactive", "set_network_active"),
69+
// raw transactions
6570
Method::new_modelled("analyzepsbt", "AnalyzePsbt", "analyze_psbt"),
6671
Method::new_nothing("combinepsbt", "combine_psbt"),
6772
Method::new_nothing("combinerawtransaction", "combine_raw_transaction"),
@@ -88,6 +93,7 @@ pub const METHODS: &[Method] = &[
8893
Method::new_string("signmessagewithprivkey", "sign_message_with_priv_key"),
8994
Method::new_modelled("validateaddress", "ValidateAddress", "validate_address"),
9095
Method::new_bool("verifymessage", "verify_message"),
96+
// wallet
9197
Method::new_nothing("abandontransaction", "abandon_transaction"),
9298
Method::new_nothing("abortrescan", "abort_rescan"),
9399
Method::new_modelled("addmultisigaddress", "AddMultisigAddress", "add_multisig_address"),
@@ -167,5 +173,6 @@ pub const METHODS: &[Method] = &[
167173
Method::new_nothing("walletpassphrase", "wallet_passphrase"),
168174
Method::new_nothing("walletpassphrasechange", "wallet_passphrase_change"),
169175
Method::new_modelled("walletprocesspsbt", "WalletProcessPsbt", "wallet_process_psbt"),
176+
// zmq
170177
Method::new_no_model("getzmqnotifications", "GetZmqNotifications", "get_zmq_notifications"),
171178
];

0 commit comments

Comments
 (0)