Getting Started with the Liquid Network


The Liquid Network is the world’s leading Bitcoin sidechain, facilitating quick and private transactions of bitcoin, stablecoins, real estate NFTs, and other assets issued on the platform.

A sidechain is a separate blockchain with different features than its base chain, but utilizes the base chain’s native currency. The 2-way peg in Liquid is 1:1 to bitcoin. So for every bitcoin you transfer (or "peg") into the network, you unlock exactly 1 Liquid Bitcoin (L-BTC) on the sidechain. In effect, this transfers BTC from the Bitcoin blockchain to the Liquid sidechain.

Liquid provides fast settlement with short 1-minute blocks and improved privacy through technology called Confidential Transactions.

Create a Wallet

A sidechain is purposefully designed to use bitcoin as its native currency. They also bring exciting new features and abilities for BTC that are infeasible on the base Bitcoin layer.

Liquid brings more smart contract functionality, easy asset/token issuances, and Confidential Transactions – a technology that blinds transaction amounts and asset types for enhanced privacy.

Some things you can do with just a Liquid wallet:

  • Send and receive any asset on Liquid (L-BTC, USDt, NFTs, etc.)
  • Atomic swap between L-BTC and any asset on Liquid (stablecoins, NFTs, etc.)
  • Atomic swap bitcoin in and out of Liquid

Liquid Wallet Options:

Blockstream Green (Android, iOS, Desktop)

Blockstream Green is an industry-leading Bitcoin and Liquid Network wallet built by Blockstream. Green is optimized for ease of use and securing assets with multisignature technology. The app is available on all popular mobile and desktop platforms.

Learn how to set up a Green wallet

Blockstream Green also supports Jade and Ledger Nano S* hardware wallets.
*Note: Ledger Nano S only supports a limited number of assets

Jade is Blockstream’s take on hardware wallets and is unique in its approach of using inexpensive commonplace hardware, developer-friendly FOSS firmware, and open source infrastructure to separate security-related components.

Buy a Blockstream Jade hardware wallet here

Jade supports all assets on Liquid and has first class support with Blockstream Green.

Sideswap (Android, iOS, Desktop)

Sideswap is a Bitcoin and Liquid Network wallet that natively supports atomic swaps between Liquid assets (L-BTC, USDt, etc.) and supports swapping bitcoin in and out of Liquid altogether. This means that you can leverage the unique features on Liquid and swap back to the Bitcoin network to store your BTC long-term.

Learn how to set up a Sideswap wallet

Download Sideswap here

Run a Node (advanced users)

If you're an advanced user, you may want to consider running a Liquid full node to validate the transactions on the Liquid Network and audit the sidechain's Bitcoin wallet to be sure there isn't extra L-BTC being created. With a Liquid node, you can also manually peg-in BTC and issue new assets

The source code and release binaries for a Liquid node are hosted on Github here. Currently, there are binaries for Windows, MacOS, and Linux. There even is a GUI now! I won’t go into building elementsd and the other utilities in this post. You can use this document to build elementsd from the source code. It’s more or less identical to building bitcoind, the daemon for running a Bitcoin node.

elementsd requires* a running bitcoind. Just like how bitcoind is operated with bitcoin-cli, the elementsd daemon is operated with elements-cli. So, all commands need to be run with elements-cli while elementsd is running.

*If you don’t want to validate peg-ins, bitcoind is not required. elementsd can then be run on its own with validatepegin=0 in elements.conf.

This means that in bitcoin.conf, the following is required:

server=1

Elements also requires an elements.conf (in ~/.elements/) with these entries:

mainchainrpccookiefile=/path/to/bitcoind/.cookie

That’s it! You can now fire up elementsd and validate the sidechain’s blocks and peg-in transactions. Like with bitcoind, you can watch Liquid’s debug.log with:

tail -f ~/.elements/liquidv1/debug.log

Initiating a Peg-In:

Initiating a peg-in is really simple. It’s just a matter of telling elementsd to generate a peginaddress for you to send bitcoin to.

$ elements-cli getpeginaddress

This will output a peg-in address and a claim script. The claim script is needed if the peginaddress is not in your wallet — e.g., if you’ve generated the peginadddress on an offline computer and are submitting the claim on a separate computer

Once you’ve generated an address, you can send bitcoins to it. For security reasons, 102 Bitcoin confirmations are required to complete the peg-in process. Peg-outs are much quicker at 2 Liquid blocks, but require you to go through a Liquid member to do so.

An alternative to a peg-out is simply swapping L-BTC for BTC. There are multiple ways to do this. You can use the Sideswap app mentioned earlier. You can also use Peerswap to swap between BTC and L-BTC via the Lightning Network. Note that Peerswap is currently beta software, so do not use large amounts.

Claiming L-BTC:

Once 102 Bitcoin blocks have been mined, you can claim your L-BTC on the Liquid sidechain. To do so requires two things.

You need:

  • The raw transaction (in hex) of the peg-in transaction
  • A txoutproof generated by bitcoind
  • (optional) The claim script generated with getpeginaddress

Once you have those, you can use elements-cli to claim your L-BTC:

(Example from elements-cli help)

> elements-cli claimpegin "0200000002b80a99d63ca943d72141750d983a3eeda3a5c5a92aa962884ffb141eb49ffb4f000000006a473044022031ffe1d76decdfbbdb7e2ee6010e865a5134137c261e1921da0348b95a207f9e02203596b065c197e31bcc2f80575154774ac4e80acd7d812c91d93c4ca6a3636f27012102d2130dfbbae9bd27eee126182a39878ac4e117d0850f04db0326981f43447f9efeffffffb80a99d63ca943d72141750d983a3eeda3a5c5a92aa962884ffb141eb49ffb4f010000006b483045022100cf041ce0eb249ae5a6bc33c71c156549c7e5ad877ae39e2e3b9c8f1d81ed35060220472d4e4bcc3b7c8d1b34e467f46d80480959183d743dad73b1ed0e93ec9fd14f012103e73e8b55478ab9c5de22e2a9e73c3e6aca2c2e93cd2bad5dc4436a9a455a5c44feffffff0200e1f5050000000017a914da1745e9b549bd0bfa1a569971c77eba30cd5a4b87e86cbe00000000001976a914a25fe72e7139fd3f61936b228d657b2548b3936a88acc0020000", "00000020976e918ed537b0f99028648f2a25c0bd4513644fb84d9cbe1108b4df6b8edf6ba715c424110f0934265bf8c5763d9cc9f1675a0f728b35b9bc5875f6806be3d19cd5b159ffff7f2000000000020000000224eab3da09d99407cb79f0089e3257414c4121cb85a320e1fd0f88678b6b798e0713a8d66544b6f631f9b6d281c71633fb91a67619b189a06bab09794d5554a60105" "0014058c769ffc7d12c35cddec87384506f536383f9c"

Issuing an asset:

Issuing an asset is ridiculously simple compared to other asset platforms like Ethereum or Solana.

$ elements-cli issueasset 1000 1 true

This creates an asset with 1000 units and 1 reissuance token. It is also issued confidentially, so you can issue and distribute assets completely confidentially — as if they were just normal Liquid transactions. Optionally, you can unblind the issuance and make it non-private.

A reissuance token allows its holder to issue more units of the asset. Hand these out to trusted parties who may want to issue additional units of the asset you're working with.

Transferring L-BTC or assets:

Transferring L-BTC is the same as if you were using bitcoin-cli :

Someone generates a confidential address:

$ elements-cli getnewaddress

They give you that address. Then, you send L-BTC:

$ elements-cli sendtoaddress  VTq74LvRzjwxqNg47UaJgCqm8go8diH6XtBZdgHhNhPGVRC8xVj8adnMLQ9NfwV87iUnJ5jni2wAQoYT 0.01

This sends 0.01 L-BTC to a demo address (don’t send real L-BTC there!).

Or an asset:

$ elements-cli sendtoaddress VTq5YvHXHq4rsSVQNuGVC4ahrd25c1XrPqv59DBD73u9ZKbk2g6794Ge9zEKcR3zVaTR3diahW6S3vyx 0.01 "giveaway" "@RobEdb" false e33b0c87afdef7e0d942daf1d9735b9a79ddefc10a3a631783f397f86f418278

This sends 0.01 of an asset to @RobEdb.

Set Sail:

Now that you've created a Liquid wallet and are running a node, you can leverage the innovative technologies on Liquid and prepare for new upcoming tech such as Simplicity. Be sure to give us a follow on Twitter and join the discussion on Telegram.

If you're a developer interested in building on Liquid, join the Liquid Dev group on Telegram and chat with other developers in the ecosystem.

This content was originally posted here and is updated with new wallets and command line utilities.