| 1400 | } |
| 1401 | |
| 1402 | std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProvider& out, std::string& error, bool require_checksum) |
| 1403 | { |
| 1404 | Span<const char> sp{descriptor}; |
| 1405 | if (!CheckChecksum(sp, require_checksum, error)) return nullptr; |
| 1406 | uint32_t key_exp_index = 0; |
| 1407 | auto ret = ParseScript(key_exp_index, sp, ParseScriptContext::TOP, out, error); |
| 1408 | if (sp.size() == 0 && ret) return std::unique_ptr<Descriptor>(std::move(ret)); |
| 1409 | return nullptr; |
| 1410 | } |
| 1411 | |
| 1412 | std::string GetDescriptorChecksum(const std::string& descriptor) |
| 1413 | { |