-
State: {{ atmStore.currentState }}
+
+ State: {{ atmStore.currentState }}
+
+
{{ JSON.stringify(atmStore.context, null, 2) }}
diff --git a/lamassu-next/apps/machine/src/services/lightning.ts b/lamassu-next/apps/machine/src/services/lightning.ts
new file mode 100644
index 0000000..ea6ce1f
--- /dev/null
+++ b/lamassu-next/apps/machine/src/services/lightning.ts
@@ -0,0 +1,201 @@
+/**
+ * Lightning Services
+ *
+ * Connects to Lightning.Pub and provides real ATMServices implementation.
+ */
+
+import { NostrClient, generateIdentity, type MachineIdentity } from '@lamassu/nostr-client'
+import { LightningPubClient } from '@lamassu/lightning'
+import { CLINKClient } from '@lamassu/clink'
+import type { ATMServices, ATMContext } from '@lamassu/state-machine'
+
+// Development infrastructure configuration
+// In production, these would come from environment or secure config
+const DEV_CONFIG = {
+ // Lightning.Pub Nostr pubkey (from docker logs)
+ lightningPubPubkey: '0943fe710a0f48c77a0bdd11bd186d320cd1b01615cf9ec36fa2dc45bd86e92f',
+ // Local strfry relay
+ relayUrl: 'ws://localhost:7777',
+ // Admin token for HTTP API (development only)
+ adminToken: 'lamassu-dev-admin-token',
+ // Lightning.Pub HTTP API
+ lightningPubApiUrl: 'http://localhost:1776',
+}
+
+interface LightningServices {
+ nostrClient: NostrClient
+ lightningPub: LightningPubClient
+ clink: CLINKClient
+ identity: MachineIdentity
+ atmServices: ATMServices
+}
+
+/**
+ * Initialize Lightning services
+ */
+export async function initializeLightningServices(): Promise