Extensions to standard tooling for TEMPLATEHASH-CSFS-IK support

Feb 20 - Feb 20, 2026

  • Last year, Greg Sanders, Steven Roose, and the sender introduced a significant development in scripting capabilities for Bitcoin, marking a "good stopping point" for expanding these capabilities.

This was followed by a proposal that implemented these new scripting abilities, now being further extended to include support within standard tooling for the introduced primitives. These extensions have been practically integrated into a proof-of-concept PR for the Bitcoin Inquisition project, leveraging the OP_TEMPLATEHASH implementation.

The integration of new primitives into Miniscript descriptors presented challenges, notably around template hash checks and rebindable signatures, which required adjustments to accommodate within the existing framework. The enhancements aimed to utilize the Taproot internal key as a fragment in descriptors, assert transaction matches against a hardcoded template, check signatures for arbitrary messages, and employ rebindable signature checks. Notably, the introduction of a ‘pk_i()’ fragment facilitates using the Taproot internal key directly in scripts.

A division of the 's' malleability property into 's' and 't' categories was necessary to address the nuances brought by these new capabilities, ensuring all spending paths are accounted for without compromising the script's safety or spendability. This led to the creation of a new th(h) fragment for template hash checks and a cms(X,m) fragment for checking signatures against arbitrary messages. These developments necessitate a nuanced approach to handling signatures within the Miniscript framework, differentiating between transaction signature checks and other forms of signature verification.

Furthermore, the proposal explores modifications to Partially Signed Bitcoin Transactions (PSBTs) to accommodate the verification of outputs from transactions committed in an output via th(). This includes considering the use of existing fields for mapping message hashes to their preimages and introducing new fields such as PSBT_OUT_COMMITTED_TXS for mapping template hash to serialized transactions. Additional PSBT fields like PSBT_OUT_TAP_INTERNAL_KEYS and PSBT_OUT_TAP_TREES are proposed to support inspection of transactions committed in outputs, enhancing the flexibility and utility of PSBTs in accommodating the new scripting capabilities.

This exploratory stage invites feedback on design choices and suggestions for missing elements. The dialogue aims to refine these proposals, ensuring they robustly support the expanded scripting capabilities introduced. The ongoing discussion and iteration of these ideas demonstrate a commitment to evolving Bitcoin's scripting and transaction infrastructure, reflecting broader community involvement and technical discourse.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback