From 384c4778ca5421c091a7d282b90b00965f3596cd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Feb 2026 13:05:01 -0800 Subject: zmq logic --- index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'index.ts') diff --git a/index.ts b/index.ts index a5e60310..b1e4ef4d 100644 --- a/index.ts +++ b/index.ts @@ -4,10 +4,12 @@ import { admin, auth, optional } from "$lib/auth"; import { fixBolt12, listenForLightning, replay } from "$lib/lightning"; import { startHealthCheck } from "$lib/health"; import { getLocations } from "$lib/locations"; +import { migrateAccounts } from "$lib/migrate"; import nwc from "$lib/nwc"; -import { catchUp, check } from "$lib/payments"; +import { check } from "$lib/payments"; import { getFx } from "$lib/rates"; import { sendHeartbeat } from "$lib/sockets"; +import { startZmq } from "$lib/zmq"; import ecash from "$routes/ecash"; import email from "$routes/email"; @@ -26,10 +28,11 @@ import users from "$routes/users"; try { getLocations(); getFx(); - catchUp(); nwc(); check(); startHealthCheck(); + startZmq(); + migrateAccounts().then((n) => n && console.log(`Migrated ${n} accounts`)); } catch (e) { console.log(e); } @@ -108,6 +111,7 @@ app.get("/pay/:username/:amount", lnurl.pay); app.post("/freeze", payments.freeze); app.post("/confirm", payments.confirm); +app.post("/bitcoin/tx", payments.txWebhook); app.post("/bitcoin/fee", auth, payments.fee); app.post("/bitcoin/send", auth, payments.send); app.post("/ark/send", auth, payments.ark); -- cgit v1.2.3