Skip to content

Commit 8ebaab5

Browse files
committed
feat: sync to payments-gateway architecture; privacy products + x402 payments family
The API now embeds the open-source payments-gateway package (github pin) instead of carrying its own copy of the x402/private-watch code. Brings the Monero/Zcash chain facts, crypto top-ups, the x402 self-bootstrap client (Bazaar discovery seeding), and ops-monitor endpoint probes (tunnel + paywall watchdog). Suite: 560 tests green.
1 parent ebca63d commit 8ebaab5

40 files changed

Lines changed: 8142 additions & 11189 deletions

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ API key):
2222
per-builder bid distributions, and Penny Oracle atomic single-fact
2323
endpoints (DeFi + Monero/Zcash) from $0.001/call.
2424

25+
Watches can also be topped up **natively in XMR or ZEC** (we quote an
26+
amount, you pay on-chain, our view-key scanner credits the watch — no
27+
bridge, no custodian). All paid routes carry the
28+
[x402 Bazaar](https://docs.cdp.coinbase.com/x402/bazaar) discovery
29+
extension and settle through the Coinbase CDP facilitator, so agents can
30+
find and pay them via CDP discovery search, Agentic.Market and
31+
[x402.eco](https://x402.eco) without any pre-baked integration.
32+
33+
The payment engine itself (x402 paywall, view-key watching, credit
34+
meters, MCP tools) is the open-source, brand-neutral
35+
[payments-gateway](https://github.com/Rotwang9000/payments-gateway)
36+
embed it to charge for your own services.
37+
2538
## Live endpoints
2639

2740
| What | URL | Auth |

docs/index.html

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ <h1>Seneschal Data API</h1>
9696
to see the data without writing a single line.
9797
</div>
9898

99+
<div class="callout callout-info">
100+
<strong>New &middot; 2026-06-05:</strong> Zcash patched a critical Orchard bug &mdash; a <em>supply</em> bug, not a privacy one.
101+
<a href="/orchard-bug-view-keys.html">What happened, what node operators must do, and why view-key payment monitoring is unaffected &raquo;</a>
102+
</div>
103+
99104
<section class="hero">
100105
<h2>Private Watch &mdash; the headline product</h2>
101106
<p>Get an HMAC-signed webhook the instant a Monero or Zcash payment lands at your address. You supply a <strong>view key</strong> (read-only, cannot spend), an address, and a webhook URL. We POST you a notification on every balance change. <strong>Prepaid credit meter: $0.02 per day idle + $0.005 per webhook delivered</strong> &mdash; no account, no API key, no node.</p>
@@ -104,6 +109,8 @@ <h2>Private Watch &mdash; the headline product</h2>
104109

105110
<p><strong>How the meter works:</strong> the first $0.10 (paywall on watch creation) buys 5 idle days. After that, top up <strong>any amount</strong> via dedicated paywalled paths: $0.10, $1.00, or $5.00 a pop. Every webhook body carries a <code>credit</code> block so your receiver always knows how much it has left. We&rsquo;ll fire one <code>low_credit</code> warning when you have ~2 idle days remaining, even if no payments have come in.</p>
106111

112+
<p><strong>Pay in privacy coin, not just USDC.</strong> A Monero/Zcash service that only took stablecoins on a transparent chain would be missing the point. So you can top a watch up by sending <strong>XMR or ZEC</strong> directly: <code>POST /v1/private/topup-crypto</code> is free to call and returns a receiving address plus the exact amount to send (Monero uses a unique-amount invoice tag; Zcash uses a memo) at a USD rate locked for the quote window. We detect your payment with the <em>same view-key scanner this product sells</em> &mdash; dogfooding the whole way down &mdash; and we hold only a view key for that wallet, never a spend key. No wallet connection, no x402, no API key.</p>
113+
107114
<p><strong>Why it&rsquo;s cheap:</strong> small users pay cents per month even with no traffic. Heavy users pay a few dollars even after thousands of webhook deliveries. Compare to a self-hosted full node (~$30/mo VPS + storage), light-wallet subscriptions ($5&ndash;$50/mo), or merchant gateways (1&ndash;2%): the only ones with skin in the game.</p>
108115

109116
<pre><code># 1. Create a watch (one x402 payment of $0.10 seeds $0.10 credit)
@@ -123,6 +130,15 @@ <h2>Private Watch &mdash; the headline product</h2>
123130
-H 'content-type: application/json' \
124131
-d '{"watchId":"...","watchToken":"..."}'
125132

133+
# 2b. ...or pay in Monero/Zcash instead (FREE quote, no x402, no key):
134+
curl -X POST https://api.seneschal.space/v1/private/topup-crypto \
135+
-H 'content-type: application/json' \
136+
-d '{"watchId":"...","watchToken":"...","chain":"monero","amountUsdCents":500}'
137+
# -> { quoteId, payTo, amount:{display,coin}, memo, confirmations, expiresAt }
138+
# Send the exact amount (Monero) or include the memo (Zcash), then poll:
139+
curl -s -H 'x-watch-token: ...' \
140+
https://api.seneschal.space/v1/private/topup-crypto/&lt;quoteId&gt;
141+
126142
# 3. One-off historical lookup (returns notes; view key never persists):
127143
curl -X POST https://api.seneschal.space/v1/private/historical \
128144
-H 'x-payment: &lt;eip3009 payload, $0.50 USDC on Base&gt;' \
@@ -199,8 +215,8 @@ <h4>Create a watch</h4>
199215
</svg>
200216
<h4>Top up credit</h4>
201217
</div>
202-
<p class="pw-price"><strong>$0.10 / $1.00 / $5.00</strong> · x402 tiers</p>
203-
<p><code>POST /v1/private/topup{,-1,-5}</code> &mdash; $1 buys ~50 idle days. <code>low_credit</code> webhook tells you when to top up.</p>
218+
<p class="pw-price"><strong>USDC (x402) or XMR/ZEC</strong> · any amount</p>
219+
<p><code>POST /v1/private/topup{,-1,-5,-custom}</code> &mdash; $1 buys ~50 idle days. Or pay in coin (free quote) via <code>POST /v1/private/topup-crypto</code>. <code>low_credit</code> webhook tells you when to top up.</p>
204220
</div>
205221
<div class="pw-tile">
206222
<div class="pw-head">
@@ -438,6 +454,7 @@ <h3>MCP (Claude Desktop / Cursor)</h3>
438454
<code>seneschal_private_watch_info</code>,
439455
<code>seneschal_private_watch_create</code>,
440456
<code>seneschal_private_watch_topup</code>,
457+
<code>seneschal_private_watch_topup_crypto</code>,
441458
<code>seneschal_private_watch_historical</code>,
442459
<code>seneschal_private_watch_derive_viewkey</code>,
443460
<code>seneschal_private_watch_status</code>,
@@ -629,9 +646,14 @@ <h2 id="premium-tier-x402">Premium tier (x402) — <strong>LIVE</strong></h2>
629646
<a href="#private-watch-detail">private watch below</a>.</td>
630647
</tr>
631648
<tr>
632-
<td><code>POST /v1/private/topup</code> &mdash; $0.10<br><code>POST /v1/private/topup-1</code> &mdash; $1.00<br><code>POST /v1/private/topup-5</code> &mdash; $5.00</td>
649+
<td><code>POST /v1/private/topup</code> &mdash; $0.10<br><code>POST /v1/private/topup-1</code> &mdash; $1.00<br><code>POST /v1/private/topup-5</code> &mdash; $5.00<br><code>POST /v1/private/topup-custom</code> &mdash; any $0.10&ndash;$25</td>
633650
<td><strong>tiered</strong></td>
634-
<td><strong>Top up an existing watch.</strong> Three explicit tiers so the x402 paywall can quote each price up front. $0.10 buys ~5 idle days, $1.00 buys ~50, $5.00 buys ~250. Body: <code>{watchId, watchToken}</code>.</td>
651+
<td><strong>Top up an existing watch (USDC via x402).</strong> Explicit tiers so the x402 paywall can quote each price up front. $0.10 buys ~5 idle days, $1.00 buys ~50, $5.00 buys ~250; <code>topup-custom</code> takes any amount. Body: <code>{watchId, watchToken}</code> (plus <code>amountAtomic</code> for custom).</td>
652+
</tr>
653+
<tr>
654+
<td><code>POST /v1/private/topup-crypto</code><br><code>GET /v1/private/topup-crypto/:quoteId</code></td>
655+
<td><strong>FREE quote<br>(pay in coin)</strong></td>
656+
<td><strong>Top up by paying in Monero/Zcash.</strong> The POST is free and returns a quote &mdash; a receiving address, the exact coin amount to send (Monero: a unique-amount invoice tag; Zcash: a memo), and a USD rate locked for ~15&nbsp;min. Send the payment, then poll the GET (header <code>x-watch-token</code>) until <code>status=settled</code>. We detect it with our own view-key scan and credit the watch after the stated confirmations; we never hold a spend key. Body: <code>{watchId, watchToken, chain, amountUsdCents}</code> ($2&ndash;$500).</td>
635657
</tr>
636658
<tr>
637659
<td><code>POST /v1/private/historical</code></td>
@@ -861,6 +883,7 @@ <h3 id="private-watch-detail">Private Watch &mdash; /v1/private/* (XMR/ZEC payme
861883
<strong>MCP.</strong> Agents already inside a paid MCP session can use
862884
<code>seneschal_private_watch_create</code>,
863885
<code>seneschal_private_watch_topup</code>,
886+
<code>seneschal_private_watch_topup_crypto</code>,
864887
<code>seneschal_private_watch_historical</code>,
865888
<code>seneschal_private_watch_derive_viewkey</code>,
866889
<code>seneschal_private_watch_status</code>,

docs/landing.html

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Seneschal — Private Watch + Ethereum block builder</title>
7-
<meta name="description" content="Get a webhook the moment a Monero or Zcash payment lands at your address, using only the (read-only) view key. $0.02/day idle + $0.005/webhook delivered via x402 USDC on Base. Plus an Ethereum mainnet block builder and free liquidation telemetry.">
7+
<meta name="description" content="Get a webhook the moment a Monero or Zcash payment lands at your address, using only the (read-only) view key. $0.02/day idle + $0.005/webhook, paid in x402 USDC on Base — or fund your watch by paying in XMR/ZEC directly. Plus an Ethereum mainnet block builder and free liquidation telemetry.">
88
<link rel="canonical" href="https://seneschal.space/">
99
<meta property="og:type" content="website">
1010
<meta property="og:site_name" content="Seneschal">
@@ -105,12 +105,54 @@
105105
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6em 1.4em; margin: 1em 0 0; padding: 0; list-style: none; font-size: 0.95em }
106106
.facts li { margin: 0 }
107107
.facts strong { display: block; color: #fff; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; opacity: 0.85 }
108+
109+
/* Orientation: lead sentence + at-a-glance service map -------------- */
110+
.lead { font-size: 1.14em; line-height: 1.5; margin: 0.45em 0 0.4em; color: #1c1c1c }
111+
.lead strong { font-weight: 600 }
112+
.glance-label { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 1.3em 0 0.5em; font-weight: 600 }
113+
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 0.7em; margin: 0 0 1.4em; padding: 0 }
114+
.glance a { display: block; text-decoration: none; color: inherit; background: var(--soft); border: 1px solid var(--card-border); border-radius: 8px; padding: 0.7em 0.85em 0.75em; transition: background .12s, border-color .12s, transform .12s }
115+
.glance a:hover { background: var(--soft-2); border-color: var(--brand); transform: translateY(-1px) }
116+
.glance .g-name { font-weight: 600; color: var(--brand); font-size: 0.98em; display: flex; align-items: center; gap: 0.4em }
117+
.glance .g-name .tag { margin-left: auto; font-size: 0.66em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 10px }
118+
.glance .g-desc { display: block; font-size: 0.86em; color: #3a3a3a; margin: 0.35em 0 0; line-height: 1.4 }
119+
.glance .g-for { display: block; font-size: 0.78em; color: var(--muted); margin: 0.45em 0 0 }
120+
.glance .g-for b { color: #333; font-weight: 600 }
108121
</style>
109122

110123
<h1>Seneschal</h1>
111-
<p class=muted>Ethereum mainnet block builder &amp; pay-per-call data services. <code>extra_data = Seneschal/0.1</code>.</p>
112-
113-
<section class="hero">
124+
<p class="lead">An independent <strong>Ethereum mainnet block builder</strong> that turns its own node, privacy-coin scanners and on-chain rails into <strong>pay-per-call services</strong>. <strong>No account, no API key, no subscription</strong> — you pay a few cents in USDC on Base (or in Monero/Zcash) only for what you actually use.</p>
125+
126+
<p class="glance-label">What you can do here</p>
127+
<nav class="glance" aria-label="Seneschal services overview">
128+
<a href="#private-watch">
129+
<span class="g-name">Private Watch <span class="tag">Flagship</span></span>
130+
<span class="g-desc">Get a webhook the instant a Monero or Zcash payment lands at your address — from a read-only view key, no node to run.</span>
131+
<span class="g-for"><b>For</b> merchants, wallets &amp; payment bots</span>
132+
</a>
133+
<a href="#builder">
134+
<span class="g-name">Block builder</span>
135+
<span class="g-desc">Send bundles to a permissionless mainnet builder bidding into six relays. No registration.</span>
136+
<span class="g-for"><b>For</b> searchers &amp; MEV matchmakers</span>
137+
</a>
138+
<a href="#data">
139+
<span class="g-name">Liquidation &amp; builder data</span>
140+
<span class="g-desc">Free REST telemetry: loans near liquidation across Aave / Morpho / Spark / Compound, plus builder market share.</span>
141+
<span class="g-for"><b>For</b> liquidators, analysts &amp; dashboards</span>
142+
</a>
143+
<a href="#paymaster">
144+
<span class="g-name">Stablecoin gas paymaster</span>
145+
<span class="g-desc">ERC-4337 paymaster on Base — let smart accounts pay gas in USDC, EURC, USDT, DAI or cbBTC instead of ETH.</span>
146+
<span class="g-for"><b>For</b> wallet &amp; smart-account developers</span>
147+
</a>
148+
<a href="#premium">
149+
<span class="g-name">Penny Oracle &amp; x402 APIs</span>
150+
<span class="g-desc">Single-fact DeFi &amp; privacy-chain data endpoints from $0.001, paid per call in USDC via x402.</span>
151+
<span class="g-for"><b>For</b> AI agents &amp; automated systems</span>
152+
</a>
153+
</nav>
154+
155+
<section class="hero" id="private-watch">
114156
<h2>Private Watch — get pinged when a Monero or Zcash payment lands</h2>
115157
<p>Hand us a <em>view key</em> (read-only — it cannot spend), an address, and a webhook URL. We POST you an HMAC-signed notification the moment funds arrive. <strong>Prepaid credit meter: $0.02/day idle + $0.005/webhook delivered, top up any time.</strong> No node, no subscription, no API key, no account.</p>
116158

@@ -157,8 +199,8 @@ <h4>Create a watch</h4>
157199
</svg>
158200
<h4>Top up credit</h4>
159201
</div>
160-
<p class="tile-price"><strong>$0.10 / $1.00 / $5.00</strong> · x402 tiers</p>
161-
<p><code>POST /v1/private/topup{,-1,-5}</code><br>$1 buys ~50 idle days; $5 buys ~250. The <code>low_credit</code> webhook tells you when to top up.</p>
202+
<p class="tile-price"><strong>USDC (x402) or XMR/ZEC</strong> · any amount</p>
203+
<p><code>POST /v1/private/topup{,-1,-5,-custom}</code> in USDC ($1 buys ~50 idle days), or <strong>pay in Monero/Zcash</strong> via <code>POST /v1/private/topup-crypto</code> — a free quote locks a rate; we detect your coin payment with the same view-key scanner this product runs on. The <code>low_credit</code> webhook tells you when to top up.</p>
162204
</div>
163205

164206
<!-- Historical -->
@@ -384,11 +426,12 @@ <h3>Try it now — derive a Zcash viewing key from a BIP-39 phrase (free, in-bro
384426
})();
385427
</script>
386428

387-
<h2>Permissionless Ethereum block builder</h2>
429+
<h2 id="builder">Permissionless Ethereum block builder</h2>
388430
<p>
389431
Independent block builder running an rbuilder fork from a single
390432
co-located node in Helsinki. Bidding into Aestus, Agnostic, ETHGas,
391-
Flashbots, Titan and Ultrasound mainnet relays.
433+
Flashbots, Titan and Ultrasound mainnet relays. Blocks we land carry
434+
<code>extra_data = Seneschal/0.1</code>.
392435
</p>
393436
<h3>For searchers &amp; matchmakers</h3>
394437
<p>
@@ -398,7 +441,7 @@ <h3>For searchers &amp; matchmakers</h3>
398441
<a href="https://github.com/flashbots/dowg/blob/main/fair-market-principles.md">Fair Market Principles</a>.
399442
</p>
400443

401-
<h2>Free liquidation &amp; builder data</h2>
444+
<h2 id="data">Free liquidation &amp; builder data</h2>
402445
<p>
403446
No-signup REST API exposing cross-protocol liquidation telemetry our
404447
bot already collects &mdash; positions near liquidation across Aave,
@@ -413,7 +456,7 @@ <h2>Free liquidation &amp; builder data</h2>
413456
<a href="https://mcp.seneschal.space/health">MCP <code>/health</code></a>
414457
</div>
415458

416-
<h2>For smart accounts: pay gas in stablecoins on Base</h2>
459+
<h2 id="paymaster">For smart accounts: pay gas in stablecoins on Base</h2>
417460
<p>
418461
ERC-4337 v0.7 paymaster on Base mainnet. Stop holding ETH in every
419462
smart account &mdash; pay gas in <code>USDC</code>, <code>EURC</code>,
@@ -427,7 +470,7 @@ <h2>For smart accounts: pay gas in stablecoins on Base</h2>
427470
<a href="https://github.com/Rotwang9000/seneschal-paymaster">GitHub</a>
428471
</div>
429472

430-
<h2>Other premium endpoints (x402 micropayments)</h2>
473+
<h2 id="premium">Other premium endpoints (x402 micropayments)</h2>
431474
<p>
432475
Pay-per-call endpoints on Base mainnet, settled in USDC via the x402
433476
protocol &mdash; no API keys, no subscriptions, no gas for the payer

docs/llms.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Seneschal
22

3-
> View-key payment webhooks for Monero and Zcash, plus an Ethereum mainnet block builder and free DeFi-liquidation telemetry. Pay-per-call in USDC via the x402 standard; free read tier; an MCP server for AI agents (no API key).
3+
> View-key payment webhooks for Monero and Zcash, plus an Ethereum mainnet block builder and free DeFi-liquidation telemetry. Pay-per-call in USDC via the x402 standard — or fund a watch directly in Monero/Zcash. Free read tier; an MCP server for AI agents (no API key).
44

55
Seneschal lets a receiver get an HMAC-signed webhook the instant a Monero (XMR) or Zcash (ZEC) payment lands at their address, using only a read-only *view key* — no node to run, no custody (view keys cannot spend). Premium endpoints are paid per call in USDC on Base via the x402 protocol; many read endpoints are free.
66

77
## Private Watch — Monero / Zcash payment webhooks (headline product)
88
- Docs & quickstart: https://docs.seneschal.space/
99
- Create a watch: POST https://api.seneschal.space/v1/private/watch (x402, $0.10 seeds credit) — body { chain, address, viewKey, webhookUrl }. Returns a webhookSecret; verify deliveries with HMAC-SHA256.
10-
- Top up credit: POST https://api.seneschal.space/v1/private/topup | /topup-1 | /topup-5
10+
- Top up credit (USDC via x402): POST https://api.seneschal.space/v1/private/topup | /topup-1 | /topup-5 | /topup-custom
11+
- Top up credit by paying in Monero/Zcash (FREE to quote, no x402, no key): POST https://api.seneschal.space/v1/private/topup-crypto — body { watchId, watchToken, chain, amountUsdCents }. Returns a receiving address, the exact coin amount (Monero: a unique-amount invoice tag; Zcash: a memo) and a USD rate locked for a short window. Poll GET https://api.seneschal.space/v1/private/topup-crypto/{quoteId} (header x-watch-token) until status=settled. We detect the payment with the same view-key scanner the product sells — we never hold a spend key.
1112
- One-off historical scan: POST https://api.seneschal.space/v1/private/historical (x402)
1213
- Free UFVK derivation from a seed phrase (rate-limited): POST https://api.seneschal.space/v1/private/derive-viewkey
1314

@@ -19,13 +20,17 @@ Seneschal lets a receiver get an HMAC-signed webhook the instant a Monero (XMR)
1920
- WalletConnect control panel: https://panel.seneschal.space/
2021

2122
## Pricing
22-
- Private Watch: $0.02 per idle day + $0.005 per webhook delivered; creation seeds $0.10 credit; top-ups of $0.10 / $1 / $5.
23+
- Private Watch: $0.02 per idle day + $0.005 per webhook delivered; creation seeds $0.10 credit; top-ups of $0.10 / $1 / $5 (or any amount $0.10–$25 via /topup-custom).
24+
- Pay-in-coin top-ups: fund a watch in XMR/ZEC, $2–$500 per quote, credited at a rate locked for the quote window (small spread covers volatility).
2325
- Atomic "single-fact" endpoints (Monero/Zcash chain facts; DeFi facts): about $0.001 each, ideal for agent loops.
2426

2527
## Free / public (no key)
2628
- DeFi liquidation telemetry for Aave, Morpho, Spark and Compound on Ethereum mainnet.
2729
- Ethereum block-builder market-share data from the Seneschal shadow recorder.
2830

31+
## Background / writing
32+
- The Zcash Orchard bug (2026-06) and why view-key payment monitoring is unaffected: https://docs.seneschal.space/orchard-bug-view-keys.html — explains the non-canonical-proof soundness bug (supply, not privacy), the Zebra 5.0.0 / NU6.2 fix, the analogous Monero bug class (2017 key-image, Bulletproofs audit), and why read-only view-key payment detection (Private Watch) keeps working.
33+
2934
## Contact & policies
3035
- Telegram: https://t.me/OrknetP
3136
- Terms: https://seneschal.space/terms.html

0 commit comments

Comments
 (0)