aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-04 13:05:01 -0800
committerAdam Soltys <[email protected]>2026-02-06 08:59:26 -0800
commit384c4778ca5421c091a7d282b90b00965f3596cd (patch)
tree0803cb8872128007e5487f94a9b9e7a00cbffba6 /index.ts
parent5e3bfba5eb3d54cc03551f98624a2e92dca5825f (diff)
downloadcoinos-server-384c4778ca5421c091a7d282b90b00965f3596cd.tar.gz
coinos-server-384c4778ca5421c091a7d282b90b00965f3596cd.zip
zmq logic
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts8
1 files changed, 6 insertions, 2 deletions
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);