[#btck-TransactionApi-08]
= xref:btck.adoc[btck]::TransactionApi
:relfileprefix: ../
:mrdocs:

CRTP mixin adding transaction accessors shared by the view and owning types&period;

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&lowbar;wrapper&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Derived&gt;
class TransactionApi;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:btck/TransactionApi-08/CountInputs.adoc[`CountInputs`] 
| Returns the number of inputs&period;
| xref:btck/TransactionApi-08/CountOutputs.adoc[`CountOutputs`] 
| Returns the number of outputs&period;
| xref:btck/TransactionApi-08/GetInput.adoc[`GetInput`] 
| Returns a single input by index&period;
| xref:btck/TransactionApi-08/GetLocktime.adoc[`GetLocktime`] 
| Returns the transaction locktime&period;
| xref:btck/TransactionApi-08/GetOutput.adoc[`GetOutput`] 
| Returns a single output by index&period;
| xref:btck/TransactionApi-08/Inputs-08.adoc[`Inputs`] 
| Returns a range over all inputs&period;
| xref:btck/TransactionApi-08/Outputs-01.adoc[`Outputs`] 
| Returns a range over all outputs&period;
| xref:btck/TransactionApi-08/ToBytes.adoc[`ToBytes`] 
| Serializes the transaction to its raw bytes&period;
| xref:btck/TransactionApi-08/Txid.adoc[`Txid`] 
| Returns the transaction id&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:btck/Transaction.adoc[`Transaction`] 
| Owning wrapper over a `btck&lowbar;Transaction`&period;
| xref:btck/TransactionView.adoc[`TransactionView`] 
| Non&hyphen;owning view over a `btck&lowbar;Transaction`&period;
|===


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