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

Mar 17 - Mar 19, 2026

  • The Bitcoin Transaction Schema Language (BTSL) represents a pioneering approach designed to standardize the validation process of Partially Signed Bitcoin Transactions (PSBTs), particularly focusing on improving the workflow of multi-party transactions like marketplaces, batch payouts, and shared expenses.

By transitioning from an imperative transaction construction method to a declarative schema for specifying transactions, BTSL aims to mitigate the challenges and vulnerabilities inherent in relying on coordinator logic that signers must trust. These challenges include accurately calculating change amounts, ensuring the outputs are balanced, and managing fee adjustments across numerous inputs, all of which are prone to errors and potential manipulation.

A key example used to illustrate BTSL's utility is the "Tri-Count" problem, where three individuals look to settle their debts within a single transaction, demonstrating the complexities of dealing with different UTXO types, platform fees, and settlement balances without needing custom imperative programming. This highlights how defining transaction requirements declaratively with BTSL simplifies the process and reduces dependence on trusted host software for constructing transactions.

The introduction of BTSL is significant due to its ability to separate the concerns by isolating validation logic from the PSBT construction process. This separation allows any participating wallet or external auditor to independently verify whether the output values meet the declared invariants before signing the transaction, thus enhancing both security and trust. Moreover, the use of structural role binding within BTSL minimizes the risk of input substitution or manipulation. While BTSL does not aim to replace existing tools such as Script/Miniscript, Descriptors, or PSBT itself, it instead functions at a higher level, providing a framework for what a valid PSBT should encompass prior to being signed.

However, the development of BTSL acknowledges certain limitations, including its reliance on BIP118 (SIGHASH_ANYPREVOUT) and the inherent risks associated with txid mutation through Replace-By-Fee (RBF) mechanisms, pointing towards areas for future improvement. Despite its experimental status, the objective behind BTSL is to encourage dialogue within the cryptocurrency community regarding its application in hardware wallets, its comparison to existing validation tools, and its potential to facilitate deterministic, schema-driven validation processes for complex, multi-party transaction workflows.

An update to the original concept includes the launch of a client-side interactive playground that follows the Maker pipeline outlined in the BTSL v1.0 specification. This playground, accessible via https://btsl-playground.vercel.app and with source code available at github.com/tsua0002/btsl-playground, demonstrates the entire construction pipeline from schema input and parameter binding to code generation and PSBT output, without requiring a server or private keys. It supports built-in examples covering various use cases including simple payments, shared settlements, multisig setups, OP_RETURN embedding, and timelocked Taproot vault workflows. The playground provides a practical tool for experimenting with BTSL schemas, promoting further exploration and feedback on the developer experience and potential edge cases encountered.

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