MCPcopy Create free account
hub / github.com/BitcoinUnlimited/BitcoinUnlimited / EncodeDestination

Function EncodeDestination

src/dstencode.cpp:12–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "script/standard.h"
11
12std::string EncodeDestination(const CTxDestination &dst,
13 const CChainParams &params,
14 const Config &cfg,
15 bool tokenAwareAddress)
16{
17 if (cfg.UseCashAddrEncoding())
18 {
19 return EncodeCashAddr(dst, params, tokenAwareAddress);
20 }
21 if (tokenAwareAddress)
22 {
23 throw std::runtime_error("Legacy addresses don't support token-awareness");
24 }
25 return EncodeLegacyAddr(dst, params);
26}
27
28CTxDestination DecodeDestination(const std::string &addr, const CChainParams &params, bool *tokenAwareAddressOut)
29{

Callers 15

ScriptPubKeyToUnivFunction · 0.85
getnewaddressFunction · 0.85
getaccountaddressFunction · 0.85
getrawchangeaddressFunction · 0.85
getaddressesbyaccountFunction · 0.85
listaddressgroupingsFunction · 0.85
addmultisigaddressFunction · 0.85
ListReceivedFunction · 0.85
MaybePushAddressFunction · 0.85
listunspentFunction · 0.85
importwalletFunction · 0.85
dumpwalletFunction · 0.85

Calls 4

EncodeCashAddrFunction · 0.85
EncodeLegacyAddrFunction · 0.85
ParamsClass · 0.70
UseCashAddrEncodingMethod · 0.45

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68