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

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

== Synopsis

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

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *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]#
