feat(docker): add zeus command for QR code display

- Show truncated lndconnect in status instead of large QR
- Add ./dev.sh zeus command to display QR on demand

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-02-15 14:48:28 -05:00
commit 8a3b38f352

View file

@ -339,14 +339,8 @@ show_status() {
if [[ -n "$lndconnect" ]]; then if [[ -n "$lndconnect" ]]; then
echo -e "${CYAN}Zeus Wallet (connect to lnd-3 for testing)${NC}" echo -e "${CYAN}Zeus Wallet (connect to lnd-3 for testing)${NC}"
if command -v qrencode &> /dev/null; then echo -e " ${DIM}${lndconnect:0:60}...${NC}"
echo "" echo -e " ${DIM}To display QR: ./dev.sh zeus${NC}"
qrencode -t ANSIUTF8 -m 1 "$lndconnect"
echo -e " ${DIM}Scan with Zeus to connect to lnd-3 (funding node)${NC}"
else
echo -e " ${DIM}$lndconnect${NC}"
echo -e " ${DIM}(install qrencode for QR code display)${NC}"
fi
echo "" echo ""
fi fi
@ -569,6 +563,34 @@ cmd_mine() {
success "Mined $blocks block(s) (height: $height)" success "Mined $blocks block(s) (height: $height)"
} }
cmd_zeus() {
if ! is_regtest_running; then
error "Regtest not running. Start with: ./dev.sh up"
exit 1
fi
local lndconnect=$(generate_lndconnect 2>/dev/null)
if [[ -z "$lndconnect" ]]; then
error "Could not generate lndconnect string"
exit 1
fi
echo ""
echo -e "${CYAN}Zeus Wallet Connection (lnd-3)${NC}"
echo ""
if command -v qrencode &> /dev/null; then
qrencode -t ANSIUTF8 -m 1 "$lndconnect"
echo ""
echo -e "${DIM}Scan with Zeus to connect to lnd-3 (funding node)${NC}"
else
echo -e "${DIM}$lndconnect${NC}"
echo ""
echo -e "${YELLOW}Install qrencode for QR display: nix-shell -p qrencode${NC}"
fi
echo ""
}
cmd_atm() { cmd_atm() {
local atm_dir="$PROJECT_DIR/apps/machine" local atm_dir="$PROJECT_DIR/apps/machine"
local background=false local background=false
@ -652,6 +674,9 @@ case "${1:-help}" in
atm) atm)
cmd_atm cmd_atm
;; ;;
zeus)
cmd_zeus
;;
*) *)
echo "Lamassu Next Development Environment" echo "Lamassu Next Development Environment"
echo "" echo ""
@ -661,6 +686,7 @@ case "${1:-help}" in
echo " up [options] Start development environment" echo " up [options] Start development environment"
echo " down [--all] Stop services (--all includes regtest)" echo " down [--all] Stop services (--all includes regtest)"
echo " atm Launch ATM application (Electron)" echo " atm Launch ATM application (Electron)"
echo " zeus Show Zeus wallet connection QR code"
echo " status Show connection info" echo " status Show connection info"
echo " logs [service] Follow service logs" echo " logs [service] Follow service logs"
echo " fund [sats] Fund ATM account" echo " fund [sats] Fund ATM account"