MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetNewAddress

Function GetNewAddress

src/bitcoin-cli.cpp:1070–1076  ·  view source on GitHub ↗

* Call RPC getnewaddress. * @returns getnewaddress response as a UniValue object. */

Source from the content-addressed store, hash-verified

1068 * @returns getnewaddress response as a UniValue object.
1069 */
1070static UniValue GetNewAddress()
1071{
1072 std::optional<std::string> wallet_name{};
1073 if (gArgs.IsArgSet("-rpcwallet")) wallet_name = gArgs.GetArg("-rpcwallet", "");
1074 DefaultRequestHandler rh;
1075 return ConnectAndCallRPC(&rh, "getnewaddress", /* args=*/{}, wallet_name);
1076}
1077
1078/**
1079 * Check bounds and set up args for RPC generatetoaddress params: nblocks, address, maxtries.

Callers 1

CommandLineRPCFunction · 0.85

Calls 3

ConnectAndCallRPCFunction · 0.85
IsArgSetMethod · 0.80
GetArgMethod · 0.80

Tested by

no test coverage detected