[#UnserializeTransaction]
= UnserializeTransaction
:mrdocs:

Basic transaction serialization format&colon; &hyphen; uint32&lowbar;t version &hyphen; std&colon;&colon;vector&lt;CTxIn&gt; vin &hyphen; std&colon;&colon;vector&lt;CTxOut&gt; vout &hyphen; uint32&lowbar;t nLockTime

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename TxType&gt;
void
UnserializeTransaction(
    TxType& tx,
    Stream& s,
    xref:TransactionSerParams.adoc[TransactionSerParams] const& params);
----

== Description

Extended transaction serialization format&colon;

* uint32&lowbar;t version
* unsigned char dummy &equals; 0x00
* unsigned char flags (!&equals; 0)
* std&colon;&colon;vector&lt;CTxIn&gt; vin
* std&colon;&colon;vector&lt;CTxOut&gt; vout
* if (flags &amp; 1)&colon;
* CScriptWitness scriptWitness&semi; (deserialized into CTxIn)
* uint32&lowbar;t nLockTime

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tx*
| The transaction to populate from the stream&period;
| *s*
| The stream to read from&period;
| *params*
| Parameters controlling whether witness data is read&period;
|===


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