mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-09 03:11:12 +02:00
cli: create GetNewAddress()
This commit is contained in:
parent
9be7fd35c5
commit
f7c65a3350
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user