Libwally Overview and Examples

Libwally is Blockstream's open source Bitcoin and Liquid wallet primitive library. It allows for third parties to build low level tools, desktop, and mobile apps that can interact with the Bitcoin and Liquid blockchains. The library contains reference implementations of cryptographic and signing functions and provides low level access to actions like generating a mnemonic, creating Liquid transactions, deriving addresses and the like. It is cross-platform and cross-language and can be built for a wide range of target operating systems and devices, such a microprocessor hardware wallets.

You can find a list of projects and products that are known to use or depend on Libwally here.

Supported operating systems and development languages

The operating system support for Libwally:

  • Linux.
  • Android.
  • macOS.
  • iOS.
  • Windows.

Libwally can be used from:

  • C and compatible languages.
  • C++.
  • Python.
  • Java.
  • Javascript via Node.js or Cordova or WebAssembly/Emscripten.

API documentation

You can read the Libwally API documentation at https://wally.readthedocs.io.
A step by step guide on how to build Libwally with Java wrappers is provided below, along with an example of how to form transactions. This is a good starting point for developers, regardless of language used, as it demonstrates some of the processes in using Libwally.

You can build Libwally on a variety of platforms and use Libwally from a variety of languages. Build Details of how to build Libwally are provided on the Libwally Github repository, along with steps of how to build the Swig wrappers needed to enable languages like Python and Java to use the library. Next we provide a detailed step process of how to do this in Java.