aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* coinosv3: migrate batches follow the manager's own coin order.HEADmasterAdam Soltys23 hours1-0/+0
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* migrator: board the float from any wallet (finds the board output in the ↵Adam Soltys23 hours3-5/+21
| | | | | | | | | funding tx). The funding tx for the float's board comes from an ordinary wallet, which may put change first. /admin/board remembers each board's address and amount; /admin/board/complete looks the tx up on esplora, finds the output paying exactly that to that address, and boards from that vout (409 until esplora has seen the tx). e2e: the float board is funded with change first (vout 1) — 20/20 pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* migrator: moves wallets' Spending coins off the retired ark.coinos.io to ↵Adam Soltys23 hours4-0/+381
| | | | | | | | | | | | | ark2.coinos.io. ark.coinos.io's server key was stolen in the 2026-12-04 breach. The app (coinosv3 5bf43a1) now points "coinos" at ark2.coinos.io and, for a wallet still holding coins on the old server, asks this service for a deposit address there (a key of its own per migration, so each payer is known), sends the coins, and gets the same amount paid on ark2 from this service's float. Payouts are crash-safe the way the names forwarder's are (in-flight record before the send, the float wallet's own send record decides on retry). Bounded against the stolen key (whoever holds it can co-sign a second spend of their own old coins): boarding is off on the old server, each migration over maxSat and all of them past dailySat per UTC day wait for an admin release. Admin: summary, release, and boarding on-chain coins into the ark2 float. migrator/e2e-test.js runs it on regtest against two captaind 0.8.0-coinos servers: happy path, wrong-server destination refused, cap hold + release, restart without double payment, and the app's migrate.js sending several coins in batches — all 19 checks pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* feed: every relay ask ends at its maxWait, and crawlers wait up to 7.5 s.Adam Soltys39 hours2-1/+4
| | | | | | | Measured after a restart: a link-preview crawler still got the plain page after 6 s, because nostr-tools starts maxWait only once a socket is open and a relay slow to connect held the build open. query() now stops at maxWait from the ask itself; a cold post page built for TelegramBot in 3.7 s (was over 6 s), a browser still gets its page at 0.65 s. BOT_BUDGET_MS 7.5 s covers a reply's three rounds (2.5 + 2.5 + 2 s); nginx on cs allows the note/profile routes 10 s (was 3 s, which cut crawlers short). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* feed: a link-preview crawler waits up to 6 s for a post's page, so the ↵Adam Soltys39 hours3-3/+40
| | | | | | | | | shared card shows the post. "can we add some meta tags that would show a better title/description/content preview for posts when i link to them on social media?" (Adam, 2026-12-04, with a Telegram card for his fresh nevent link showing the generic Coinos card). The post pages already carry the author as og:title, the text as og:description and the post's picture or the author's face as og:image, but a post the server hadn't cached got 500 ms (profiles 2 s) before the plain page went out, and a post shared right after it was written misses that: Telegram fetched it once and kept the site's card. Link-preview crawlers (Telegram, X, Facebook, WhatsApp, Slack, Discord, LinkedIn, Mastodon & co, search bots: isPreviewBot) now get up to 6 s; people keep the short wait. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: /lnurlp-fetch fetches a Lightning address's pay parameters for a ↵Adam Soltys39 hours3-1/+94
| | | | | | | | | browser that can't. "another thing is coinos cannot reach speed.app wallet, not sure why" (Shark, relayed by Adam 2026-12-04). speed.app answers /.well-known/lnurlp/<name> with a 301 to appapi.tryspeed.com that carries no Access-Control-Allow-Origin, and a browser won't follow a cross-origin redirect without it: from v3.coinos.io the fetch fails ("Failed to fetch"), though the target itself allows any origin. GET /lnurlp-fetch?url=https://<host>/.well-known/lnurlp/<name> fetches it server-side with the link previews' guards (public hosts only, rechecked after every redirect, capped body), https only, that one path only, and returns the pay parameters (200), the host's own error (404) or 502. Rate-limited, cached 5 minutes (30 s for failures). New lnurl-proxy.test.js passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: a Lightning address callback with a second "?" still finds the name.Adam Soltys39 hours3-0/+34
| | | | | | | "Payment failed: Unable to generate invoice from [email protected] (HTTP 500: Error processing request: HTTP error! status: 404)" from aqstr.com (Shark, relayed by Adam 2026-12-04). Some LNURL clients add the amount with "?" instead of "&", so our callback "cb?domain=coinos.io" arrived as "cb?domain=coinos.io?amount=21000": the domain read as "coinos.io?amount=21000", no name matched, and the payer got 404 "unknown address". On /lnurlp/ and /.well-known/lnurlp/ paths a literal "?" inside the query is now read as "&" (a real one in a value arrives encoded as %3F), and the first occurrence of a parameter wins. New lnurl-params.test.js passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: /migrate-grant needs a fresh v3 hand-off stamp from coinos.io.Adam Soltys3 days4-1/+76
| | | | | | | "Fix the gap" (Adam, 2026-12-02). The reverted check keyed on `migrated`, which coinos.io has set on every new account since 2023, so it stopped nothing (c851718). coinos-server 796999cb now records `v3migrated`, a timestamp set only when an account's own session posts the hand-off, and shows it on /api/users/<name>. The grant follows within seconds, so it goes ahead only when that stamp is under 5 minutes old. That is the same proof as carrying the old account's session to /api/me, without sending coinos.io JWTs (no expiry, no revocation) to this host. A name handed over earlier can't be re-granted to a different key unless its owner hands it over again. Refused: stale, future-dated or missing stamp (409); no such account (404); coinos.io unreachable (502, the caller retries). migrate-check.test.js runs in `bun run test` (18 pass). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU
* Revert "names: /migrate-grant only hands over a name whose coinos.io account ↵Adam Soltys3 days3-48/+0
| | | | | | | | | has migrated." The legacy `migrated` flag is set on nearly every coinos.io account (295 of a 299-account sample), so the check stopped almost nothing and only made grants depend on a second call to coinos.io. The hole itself is closed in coinos-ui (374afce1: the name comes from the session, not the form). A real second check would have the grant carry the old account's session for the registrar to verify against coinos.io/api/me. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: /migrate-grant only hands over a name whose coinos.io account has ↵Adam Soltys3 days3-0/+48
| | | | | | | | | migrated. "check with the coinos-server agent on desk about the migrate hole. We should fix the issue and get it reenabled" (Adam, 2026-12-02). The bearer token proves the caller is coinos.io, not that the name's own account asked for the grant. The grant now also asks coinos.io for the account and goes ahead only when it exists and is flagged migrated; the old account's session flags itself just before it calls the grant, so a legitimate migration passes. It refuses with 404 when there's no such account, 409 when it hasn't migrated, and 502 when coinos.io can't be asked (the caller retries). New migrate-check.test.js passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: a free Santa hat for everyone through December. "Let's add a free ↵Adam Soltys4 days1-2/+37
| | | | | | | Santa hat to the hat shop for everyone. Available only through the month of December." (Adam, 2026-12-01). POST /hats/free (NIP-98) grants and wears a free seasonal hat while its season is on; /hats/<pk> lists the hats free right now (free: ['santa']). December runs from the moment it is December 1st anywhere (UTC+14) to the last moment it is December 31st anywhere (UTC-12), every year. A hat taken stays in the rack after the season; out of season /hats/free refuses it. The operator grant accepts it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6WoqaQDYdpWkatPCar
* names: POST /admin/forget-key removes everything a key holds, as Delete my ↵Adam Soltys10 days1-0/+28
| | | | | | | account does for its own signer. For the 528 @coinos.io names an attacker took on 2026-11-24 through the old site's /migrate hole (its grant trusted the form's username), all held by one key: the names go back to unclaimed with their grants and DNS records. Refused while sats are owed to the key's names; dryRun reports what would go; the removed records come back for the operator's file. Approved by Adam 2026-11-25 ("Yes to all 3"). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* coinosv3 pin 2cd42f8 → b23b02b: the float's arkoor sends split dust the ↵Adam Soltys10 days1-0/+0
| | | | | | | way its server wants it (old rule on captaind 0.8.0, 0.9.0's once ArkInfo field 23 appears) and its renewals check their new coins before forfeiting (bark !2803). Needed before ark.coinos.io moves to 0.9.0, which refuses the old split in two shapes. names tests pass; selection against the live float state unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* names: float consolidation skips a merge that can't pay for its round. Once ↵Adam Soltys12 days1-1/+5
| | | | | | | upkeep ran again (f27c49c) the 92 small coins tripped consolidation, whose 64 smallest came to 259 sat against a 301-sat round fee: refused, and asked again every minute. Sends gather largest-first, so dust never decides whether one fits; the merge now waits until the coins it would take clear the fee and the 330-sat floor. Checked on the live float state (skip: true); names tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* coinosv3 pin 73bffd9 → 2cd42f8: the float runs the wallet code the app ↵Adam Soltys12 days2-28/+18
| | | | | | | | | | | runs. "Test it and bring it up to speed" (Adam, 2026-11-24, after the depth-cap outage of f27c49c). The pin was from 2026-10-16; since then src/ark gained the exit-depth cap (read from the server, field 19) and the deep-refresh waiver (field 3 of the refresh fees), refunds that come back through the mailbox to any key the wallet handed out, orphan HTLC coins settled by the server's answer, a send input cap of 48 instead of 24, and refreshes no longer retired for an expired input. The opt-in parts (honorsExpired, lnOldestFirst, infoHint, custody tiers) stay off: names passes none of them. Every ArkManager method names calls keeps its signature. With the cap in the library, f27c49c's selection wrapper goes. Float upkeep now flattens the library's deepCoins() — depth ≥ 60, where the server waives the 300-sat base fee — in a round of their own (the waiver needs every input deep), on a 2-minute cadence while there are enough of them to make a round; coins nearing expiry go in the next one. Names logs it if the server ever stops publishing a cap. Checked offline against the live float state with the live server info: balance matches /health (248,956 spendable, 13,934 renewing); sends of 52 to 150,000 sat pick coins at depth ≤ 26, none capped; upkeep does nothing now (26 deep dust coins, 152 sat, can't make a round) and flattens the main 66,315-sat coin with them for 133 sat once its chain reaches depth 60 (59: nothing). names and bridge tests (25), public-feed-cache-test, and a parse of names, bridge, feed and translate pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* names: float forwards skip coins at the exit-depth cap and refresh them. "I ↵Adam Soltys12 days1-10/+54
| | | | | | | think there's an issue with the lightning forwarder can you look into it? I've got reports of missing deposits" (Adam, 2026-11-23). From 2026-11-24 00:09Z every forward under 13,661 sat failed: the float's wallet code (the coinosv3 submodule, from 10-16, older than its own cap check) picks the smallest coin that covers a send, and that was a 13,661-sat change chain at exit depth 100, where the ASP refuses every cosign ("refresh the VTXO in a round"). Nine forwards (14,816 sat) sat queued, retried every minute. Float sends now leave coins at the cap out of selection, and upkeep refreshes coins within 8 hops of it right away (2-minute cadence while there are any, dust riding along). Upkeep had not run at all since 2026-10-27: five 1-sat test sends sat 'registered' with a permanently refused mailbox notice, and any open action holds the round. Those are now closed as forwardOnce already closes the ones made for a payment. Checked against the live float state: before, a 381-sat send picked the depth-100 coin; after, every queued amount picks an 81,184-sat coin at depth 12, and the capped coin is still free for the refresh. names tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* names: LUD-21 verify for invoices our node mintsAdam Soltys12 days1-1/+19
| | | | | | | A name's LNURL-pay callback now returns a `verify` URL when the invoice comes from our node (the recipient's wallet was not listening), and GET /lnurlp/verify/<hash> answers {status, settled, preimage, pr} from CLN. The v3.coinos.io/<name>/receive pay page (coinosv3) polls it to say "Paid". An invoice the recipient's own wallet minted has no verify URL: only that wallet knows when it is paid. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* home.paff.club: negative answers kept 30 s, not 5 minAdam Soltys2026-11-201-1/+1
| | | | | | | | | | A node's certificate challenge (a TXT record) asked for before it's there is NXDOMAIN, and resolvers kept that for the SOA's 300 s: 1.1.1.1 went on answering 'no such name' for a minute and a half after the record was up, and Let's Encrypt failed a phone's certificate on it (2026-11-20). Changed in the live zone with knotc too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6U6NfdUu76mpuZySaf
* home.paff.club on our Knot DNS tooAdam Soltys2026-11-204-0/+20
| | | | | | | | | | | | PAFF gives every node a name under home.paff.club (an A record to its home network address, and the ACME challenge TXT for its certificate). Those were records in paff.club's Cloudflare zone, which is on the Free plan: 153 nodes and 37 challenges filled its 200 records and new names failed (error 81045). Adam approved moving them like the BIP-353 records (2026-11-20). The zone is signed here and served by ovh2; PAFF's names service updates it with its own TSIG key, paff-names, which the ACL lets change only A and TXT records in this zone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6U6NfdUu76mpuZySaf
* names restarts itself when the Lightning node's socket goes stale. "tried to ↵Adam Soltys2026-11-204-6/+89
| | | | | | | zap pnk but it said names.coinos.io could not create an invoice" (Adam, 2026-11-20). bcln was recreated at 04:26Z; names has the node's socket file mounted, the mount kept pointing at the old file, and every @coinos.io LNURL invoice failed with ECONNREFUSED for four and a half hours until names was restarted by hand. The same thing cost 13 hours on 2026-11-11. The socket client now counts refused connections: after a minute of nothing but refusals (ten minutes if this process never reached the node, so a node that is down doesn't restart names in a loop) names logs it and exits, and docker's restart mounts the new socket. Only the mainnet node does this; the mutinynet one is left alone. New bridge/ln.test.js passes (4 checks), with the store and forget tests. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg
* dns-migrate: backfill names without a Cloudflare record idAdam Soltys2026-11-161-1/+3
| | | | | | | paff.club names claimed while it had dns:false (16 of 68) never got a record id, so backfill skipped them; on a knot domain every name with a URI belongs in the zone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
* BIP-353 for paff.club on our Knot DNS too. paff.club's Cloudflare zone is on ↵Adam Soltys2026-11-164-0/+10
| | | | | | | the Free plan (200 records) and hit its quota (error 81045), so its names had no TXT records (dns:false since 2026-11-16). Adam approved moving them like coinos.io's (2026-11-16): zone user._bitcoin-payment.paff.club on the cs primary and the ovh2 secondary, delegated from the paff.club zone with NS dns1.coinos.io + DS. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
* dns-migrate: an optional domain argument (rehearse cf-cleanup on ↵Adam Soltys2026-11-151-1/+4
| | | | | | | staging.coinos.io first) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
* dns-migrate check: Bun returns a long TXT record's character-strings as ↵Adam Soltys2026-11-151-1/+3
| | | | | | | separate entries; join them all (the 2,409 'mismatches' were 615-byte URIs split at 255, stored correctly in Knot) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
* BIP-353 records move to our own DNS: Knot on cs, served from ovh2. "just ↵Adam Soltys2026-11-1513-6/+412
| | | | | | | learned cloudflare may have a quota on how many names we can register on dns so is that going to foil our plans to give everyone a bip353 payment address?" … "yeah build it on cs don't worry about the fallback just get it working with our knot dns" (Adam, 2026-11-16). coinos.io's Cloudflare zone (Pro) was at 3,038 of its 3,500 records with one TXT per name and about 35 names claimed a day. user._bitcoin-payment.coinos.io and user._bitcoin-payment.staging.coinos.io get delegated (NS + DS in Cloudflare) to Knot DNS, so there's no record quota. The `dns` compose service on cs is the hidden primary: it signs both zones (ECDSA P-256, NSEC3 without iterations, the KSK fixed because its DS sits in Cloudflare) and listens on cs's Tailscale address only, because the house router forwards nothing to cs. ovh2 runs the public secondary (dns/secondary.conf, dns1.coinos.io), notified and transferred over Tailscale with a TSIG key, so names keep resolving while cs is down. The registrar sends RFC 2136 UPDATEs signed with TSIG hmac-sha256 over TCP (names/dns-update.js) for domains with `knot` in its config. It replaces a name's TXT RRset whole, removes it on release and on account deletion (forgetAccount now hands back the name), and deletes a name's leftover Cloudflare record as it rewrites it. names/dns-migrate.js does the one-shot moves: backfill, check, cf-cleanup. dns/README.md is the runbook. Tested against Knot 3.4.11: updates land signed, a 700-byte URI spans several TXT strings, a wrong key gets NOTAUTH and an out-of-zone name gets NOTZONE. bun test names/ passes (21, with the new dns-update tests) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
* names: a domain may have no DNS records (dns: false in its config). ↵Adam Soltys2026-11-151-1/+11
| | | | | | | paff.club does: every browser's PAFF tipping wallet claims a name there, the zone reached Cloudflare's record quota ("Record quota exceeded", 81045) and every new claim failed, its 500 answered without CORS so the browser only saw a CORS error; while the records were never usable there, DNSSEC being off. Its names stay LNURL and NIP-05; a record kept from before is removed as its name updates Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VeUVDmcp6GPSFWPwT
* names: a withdraw-link claim with no route right now is tried again for up ↵Adam Soltys2026-11-142-8/+79
| | | | | | | to ten minutes. "I made a transaction for 1,000,000 sats using the Withdraw link method, but they never arrived" (a user via Adam, 2026-11-14). The claim's invoice sat behind a private channel; at that moment this node's own channels couldn't carry 1M ("could not find a usable set of paths", answered in a tenth of a second), so the payout failed at once and the sats went back on the link, while the claimer's wallet, told OK as LUD-03 has it, waited for nothing. Minutes later a route was there. Now a payout to another node that definitely failed (no part pending or complete) is paid again after 30 s, 90 s, 3 min and 5 min, as long as the invoice has a minute to spare; the claim stays 'paying' meanwhile and settlePending leaves it alone. Reclaims are not retried (the creator is waiting on them). The claim's view carries tries, so the app can say it's still trying Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
* names: a float send the mailbox refuses for good counts as delivered, once. ↵Adam Soltys2026-11-141-0/+18
| | | | | | | "can we do something to stop it logging at least?" (Adam, 2026-11-14), of "forward retry failed for [email protected] (21 sat, try N): float send for this payment still unresolved — not paying again" every minute. [email protected]'s ark address carries a blinded mailbox id that isn't a point (64bbbb…), so after the server cosigned and registered the arkoor to the recipient's key, PostArkoorMessage answered status 3 "invalid a blinded VTXO mailbox identifier" and the action sat at 'registered' for good: the forward refused to pay twice, and floatUpkeep/consolidateFloat (held while any action is open) stopped. Now such an action is closed as done (undelivered: the reason), the payment is recorded delivered, and one line says it went without a notice Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
* names: paff.club, a domain without the coinos welcome DM. Each PAFF node ↵Adam Soltys2026-11-121-2/+4
| | | | | | gets a lightning address and NIP-05 under paff.club from this registrar (Adam, 2026-11-12: "re-use the same name server that's on the cs machine for v3 and let it handle paff.club name lookups"). A domain's config entry may say welcome: false; paff.club does, since a node claims its own name and there's nobody to greet Co-Authored-By: Claude Opus 5.5 <[email protected]>
* names: delete my account. "someone's asking for a way to delete their v3 ↵Adam Soltys2026-11-105-1/+224
| | | | | | | account. we allowed that in v2. i guess we'd want to free up the name once the deletion is done and remove any records we have on them on the server" (Adam, 2026-11-10). POST /account/delete, NIP-98 signed: the signer's account is its key, the names it owns or manages, and those names' other key (a login identity's name is kept by its wallet's key). Everything filed under them goes: the names (DNS record, node offer), custom offers, POS tokens and sales, hats and hat invoices, the welcome mark, Lightning receipts, migration grants (which would otherwise keep the name reserved for the key that left), queued webhooks, closed and never-funded withdraw links. Then the notifier is told (POST /forget with the shared notify token): the devices registered to be told about those keys lose their registrations, NWC wakes included, and the keys' scheduled posts are dropped. Money is never deleted: while sats are queued, parked or in flight to them, or an open withdraw link of theirs still holds some, the answer is 409 "funds" with the amounts; { check: true } asks without doing. Kept: what stops a payment being made twice (delivered, withdrawPaid, inflight) and the unpaid-invoice map, which ages out in a week. names/forget.js + forget.test.js; run against both real services on throwaway state Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6V74NSFWZtNtgCfokN
* nwcpush: a claim says when the request was already answered, can be handed ↵Adam Soltys2026-11-101-3/+23
| | | | | | back, and /publish returns once one relay has the reply. A background zap's worker asked /answered, then (after starting the wallet) /claim, one after the other, and then sat in /publish until the slowest of three relays answered — about four seconds after its payment had settled. /claim now refuses a request that already has a reply with {ok:false, answered:true} (old workers read ok:false and stand down, as they should), takes {release:true} from a holder that can't make good on it (the wallet's server unreachable), and /publish marks the request answered at once, answers after the first relay's word and logs how long the first and the last took Co-Authored-By: Claude Fable 5.2 <[email protected]>
* names: prepaid Lightning withdraw links (LNURL-withdraw, LUD-03). "Do we ↵Adam Soltys2026-11-073-0/+446
| | | | | | | have lnurl withdraw links somewhere? can we add them?" → "Prepaid" (Adam, 2026-11-07). A self-custodial wallet asleep in a pocket can't answer a withdraw link days later, so the creator pays the whole amount up front (POST /withdraw/new → a CLN invoice for sat × uses; the settle loop, or the creator's POST /withdraw/funded checking listinvoices, opens the link) and this service pays each claim out of that reserve: GET /w/<id> serves the withdrawRequest (up to the per-claim amount, never past what's left), GET /w/<id>/cb?k1&pr pays it — a plain pay with the routing fee capped at max(10 sat, 1%) and borne here, or, for an invoice on this very node (any coinos wallet's Lightning receive), round the float top-up's circular route, read back with waitsendpay. The reserve is taken before a payment starts and handed back only on a definite failure; an unknown outcome stays reserved for a minute-ly listsendpays check. No invoice is ever paid twice, one claim per link at a time. The creator lists theirs (GET /withdraw/mine) and takes back the remainder with an invoice of their own (POST /withdraw/reclaim), which closes the link first and reopens it if that payment fails. All NIP-98 by the wallet key. Mainnet and (play money) mutinynet, on the hat stand's nodes. names/withdraw.test.js covers it against a fake node Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
* nwcpush only pushes to push services and public hosts. A subscription is ↵Adam Soltys2026-11-061-0/+56
| | | | | | | whatever a stranger POSTs to /register, and delivering one is this server making a request to the URL in it: unchecked, anyone could point it at an address inside our own network — an interactsh (oast.pro) probe registered one under the coinos service key (2026-11-06). Now a browser subscription must name a browser push service (FCM/jmt Google, Mozilla, Apple, Windows); a UnifiedPush endpoint must be https on a public host, its name re-resolved at send time (a name can be re-pointed after registering) and refused if any address is private, loopback, link-local, CGNAT or multicast, with redirects not followed; an fcm: endpoint must be a token. /register refuses the rest (400); at delivery a failing endpoint counts as dead (410) so stored ones are dropped, except a name that merely didn't resolve just then (503, kept). Audited against the live registrations: 760 kept; dropped are the probe, example.com, a 10.x ntfy, an IP-literal private endpoint, two hosts that no longer resolve and one unparseable endpoint Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
* nwcpush delivers to Firebase Cloud Messaging for the Android app that runs ↵Adam Soltys2026-11-061-0/+65
| | | | | | | the wallet in its own WebView. That app hands the web app "fcm:<token>" where a UnifiedPush endpoint would go (the same ?up= road), so the device registers exactly as a UnifiedPush one and only delivery differs: deliver() sends an fcm: endpoint through the FCM v1 API (service-account JWT → OAuth token, cached for its hour) as a data message whose `body` is the same JSON payload, priority HIGH for urgent pushes, TTL carried over. A token the app no longer holds (404 / UNREGISTERED) is reported as 410 so the registration is dropped. Needs CFG.fcm.serviceAccount (path to the Firebase service-account JSON); until it's set, fcm: deliveries fail as 503 and are kept Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
* names: a wallet on another ark server says it is listening, and its queued ↵Adam Soltys2026-11-031-4/+35
| | | | | | | Lightning deliveries go now. A name whose wallet lives on Second (or a custom captaind) can only be paid over Lightning, and only while the wallet is open to answer the registrar's offer request — the float can't arkoor to a server it isn't on — and the queue's hourly retry with its six-second window rarely overlapped a short phone session: manna's 52 sats failed 449 times from 2026-10-18 to 11-03. POST /listening (NIP-98) marks every queued forward for the caller's names due now and runs the retry pass at once (or again, when one is mid-flight); the answer says how much is waiting. The app calls it once its offer listener is up (coinosv3, same day) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6TFgisGKUDhdStLUvs
* names: GET /pos/invoice/<hash> tells a terminal whether its sale settledAdam Soltys2026-10-301-0/+9
| | | | | | | | | A terminal in the field sat on "Waiting for payment" with its websocket open the whole time while the registrar credited the sale and pushed the payment frame. The firmware now polls this while it waits, so a socket that stays up but goes deaf can't strand a paid sale. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* names: GET /hats/worn lists every head wearing a hat (a couple of dozen), so ↵Adam Soltys2026-10-291-0/+13
| | | | | | | coinos holds the whole list and a face it has never seen gets its hat in the first paint instead of after a per-head lookup Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6TUeqTyZB8eXLGymUY
* nwcpush: scheduled posts. POST /schedule holds a signed kind-1 note whose ↵Adam Soltys2026-10-291-0/+94
| | | | | | | created_at is in the future (2 min to 90 days, 50 per author, 64 KB) and publishes it at that time to the author's relays plus ours, retrying with backoff for up to a day; GET /schedule/status?ids= says which are still held; POST /schedule/cancel takes a kind 5 by the same key and drops them before they reach any relay. Kept in data/scheduled.json Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6TUeqTyZB8eXLGymUY
* nwcpush: POST /decline holds a worker's "wait" reply and sends it only if ↵Adam Soltys2026-10-281-1/+33
| | | | | | | | nobody answers the request in afterMs (5–60 s); NWC wake pushes live 600 s at APNs instead of 120 so a phone on a patchy signal gets the wake late rather than never A worker that can't act on a request (mirror short of keys or coins) wakes the user and, through this, tells the other app to look the request up later — PullCap read the silence as "no answer" and suspended the subscription (2026-10-26). A sibling device or the woken user may still pay inside the window; their real reply wins and the error never lands on a payment. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* names: /admin/parked — deliver a parked payment to the name its owner ↵Adam Soltys2026-10-271-0/+31
| | | | | | | holds now, or write it off (state.writtenOff keeps the record) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: a payment for a released name with no key to follow is parked, not ↵Adam Soltys2026-10-271-1/+4
| | | | | | | retried (and paged on) forever Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: nothing goes out that didn't come in, and no key gets more than 1.5M ↵Adam Soltys2026-10-271-11/+33
| | | | | | | | | | | | | | an hour without a person - forward() refuses (parks) any delivery not backed by this node's own invoice for that payment hash, paid, for at least the amount — whatever path asked (settle loop, retry tick, /admin/forward) - a key past 1.5M sat delivered in the trailing hour has its next deliveries wait in the queue (ALERT line in the log; the desk monitor pages on a queue older than 30 min) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: a float send that threw is looked up before the payment is tried againAdam Soltys2026-10-271-2/+20
| | | | | | | | | | | | The float wallet keeps every send as an action. forward() records the send it is about to make (destination, amount, start time) before making it; a later try finds that action: done = delivered, failed or never started = go again, anything else = still unresolved, wait. Before, a send that threw after its cosign landed (the coins moved, the answer didn't) was queued and paid a second time. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: one payment, one delivery — an idempotency record and a per-payment ↵Adam Soltys2026-10-271-8/+37
| | | | | | | | | | | | | | | | | lock around forward(), the first try queued before it runs - state.delivered[saleHash] is saved once a delivery succeeds; any later caller (retry tick, settle loop, /admin/forward) returns without paying - a sale already being delivered refuses a second concurrent caller (stays queued) instead of racing it - the settle loop queues a payment BEFORE its first try, so a restart mid-delivery no longer loses it (the retry finds it; the records keep it from paying twice) - the retry tick no longer overwrites the queue with its snapshot (it dropped payments queued while it ran) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: hold the second key of the double-payout claims (safeguard01 / ↵Adam Soltys2026-10-271-1/+2
| | | | | | | user42a0887a / sloperated) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* names: a Lightning delivery that timed out is never paid again while it's ↵Adam Soltys2026-10-271-0/+42
| | | | | | | | | | | | | | | | still in flight forward() records the payment hash of every Lightning delivery before it pays (state.inflight, keyed by the settled payment). A later try checks it first: complete = delivered, pending = wait, failed or never sent = go again. Before, waitsendpay's 240 s timeout queued the payment while its HTLC was still out, and the retry paid it a second time once the wallet claimed the first. A scripted wallet (usera7fc7e2c, "crit1 … double payout") held its claims to do exactly that on 2026-10-27; its key's forwards are parked for review (HOLD_KEYS). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* messages: two reactors, one per CPU the container getsAdam Soltys2026-10-251-0/+2
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* messages: messages.coinos.io, a Magnitude Relay for the app's private ↵Adam Soltys2026-10-255-1/+96
| | | | | | | messages, inbox lists, calls and group chats; copies down from relay.coinos.io over NIP-77 (the strfry tunnel), never writes into it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
* nwcpush: NWC wake pushes live 120 s at APNs, the request window, so a phone ↵Adam Soltys2026-10-231-1/+1
| | | | | | in deep sleep gets the wake late rather than never Co-Authored-By: Claude Fable 5.1 <[email protected]>
* vmedia: pic.webp?s=row, a picture 360px tall in its own shape for the grid's ↵Adam Soltys2026-10-221-3/+5
| | | | | | justified rows Co-Authored-By: Claude Opus 5.5 <[email protected]>