From 43b6d2a4e16f1991a02a77f2198bc83bb71deb04 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 25 Nov 2026 09:25:18 -0700 Subject: names: ignore registrar records held by blocked keys Names whose v3 record belongs to a key in names:blocked_holders are treated as unclaimed: lightning address, NIP-05 and legacy forwarding stay with the local account. Fails open if the registrar or db cannot answer. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX --- routes/lnurl.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/lnurl.ts b/routes/lnurl.ts index e28bb510..20d795c0 100644 --- a/routes/lnurl.ts +++ b/routes/lnurl.ts @@ -37,6 +37,8 @@ const unauthInvoiceBudget = async (uid: string) => { fail("Too many payment requests for this user, try again later"); } }; +import { holderBlocked } from "$lib/names"; + // v3 payment addresses (coinos v3 / halwallet) are registered here. const NAMES_URL = process.env.NAMES_URL || "https://names.coinos.io"; @@ -135,7 +137,7 @@ export default { // registrar never queries this endpoint for those. If the registrar is // unreachable we fall through and serve the local account — a briefly // stale destination beats an unpayable address. - const v3 = await registrarLookup(name); + const v3 = (await holderBlocked(name)) ? null : await registrarLookup(name); if (v3) return res.send(v3); const user = await getUser(name); -- cgit v1.2.3