pub const CORE_RPC_METHODS: &[&str] = &[
"getblockchaininfo",
"getblock",
"getblockhash",
"getblockheader",
"getbestblockhash",
"getblockcount",
"getdifficulty",
"gettxoutsetinfo",
"loadtxoutset",
"verifychain",
"getchaintips",
"getchaintxstats",
"getblockstats",
"pruneblockchain",
"getpruneinfo",
"invalidateblock",
"reconsiderblock",
"waitfornewblock",
"waitforblock",
"waitforblockheight",
"getrawtransaction",
"sendrawtransaction",
"testmempoolaccept",
"decoderawtransaction",
"createrawtransaction",
"gettxout",
"gettxoutproof",
"verifytxoutproof",
"getmempoolinfo",
"getrawmempool",
"savemempool",
"getmempoolancestors",
"getmempooldescendants",
"getmempoolentry",
"getnetworkinfo",
"getpeerinfo",
"getconnectioncount",
"ping",
"addnode",
"disconnectnode",
"getnettotals",
"clearbanned",
"setban",
"listbanned",
"getaddednodeinfo",
"getnodeaddresses",
"setnetworkactive",
"getmininginfo",
"getblocktemplate",
"generatetoaddress",
"submitblock",
"estimatesmartfee",
"prioritisetransaction",
"getblockfilter",
"getindexinfo",
"getblockchainstate",
"validateaddress",
"getaddressinfo",
"gettransactiondetails",
"stop",
"uptime",
"getmemoryinfo",
"getrpcinfo",
"help",
"logging",
"gethealth",
"getmetrics",
"loadmodule",
"unloadmodule",
"reloadmodule",
"listmodules",
"getmoduleclispecs",
"runmodulecli",
#[cfg(feature = "miniscript")]
"getdescriptorinfo",
#[cfg(feature = "miniscript")]
"analyzepsbt",
];
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn core_rpc_methods_no_duplicates() {
let mut seen = std::collections::HashSet::new();
for name in CORE_RPC_METHODS {
assert!(seen.insert(*name), "duplicate core RPC method: {}", name);
}
}
}