<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinosv3.git/tools/sp-indexer.js, branch master</title>
<subtitle>coinos v3 — bitcoin, Ark, Lightning and nostr wallet (web + Android)</subtitle>
<id>https://git.coinos.io/coinosv3.git/atom?h=master</id>
<link rel='self' href='https://git.coinos.io/coinosv3.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/'/>
<updated>2026-08-02T02:38:30Z</updated>
<entry>
<title>Simplify: one Lightning path, one balance, fewer features</title>
<updated>2026-08-02T02:38:30Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-08-02T02:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=348a57004f94dd0f58c4e70769e65ca7ea3f7619'/>
<id>urn:sha1:348a57004f94dd0f58c4e70769e65ca7ea3f7619</id>
<content type='text'>
Dropped: silent payments (feature, wallet chains, scan worker, indexer
config), Boltz submarine/reverse swaps (feature + swap.js + tools), the
third-party ark swap bridge (config, client flows, settings card — the
ASP's own Lightning send is the one path now), and the Consolidate
coins settings action.

The NWC pouch is gone with them: background answering now spends the
WHOLE ark balance. The IndexedDB record mirrors the real manager state
plus the chain-3 keys for its live coins and a change-index window; the
worker pays through the ASP exactly like the open app, and the app
folds the worker's spends, change, and key allocations back in on
connect (additive merge + reconcile against the server). A leftover
chain-6 pouch from the short-lived pouch era is swept home
automatically using the keys stored in its own record. The stated
tradeoff: same-origin script access now reaches the ark balance, not a
carve-out — the ark balance is walking-around money, the on-chain
wallet's keys are never mirrored, and per-connection NWC budgets remain
the enforced ceiling.

Bundle: 726KB -&gt; 602KB.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Skip the mempool backlog on startup for large (mainnet) mempools</title>
<updated>2026-06-28T00:38:03Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-28T00:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=97b32b97edea28b72f9be3dd82c468f57f401926'/>
<id>urn:sha1:97b32b97edea28b72f9be3dd82c468f57f401926</id>
<content type='text'>
First mempool pass over a &gt;200-tx mempool would fire thousands of getrawtransaction
calls at the node in a burst. Mark the existing backlog seen and scan only new
arrivals instead; small (regtest) mempools still scan fully.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Catch-up scaling: dust filter + per-block Bloom filters</title>
<updated>2026-06-28T00:17:58Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-28T00:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=56a2736be51d2f35d68ca88b477a948efe3398ce'/>
<id>urn:sha1:56a2736be51d2f35d68ca88b477a948efe3398ce</id>
<content type='text'>
silentpay.js: silentPaymentCandidate() (our P_0 for a tweak) + buildBloom/bloomHas
(double-hashed sha256, ~0.8% FP). Validated: candidate == P_0 on all no-label
vectors.

Indexer /scan now returns, per block, the tweaks + a Bloom over that block's
taproot output keys (no outputs), with an optional dustLimit. The wallet derives
a candidate per tweak, tests the filter, and only fetches /block on a hit — so a
big historical scan costs candidate math + a handful of fetches instead of
downloading and scanning every block. Live WS pushes still carry full items.

SP_DUST_LIMIT defaults to 0 (receive everything; the indexer honors any value).
Verified end-to-end on regtest: the filter flow finds the output.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Gate mempool discovery behind SP_MEMPOOL (default on; off spares a busy node)</title>
<updated>2026-06-28T00:12:22Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-28T00:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=ef183514e078169bf171e29b88c85aa16c8ecc75'/>
<id>urn:sha1:ef183514e078169bf171e29b88c85aa16c8ecc75</id>
<content type='text'>
Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Mempool (unconfirmed) silent-payment discovery</title>
<updated>2026-06-28T00:11:15Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-28T00:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=b0b9a71ef4912350ecf188bf6a75d21e97adc06b'/>
<id>urn:sha1:b0b9a71ef4912350ecf188bf6a75d21e97adc06b</id>
<content type='text'>
Indexer: scan the mempool (getrawmempool + getrawtransaction; prevouts fetched
explicitly since verbosity-2 omits them for mempool txs), track SP-eligible
unconfirmed txs, serve /mempool, and push {type:'mempool'} on change. Switched
Core RPC to node:http (no keep-alive) + serialized calls — Bun's fetch was
dropping sockets under the added mempool load.

Wallet: handle the mempool push and /mempool catch-up (_scanSpMempool) — pending
SP receipts rebuild on each update (also drops RBF'd/vanished ones); block pushes
promote a pending entry to confirmed. So a silent payment shows the instant it's
broadcast, like a normal receive, with no mining.

Verified on regtest: an unconfirmed SP is detected and served; clean logs.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Indexer: SQLite persistence + instant ZMQ hashblock detection</title>
<updated>2026-06-27T23:18:20Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-27T23:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=588159a38bf2a2e9cae4d5b8a8ff7faae8b9ad2a'/>
<id>urn:sha1:588159a38bf2a2e9cae4d5b8a8ff7faae8b9ad2a</id>
<content type='text'>
- Persist blocks/items to SQLite (SP_DB; defaults to in-memory) so the indexer
  resumes instead of re-walking the chain on restart — verified resume-from the
  stored height.
- Subscribe to Core's hashblock ZMQ (SP_ZMQ) via a tiny pure-JS ZMTP/3.0 SUB
  client (no native dep, bundle stays self-contained) to trigger a sync the
  instant a block lands — measured ~200ms end-to-end vs the poll interval. Poll
  remains a backstop.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Push silent payments over WebSocket instead of polling</title>
<updated>2026-06-27T23:03:40Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-27T23:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=4c95ed2826b4dd11555c0500426747571c148dec'/>
<id>urn:sha1:4c95ed2826b4dd11555c0500426747571c148dec</id>
<content type='text'>
The indexer now serves a /ws endpoint and publishes each newly-indexed block's
SP items to subscribers. The wallet subscribes (_spConnect) and scans pushed
items on arrival (_scanSpItems) — folding receipts into the balance instantly —
catching up via /scan on connect/reconnect. Polling for SP is now only a fallback
for when the socket isn't live.

Verified on regtest: connect, mine a block, wallet receives the push.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Wire silent-payment receiving into the wallet (scan + balance + UI)</title>
<updated>2026-06-27T22:01:06Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-27T22:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=68edd804f1696aa412da2357a469c013f0a3e92d'/>
<id>urn:sha1:68edd804f1696aa412da2357a469c013f0a3e92d</id>
<content type='text'>
wallet.js: scanSilentPayments() pulls the indexer's /scan range, matches outputs
on-device, and verifies each is unspent via the chain backend; spUtxos + balance
are tracked in their own bucket (one-time taproot keys), persisted in the cache.
silentPaymentsAvailable()/spBalance() expose state.

app.js: the Receive tab shows the reusable sp address (QR + copy), a 'Scan for
silent payments' button, and the found amount; Settings gains a per-network SP
indexer picker (under Data source) with custom/self-host support.

sp-indexer.js: added /scan/{from} so a client fetches a whole range in one
request instead of one fetch per block.

Receiving verified end-to-end on regtest (scan finds the output, 49,999,800 sat
confirmed). Spending SP outputs is the remaining piece.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add regtest SP tweak indexer; accept Core's array-witness in inputPubKey</title>
<updated>2026-06-27T21:42:11Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-27T21:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=1beae75ebd34142cc63342fbf7c8a798af45bb5a'/>
<id>urn:sha1:1beae75ebd34142cc63342fbf7c8a798af45bb5a</id>
<content type='text'>
tools/sp-indexer.js: a minimal BIP-352 oracle (Bun) that walks Core and serves,
per block, one entry per eligible tx — the tweak (input_hash*A) plus that tx's
taproot outputs — for the wallet to scan on-device. Shares src/silentpay.js so
the tweak math is the vector-validated code. Added to the regtest compose as the
'sp' service (oven/bun, pointed at bc:18443).

inputPubKey now accepts a witness as either serialized hex (vectors) or an array
of stack items (Core getblock RPC). Verified end-to-end on regtest: a real SP
payment is indexed and the scan recovers the output, value, and spend tweak.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
