Files
bitcoin/src/test/kernel
merge-script 8d9fbf7666 Merge bitcoin/bitcoin#35380: kernel: expose witness stack and scriptSig for btck_TransactionInput
6667dc4eec kernel: expose scriptSig for btck_TransactionInput (Peter Zafonte)
e6de3a2d3c kernel: expose witness stack for btck_TransactionInput (Peter Zafonte)

Pull request description:

  Silent payments scanning  needs the public key from every input. For SegWit inputs it is in the witness stack. For P2PKH inputs it is in scriptSig. Without these new functions, callers must deserialize the raw transaction themselves to reach that data, which is difficult and error-prone.

  Introduces a `btck_WitnessStack` type and adds the following functions:

  **Witness stack:**
  `btck_transaction_input_get_witness_stack`:  returns a non-owning `const btck_WitnessStack* `view
  `btck_witness_stack_count_items `: item count
  `btck_witness_stack_get_item_at `: single item by index via btck_WriteBytes
  `btck_witness_stack_copy` / `btck_witness_stack_destroy`: lifecycle for owned copies

  **scriptSig:**
  `btck_transaction_input_get_script_sig`: full scriptSig via btck_WriteBytes

  All functions are exposed in the C++ wrapper via `WitnessStackView`, `WitnessStack`, and `WitnessStackApi` , and `GetScriptSig()`.

ACKs for top commit:
  sedited:
    ACK 6667dc4eec
  musaHaruna:
    ACK [6667dc](6667dc4eec)
  stickies-v:
    ACK 6667dc4eec

Tree-SHA512: b5e9d32ec87a5f5a9fea5652ed69737eae1d1f9cfb777544b96d703bbd057c114e0b7afae4e9e9d09b8b546694b14fb923b747c04a8f0211ab6caa015d06967d
2026-07-14 14:38:04 +02:00
..