Skip to content

BoltzExchange/regtest

Repository files navigation

Boltz Regtest

An environment for local development and testing, successor of legend-regtest-enviroment.

Prerequisites

Docker or Orbstack for Apple Silicon based Macs. When using OrbStack on macOS, set export DOCKER_DEFAULT_PLATFORM=linux/amd64 before starting.

Usage

./start.sh
./stop.sh

Data dirs for the services are stored in ./data folder.

Scripts container

docker exec -it boltz-scripts bash
  • bitcoin-cli-sim-client
  • bitcoin-cli-sim-server
  • elements-cli-sim-client
  • elements-cli-sim-server
  • lightning-cli-sim-client
  • lightning-cli-sim-server
  • lncli-sim-client
  • lncli-sim-server
  • boltz-client-cli-sim
  • boltz-backend-cli-sim

Or alternatively, you can source aliases.sh to have these convenience scripts available on the host machine.

Block explorers

Esplora is running for the Bitcoin Core and Elements regtest:

Otterscan is used as block explorer for Anvil: http://localhost:5100

Your first swap

Run ./start.sh and enter the scripts container or add aliases on your host as described above.

Check the client's bitcoin wallet balance:

bitcoin-cli-sim-client getbalance

Check the client's LND channel balance:

lncli-sim-client channelbalance

Generate e.g. a Bitcoin -> Lightning swap in Web App using Client's LND as destination with a 100k sats invoice:

lncli-sim-client addinvoice --amt 100000

Send the required Bitcoin amount into the swap, e.g. with

bitcoin-cli-sim-client sendtoaddress bcrt1qfzjp72mft2kcx49w49l5v6vdegr7lff86j08w7 0.00104200

Mine three blocks for the swap to process and watch web app progress to the swap success screen:

bitcoin-cli-sim-client -generate 3

Check the client's bitcoin wallet balance again:

bitcoin-cli-sim-client getbalance

Check the client's LND channel balance again:

lncli-sim-client channelbalance

Updating images

./stop.sh
docker compose pull
./start.sh

About

Boltz Regtest Environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9