Commit graph

2 commits

Author SHA1 Message Date
Ken Sedgwick
8dbde86789
dev-boltz-api.cpp: Support env-var URL/proxy overrides for non-mainnet testing.
The binary was hardcoded to talk to https://boltz.exchange/api via no
proxy, which made it useless for verifying the signet Boltz backend
added by the recent boltz_instances cherry-pick.

Read two new optional environment variables on startup:

  BOLTZ_API_BASE  URL prefix (default: https://boltz.exchange/api)
  BOLTZ_PROXY     libcurl proxy (e.g. socks5h://127.0.0.1:9050)

and pass them through to the Boltz::Connection constructor. No
behavior change when neither variable is set, so existing usage
continues to hit mainnet Boltz.

Tested against signet Boltz via both paths:

  ./dev-boltz-api /getpairs                                # mainnet, default
  BOLTZ_API_BASE=http://127.0.0.1:8080 \
    ./dev-boltz-api /getpairs                              # signet via socat
  BOLTZ_API_BASE=http://boltz7ck...onion \
    BOLTZ_PROXY=socks5h://127.0.0.1:9050 \
    ./dev-boltz-api /getpairs                              # signet direct via Tor
2026-06-13 17:09:04 -07:00
ZmnSCPxj jxPCSnmZ
2959fc0406 dev-boltz-api.cpp: Tool to check that Boltz::Connection works. 2020-09-18 11:29:06 +08:00