<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinos-server.git/scripts, branch master</title>
<subtitle>coinos server — legacy coinos.io backend (Lightning, on-chain, Liquid)</subtitle>
<id>https://git.coinos.io/coinos-server.git/atom?h=master</id>
<link rel='self' href='https://git.coinos.io/coinos-server.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/'/>
<updated>2026-10-08T19:03:38Z</updated>
<entry>
<title>analytics-geo: read rotated request log chunks</title>
<updated>2026-10-08T19:03:38Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-10-08T19:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=621cb7b6ae6655db60971f248d2e799dbb8c4b3d'/>
<id>urn:sha1:621cb7b6ae6655db60971f248d2e799dbb8c4b3d</id>
<content type='text'>
Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>scripts: stubborn peer-force LN payer + boltz stuck-swap recovery</title>
<updated>2026-08-27T22:19:52Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-08-27T22:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=0080e6231cd5f23dfb9260e1a846153b01904903'/>
<id>urn:sha1:0080e6231cd5f23dfb9260e1a846153b01904903</id>
<content type='text'>
Add scripts/pay-hard.ts: a payment helper for well-connected but inbound-scarce
destinations (exchange nodes) that cost-first payers (xpay/renepay) can't reach.
When the normal xpay attempt fails, it enumerates the destination's peers, keeps
the ones we can reach (preferring peers we already channel with enough outbound),
and for each builds a route forced through peer-&gt;dest with the invoice's correct
final CLTV, probes it with an unclaimable random hash, and pays through the first
path that reaches the destination. Probe-before-send, refuses to start with a
payment already pending, and stops rather than risk a second in-flight payment.
Works against either the main node (cl) or the boltz node (bcln).

Add scripts/boltz-recover-stuck.ts: a cron watcher that finds submarine swaps
stuck at invoice.pending (lockup confirmed, invoice unexpired, idle past a
threshold) and runs pay-hard against bcln to complete them, then lets boltz
reconcile (restarting it only if it hasn't picked up the preimage within a grace
period).

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01DKkev76U4YRnRAqM6jqbae
</content>
</entry>
<entry>
<title>scripts: add lightning-backlog audit + kvrocks archive merge tooling</title>
<updated>2026-08-22T15:46:47Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-08-22T15:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=9abbb87e290dc7e6749e116fbeb9a0a153c581bc'/>
<id>urn:sha1:9abbb87e290dc7e6749e116fbeb9a0a153c581bc</id>
<content type='text'>
audit-lightning-backlog.ts walks settled invoices from the stored pay_index to
surface receives the listener may have missed crediting (companion to the
listener backlog probe). merge-kvrocks-archives.ts overlays one Kvrocks/Redis
archive onto a base without materializing keys in memory (raw SCAN to survive
cursors beyond JS safe-integer range), with kvrocks-merge-lowmem.conf as the
low-memory server config for the merge. All parameterized via CLI flags; no
embedded hosts or secrets.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01XiwgmQKwKnRxUmVDd4xSf7
</content>
</entry>
<entry>
<title>scripts: add dedup-invoices cleanup for already-duplicated :invoices</title>
<updated>2026-06-18T15:27:11Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-18T14:41:21Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=fbf0c4f45249875b0b95eeb1beedd811b176a245'/>
<id>urn:sha1:fbf0c4f45249875b0b95eeb1beedd811b176a245</id>
<content type='text'>
The source fix (LPOS guard in generate()) stops NEW duplicate entries but
doesn't remove the ones already accumulated. This one-time script scrubs
them: scans every &lt;id&gt;:invoices list and removes duplicate ids, keeping
each id's original creation-order position. Dry-run by default; pass
--apply to write. Idempotent.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>scripts: add wiped-history audit and rebalance-economics model</title>
<updated>2026-06-13T21:21:53Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-13T21:21:53Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=03f68bedddb18e92b487cc6c1358225ce9b40fe6'/>
<id>urn:sha1:03f68bedddb18e92b487cc6c1358225ce9b40fe6</id>
<content type='text'>
audit-wiped-history.ts (read-only) finds accounts whose :payments index
was wiped by the changeid bug — balance&gt;0 with empty history in both db
and arc. rebalance-economics.ts models whether the lightning-&gt;liquid
bridge throughput is fee-positive against on-chain rebalance cost.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>analytics: missing-history audit + lightning-&gt;liquid arb finder</title>
<updated>2026-06-04T19:14:15Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-04T19:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=be896868de55ef82b268d8c9f92c3f0ba857fed8'/>
<id>urn:sha1:be896868de55ef82b268d8c9f92c3f0ba857fed8</id>
<content type='text'>
audit-missing-history.ts: read-only audit classifying every user's payment
history as clean / recoverable (record in arc not db) / lost (gone from
both). Full-scan finding: of 6,330 users with history, 77% are "arc-only"
which is the NORMAL archived state — the payments route reads via gf()
(archive fallback) so those render fine in the app. True loss is 58 users
/ 59 records (0.02%). So there is no widespread history loss; "missing
history" reports are almost always either dropped receive-callbacks
(record never written, like apk403's 1100 sats) or one of the rare 59.

ln-liquid-arb.ts: finds users funding via lightning and withdrawing via
liquid (the pattern draining the liquid hot wallet / forcing threshold
cuts). Reports per-user through-flow + net liquid drainers.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>analytics: --csv flag for month-over-month trend tracking</title>
<updated>2026-06-04T07:42:15Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-04T07:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=3db24424438322c3b341623456bd235ae64f98a1'/>
<id>urn:sha1:3db24424438322c3b341623456bd235ae64f98a1</id>
<content type='text'>
Appends one metrics row per run to a CSV (header written if file is new):
date, users, MAU/WAU, payments, volume, custody, fee revenue, bolt12
recipients, and per-type volume/txn columns. Notice goes to stderr so it
doesn't pollute the saved stdout report or --json output. Drives the new
monthly snapshot cron (~/scripts/analytics-cron.sh).

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>analytics: monthly insight reports + signup instrumentation</title>
<updated>2026-06-04T06:10:20Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-04T06:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=183a3cb03e9ca04a0b1433fa2850a47747de00d6'/>
<id>urn:sha1:183a3cb03e9ca04a0b1433fa2850a47747de00d6</id>
<content type='text'>
scripts/analytics.ts — streams live db (SCAN, never KEYS) and reports for
a trailing window (default 30d): MAU/WAU, new users, custody total + top
holders, network volume by type (lightning/liquid/bitcoin/internal/bolt12/
fund), most-active and highest-volume users, and bolt12 recipients with a
"regular" flag for the Ocean mining-reward stream.

scripts/analytics-geo.ts — top countries from the request log. Counts only
/login + /register events tied to a username (raw cf-ipcountry volume is
dominated by datacenter/nostr traffic). Surfaces a distinct-IP-per-country
column so proxy/VPN egress is visible, and filters a known credential-test
bot IP. Honest result: US #1, then GB/CA/JP/DE/ES/BR.

lib/register.ts — stamp `created` (ms epoch) and store `country` (CF/
ipregistry code) on new users, so future reports get real signup timing and
geography from the db directly instead of log archaeology. Existing users
predate this; backfill is out of scope.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>catch reverse errors</title>
<updated>2026-03-17T05:53:11Z</updated>
<author>
<name>Adam Soltys</name>
<email>asoltys@gmail.com</email>
</author>
<published>2026-03-17T05:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=4f4e008cad9a30251926aa060f47583734ce32d2'/>
<id>urn:sha1:4f4e008cad9a30251926aa060f47583734ce32d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>adjust ln minfee</title>
<updated>2026-03-15T22:49:17Z</updated>
<author>
<name>Adam Soltys</name>
<email>asoltys@gmail.com</email>
</author>
<published>2026-03-15T22:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=74af7b1d0922e740c0358dfd131776fd7c877767'/>
<id>urn:sha1:74af7b1d0922e740c0358dfd131776fd7c877767</id>
<content type='text'>
</content>
</entry>
</feed>
