aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.ts
Commit message (Collapse)AuthorAgeFilesLines
* users: stamp v3migrated when an account hands its name to v3Adam Soltys3 days1-0/+2
| | | | | | | | | | | `migrated` has been set on every new account since 2023, so it can't tell the names registrar whether an account actually handed its name over. When the account's own session posts the hand-off, also record a server-set `v3migrated` timestamp, and include it in the public user fields so the registrar can require a fresh one before granting the name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU
* security: drop the admin endpoint surface and land pending hardeningAdam Soltys2026-09-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the admin-gated endpoints and the account flags they set, plus a batch of hardening that had accumulated uncommitted in the tree. These were deployed and verified together, so they land as one change. admin surface: - drop POST /hidepay, POST /unlimit and GET /users, their handlers, and the now-unused admin preValidation export - `unlimited` was only ever written, never read; `hidepay` only appeared in output projections. Both flags go, along with their whitelist, public-fields and type entries. request log: - redactBody now recurses. It only masked top-level keys, so a body that nests credentials one level down wrote them to the log in plaintext, and pin fields were not on the list at all. payments: - sendOnchain/build gate `aid` through requireAccount, so a caller can only spend from an account it owns - sendOnchain signs only a tx we composed, matched against a short-lived per-account build receipt - raise xpay retry_for to 60s; route-finding preferred a drained zero-fee hop and burned the whole budget on it. check()'s reversal window keeps its 2x margin. ecash / invoices / webhooks: - resolve a token's mint through the IP-pinning fetcher instead of plain fetch, closing an unauthenticated SSRF path into the internal network - reject non-positive amounts before the balance write - /sign requires the caller to own the address, rather than signing under any address the hot wallet controls - webhook delivery no longer disables TLS verification; the body carries the merchant's shared secret registration: - refuse a username the v3 registrar holds unless the caller's own nostr key is the holder (lib/names.ts) liquid: - honour the deposit kill switch at invoice generation and at credit elements image: - pin 23.3.4 and verify the release tarball checksum Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0112TGi9GGNWqji1XQ5jZRzc
* Let a migrated account hand its address to coinos v3Adam Soltys2026-08-031-0/+2
| | | | | | | | | | | | 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 [email protected] 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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
* read payments from archiveAdam Soltys2026-01-221-5/+5
|
* payment typesAdam Soltys2025-02-261-29/+4
|
* nostr workAdam Soltys2025-01-281-1/+0
|
* handle no zaps caseAdam Soltys2025-01-171-1/+1
|
* test for userAdam Soltys2025-01-141-1/+1
|
* public fieldsAdam Soltys2025-01-141-21/+3
|
* use strfry scanAdam Soltys2025-01-141-1/+21
|
* remove salt and cipherAdam Soltys2025-01-071-2/+0
|
* check for userAdam Soltys2024-12-311-2/+2
|
* user picture and aboutAdam Soltys2024-12-311-1/+20
|
* bip21 message fieldAdam Soltys2024-12-221-1/+1
|
* lintAdam Soltys2024-10-231-40/+41
|
* subscriptionsAdam Soltys2024-10-191-0/+8
|
* use cached event for tagsonlyAdam Soltys2024-10-111-4/+5
|
* follow countsAdam Soltys2024-10-101-0/+11
|
* 2s maxwaitAdam Soltys2024-10-101-6/+0
|
* nostr revamp wipAdam Soltys2024-10-101-0/+6
|
* wip socket communicationAdam Soltys2024-10-101-1/+1
|
* getpayment helperAdam Soltys2024-10-011-1/+7
|
* translations helperAdam Soltys2024-09-231-0/+3
|
* account update and deleteAdam Soltys2024-09-181-1/+1
|
* nwcAdam Soltys2024-09-161-1/+3
|
* refactor rpc helper, accounts endpointsAdam Soltys2024-09-081-1/+0
|
* typescriptAdam Soltys2024-08-261-0/+160