The Liquid Network provides advanced features, such as Confidential Transactions, Issued Assets, atomic swaps, cross-chain swaps with Lightning, generic multisig and hardware wallet support with Jade. It supports more advanced protocols like asset-backed loans with escrows that can also be secured by covenants, and fully-collateralized options contracts.
These features can improve processes from traditional finance that require trust in third parties, allowing more automation, reducing friction, and unlocking permissionless markets. However, in practice these features are quite complicated to integrate, build upon and combine in more innovative products.
As the technical providers of Liquid, Blockstream is committed to making it easier to build on Liquid and during the past few months we have developed new tooling for the Liquid ecosystem. These new development efforts have culminated in the new Liquid Wallet Kit (LWK), a collection of Rust tools to build Liquid wallets.
Liquid Wallet Kit (LWK)
The aim of LWK is to provide all the necessary building blocks for Liquid wallet applications development and simplify the life of developers by addressing common pain points of the current tooling.
We opted for a modular approach that enables developers to use only what they need, with the ability to easily extend LWK for more complex use cases. We want LWK to be a reference tool driven both by Blockstream and Liquid participants that can help reduce friction for Liquid integration, define ecosystem standards and productionize Liquid innovation.
LWK is built using the Rust programming language, which allows us to support Windows, Linux, and macOS, and to leverage the existing libraries rust-elements and elements-miniscript.
Features
LWK leverages recent innovations in the Liquid ecosystem: Liquid descriptors and Partially Signed Elements Transactions (PSET).
Liquid descriptors (aka CT descriptors) are used to create watch-only wallets. This allows users and wallet developers to clearly separate the private keys in Liquid applications and use them only when needed, namely during setup and transaction signing.
Transactions are passed around from watch-only wallets to signers using PSETs, a flexible format to encode transaction data. Signers can process this data and show the relevant information to the user, who can decide if it's appropriate to sign the transaction.
Signers can be either “hot” software wallets, defined by mnemonics stored on the computer or mobile phone, or hardware signers, like the Blockstream Jade, that can be used to improve the security of the setup. Initial support for Jade is already included, with additional work on other hardware signers underway.
CT descriptors and PSETs are open standards that allow interoperability between any conforming applications, not just LWK.
LWK currently has support for lightweight backends, Electrum and Esplora, so users are not required to sync a full node to get their transactions. Elements backend support is also on the roadmap.
Thanks to CT descriptors, LWK can support a wide range of scripts, starting from singlesig, to generic multisig, to even more complex scripts that might be suitable for certain applications, such as multisig with decaying security and covenant-based scripts.
We also focused on bindings for popular languages, including Python, Swift and Kotlin to ease mobile integration, and WebAssembly (Wasm), which even allows LWK to run in the browser!
All the features included in LWK are accessible with a CLI application based on a JSON-RPC server. You can install it and start discovering LWK capabilities now.
For instance, you can use LWK to create a multisig wallet with a combination of Jades and software signers. Then use the wallet to issue assets and manage the whole life cycle, reissuing, distributing and burning assets using the signers involved in the wallet.
Current Status
LWK is a relatively young project, having started development in late 2023 and open sourced earlier this year. It is currently pre-1.0, and considered ready for beta testing and community feedback. The desired scope for LWK is ambitious, we intend for it to be the best option for Liquid wallet and application developers.
Some APIs may still change, and we plan to iterate on them before version 1.0. Our priority was to get to a state where it's easy for any developer to contribute and iterate, even without a complete understanding of the whole project.
Roadmap
In the coming months we plan to improve LWK in multiple ways. We want to iterate on the interface of the inner pieces to move towards their stabilization. We also want to provide support for more hardware signers, and define the Liquid version of hardware wallet interface (HWI).
We plan to improve the existing language bindings, while adding support for many more programming languages that show demand from the community. However, there are some groups that have taken the initiative and started creating additional language bindings like the lwk-dart/flutter repo from the Bull Bitcoin team.
We also plan to provide support for existing protocols such as LiquiDEX, as well as any covenant-based protocols.
Get in Touch
We believe Liquid has the potential to be the base on top of which new financial products can be built.
LWK aims to make it easier for developers to leverage features such as watch-only, HWW support, complex scripting, and much more in their Liquid applications. For instance, you can use LWK to create a multisig wallet with multiple Jade devices, and issue, reissue and burn assets with that wallet.
LWK is a young library with an evolving interface that will be polished, improved and extended in the coming months. We encourage developers to try and contribute to LWK, and reach out to us, on GitHub or Telegram.
We will also be hosting a demo of LWK Thursday, April 18, at 5 p.m. CET / 10 a.m. CDT on Build On L2. It’s open to the public and no sign up is required, just keep an eye out for the live link on the Liquid 𝕏 feed. We hope to see you all there. Come with questions!