diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -884,6 +884,16 @@ result.pushKV("balances", balances); } +/** + * Call RPC getnewaddress. + * @returns getnewaddress response as a UniValue object. + */ +[[maybe_unused]] static UniValue GetNewAddress() { + std::unique_ptr rh{ + std::make_unique()}; + return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{}); +} + static int CommandLineRPC(int argc, char *argv[]) { std::string strPrint; int nRet = 0;