[#miniscript-FromString] = xref:miniscript.adoc[miniscript]::FromString :relfileprefix: ../ :mrdocs: Parses a Miniscript from its textual (policy‐language) representation. == Synopsis Declared in `<script/miniscript.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> std::optional<Node<Ctx::Key>> FromString( std::string const& str, Ctx const& ctx); ---- == Return Value The parsed node tree, or std::nullopt on failure. == Parameters [cols="1,4"] |=== | Name| Description | *str* | The Miniscript string to parse. | *ctx* | Context providing key parsing and the script context. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#