mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
6667dc4eeckernel: expose scriptSig for btck_TransactionInput (Peter Zafonte)e6de3a2d3ckernel: 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: ACK6667dc4eecmusaHaruna: ACK [6667dc](6667dc4eec) stickies-v: ACK6667dc4eecTree-SHA512: b5e9d32ec87a5f5a9fea5652ed69737eae1d1f9cfb777544b96d703bbd057c114e0b7afae4e9e9d09b8b546694b14fb923b747c04a8f0211ab6caa015d06967d