Skip to content

Commit

Permalink
refactor: move docs to gitbook
Browse files Browse the repository at this point in the history
refactor: move docs to gitbook
  • Loading branch information
armurbalda authored Oct 3, 2023
1 parent 488c3ce commit a730eeb
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 399 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Boltz LND

This repository contains a [Boltz](https://boltz.exchange) client for [LND](https://github.com/lightningnetwork/lnd). It supports Normal Submarine Swaps (from onchain to Lightning coins) and Reverse ones (from Lightning to onchain coins).
This repository contains `boltz-lnd`, a [Boltz](https://boltz.exchange) client for [LND](https://github.com/lightningnetwork/lnd). It supports Normal Submarine Swaps (Bitcoin -> Lightning) and Reverse Submarine Swaps (Lightning -> Bitcoin).

The full documentation can be found [here](https://lnd.docs.boltz.exchange/) or in the `docs` folder
The full documentation can be found [here](https://docs.boltz.exchange/boltz-lnd) or in the [`docs`](./docs) folder of this repo.

## Building

To build Go version 1.14 or higher is required. `boltz-lnd` also has C dependencies which means a C compiler has to be installed to compile the daemon successfully.
To build `boltz-lnd`, [go](https://github.com/golang/go) version 1.14 or higher is required. `boltz-lnd` also has C dependencies which means a C compiler has to be installed to compile the daemon successfully.

The build process requires patches for dependencies, and some build flags, therefore the `Makefile` in the repository root should be used.
The build process requires patches for dependencies, and some build flags, therefore the provided [`Makefile`](Makefile) should be used.

To start the build process, run:
```
go mod vendor
make build
```
```
Binary file added docs/.gitbook/assets/boltz-lnd_header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
cover: .gitbook/assets/boltz-lnd_header.png
coverY: 0
---

# 👋 Introduction

`boltz-lnd` is a [Boltz](https://boltz.exchange) client for [LND](https://github.com/lightningnetwork/lnd). It supports Normal Submarine Swaps (mainchain Bitcoin -> Lightning) and Reverse Submarine Swaps (Lightning -> mainchain Bitcoin). Other layers like Liquid are currently _not_ supported. It consists of two main components:

## `boltzd`

`boltzd` is the daemon that runs alongside your LND node. It connects to your LND node and hooks it up with the [Boltz API](https://api.boltz.exchange/) to create and execute swaps.

## `boltzcli`

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

## Setup

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](https://github.com/lightningnetwork/lnd/releases) include them already):

* `invoicerpc` (hold invoices)
* `routerrpc` (multi path payments)
* `chainrpc` (block listener)
* `walletrpc` (fee estimations)

Binaries of `boltz-lnd` can be found [here](https://github.com/BoltzExchange/boltz-lnd/releases). If no binaries are available for your platform, you can build them yourself with the instructions provided [here](https://github.com/BoltzExchange/boltz-lnd#building).

### Configuration

`boltzd` requires a connection to a LND node. In most cases the CLI flags `--lnd.certificate <path to the tls.cert of LND>` and `--lnd.macaroon <path to the admin.macaroon of LND>` should be enough. To view all CLI flags use `--help`.

`boltzd` can also be configured via a `TOML` file. The full documentation for the configuration file can be found in the [configuration](configuration.md) section.

### Macaroons

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-lnd` on Linux.
7 changes: 7 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Table of contents

* [👋 Introduction](README.md)
* [🎛 Configuration](configuration.md)
* [🤖 gRPC API](grpc.md)
* [🤖 REST API](https://github.com/BoltzExchange/boltz-lnd/blob/master/boltzrpc/rest-annotations.yaml)
* [🔙 Back to Docs Home](http://127.0.0.1:5000/o/SPM8mTvJyc7OIzGL3HD7/s/XUXMXrD8YTzvuqvAeom7/)
18 changes: 9 additions & 9 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Configuration
# 🎛 Configuration

`boltz-lnd` can be configured via CLI arguments, and a TOML config file. By default, the config file is called `boltz.toml` and located in the data directory of `boltz-lnd` (`/home/<user>/.boltz-lnd` by default on Linux).
`boltz-lnd` can be configured via a `TOML` config file or CLI arguments. By default, the config file is called `boltz.toml` and located in the data directory of `boltz-lnd` (`/home/<user>/.boltz-lnd` by default on Linux).

## Example

```toml
# Path the the log file
# Path to the log file
logfile = ""

# Prefix for all log messages.
# Useful in cases two boltz-lnd instances (one for BTC and LTC) are running in a single Docker container
# Useful in cases where multiple boltz-lnd instances are running in a Docker container
logprefix = "[BTC] "

[BOLTZ]
# By default the daemon automatically connects to the official Boltz instance for the network LND is on
# This value is used to override that
url = "https://testnet.boltz.exchange/api"
# By default the daemon automatically connects to the official Boltz Backend for the network LND is on
# This value is used to overwrite that
url = "https://api.boltz.exchange"

[DATABASE]
# Path to the SQLite database file
path = "/home/michael/test.db"
path = "/home/me/test.db"

[LND]
# Host of the gRPC interface of LND
Expand Down Expand Up @@ -63,6 +63,6 @@ noMacaroons = false
# Path to the admin macaroon for the gRPC and REST interface
adminMacaroonPath = ""

# Path to the read only macaroon for the gRPC and REST interface
# Path to the read-only macaroon for the gRPC and REST interface
readOnlyMacaroonPath = ""
```
Loading

0 comments on commit a730eeb

Please sign in to comment.