SatRank — Lightning trust + audit oracle

dev.satrank由 satrank.dev 發布v1.0.1更新於 Oct 25, 2026

Lightning trust + audit oracle. Score, pay, and audit L402 endpoints with Ed25519 receipts.

發布方自己的服務:audit.domains - Domain Valuation

已驗證STDIO僅桌面金融安全與監控

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理查詢 SatRank 的 Lightning 信任預言機,取得 L402 端點評分、付費意圖排名,並離線驗證 Nostr 斷言。

可以做什麼
透過付費的 intent 工具依類別、預算與 SLA 請求 L402 端點候選排名,該工具會轉送到 SatRank API 並依 L402 收取 sats。依 URL 雜湊查詢單一端點的評分快照。離線驗證 SatRank 簽署的 Nostr 信任斷言,無需網路。
適用情境
當助理需要在付費 L402 端點之間做選擇,並希望取得貝氏成功機率評分或可離線核驗的簽章信任斷言時適用。若不涉及 L402 或 Lightning 付費 API,則無需使用。
執行需求
透過 stdio 在本機執行,通常以 npx 啟動 satrank-mcp npm 套件,因此需要 Node.js。環境變數 SATRANK_API_BASE 指定 API 主機,預設指向公開的 SatRank 預言機。付費 intent 工具需要 Lightning 錢包或存款 macaroon 支付 2 sats 費用。
安裝前請注意
intent 工具每次呼叫都會透過 L402 花費真實 sats;存款 macaroon 是可用於預付餘額的持有者憑證,應視為機密。查詢與端點資料會傳送到所設定的 SatRank 主機,可能是第三方。斷言驗證在本機離線完成,但評分來自該遠端服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 SatRank — Lightning trust + audit oracle,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

SatRank

Lightning trust oracle for AI agents on L402. Bitcoin-pure.

What this does

  • Crawls the L402 ecosystem (l402.directory + RSS + DNS) to build a catalogue of paid endpoints.
  • Probes each endpoint, classifying outcomes across 5 stages: challenge / invoice / payment / delivery / quality.
  • Scores every (endpoint, stage) pair as a streaming Beta(α, β) posterior. The end-to-end success probability is the product of stage means.
  • Ranks candidates on POST /api/intent (paid 2 sats via L402): an agent passes a category + budget + SLA, gets back the top-K endpoints with full Bayesian breakdown.
  • Publishes signed Nostr trust assertions (kind 30782) so any agent can cache / verify SatRank's output offline.

Public endpoints

Doc surfaces:

GET  /                                 landing page (static HTML)GET  /methodology                      technical reference (static HTML)GET  /api                              API reference (static HTML)GET  /openapi.json                     OpenAPI 3.0 spec (machine-readable)

Functional API (nine routes — POST /api/intent is the only L402-gated one):

POST /api/intent                       paid, 2 sats via L402POST /api/deposit                      free, mint a multi-use deposit macaroon (10–10000 sats, 30-day TTL)GET  /api/deposit/:macaroon_id         free, read remaining balanceGET  /api/services/:url_hash           free, per-endpoint score snapshotGET  /api/services/categories          free, list of catalogue categoriesGET  /api/services/best                free, top-3 per category (5-min cache)GET  /api/oracle/budget                free, last 24h revenue + paid-probe spendGET  /health                           free, livenessGET  /.well-known/satrank-key          free, oracle pubkey for offline verify

Deposit macaroons let an agent pre-pay N sats once and use the bearer preimage across many /api/intent calls without a Lightning round-trip per call. Authorization: L402 deposit_<id>:<preimage_hex>.

MCP

Three tools for any MCP-compatible AI runtime (Claude Code, Cursor, Codex, n8n):

intent              forwards POST /api/intent (paid)get_endpoint_score  forwards GET /api/services/:url_hash (free)verify_assertion    offline Schnorr verification of kind 30782 (no network)

Install in Claude Code:

bash
claude mcp add satrank -- npx -y satrank-mcp

Self-hosters point SATRANK_API_BASE at their own deployment.

Architecture

14 source files + 4 doc surfaces (3 HTML pages + OpenAPI spec). Read top-to-bottom in 30 minutes.

src/├── types.ts             Stage, Posterior, Endpoint, Observation├── config.ts            zod env schema, parsed once at boot├── logger.ts            JSON-line stdout├── db.ts                pg Pool + idempotent schema bootstrap├── schema.sql           9 tables in ONE file (no migrations folder)├── lnd.ts               minimal LND REST client (addInvoice + payInvoice)├── ssrf.ts              RFC1918 + link-local + IPv6 ULA URL guard├── nostr.ts             kind 30782 sign + publish + offline verify├── scoring.ts           Beta(α,β) per stage, Wilson CI95, ranker├── probe.ts             HTTP probe with optional L402 pay├── crawler.ts           l402.directory + RSS + DNS + cron├── api.ts               Express; 9 functional routes + 4 doc surfaces, native L402 paid gate, deposit credits├── mcp.ts               MCP server, 3 tools, ships verbatim to npm├── landing.html         static landing served at GET /├── methodology.html     technical reference served at GET /methodology├── api-reference.html   API reference served at GET /api├── openapi.json         OpenAPI 3.0 spec served at GET /openapi.json└── index.ts             boot + shutdown

Run it

bash
cp .env.example .env# minimum: set DATABASE_URL
npm installnpm run buildnpm start

For paid probes + paid /api/intent gate, set LND_REST_URL + LND_MACAROON_HEX + L402_MACAROON_SECRET. For Nostr trust assertions, set NOSTR_PRIVATE_KEY.

Scoring math

For each (endpoint, stage), maintain a Beta(α, β) posterior with α₀ = β₀ = 1 (uniform prior). On every observation:

  • success → α += 1
  • failure → β += 1

Stage mean: α / (α+β). 95% credible interval via Wilson (closed-form). End-to-end success: ∏ stage_means across the 5 stages, assuming stage independence.

is_meaningful is true iff the challenge stage has at least MEANINGFUL_N_OBS_MIN observations. The challenge stage is observed on every probe (free or paid), so its n_obs converges fastest. p_e2e remains the honest end-to-end product separately.

License

AGPL-3.0

來源:README.md,提交 96690c5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Audit 整合