[#btck_witness_stack_get_item_at] = btck_witness_stack_get_item_at :mrdocs: Serialize a witness stack item at a given index through the passed in callback. == Synopsis Declared in `<kernel/bitcoinkernel.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard, __nonnull__]] int btck_witness_stack_get_item_at( xref:btck_WitnessStack-0e.adoc[btck_WitnessStack] const* witness_stack, size_t index, xref:btck_WriteBytes.adoc[btck_WriteBytes] writer, void* user_data); ---- == Return Value The return value of the writer. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *witness_stack* [in] | Non‐null. | *index* [in] | Index of the item in the witness stack. | *writer* [in] | Non‐null, function pointer for writing bytes. | *user_data* [in] | Nullable, passed back through the writer callback. |=== == Preconditions * index < btck_witness_stack_count_items(witness_stack) [.small]#Created with https://www.mrdocs.com[MrDocs]#