[#Parse]
= Parse
:mrdocs:

Parse a `descriptor` string&period; Included private keys are put in `out`&period;

== Synopsis

Declared in `&lt;script&sol;descriptor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::vector&lt;std::unique&lowbar;ptr&lt;Descriptor&gt;&gt;
Parse(
    std::string&lowbar;view descriptor,
    xref:FlatSigningProvider.adoc[FlatSigningProvider]& out,
    std::string& error,
    bool require&lowbar;checksum = false);
----

== Description

If the descriptor has a checksum, it must be valid&period; If `require&lowbar;checksum` is set, the checksum is mandatory &hyphen; otherwise it is optional&period;

If a parse error occurs, or the checksum is missing&sol;invalid, or anything else is wrong, an empty vector is returned&period;

== Return Value

The parsed descriptors, or an empty vector on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *descriptor* [in]
| The descriptor string to parse&period;
| *out* [out]
| Signing provider filled with any private keys found in the descriptor&period;
| *error* [out]
| Set to a human&hyphen;readable message when parsing fails&period;
| *require&lowbar;checksum* [in]
| Whether a valid checksum is mandatory&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
