cli: create GetNewAddress()

This commit is contained in:
Jon Atack 2020-06-01 11:57:12 +02:00
parent 9be7fd35c5
commit f7c65a3350
No known key found for this signature in database
GPG key ID: 4F5721B3D0E3921D

View file

@ -477,6 +477,16 @@ static void GetWalletBalances(UniValue& result)
result.pushKV("balances", balances);
}
/**
* Call RPC getnewaddress.
* @returns getnewaddress response as a UniValue object.
*/
static UniValue GetNewAddress()
{
std::unique_ptr<BaseRequestHandler> rh{MakeUnique<DefaultRequestHandler>()};
return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{});
}
static int CommandLineRPC(int argc, char *argv[])
{
std::string strPrint;