<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinosv3.git/tools/zmq-watcher.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-16T15:33:17Z</updated>
<entry>
<title>The watcher stops hoarding what it cannot parse: one unfinalizable tx no longer poisons the frame buffer into a 2GB firehose hoard, and exotic txs get their txid computed by hand instead of dropped</title>
<updated>2026-08-16T15:33:17Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-08-16T15:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=1c823643aedc36c159a52c3285fdf9693bdfde7d'/>
<id>urn:sha1:1c823643aedc36c159a52c3285fdf9693bdfde7d</id>
<content type='text'>
Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
</content>
</entry>
<entry>
<title>Confirm transactions via the WebSocket push, not REST</title>
<updated>2026-06-25T22:47:50Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-25T22:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=c1581a783b02af40567666e03b4f28e404e8ec34'/>
<id>urn:sha1:c1581a783b02af40567666e03b4f28e404e8ec34</id>
<content type='text'>
The watcher's block (rawblock) push now carries confirmed=true + the block time,
and _applyTxNotification flips the matching history row and coins from pending to
confirmed directly — for incoming and outgoing txs (flag-only, so no overcount).
Confirmations no longer wait on a mempool.space reconcile; the 30s backstop poll
just fills in block height / fee afterward.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Credit payments instantly from the watcher push (no REST on critical path)</title>
<updated>2026-06-25T20:28:45Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-25T20:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=96b0ebcf370d7d88fcf515238ce6b9f363ec8265'/>
<id>urn:sha1:96b0ebcf370d7d88fcf515238ce6b9f363ec8265</id>
<content type='text'>
The watcher push now carries the tx data (matched outputs + confirmed flag), so
the app credits an incoming payment the moment the push arrives — no mempool.space
round-trip. This removes the rate-limited REST reconcile from the path a user
actually waits on, and lets us back the frontier poll way off when the socket is
live (30s backstop vs the old 3s receive-tab hammer), cutting the 429s to a
trickle.

- watcher: notification includes { txid, confirmed, outputs:[{vout,value}] }.
- wallet: _applyTxNotification credits the receive coin + a pending history row
  optimistically (receives only; change reconciles in the background), advances
  the frontier, updates the balance, and schedules a background reconcile for
  full accuracy off the critical path.
- poll intervals relaxed now that the WS does the real work instantly.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Realtime via self-hosted ZMQ watcher (Electrum-over-WS)</title>
<updated>2026-06-25T16:39:14Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-25T16:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=a2bb363e2c86dc845e6748e046c8d489e656c584'/>
<id>urn:sha1:a2bb363e2c86dc845e6748e046c8d489e656c584</id>
<content type='text'>
Replace the unreliable public WebSocket push (mempool/blockchain.info address
subscriptions never reliably fire) with a private notification service:

- tools/zmq-watcher.js: a standalone Bun service (reusing coinos lib/zmq.ts's
  ZMTP subscriber) that reads Bitcoin Core's ZMQ rawtx/rawblock, computes the
  scripthash of each output, and pushes a blockchain.scripthash.subscribe
  notification to subscribed clients. No historical index (~24MB RAM) — just the
  live tx stream. Runs on the coinos box reading its Core's ZMQ.
- wallet.js: realtime client now speaks the Electrum protocol (server.version,
  scripthash.subscribe, server.ping) over the WS; any scripthash notification
  triggers the existing refreshLive() (REST stays the source of truth).
- api.js: wsUrl -&gt; wss://coinos.io/electrum.

Verified end-to-end: live mempool txs to subscribed addresses notify instantly.

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