| 1921 | } |
| 1922 | |
| 1923 | static DeriveType ParseDeriveType(std::vector<std::span<const char>>& split, bool& apostrophe) |
| 1924 | { |
| 1925 | DeriveType type = DeriveType::NON_RANGED; |
| 1926 | if (std::ranges::equal(split.back(), std::span{"*"}.first(1))) { |
| 1927 | split.pop_back(); |
| 1928 | type = DeriveType::UNHARDENED_RANGED; |
| 1929 | } else if (std::ranges::equal(split.back(), std::span{"*'"}.first(2)) || std::ranges::equal(split.back(), std::span{"*h"}.first(2))) { |
| 1930 | apostrophe = std::ranges::equal(split.back(), std::span{"*'"}.first(2)); |
| 1931 | split.pop_back(); |
| 1932 | type = DeriveType::HARDENED_RANGED; |
| 1933 | } |
| 1934 | return type; |
| 1935 | } |
| 1936 | |
| 1937 | /** Parse a public key that excludes origin information. */ |
| 1938 | std::vector<std::unique_ptr<PubkeyProvider>> ParsePubkeyInner(uint32_t& key_exp_index, const std::span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, bool& apostrophe, std::string& error) |
no test coverage detected