From fb63b96ec90e32bc8adc5b77b2735097dde16bbd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 3 Aug 2026 13:04:36 -0700 Subject: Let a migrated account hand its address to coinos v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A `migrated` flag on the user, settable through /user and visible on the public user endpoint. It changes exactly one thing: lnurlp for that username defers to the names registrar, so payments to name@coinos.io arrive in the person's v3 wallet. The account itself is untouched — same username, same history, still usable here — which is why this is a flag and not a rename or a shutdown. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- lib/utils.ts | 2 ++ lib/whitelist.ts | 1 + routes/lnurl.ts | 8 ++++---- routes/users.ts | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/utils.ts b/lib/utils.ts index add09782..f336c144 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -175,6 +175,8 @@ export const fields = [ "hidepay", "lud16", "memoPrompt", + // a v3-migrated account: the names registrar owns this name for receiving + "migrated", "npub", "picture", "prompt", diff --git a/lib/whitelist.ts b/lib/whitelist.ts index 13e4b0dc..c1ac5340 100644 --- a/lib/whitelist.ts +++ b/lib/whitelist.ts @@ -25,6 +25,7 @@ export default [ "locked", "locktime", "memoPrompt", + "migrated", "nip5", "notify", "npub", diff --git a/routes/lnurl.ts b/routes/lnurl.ts index ab9b64f1..58cea541 100644 --- a/routes/lnurl.ts +++ b/routes/lnurl.ts @@ -69,11 +69,11 @@ export default { .toLowerCase(), ); - // Not one of ours? It may be a v3 payment address, which lives at this - // same domain but is served by the names registrar. Hand its response - // through unchanged — the callback it returns is absolute, so the payer + // Not one of ours — or migrated to coinos v3, where the name now lives. + // Either way the names registrar answers for it. Hand its response + // through unchanged: the callback it returns is absolute, so the payer // talks to the registrar directly from here on. - if (!user) { + if (!user || user.migrated) { const name = username.toLowerCase().replace(/\s/g, ""); try { const r = await fetch( diff --git a/routes/users.ts b/routes/users.ts index 572224be..182c43aa 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -318,6 +318,7 @@ export default { "language", "locktime", "memoPrompt", + "migrated", "nip5", "notify", "nsec", -- cgit v1.2.3