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

Function ParseOutputType

src/outputtype.cpp:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23static const std::string OUTPUT_TYPE_STRING_BECH32M = "bech32m";
24
25std::optional<OutputType> ParseOutputType(const std::string& type)
26{
27 if (type == OUTPUT_TYPE_STRING_LEGACY) {
28 return OutputType::LEGACY;
29 } else if (type == OUTPUT_TYPE_STRING_P2SH_SEGWIT) {
30 return OutputType::P2SH_SEGWIT;
31 } else if (type == OUTPUT_TYPE_STRING_BECH32 || type == OUTPUT_TYPE_STRING_BLECH32) {
32 return OutputType::BECH32;
33 } else if (type == OUTPUT_TYPE_STRING_BECH32M) {
34 return OutputType::BECH32M;
35 }
36 return std::nullopt;
37}
38
39const std::string& FormatOutputType(OutputType type)
40{

Callers 8

CreateMethod · 0.85
getnewaddressFunction · 0.85
getrawchangeaddressFunction · 0.85
addmultisigaddressFunction · 0.85
FundTransactionFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
createmultisigFunction · 0.85

Calls

no outgoing calls

Tested by 2

FUZZ_TARGETFunction · 0.68
FUZZ_TARGETFunction · 0.68