Boltz Docs
Boltz Client
Boltz Client
  • 👋Introduction
  • 💰Wallets
  • 🔁Autoswap
  • 🎛️Configuration
  • 🤖gRPC API
  • 🤖REST API
  • 🔙Back to Docs Home
Powered by GitBook
On this page
  • Main Components
  • boltzd
  • boltzcli
  • Installation
  • Binaries
  • Docker
  • Building from source
  • Setup
  • Configuration
  • CLI
  • Macaroons

Introduction

NextWallets

Last updated 13 days ago

Boltz Client connects to or nodes and allows for fully unattended channel rebalancing or accepting Lightning payments without running a node, using . It is composed of boltzcli and boltzd.

Design principles:

  • CLI-first: fine-grained control and enhanced setup UX via boltzcli

  • CLN-first: first-class citizen support for in addition to

  • -first: leverages fee-efficient Lightning -> Liquid swaps in addition to Bitcoin swaps

  • Self-contained: create/import Liquid and mainchain wallets, swap to read-only wallets

Main Components

boltzd

boltzd is a daemon that should run alongside of your lightning node. It connects to your lightning node and the Boltz API to create and execute swaps.

boltzcli

boltzcli is the CLI tool to interact with the gRPC interface that boltzd exposes.

Installation

Binaries

Docker

docker create -v ~/.boltz:/root/.boltz -v ~/.lnd:/root/.lnd --name boltz-client boltz/boltz-client:latest
docker start boltz-client
docker exec boltz-client boltzcli getinfo

Building from source

Run make build to build the daemon and CLI. The binaries will be placed at the current path.

You can also run make install which will place the binaries into your GOBIN ($HOME/go/bin by default) directory.

Setup

Configuration

boltzd requires a connection to a lightning node, which can be CLN or LND. If you set configuration values for both, you can specify which to use with the node param.

To view all CLI flags use --help.

LND

The LND node to which the daemon connects has to be version v0.10.0-beta or higher. Also, LND needs to be compiled with these build flags (official binaries from Lightning Labs releases include them):

  • invoicerpc (hold invoices)

  • routerrpc (multi path payments)

  • chainrpc (block listener)

  • walletrpc (fee estimations)

By default, boltzd will attempt to connect to lnd running at localhost:10009 (lnd.host and lnd.port) and looking for certificate and macaroon inside the data directory ~/.lnd (lnd.datadir).

You can manually set the location of the tls certificate (lnd.certificate) and admin macaroon (lnd.macaroon) instead of speciyfing the data directory as well.

CLN

  • --cln.port same port as used for --grpc-port

  • --cln.host host of the machine CLN is running on

  • --cln.datadir data directory of cln (~/.lightning by default)

You can manually set the paths of cln.rootcert, cln.privatekey and cln.certchain instead of speciyfing the data directory as well. You might have to set the cln.servername option as well, if you are using a custom certificate.

CLI

We recommend running boltzcli completions to setup autocompletions for the CLI (only supported for zsh and bash).

Macaroons

The macaroons for the gRPC server of boltzd can be found in the macaroons folder inside the data directory of the daemon. By default, that data directory is ~/.boltz on Linux.

Boltz Client is available for linux on amd64 and arm64. Download the latest binaries from the page. If you are on another platform, use the docker image below.

Boltz Client is also available as . Assuming your lnd macaroon and certificate are placed in ~/.lnd, run:

To build, version 1.21 or higher is required. Boltz Client also has C dependencies, which means a C compiler has to be installed to compile the daemon successfully.

Boltz Client depends on by blockstream, which can be either dynamically or statically linked. The recommended way to build from source is linking dynamically as a static link requires compiling gdk as well.

Binaries for the latest release of Boltz Client can be found on the . If no binaries are available for your platform, you can build them yourself with the instructions above.

Configuration can be done via CLI params or a TOML configuration file (by default located in ~/.boltz/boltz.toml). We suggest starting off with the sample configuration file, which can be found .

The daemon connects to CLN through . You need start CLN with the --grpc-port CLI flag, or set it in your config:

CLN
LND
Boltz API
CLN
LND
Liquid
release
docker image
Go
GDK
release page
here
gRPC
👋
Page cover image