From 9507e040a03834f7d603c5c13a1f69ae6ef48b3a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 3 Mar 2026 21:26:57 -0800 Subject: bip353 --- routes/users.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'routes') diff --git a/routes/users.ts b/routes/users.ts index 941a0a3b..6948fb28 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -26,6 +26,7 @@ import { authenticator } from "otplib"; import { v4 } from "uuid"; import { setCookie } from "hono/cookie"; +import { setupBip353, teardownBip353 } from "$lib/bip353"; import { PaymentType } from "$lib/types"; import { createBalanceAccount, getBalance, getCredit, getPending } from "$lib/tb"; import { importAccountHistory } from "$lib/payments"; @@ -297,6 +298,7 @@ export default { "arkAddress", "autowithdraw", "banner", + "bip353", "currencies", "currency", "destination", @@ -353,6 +355,11 @@ export default { await s(`user:${user.id}`, user); if (user.nip5) await db.sAdd("nip5", `${user.username}:${user.pubkey}`); + if (typeof body.bip353 !== "undefined") { + if (user.bip353) setupBip353(user).catch((e) => warn("BIP 353 setup failed", e.message)); + else teardownBip353(user).catch((e) => warn("BIP 353 teardown failed", e.message)); + } + emit(user.id, "user", user); return c.json({ user }); } catch (e) { -- cgit v1.2.3