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:
parent
ba3a54265f
commit
8a3b38f352
1 changed files with 34 additions and 8 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue