diff options
| author | Adam Soltys <[email protected]> | 2024-12-26 22:36:12 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-26 22:37:03 +0000 |
| commit | 703564c452f3549adc2c23c62ff11d5e713b681e (patch) | |
| tree | b369f162feceed4ad452bd10eae6f9ed0716a2fd /index.ts | |
| parent | be16090d086a05ed03fc8149581c49c717826535 (diff) | |
| download | coinos-server-703564c452f3549adc2c23c62ff11d5e713b681e.tar.gz coinos-server-703564c452f3549adc2c23c62ff11d5e713b681e.zip | |
bolt12 replay
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 23 |
1 files changed, 7 insertions, 16 deletions
@@ -3,7 +3,7 @@ Error.stackTraceLimit = Infinity; import app from "$lib/app"; import { admin, auth, optional } from "$lib/auth"; -import { listenForLightning } from "$lib/lightning"; +import { listenForLightning, replay } from "$lib/lightning"; import { getLocations } from "$lib/locations"; import nwc from "$lib/nwc"; import { catchUp, check } from "$lib/payments"; @@ -135,13 +135,11 @@ app.post("/claim", auth, ecash.claim); app.post("/mint", auth, ecash.mint); app.post("/melt", auth, ecash.melt); app.post("/ecash/:id", ecash.receive); -app.get( - "/liquid-asset-proof-c938c75d110b18aed74b45caf613ebfc1eeb9f77ab48f85016eca850489d07c2", - (_, res) => - res.send( - "Authorize linking the domain name coinos.io to the Liquid asset c938c75d110b18aed74b45caf613ebfc1eeb9f77ab48f85016eca850489d07c2", - ), -); + +app.get("/replay/:index", (req,res) => { + replay(req.params.index); + res.send({}); +}); app.post("/echo", (req, res) => { console.log("echo", req.body); @@ -153,13 +151,6 @@ const port: number = parseInt(process.env["PORT"]) || 3119; app.listen({ host, port }); -const logerr = (e: Error) => - // (e && - // e.message && - // (e.message.includes("Invalid") || - // e.message.includes("MASK") || - // e.message.includes("Rate"))) || - console.log(e); - +const logerr = (e: Error) => console.log(e); process.on("unhandledRejection", logerr); process.on("uncaughtException", logerr); |
