[#btck_transaction_output_create]
= btck&lowbar;transaction&lowbar;output&lowbar;create
:mrdocs:

Create a transaction output from a script pubkey and an amount&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_TransactionOutput-0d.adoc[btck&lowbar;TransactionOutput]*
btck&lowbar;transaction&lowbar;output&lowbar;create(
    xref:btck_ScriptPubkey-0e.adoc[btck&lowbar;ScriptPubkey] const* script&lowbar;pubkey,
    int64&lowbar;t amount);
----

== Return Value

The transaction output&period;

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

[cols="1,4"]
|===
| Name| Description
| *script&lowbar;pubkey* [in]
| Non&hyphen;null&period;
| *amount* [in]
| The amount associated with the script pubkey for this output&period;
|===


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