[#wallet-CWalletTx-2constructor-09]
= xref:wallet.adoc[wallet]::xref:wallet/CWalletTx.adoc[CWalletTx]::CWalletTx
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;wallet&sol;transaction&period;h&gt;`

Deleted copy constructor&semi; CWalletTx objects must not be copied&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:wallet/CWalletTx/2constructor-03.adoc[CWalletTx](xref:wallet/CWalletTx.adoc[CWalletTx] const& other) = delete;
----

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

Enable the default move constructor&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:wallet/CWalletTx/2constructor-01.adoc[CWalletTx](xref:wallet/CWalletTx.adoc[CWalletTx]&& other) = default;
----

[.small]#xref:wallet/CWalletTx/2constructor-01.adoc[_» more&period;&period;&period;_]#

Construct a wallet transaction from a transaction reference and its state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:wallet/CWalletTx/2constructor-0b.adoc[CWalletTx](
    xref:CTransactionRef.adoc[CTransactionRef] tx,
    xref:wallet/TxState.adoc[TxState] const& state);
----

[.small]#xref:wallet/CWalletTx/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Construct a wallet transaction by deserializing it, merging any witness variants&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
xref:wallet/CWalletTx/2constructor-02.adoc[CWalletTx](
    xref:deserialize_type.adoc[deserialize&lowbar;type] type,
    Stream& s,
    std::map&lt;Wtxid, CTransactionRef&gt; const& variants);
----

[.small]#xref:wallet/CWalletTx/2constructor-02.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The wallet transaction to move from&period;
| *tx*
| The transaction reference to wrap&period;
| *state*
| The initial confirmation state of the transaction&period;
| *type*
| Tag selecting the deserializing constructor overload&period;
| *s*
| The input stream to deserialize the transaction from&period;
| *variants*
| Additional witness variants to merge, keyed by witness txid&period;
|===


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