[#GenTxid]
= GenTxid
:mrdocs:

A transaction identifier that holds either a txid or a wtxid&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class GenTxid
    : public std::variant&lt;Txid, Wtxid&gt;
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::variant&lt;Txid, Wtxid&gt;`
| 
|===

== Type Aliases

[cols="1"]
|===
| Name
| xref:GenTxid/__trivially_relocatable.adoc[`&lowbar;&lowbar;trivially&lowbar;relocatable`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:GenTxid/operator_assign-0e.adoc[`operator&equals;`] 
| Assignment operators
| xref:GenTxid/IsWtxid.adoc[`IsWtxid`] 
| Returns true when the identifier holds a wtxid&period;
| xref:GenTxid/ToUint256.adoc[`ToUint256`] 
| Returns the underlying 256&hyphen;bit value, whichever alternative is held&period;
| xref:GenTxid/emplace-017.adoc[`emplace`] 
| 
| xref:GenTxid/index.adoc[`index`] 
| 
| xref:GenTxid/swap.adoc[`swap`] 
| 
| xref:GenTxid/valueless_by_exception.adoc[`valueless&lowbar;by&lowbar;exception`] 
| 
|===


== Using Declarations

[cols="1,4"]
|===
| Name| Description
| xref:GenTxid/GenTxid.adoc[`GenTxid`] 
| Inherits the variant constructors to build from a Txid or Wtxid&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:operator_3way-09.adoc[operator&lt;&equals;&gt;]`
| Orders identifiers by kind, then by wrapped value&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:ToGenTxid.adoc[`ToGenTxid`]
| Convert a TX&sol;WITNESS&lowbar;TX&sol;WTX CInv to a GenTxid&period;
|===


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