[#btck_precomputed_transaction_data_create]
= btck&lowbar;precomputed&lowbar;transaction&lowbar;data&lowbar;create
:mrdocs:

Create precomputed transaction data for script verification&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, &lowbar;&lowbar;nonnull&lowbar;&lowbar;&rsqb;&rsqb;
xref:btck_PrecomputedTransactionData-00.adoc[btck&lowbar;PrecomputedTransactionData]*
btck&lowbar;precomputed&lowbar;transaction&lowbar;data&lowbar;create(
    xref:btck_Transaction-08.adoc[btck&lowbar;Transaction] const* tx&lowbar;to,
    xref:btck_TransactionOutput-0d.adoc[btck&lowbar;TransactionOutput] const** spent&lowbar;outputs,
    size&lowbar;t spent&lowbar;outputs&lowbar;len);
----

== Return Value

The precomputed data, or null on error&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *tx&lowbar;to* [in]
| Non&hyphen;null&period;
| *spent&lowbar;outputs* [in]
| Nullable for non&hyphen;taproot verification&period; Points to an array of outputs spent by the transaction&period;
| *spent&lowbar;outputs&lowbar;len* [in]
| Length of the spent&lowbar;outputs array&period;
|===


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