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

Function getnewaddress

src/test/util/wallet.cpp:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19#ifdef ENABLE_WALLET
20std::string getnewaddress(CWallet& w)
21{
22 constexpr auto output_type = OutputType::BECH32;
23 CTxDestination dest;
24 bilingual_str error;
25 if (!w.GetNewDestination(output_type, "", dest, error)) assert(false);
26
27 return EncodeDestination(dest);
28}
29
30#endif // ENABLE_WALLET

Callers 1

WalletBalanceFunction · 0.50

Calls 2

EncodeDestinationFunction · 0.85
GetNewDestinationMethod · 0.45

Tested by

no test coverage detected