[#SerializeTransaction]
= SerializeTransaction
:mrdocs:

Writes a transaction to a stream, optionally including witness data&period;

== 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
SerializeTransaction(
    TxType const& tx,
    Stream& s,
    xref:TransactionSerParams.adoc[TransactionSerParams] const& params);
----

== Parameters

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


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