Metadata-Version: 2.1
Name: blitskrieg
Version: 0.2.1
Summary: The Bitcoin Lightning Integration Test Service
Home-page: https://gitlab.com/hashbeam/blitskrieg
License: AGPL-3.0-or-later
Keywords: ln,lightning network,bitcoin,integration,test,boltlight
Author: Hashbeam
Author-email: hashbeam@protonmail.com
Requires-Python: >=3.9.0,<4.0.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Other/Nonlisted Topic
Requires-Dist: PyYAML (>=5.4.1,<6.0.0)
Requires-Dist: boltlight-proto (>=2.0.0,<3.0.0)
Requires-Dist: click (>=8.0.4,<9.0.0)
Requires-Dist: docker (>=5.0.3,<6.0.0)
Requires-Dist: docker-compose (>=1.28.5,<2.0.0)
Requires-Dist: googleapis-common-protos (>=1.53.0,<2.0.0)
Requires-Dist: grpcio (>=1.43.0,<2.0.0)
Requires-Dist: protobuf (>=3.19.1,<4.0.0)
Requires-Dist: requests (>=2.25.1,<3.0.0)
Project-URL: Repository, https://gitlab.com/hashbeam/blitskrieg
Description-Content-Type: text/markdown

# BLITSkrieg: Bitcoin Lightning Integration Test Service

BLITSkrieg is a gRPC server in Python that aims to provide a set of utilities
to test Bitcoin and Lightning Network services.

It uses [boltlight](https://gitlab.com/hashbeam/boltlight) in order to hide
the differences between the different LN node implementations.

Currently the available services are:
* `bitcoind` <sup>[1]</sup>
* `boltlight` <sup>[2]</sup>
* `c-lightning`
* `eclair`
* `electrs` <sup>[3]</sup>
* `electrum`
* `lnd`

#### Notes

1. docker image always necessary
2. docker image necessary to call LN-related commands
3. docker image necessary to run `electrum`

## System dependencies

- Linux or macOS (_Windows may work, but is not supported_)
- Python 3.9+
- poetry
- docker

## Build

In order to build the docker image for BLITSkrieg, run:
```bash
# production mode
$ ./unix_helper build

# development mode
$ ./unix_helper build-dev
```

Production mode does not include the package dev dependencies.

Pre-built (production mode) images for the latest versions can be downloaded
from GitLab's [container
registry](https://gitlab.com/hashbeam/blitskrieg/container_registry).

## Run

In order to launch the docker image of BLITSkrieg, run:
```bash
# production mode
$ ./unix_helper run

# development mode
$ ./unix_helper run-dev
```

## CLI

BLITSkrieg features a Command Line Interface, named `bli`. It can be installed
and called from the project directory.

In order to install the project, run:
```bash
$ poetry install
```

In order to run `bli`, call it via poetry:
```bash
$ poetry run bli
```

`bli` supports shell completion for bash and zsh (the shell needs to have
completion support enabled). It can be enabled sourcing the appropriate file
for the running shell, from the project directory:
```bash
$ . ./blitskrieg/share/complete-bli.bash
$ . ./blitskrieg/share/complete-bli.zsh
```

## Use

In order to run a command on BLITSkrieg, you can directly call it by making
a gRPC call to it, or you can use its CLI.

To get a list of available CLI commands, run:
```bash
$ poetry run bli --help
```

In order to perform any action in BLITSkrieg, you first need to create a LN
stack. To do so, call:
```bash
$ poetry run bli createstack [--<implementation>=<number_of_nodes>]
```

If you do not specify any LN node, this will run a single `bitcoind` instance
and only Bitcoin-related commands will be available.

Visit our [docker repository](https://gitlab.com/hashbeam/docker) in
order to build the required services.
Otherwise, if the needed docker images are not available, they will be pulled
from hashbeam's GitLab container registry.

