BTSL (Bitcoin Transaction Schema Language): A Declarative Validation Schema for PSBT Workflows

Posted by Tsua00021

Mar 17, 2026/14:38 UTC

The exploration of Bitcoin Transaction Schema Language (BTSL) introduces a novel approach to standardizing the validation of Partially Signed Bitcoin Transactions (PSBTs), primarily aimed at enhancing multi-party transaction workflows such as marketplaces, batch payouts, and shared expenses. By shifting from constructing transactions to specifying them through a declarative schema, BTSL aims to address the challenges associated with imperative coordinator logic that signers must typically trust. This includes calculating change amounts, ensuring output equilibrium, and managing fee bumping across multiple inputs, which are often susceptible to errors and manipulations.

A concrete example provided to illustrate the utility of BTSL is the "Tri-Count" problem, where three individuals wish to settle their debts in a single transaction. The scenario underscores the complexity of accommodating different UTXO types, platform maker fees, and settlement balances without resorting to custom imperative coding. BTSL allows for the definition of these requirements in a declarative manner, simplifying the process and reducing the reliance on trusted host software for transaction construction.

The significance of BTSL lies in its potential to separate concerns by decoupling validation logic from PSBT construction. This enables any signer wallet or external auditor to independently verify that output values satisfy the declared invariants before signing, thus enhancing security and trust. Additionally, structural role binding reduces the risk of input substitution or manipulation, and the schema could potentially be applied in hardware wallets, allowing for independent verification of transaction invariants.

Despite its novelty, BTSL does not aim to replace existing tools like Script/Miniscript, Descriptors, or PSBT itself; rather, it operates above these layers, providing a specification of what a valid PSBT should look like prior to signing. However, the approach does acknowledge certain limitations, such as the dependency on BIP118 (SIGHASH_ANYPREVOUT) and the accepted structural risk of txid mutation through Replace-By-Fee (RBF) mechanisms, suggesting areas for future refinement.

The experimental nature of BTSL is highlighted, with an emphasis on its current prototype status and the goal of stimulating discussion within the community. Questions raised for consideration include the utility of BTSL for hardware wallet implementations, comparisons with existing validation tools, considerations for transaction invariant verification at the PSBT layer, the feasibility of using PSBT_GLOBAL_UNKNOWN fields for attaching schemas to PSBTs, and the potential value for wallet developers in adopting deterministic, schema-driven validation processes for complex, multi-party workflows. For more detailed information and engagement, the community is directed to the Bitcoin Transaction Schema Language (BTSL) Standard.

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