Parse a descriptor string. Included private keys are put in out.
Synopsis
Declared in <script/descriptor.h>
std::vector<std::unique_ptr<Descriptor>>
Parse(
std::string_view descriptor,
FlatSigningProvider& out,
std::string& error,
bool require_checksum = false);
Description
If the descriptor has a checksum, it must be valid. If require_checksum is set, the checksum is mandatory ‐ otherwise it is optional.
If a parse error occurs, or the checksum is missing/invalid, or anything else is wrong, an empty vector is returned.
Return Value
The parsed descriptors, or an empty vector on failure.
Parameters
Name |
Description |
descriptor [in] |
The descriptor string to parse. |
out [out] |
Signing provider filled with any private keys found in the descriptor. |
error [out] |
Set to a human‐readable message when parsing fails. |
require_checksum [in] |
Whether a valid checksum is mandatory. |
Created with MrDocs