Blockstream Jade Adds Support for Miniscript
Blockstream Jade

Blockstream Jade Adds Support for Miniscript

Drew Fischer

Starting from today, our fully open-source hardware wallet Blockstream Jade supports Miniscript. This new functionality significantly simplifies complex self-custody processes for Jade users.

With the new Miniscript functionality, we are confident you will be impressed with one of the most affordable hardware wallets on the market. 

Blockstream Jade aims to be easy enough for beginners and advanced enough for even the most cypherpunk Bitcoiner.

Liana Software Wallet

Miniscript is currently available through the Liana companion app. Liana is a Bitcoin wallet featuring built-in loss protection, enabling users to add secondary keys that activate after wallet inactivity. This allows for trustless safeguards against key loss or theft, and safer inheritance setups. Liana uses Bitcoin's timelock capabilities, ensuring backup and inheritance options are accessible only after predefined conditions are met, enforced directly at Bitcoin consensus layer. It allows the combination of multiple recovery options, safer backups and inheritance all at once, providing peace of mind for users' digital assets. 

For more information, visit Liana.

What is Miniscript

Miniscript is a Bitcoin Script language conceived by Blockstream in 2018, evolving from several ideas that were already in development. Pieter Wuille introduced output descriptors to Bitcoin Core, while Ava Chow's Partially Signed Bitcoin Transaction (PSBT) protocol gained traction. PSBT required specialized finalizers for transaction assembly, limiting interoperability. Another Blockstream researcher, Andrew Poelstra, facing challenges with PSBT for Rust Bitcoin, suggested structured script templates, which led to Miniscript. Wuille and Poelstra collaborated to extend Bitcoin Core's output descriptors, forming Miniscript and a policy language. With Sanket Kanjalkar's help, Miniscript was refined to be more efficient and secure, leading to its current form.

Miniscript is designed to simplify the creation of complex smart contracts on Bitcoin. It enhances readability and usability compared to traditional Bitcoin scripts, making it easier to develop, test, and deploy sophisticated spending conditions. By generalizing across various spending conditions, Miniscript offers a more straightforward and reliable solution than creating bespoke software for each new use case.

Introduction to Bitcoin Script and Its Challenges

Contrary to popular belief, Bitcoin has smart contract capabilities. However, harnessing the full power of Bitcoin Script has always been challenging. Constructing complex scripts is cumbersome, verification is difficult, and ensuring security can be even harder. Each new script often requires bespoke development work, leading to inefficiencies and compatibility issues.

Firstly, constructing complex scripts involves a deep understanding of Bitcoin Script's unique, stack-based language. Unlike more intuitive programming languages, Bitcoin Script requires developers to manage operations in a linear, step-by-step manner, which can be counterintuitive and prone to errors. The lack of high-level abstractions means developers must manually handle many low-level details, making the development process quite time consuming and liable to error.

Verification of these scripts adds another layer of complexity. Ensuring that a script behaves as expected under all potential scenarios requires extensive testing and auditing. This process is critical because any oversight can lead to vulnerabilities, which malicious actors can exploit. The deterministic nature of Bitcoin Script—while a security feature—also means that even minor mistakes can result in scripts that either lock funds irreversibly or expose them to unauthorized access.

Ensuring security is perhaps the most daunting challenge. Bitcoin operates in a trustless environment where transactions are irreversible and transparent. Any flaws in a script can have catastrophic consequences, such as loss of funds or unintended behavior. Developers must anticipate and mitigate potential attack vectors, which requires not only technical expertise but also an understanding of emerging threats and attack techniques.

Each new script often requires bespoke development work, which can lead to inefficiencies and issues with compatibility. Unlike other blockchain platforms with more expressive smart contract frameworks, Bitcoin's scripts tend to be custom-built for specific use cases. This bespoke nature means that there is less opportunity to reuse code, which can slow down development and increase costs. Additionally, compatibility issues arise when different scripts or upgrades interact, potentially leading to unforeseen bugs or conflicts.

To address these challenges, researchers from Blockstream have been working on various solutions. These include higher-level scripting languages that compile down to Bitcoin Script, such as Miniscript and Simplicity, tooling to automate script verification, and standardization efforts to create more reusable script templates. 

Why Miniscript is Useful

With Miniscript, developers can create and deploy complex smart contracts on the Bitcoin network, automating contract execution to boost efficiency, reduce costs, and mitigate fraud risks. This automation ensures that contractual obligations are met securely and seamlessly, without the need for constant human oversight.

Self-custodying Bitcoin has become increasingly crucial, especially in light of recent major exchange collapses like FTX and Celsius, that have resulted in billions of dollars worth of cryptocurrencies being lost or rendered inaccessible. Relying on these centralized exchanges exposes assets to risk, but there is a better way with Miniscript.

Time-Locked Multisig Transactions

Multisignature wallets, or multisig, use multiple keys to protect a Bitcoin wallet. For example, a 2-of-3 multisig requires 2 out of 3 keys to authorize a transaction. Miniscript enhances this by allowing the use of multisig and timelocks together, creating more complex setups. For instance, in a 2-of-3 multisig, losing 2 keys usually locks the funds forever. With Miniscript, you can assign time durations to keys, adding an extra layer of security or bringing new use cases like facilitating corporate treasury management. Advanced timelock conditions can also be configured, such as resetting the wallet’s timelock based on specific time thresholds.

Hierarchical Key Signing

Miniscript allows hierarchical key signing, where you can designate which key is needed at any time. In a multisig, the user can assign certain keys more authority, enabling advanced conditional payments and recovery mechanisms. For example, small payments might require a single signature, while larger ones need multiple signatures and a timelock, providing granular control over transaction policies and ensuring stricter security for high-value transactions.

Complex Escrow Arrangements

Miniscript can also create complex escrow arrangements requiring multiple party signatures under different conditions. For example, a transaction could be spent by A and B together, B and C after a certain time, or A and C after a longer period. This can be used in scenarios like releasing payments to contractors only when both the client and a third-party inspector sign off, or in inheritance setups where funds are released to the heir after a specific period or earlier if multiple trustees agree.

In the following video from Bitcoin 2023 Open Source Stage, Rob Hamilton from AnchorWatch, Inc. moderates a talk on Miniscript, featuring panelists Blockstream Director of Research Andrew Poelstra and Wizardsardine CTO Antoine Poinsot. The discussion goes into the technical aspects and benefits of Miniscript, emphasizing Miniscript’s utility in simplifying complex scripts.

Where to Learn More

Readers can learn more about the Blockstream Jade on the new Jade portal. Here you will find detailed information on setting up, using, and updating your Blockstream Jade hardware wallet. It highlights features like air-gapped QR functionality, multisig security, and support for Liquid swaps. Users can access firmware updates, security guides, and DIY options for building your own Blockstream Jade. The page also provides resources for troubleshooting and community support, ensuring a secure and user-friendly experience for both beginners and experienced users.

If you are a software wallet provider that would like to add capability for Miniscript with the Jade, please reach out to us at green@blockstream.com.

For those of you who are newcomers, the Jade can be purchased on the official Blockstream Store, on Amazon, or at any of our official resellers around the globe.

If you have specific preferences, please, mark the topic(s) you would like to read: