miniscript::Node::ToString

Produces the textual (policy-language) representation of this Miniscript.

Synopsis

Declared in <script/miniscript.h>

template<typename CTx>
std::optional<std::string>
ToString(
    CTx const& ctx,
    bool& has_priv_key) const;

Return Value

The string form, or std::nullopt if a key cannot be represented.

Parameters

NameDescription
ctxContext providing key-to-string conversions.
has_priv_keySet to true if any key resolved to a private key.