[#CTxIn-2constructor-0e]
= xref:CTxIn.adoc[CTxIn]::CTxIn
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Constructs an input with a final sequence number and empty fields&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CTxIn/2constructor-0b.adoc[CTxIn]();
----

[.small]#xref:CTxIn/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Constructs an input spending a given outpoint&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:CTxIn/2constructor-05.adoc[CTxIn](
    xref:COutPoint.adoc[COutPoint] prevoutIn,
    xref:CScript.adoc[CScript] scriptSigIn = CScript(),
    uint32&lowbar;t nSequenceIn = SEQUENCE&lowbar;FINAL);
----

[.small]#xref:CTxIn/2constructor-05.adoc[_» more&period;&period;&period;_]#

Constructs an input spending output nOut of a given transaction&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CTxIn/2constructor-00.adoc[CTxIn](
    xref:Txid.adoc[Txid] hashPrevTx,
    uint32&lowbar;t nOut,
    xref:CScript.adoc[CScript] scriptSigIn = CScript(),
    uint32&lowbar;t nSequenceIn = SEQUENCE&lowbar;FINAL);
----

[.small]#xref:CTxIn/2constructor-00.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *prevoutIn*
| The previous output being spent&period;
| *scriptSigIn*
| The signature script satisfying the output&period;
| *nSequenceIn*
| The sequence number for the input&period;
| *hashPrevTx*
| Hash of the transaction holding the spent output&period;
| *nOut*
| Index of the spent output within that transaction&period;
|===


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