Serialize a witness stack item at a given index through the passed in callback.

Synopsis

Declared in <kernel/bitcoinkernel.h>

[[nodiscard, __nonnull__]]
int
btck_witness_stack_get_item_at(
    btck_WitnessStack const* witness_stack,
    size_t index,
    btck_WriteBytes writer,
    void* user_data);

Return Value

The return value of the writer.

Note

The return value should not be discarded.

Parameters

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)

Created with MrDocs