[#TxIndex-01-FindTx]
= xref:TxIndex-01.adoc[TxIndex]::FindTx
:relfileprefix: ../
:mrdocs:

Look up a transaction by hash&period;

== Synopsis

Declared in `&lt;index&sol;txindex&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;TxIndexResult&gt;
FindTx(xref:Txid.adoc[Txid] const& tx&lowbar;hash) const;
----

== Return Value

the transaction and containing block hash, or nullopt if it is not found

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tx&lowbar;hash* [in]
| The hash of the transaction to be returned&period;
|===


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