mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
cli: create GetNewAddress()
This commit is contained in:
parent
9be7fd35c5
commit
f7c65a3350
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue