| 23 | static const std::string OUTPUT_TYPE_STRING_BECH32M = "bech32m"; |
| 24 | |
| 25 | std::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 | |
| 39 | const std::string& FormatOutputType(OutputType type) |
| 40 | { |
no outgoing calls