[#miniscript-Node-2constructor-06] = xref:miniscript.adoc[miniscript]::xref:miniscript/Node.adoc[Node]::Node :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<script/miniscript.h>` Deleted copy constructor; use Clone() instead. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-00.adoc[Node](xref:miniscript/Node.adoc[Node] const& other) = delete; ---- [.small]#xref:miniscript/Node/2constructor-00.adoc[_» more..._]# Move constructor. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-02d6.adoc[Node](xref:miniscript/Node.adoc[Node]&& other) noexcept = default; ---- [.small]#xref:miniscript/Node/2constructor-02d6.adoc[_» more..._]# Constructs a leaf node with only a k value, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-03.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-03.adoc[_» more..._]# Constructs a leaf node with only a k value, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-071.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-071.adoc[_» more..._]# Constructs a node with keys, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-0a3.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Key> key, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0a3.adoc[_» more..._]# Constructs a node with subexpressions, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-0fd.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0fd.adoc[_» more..._]# Constructs a node with data bytes, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-0c.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<unsigned char> arg, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0c.adoc[_» more..._]# Constructs a node with keys, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-09.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Key> key, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-09.adoc[_» more..._]# Constructs a node with subexpressions, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-02db.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-02db.adoc[_» more..._]# Constructs a node with data bytes, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-05.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<unsigned char> arg, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-05.adoc[_» more..._]# Constructs a node with subexpressions and keys, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-0f0.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, std::vector<Key> key, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0f0.adoc[_» more..._]# Constructs a node with subexpressions and data bytes, performing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Ctx> xref:miniscript/Node/2constructor-07e.adoc[Node]( Ctx const& ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, std::vector<unsigned char> arg, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-07e.adoc[_» more..._]# Constructs a node with subexpressions and keys, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-0e.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, std::vector<Key> key, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0e.adoc[_» more..._]# Constructs a node with subexpressions and data bytes, bypassing the duplicate key check. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:miniscript/Node/2constructor-0a9.adoc[Node]( /* implementation-defined */ no_dup_check, xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script_ctx, xref:miniscript/Fragment.adoc[Fragment] nt, std::vector<Node> sub, std::vector<unsigned char> arg, uint32_t val = 0); ---- [.small]#xref:miniscript/Node/2constructor-0a9.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* | The node that would be copied. | *ctx* | Context providing the script context and key comparator. | *nt* | The fragment (node type). | *val* | The k value (timelock value or threshold). | *no_dup_check* | Tag selecting the constructor that skips the duplicate key check. | *script_ctx* | The script context (P2WSH or Tapscript). | *key* | The keys. | *sub* | The subexpressions. | *arg* | The data bytes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#