An environment for local development and testing, successor of legend-regtest-enviroment.
Docker or Orbstack for Apple Silicon based Macs.
When using OrbStack on macOS, set export DOCKER_DEFAULT_PLATFORM=linux/amd64
before starting.
./start.sh
./stop.sh
- Web App: http://localhost:8080
- API: http://localhost:9001
Data dirs for the services are stored in ./data
folder.
docker exec -it boltz-scripts bash
- bitcoin-cli-sim-client
- bitcoin-cli-sim-server
- elements-cli-sim-client
- elements-cli-sim-server
- boltzcli-sim (boltz-client)
- lightning-cli-sim
- lncli-sim
Since there are two lnd and two cln instances, use lncli-sim 1
or lightning-cli-sim 1
to interact with the first instance and lncli-sim 2
or lightning-cli-sim 2
to interact with the second.
Or alternatively, you can source aliases.sh
to have these convenience scripts available on the host machine.
Esplora is running for the Bitcoin Core and Elements regtest:
- Bitcoin: http://localhost:4002
- Elements: http://localhost:4003
Otterscan is used as block explorer for Anvil: http://localhost:5100
Run ./start.sh
then run bash on the container
docker exec -it boltz-scripts bash
check your bitcoin wallet balance
bitcoin-cli-sim-client getbalance
connect to bitcoind via rpc (127.0.0.1:18433
, using cookie auth or rpc user:password can be extracted with cat /root/.bitcoin/regtest/.cookie
) or esplora (http://localhost:4002/api
)
Generate an address in your wallet and send 1 BTC e.g.
bitcoin-cli-sim-client sendtoaddress bcrt1qfzjp72mft2kcx49w49l5v6vdegr7lff86j08w7 1
Then mine a block for the tx to confirm
bitcoin-cli-sim-client -generate 1
- Get the identity_pubkey:
lncli-sim 1 getinfo
- Connect to the peer and open a channel:
023a6159c3be21ef992d89d9579c589c9f27308e61ae1dcb609170c13af09c0504@127.0.0.1:29735
- Mine some blocks for the tx to confirm
bitcoin-cli-sim-client -generate 6
Now you should be able to swap out!