TrustBench

io.github.lithvall由 GitHub 帳號 lithvall 發布v1.1.1更新於 Oct 27, 2026

x402 provider rankings + Ed25519-signed payment receipts + signature verification (3 tools).

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取金融

概覽

AI 產生的概覽

TrustBench 讓助理查詢 x402 服務商的可用性排名、取得已簽章的付款收據,並驗證其 Ed25519 簽章。

可以做什麼
  • 依能力查詢附評分的 x402 服務商,並附延遲與成功率遙測
  • 依 ID 取得路由或付款收據,查看付了什麼、付給誰以及鏈上結算參照
  • 驗證收據的 Ed25519 簽章:可依 ID 由伺服器重新取得,也可用已儲存的收據信封離線驗證
適用情境
適合在 Base 上使用 x402 付費 API 呼叫的情境,需要判斷哪些服務商目前有回應,或證明某筆付款已完成結算。它是讀取與驗證層,不是付款工具:路由與結算工具不在本次發布中。
執行需求
可作為遠端端點使用,也可透過 npx 以本機 npm 套件執行,本機方式需要 Node.js。隨附的三個工具不需 API 金鑰。需要 tb_live API 金鑰的路由工具預告於後續版本提供。
安裝前請注意
排名來自單一主機每晚三次 HEAD 探測,僅為相對參考訊號,並非嚴謹的基準測試。依 ID 驗證收據依賴 TrustBench 服務可連線,離線模式可避開此依賴。README 提到每次呼叫 0.005 美元的付費路由與 USDC 結算,但這些工具不在本次發布中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TrustBench,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.lithvall%2Ftrustbench/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "trustbench": {
      "type": "http",
      "url": "https://trustbench.io/mcp"
    }
  }
}

README

TrustBench

Verify that x402 payments settled on-chain and get cryptographically signed proof. POST /verify with a receipt ID or raw envelope to confirm Ed25519 signature validity + on-chain settlement on Base, no trust required.

Also routes paid x402 calls with server-side spend caps, idempotency, and a fail-safe paywall (agent isn't charged when the upstream merchant is non-conformant). Non-custodial: TrustBench never holds funds. Every paid call emits an Ed25519-signed receipt verifiable offline against a published public key.

Cross-network: routes Base today, registers Solana endpoints (Heurist Mesh, Pay.sh skills), Solana settlement next.

What's live today

  • Public registry of x402 endpoints across Base (Coinbase Agentic Market, ~650 services) and Solana (Heurist Mesh, ~150 endpoints) — Solana inventory is in the database today and surfaces on /rankings once the network filter is dropped (P4-3a, see phase4-p4-3-timing.md)
  • Nightly liveness probe (HEAD requests from a single cloud host, 3 samples per provider, statuses 200/201/204/401/402/403/404/405/429 treated as alive)
  • Score derivation: 15 + 45·successRate + 35·latencyHealth + 3·consistency, clamped to [40, 98], via linear-interpolation percentiles
  • Ed25519-signed scorecards, public key at /.well-known/trustbench-pubkey
  • Routing and settlement on Base + USDC (Phase 3); Solana is roadmap (P4-3)
  • Methodology disclosure at /methodology

Phase 3 + 4 (live since 2026-05-04 / 2026-05-06)

  • Authenticated POST /route endpoint with API-key auth (argon2id), idempotency keys, hard spend caps, and Ed25519-signed receipts
  • /route/settle endpoint forwarding agent-signed EIP-3009 authorizations
  • Queryable audit at /receipts/:id
  • Strict reservation-based spend caps (P4-7)
  • Discovery surfaces: /skill.md, /llms.txt, /.well-known/trustbench.json
  • First paid x402 receipt against a real provider, settled on Base 2026-05-06: rcpt_01KQY7C44GAPSXZPFQYRZ1D10C — verifies SIGNATURE VALID + ON-CHAIN VERIFIED with no overrides.

In flight (Phase 4b)

  • x402-paywalled API endpoints (per-call USDC pricing surface)
  • Public receipt explorer at /explorer
  • Formal partner integrations
  • Solana routing (registry pre-built, network filter to drop)
  • npm verifier package @trustbench/verify-receipt

Claude Desktop / MCP

TrustBench ships a native MCP server so agents in Claude Desktop, Claude Cowork, ChatGPT, or Cherry Studio can look up providers, fetch receipts, and verify signatures without any HTTP-fetch workaround.

Add to claude_desktop_config.json (or your host's equivalent MCP settings file):

json
{  "mcpServers": {    "trustbench": {      "command": "npx",      "args": ["-y", "@trustbench/mcp"]    }  }}

Restart the host app after saving. Three tools become available:

  • get_rankings — scored providers by capability. No API key.
  • get_receipt — fetch any receipt by ID (rcpt_… / rrcpt_…). No API key.
  • verify_receipt — confirm Ed25519 signature + on-chain status. No API key.

Routing tools (route_quote, route_settle) require a tb_live_… API key and ship in the next MCP release. Request access by DM'ing @TrustBench on X.

What we don't do

  • We never hold agent funds, never submit transactions on-chain, never act as a payment facilitator. Agents sign EIP-3009 transferWithAuthorization payloads; providers submit them on-chain and pay gas. TrustBench observes the resulting tx_hash and records it in a signed receipt.

Pricing model

  • x402-native paywalled API endpoints, per-call USDC settlement on Base
  • No subscriptions, no contracts, no per-seat or per-month charge
  • v0.1.0 ships POST /route at $0.005 per call (score-provider tier); full tier table at /pricing (HTML for humans, JSON for agents via Accept: application/json or ?format=json)
  • Settlement through the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402 (the public x402.org/facilitator is testnet-only). TrustBench never holds funds; the agent's wallet signs and the facilitator submits on-chain.
  • Existing partner agreements override the published table for that partner. Reach out for partner-volume credit before integration.
  • Registry listing is currently free and automatic (crawled from public x402 catalogs). A refundable provider verification bond is a design intent, not a shipped mechanism. Never pay-to-rank — routing decisions are measurement-based.

Stack

TypeScript + Hono (API) + Supabase (Postgres + RLS) + ioredis (Upstash Redis cache) + tsx runtime. Deployed on Railway. Nightly probe pipeline + autonomous X posting via GitHub Actions.

Quick start

bash
npm installcp .env.example .env   # fill in Supabase + Upstash credentialsnpm run pipeline       # probe + score (writes to Supabase)npm run dev            # run the API locally

Endpoints

Public (no auth):

  • GET /health — liveness check for the API itself
  • GET /rankings?capability=search — ranked providers for a capability (search, inference, data)
  • GET /rankings/paid?capability=search — same as /rankings but with each provider's signed scorecard
  • GET /route?capability=search — current best provider + fallback (legacy read-only — the Phase 3 routing surface is POST /route)
  • GET /mcp/tools — MCP tool descriptor catalog (JSON schema). For native tool use, see the Claude Desktop / MCP section above.
  • GET /analytics — plain HTML dashboard
  • GET /methodology — full description of what the probe does and does not measure
  • GET /skill.md — agent skill file in the agentic.market/skill.md format. Paste into Claude Code, Codex, Gemini CLI, Hermes, Cursor, Claude Desktop, Cherry Studio, or ChatGPT to teach the agent the TrustBench quote/settle flow as an additive policy + receipt layer on top of Coinbase Agentic Wallet.
  • GET /llms.txt — LLM-grounded research summary in llmstxt.org format
  • GET /pricing — public, honest pricing for paid endpoints. Content-negotiated: HTML for humans, JSON for agents via Accept: application/json or ?format=json. Returns a 7-row tier table with live / planned (v0.2.0) / planned (v0.3.0) status badges per endpoint.
  • GET /.well-known/trustbench.json — machine-readable manifest of TrustBench's public surfaces, capabilities, signing scheme, and discovery references. Includes an endpoints array with paid annotations matching /pricing.
  • GET /.well-known/trustbench-pubkey — Ed25519 public key (PEM) for verifying scorecards and receipts

Authenticated (Phase 3, in build):

  • POST /route — quote step. Authorization: Bearer tb_…, Idempotency-Key: <16–128 chars>, body {capability, max_price (atomic-unit string), payer_address}. Returns {route_id, payment_required, expires_at, fallback_provider}. Quote validity is 5 minutes; settling after that returns 410.
  • POST /route/settle — settle step. Body {route_id, signature} where signature is the agent's EIP-3009 transferWithAuthorization signature. Returns {response, receipt} plus X-Receipt-Id header. Idempotent on (route_id, signature): replays return x-idempotent-replay: true with the cached receipt and never re-call the merchant.
  • GET /receipts/:id — public, no-auth, immutable. Returns the exact signed envelope ({receipt, signature}) that was issued. Cache-Control: public, max-age=86400, immutable.

Verifying a receipt

Receipts are Ed25519-signed over the JCS-canonicalized form of envelope.receipt. The signature block (including public_key_url) is detached and not part of the signed bytes, so it can be overridden at verification time without invalidating the chain of trust.

Reference verifier: scripts/verify-receipt.js.

bash
# By id, against a deployed instancenpm run verify-receipt -- rcpt_01HV3K8M5C9X2ZBFYR4QWP8ND1 https://your.trustbench.deployment
# From a saved JSON filenode scripts/verify-receipt.js ./receipt.json
# Override pubkey URL when the receipt's public_key_url isn't reachable# from your network (useful for local-dev verification of locally-issued receipts)node scripts/verify-receipt.js ./receipt.json --pubkey-url http://localhost:3000/.well-known/trustbench-pubkey

Failure semantics

TrustBench down ≠ payments down. This is an architectural property, not a feature flag.

The agent's payment authorization is an EIP-3009 signature it produces with its own key. The merchant accepts that signature and submits the on-chain transaction. TrustBench sits between them as a router and audit layer — it constructs the quote and records the result, but it never holds funds, never signs the payment, and never broadcasts the transaction.

If the TrustBench API is unavailable, an agent can still:

  • Transact directly with any x402 provider it already knows about, using the same EIP-3009 signing flow.
  • Submit and verify receipts after the fact (the verifier is a standalone script and the public key is served from /.well-known/trustbench-pubkey).

What it temporarily loses while the API is down:

  • Routing decision (which provider scored best at this moment).
  • Server-enforced spend caps (the agent must enforce caps locally if it cares).
  • Signed receipts for any calls made during the outage.

Existing receipts remain verifiable — the public key and JCS canonicalization rules are stable, and the receipt's audit_url is a hint, not a dependency.

Paywall (Phase 4 v0.1.0)

POST /route is paywalled when TRUSTBENCH_PAYWALL_ENABLED=true on the deployment. The flow is x402-native end-to-end:

  1. Agent calls POST /route with no X-PAYMENT header.
  2. TrustBench responds 402 Payment Required with x402 payment requirements pointing at the TrustBench revenue wallet on Base. Price: $0.005 USDC.
  3. Agent signs an EIP-3009 transferWithAuthorization for the routing fee and retries the call with an X-PAYMENT header carrying the signed envelope (use any x402 client; the modular @x402/core + @x402/evm SDKs are the reference).
  4. TrustBench verifies the payment with the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402, settles it on-chain, selects the best provider via the live registry, and returns 200 with an Ed25519-signed routing receipt plus payment requirements for the agent's NEXT call (to the upstream provider).
  5. The agent then pays the provider directly via a second x402 transaction. TrustBench is out of the loop after step 4.

Two payments per call (TrustBench fee + provider fee), both non-custodial. Receipts cover the routing decision; the provider transaction is a separate x402 envelope the agent owns end-to-end.

Discovery. Paid endpoints carry paid: true annotations alongside the free ones in /skill.md and /.well-known/trustbench.json. v0.2.0+ endpoints are listed with available_in tags so agent builders see the roadmap shape.

Verifying a routing receipt. Same Ed25519 + JCS canonicalization as Phase 3 settlement receipts, with kind: "paid_response.route". Use the npm verifier:

bash
npm install @trustbench/verify-receipttrustbench-verify-receipt ./routing-receipt.jsontrustbench-verify-receipt ./routing-receipt.json --check-chain   # also re-verify the on-chain tx

Server-side controls (v0.1.1). Two safeguards run on every paywalled call:

  • Per-paying-wallet hourly rate limit. Default 60 paid calls per hour per agent_address. Tunable via TRUSTBENCH_PAYWALL_HOURLY_LIMIT (set to 0 to disable). Returns 429 with Retry-After: 60 when exceeded.
  • Idempotency-key replay with replayed_at marker. Idempotency-Key header (16-128 chars) honored on every paywalled call. Same key + same body within 24 hours returns the original signed receipt with a top-level replayed_at field added outside the signed bytes — original signature stays valid, downstream consumers can distinguish fresh from replayed. Same key + different body returns 409.

Failure modes. Documented in detail in the Critic-pass header at the top of src/paywall-handler.ts. Live facilitator is the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402; the original "Foundation facilitator first, swap to CDP later" plan was disproven on 2026-05-11 when settle-tests confirmed the Foundation facilitator is testnet-only (see lessons.md 2026-05-11 entry). Current hidden assumption: CDP facilitator stays stable and within plan limits. Kill criterion: if CDP returns 5xx or auth-errors >5% of calls in the first 4 weeks, fall back to PayAI-mediated settlement.

What Phase 3 deliberately does not do

These are limits in the current implementation, called out so consumers don't infer behavior the system doesn't actually deliver:

  • Single-merchant routing. POST /route serves one capability against one selected provider per call. Multi-merchant fan-out (one intent → multiple paid APIs → one envelope) is Phase 4.
  • Receipt content is not yet on-chain anchored. Receipts are Ed25519-signed by TrustBench. They are not Merkle-batched into a public blockchain. On-chain anchoring is a Phase 5 consideration if real demand surfaces.
  • Single-chain settlement today. Routing + settlement is Base + USDC. Solana inventory is registered but not yet routable (P4-3 next).

Methodology disclosure

The probe is a HEAD-request liveness check from a single host, three samples per provider per night. Status codes 200, 201, 204, 401, 402, 403, 404, 405, and 429 are treated as alive (the provider is responding; only the auth/payment gate is closed).

This is not a benchmark in the rigorous sense. Latency is wall-clock from a single network vantage. Score latencyHealth is derived from linear-interpolation percentiles across the cohort — useful as a relative signal, not as a service-level claim. Full description at /methodology.

License

MIT.

來源:README.md,提交 14d4320

工具

3

get_rankings

Get Provider Rankings

Get TrustBench liveness rankings for x402 providers by capability. Returns a scored list of providers with latency and success-rate telemetry. Methodology note: scores are derived from HEAD-probe liveness checks (3 samples from one host), not a rigorous benchmark. See trustbench.io/methodology. Output: returns a JSON array. Each object has name (string, provider name), score (number 0-100, composite liveness score), latency_p50 (number, ms), success_rate (number 0.0-1.0, last 7 days), endpoint (string, URL), capabilities (array of strings).

輸入參數capability必填

get_receipt

Fetch Payment Receipt

Fetch a TrustBench routing receipt by ID. Receipts are immutable, Ed25519-signed records of a routing or payment event. Use to verify what was paid, to whom, for what capability, and what the on-chain settlement reference is. IDs start with rcpt_ (Phase 3) or rrcpt_ (Phase 4). Output: returns the signed receipt envelope as JSON. Phase 3 (rcpt_) returns a SignedReceipt with receipt (call metadata + settlement ref) and signature (Ed25519 over JCS-canonicalized receipt body). Phase 4 (rrcpt_) returns {receipt, signature} where receipt.paid contains routing details and signature covers the canonical envelope. To verify an envelope offline use the verify_receipt tool with the returned JSON, or @trustbench/verify-receipt npm.

輸入參數receipt_id必填

verify_receipt

Verify Receipt Signature

Verify the Ed25519 signature on a TrustBench receipt. Two modes: (1) Lookup mode — pass receipt_id and the server fetches the receipt from trustbench.io and re-runs verification (handy when you only have an ID). (2) Offline mode — pass receipt_json (the full {receipt, signature} envelope an agent received from a third party) and the server verifies the Ed25519 signature against the published public key at trustbench.io/.well-known/trustbench-pubkey without trusting the database. Exactly one of receipt_id or receipt_json must be provided. Output: returns JSON with receipt_id, signature_valid (boolean), on_chain_verified (boolean, where present), signature_alg ("ed25519"), verify_url, pubkey_url. For non-server-mediated verification with no network round-trip, use the @trustbench/verify-receipt npm package.

輸入參數receipt_idreceipt_json

版本歷史

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

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。