diff --git a/docker/dev.sh b/docker/dev.sh index 0020715..1c8ef12 100755 --- a/docker/dev.sh +++ b/docker/dev.sh @@ -339,14 +339,8 @@ show_status() { if [[ -n "$lndconnect" ]]; then echo -e "${CYAN}Zeus Wallet (connect to lnd-3 for testing)${NC}" - if command -v qrencode &> /dev/null; then - echo "" - 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 -e " ${DIM}${lndconnect:0:60}...${NC}" + echo -e " ${DIM}To display QR: ./dev.sh zeus${NC}" echo "" fi @@ -569,6 +563,34 @@ cmd_mine() { 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() { local atm_dir="$PROJECT_DIR/apps/machine" local background=false @@ -652,6 +674,9 @@ case "${1:-help}" in atm) cmd_atm ;; + zeus) + cmd_zeus + ;; *) echo "Lamassu Next Development Environment" echo "" @@ -661,6 +686,7 @@ case "${1:-help}" in echo " up [options] Start development environment" echo " down [--all] Stop services (--all includes regtest)" echo " atm Launch ATM application (Electron)" + echo " zeus Show Zeus wallet connection QR code" echo " status Show connection info" echo " logs [service] Follow service logs" echo " fund [sats] Fund ATM account"