[#miniscript-Node-ToString-028] = xref:miniscript.adoc[miniscript]::xref:miniscript/Node.adoc[Node]::ToString :relfileprefix: ../../ :mrdocs: Produces the textual (policy‐language) representation of this Miniscript. == Synopses Declared in `<script/miniscript.h>` Produces the textual (policy‐language) representation of this Miniscript. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename CTx> std::optional<std::string> xref:miniscript/Node/ToString-02a.adoc[ToString](CTx const& ctx) const; ---- [.small]#xref:miniscript/Node/ToString-02a.adoc[_» more..._]# Produces the textual (policy‐language) representation of this Miniscript. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename CTx> std::optional<std::string> xref:miniscript/Node/ToString-0b.adoc[ToString]( CTx const& ctx, bool& has_priv_key) const; ---- [.small]#xref:miniscript/Node/ToString-0b.adoc[_» more..._]# == Return Value The string form, or std::nullopt if a key cannot be represented. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Context providing key‐to‐string conversions. | *has_priv_key* | Set to true if any key resolved to a private key. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#