A simple guide to get up and running with the interactive regtest environment.
# Terminal 1: Start regtest with default sqlite database
just regtest
# Or with redb database
just regtest redb
The script will:
mprocs
and offer to install it if missingmprocs
showing logs from all componentsThe just
commands work from any terminal - they automatically find the running environment.
just ln-cln1 getinfo # CLN node 1
just ln-cln2 getinfo # CLN node 2
just ln-lnd1 getinfo # LND node 1
just ln-lnd2 getinfo # LND node 2
# Create 1000 sat invoice on CLN
just ln-cln1 invoice 1000 test_label "Test payment"
# Pay invoice with LND (use the bolt11 from above)
just ln-lnd1 payinvoice lnbcrt10u1...
# Check balances
just ln-cln1 listfunds
just ln-lnd1 listchannels
just btc getblockchaininfo # Blockchain status
just btc getbalance # Wallet balance
just btc-mine 5 # Mine 5 blocks
just mint-info # Show both mints' info
just mint-test # Run integration tests
just restart-mints # Stop, recompile, and restart mints
just regtest-status # Check all components
just regtest-logs # Show recent logs
just regtest-mprocs # Start mprocs TUI (if not already running)
Press Ctrl+C
in the terminal running just regtest
. Everything will be cleaned up automatically.
# Terminal 1
just regtest
# Terminal 2
just ln-cln1 invoice 1000 test "Test payment"
# Copy the bolt11 invoice
just ln-lnd1 payinvoice <bolt11>
just ln-cln1 listinvoices
just ln-lnd1 listpayments
# Terminal 1
just regtest
# Terminal 2
just mint-test # Run all tests
cargo test -p cdk-integration-tests # Or specific tests
# Terminal 1
just regtest
# Terminal 2 - use environment variables
echo $CDK_TEST_MINT_URL # CLN mint URL
echo $CDK_TEST_MINT_URL_2 # LND mint URL
# Use with CDK CLI
cargo run --bin cdk-cli -- --mint-url $CDK_TEST_MINT_URL mint-info
# Terminal 1: Keep regtest running
just regtest
# Terminal 2: Make changes to mint code, then
just restart-mints # Recompiles and restarts both mints
just mint-info # Test the changes
just mint-test # Run integration tests
That's it! The environment provides a full Lightning Network with CDK mints for testing and development.