From 687717bfcedd2461720450814091629e0306ebf8 Mon Sep 17 00:00:00 2001 From: Patrick Mulligan Date: Sat, 24 Jan 2026 13:12:15 -0500 Subject: [PATCH] Wire Lightning.Pub services to ATM state machine - Add lightning.ts services module with real LightningPubClient and CLINKClient - Connect to local relay (ws://localhost:7777) and Lightning.Pub on init - Generate real CLINK noffers for cash-in flow - Generate real Lightning invoices for cash-out flow - Add connection status indicator (Live/Connecting/Offline badge) - Add toggle between live and mock services in debug panel - Fall back to mock services on connection failure Co-Authored-By: Claude Opus 4.5 --- lamassu-next/apps/machine/src/App.vue | 45 +++- .../apps/machine/src/services/lightning.ts | 201 ++++++++++++++++++ lamassu-next/apps/machine/src/stores/atm.ts | 53 +++-- 3 files changed, 283 insertions(+), 16 deletions(-) create mode 100644 lamassu-next/apps/machine/src/services/lightning.ts diff --git a/lamassu-next/apps/machine/src/App.vue b/lamassu-next/apps/machine/src/App.vue index 7616400..1e85a76 100644 --- a/lamassu-next/apps/machine/src/App.vue +++ b/lamassu-next/apps/machine/src/App.vue @@ -1,13 +1,25 @@