[#miniscript-Node-2constructor-06]
= xref:miniscript.adoc[miniscript]::xref:miniscript/Node.adoc[Node]::Node
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;script&sol;miniscript&period;h&gt;`

Deleted copy constructor&semi; use Clone() instead&period;


[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&period;&period;&period;_]#

Move constructor&period;


[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&period;&period;&period;_]#

Constructs a leaf node with only a k value, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-03.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-03.adoc[_» more&period;&period;&period;_]#

Constructs a leaf node with only a k value, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-071.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-071.adoc[_» more&period;&period;&period;_]#

Constructs a node with keys, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-0a3.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Key&gt; key,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0a3.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-0fd.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0fd.adoc[_» more&period;&period;&period;_]#

Constructs a node with data bytes, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-0c.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;unsigned char&gt; arg,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Constructs a node with keys, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-09.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Key&gt; key,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-09.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-02db.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-02db.adoc[_» more&period;&period;&period;_]#

Constructs a node with data bytes, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-05.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;unsigned char&gt; arg,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-05.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions and keys, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-0f0.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    std::vector&lt;Key&gt; key,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0f0.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions and data bytes, performing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Ctx&gt;
xref:miniscript/Node/2constructor-07e.adoc[Node](
    Ctx const& ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    std::vector&lt;unsigned char&gt; arg,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-07e.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions and keys, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-0e.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    std::vector&lt;Key&gt; key,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0e.adoc[_» more&period;&period;&period;_]#

Constructs a node with subexpressions and data bytes, bypassing the duplicate key check&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:miniscript/Node/2constructor-0a9.adoc[Node](
    &sol;&ast; implementation-defined &ast;&sol; no&lowbar;dup&lowbar;check,
    xref:miniscript/MiniscriptContext.adoc[MiniscriptContext] script&lowbar;ctx,
    xref:miniscript/Fragment.adoc[Fragment] nt,
    std::vector&lt;Node&gt; sub,
    std::vector&lt;unsigned char&gt; arg,
    uint32&lowbar;t val = 0);
----

[.small]#xref:miniscript/Node/2constructor-0a9.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The node that would be copied&period;
| *ctx*
| Context providing the script context and key comparator&period;
| *nt*
| The fragment (node type)&period;
| *val*
| The k value (timelock value or threshold)&period;
| *no&lowbar;dup&lowbar;check*
| Tag selecting the constructor that skips the duplicate key check&period;
| *script&lowbar;ctx*
| The script context (P2WSH or Tapscript)&period;
| *key*
| The keys&period;
| *sub*
| The subexpressions&period;
| *arg*
| The data bytes&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
