{
  "$schema": "https://xochi.fi/.well-known/agents.schema.json",
  "name": "Xochi",
  "description": "The Agentic Dark Pool on Ethereum. Private execution via stealth settlement; ERC-8262 (Xochi's ZK Compliance Oracle) is the compliance design and is not yet live. Submit signed intents, solvers compete to fill them, settle privately on L1 or L2. Privacy is free by default; attestation-based trust scoring unlocks lower fees and deeper privacy.",
  "url": "https://xochi.fi",
  "documentation": "https://xochi.fi/whitepaper",
  "summary": "https://xochi.fi/llms.txt",
  "summary_full": "https://xochi.fi/llms-full.txt",
  "openapi": "https://xochi.fi/openapi.yaml",
  "capabilities": "https://api.xochi.fi/api/capabilities",
  "contact": {
    "type": "github",
    "url": "https://github.com/xochi-fi/xochi/issues"
  },
  "auth": [
    {
      "role": "wallet",
      "method": "intent-signature",
      "status": "live",
      "description": "Connect a wallet and sign the EIP-712 intent. On `/api/intent/execute` (walletAuth) the signed intent IS the auth -- no Xochi ID, no x402. Member/Mandate/Guest still apply when their headers are present. Tier resolves from the wallet (Standard default). Quote and read-by-id (`/status`, `/:id`) are public."
    },
    {
      "role": "member",
      "method": "passkey",
      "status": "live",
      "description": "Human authenticated via XID (WebAuthn discoverable credential). Browser-only registration; the issued JWT is presented as `Authorization: Bearer <jwt>` on protected endpoints. Members can hold attestations and unlock lower fees + deeper privacy.",
      "endpoints": {
        "register_options": "https://api.xochi.fi/api/auth/register/options",
        "register_verify": "https://api.xochi.fi/api/auth/register/verify",
        "login_options": "https://api.xochi.fi/api/auth/login/options",
        "login_verify": "https://api.xochi.fi/api/auth/login/verify"
      }
    },
    {
      "role": "mandate",
      "method": "envelope",
      "status": "live",
      "description": "Agent acting on behalf of a Member. The Member signs an EIP-712 delegation envelope (max amount, scopes, expiry, nonce); the Agent presents it as `X-Xochi-Delegation: <base64url(envelope)>` on every protected request. No session, no agent JWT. Inherits the Member's trust tier. The Member revokes an outstanding envelope via `POST /api/auth/mandate/revoke` (delegator-signed).",
      "design_doc": "https://github.com/xochi-fi/xochi/blob/main/docs/planning/agent-auth.md"
    },
    {
      "role": "guest",
      "method": "x402",
      "status": "live",
      "description": "Agent transacting anonymously, no Member, no account. Pays per call via x402 micropayments. Capped at Standard tier privacy. See `x402.endpoints` below for the priced surface."
    }
  ],
  "x402": {
    "spec": "https://x402.org",
    "boundary": "Xochi worker is the sole x402 surface. The worker validates the payment via Coinbase facilitator and calls Riddler internally. Agents do not call Riddler directly.",
    "auth_alternative": "On routes with `auth: true`, x402 is an alternative to Authorization: Bearer JWT, not in addition. Send X-PAYMENT for Guest, Authorization for Member. On a `walletAuth` route like `/api/intent/execute`, sending neither falls through to the EIP-712 signature check (no 402); on other auth-gated routes, sending neither returns 402 if x402 is offered.",
    "endpoints": [
      {
        "method": "POST",
        "path": "/api/intent/execute",
        "price_usd": "0.01",
        "category": "write",
        "description": "Execute a quoted swap intent (walletAuth: x402 optional; the signed intent already authenticates)"
      },
      {
        "method": "POST",
        "path": "/api/intent/limit-submit",
        "price_usd": "0.01",
        "category": "write",
        "description": "Submit a limit order"
      },
      {
        "method": "POST",
        "path": "/api/settlement/claim",
        "price_usd": "0.005",
        "category": "write",
        "description": "Claim a shielded settlement"
      }
    ],
    "reads": "Reads are NOT x402-priced. Quotes (POST /api/intent/quote, /api/intent/limit-quote) and status/record-by-id (GET /api/intent/{id}, /api/intent/{id}/status) are public and free. Wallet-scoped reads (history, settlements, stealth meta-address, limit orders) require ownership of the wallet -- a SIWE wallet-bound session or a Mandate -- and cannot be accessed by paying x402."
  },
  "supported_chains": [
    { "id": 1, "name": "Ethereum" },
    { "id": 10, "name": "Optimism" },
    { "id": 137, "name": "Polygon" },
    { "id": 42161, "name": "Arbitrum" },
    { "id": 8453, "name": "Base" },
    {
      "id": 4663,
      "name": "Robinhood Chain",
      "note": "Arbitrum Orbit L2; native stablecoin USDG (Paxos), 6 decimals, Permit2 pull, no USDC. Bidirectional cross-asset USDC<->USDG corridors. Selectable in the trade UI (USDG + WETH)."
    }
  ],
  "settlement_types": [
    {
      "id": "public",
      "description": "Standard L1 settlement to wallet address"
    },
    {
      "id": "stealth",
      "status": "live",
      "description": "L1 stealth smart account (ERC-5564 + ERC-4337). Gasless claim via the two-step /api/stealth/claim/prepare + /api/stealth/claim/submit flow. Open to every wallet: no trust-score gate (privacy is free by default). Gated only server-side by STEALTH_SETTLEMENT_LIVE."
    },
    {
      "id": "shielded",
      "status": "planned",
      "description": "Aztec L2 shielded note. Not live until Aztec transaction support ships."
    }
  ],
  "compliance_proofs": {
    "standard": "ERC-8262",
    "status": "planned",
    "reference_impl": "https://github.com/xochi-fi/ERC-8262",
    "description": "Privacy-preserving compliance proof catalog. Not live yet: as of 2026-07-18 no sanctions screening or on-chain compliance verification runs in production, and the oracle is not deployed. Specified as ERC-8262 (Draft). Nine ZK proof types covering AML risk thresholds, large-value reporting, anti-structuring, KYC attestations, allowlist membership, sanctions non-membership, and signed / multi-signed variants for honest-signal enforcement.",
    "types": [
      {
        "code": "0x01",
        "name": "Compliance",
        "assertion": "Score below jurisdiction threshold",
        "hidden": "exact score, signals"
      },
      {
        "code": "0x02",
        "name": "RiskScore",
        "assertion": "Score > X or Score in [X,Y]",
        "hidden": "exact score"
      },
      {
        "code": "0x03",
        "name": "Pattern",
        "assertion": "Pattern P not detected (anti-structuring)",
        "hidden": "transaction history"
      },
      {
        "code": "0x04",
        "name": "Attestation",
        "assertion": "Valid credential exists",
        "hidden": "credential details"
      },
      {
        "code": "0x05",
        "name": "Membership",
        "assertion": "Address in approved set S",
        "hidden": "which element"
      },
      {
        "code": "0x06",
        "name": "NonMembership",
        "assertion": "Address NOT in sanctions set S",
        "hidden": "set contents"
      },
      {
        "code": "0x07",
        "name": "ComplianceSigned",
        "assertion": "Compliance + provider secp256k1 signature",
        "hidden": "signals, score, signature"
      },
      {
        "code": "0x08",
        "name": "RiskScoreSigned",
        "assertion": "RiskScore + provider secp256k1 signature",
        "hidden": "exact score, signature"
      },
      {
        "code": "0x09",
        "name": "ComplianceMultiSigned",
        "assertion": "M of N providers attest (up to 5 slots)",
        "hidden": "per-provider data"
      }
    ],
    "jurisdiction_signed_required": {
      "EU": false,
      "US": true,
      "UK": false,
      "SG": true,
      "UAE": false
    },
    "jurisdiction_multi_provider_min": {
      "EU": 1,
      "US": 2,
      "UK": 1,
      "SG": 2
    }
  },
  "trust_tiers": [
    {
      "score_min": 0,
      "score_max": 24,
      "tier": "standard",
      "fee_pct_stable": 0.24,
      "fee_pct_volatile": 0.4,
      "privacy": ["open", "public", "standard", "stealth"]
    },
    {
      "score_min": 25,
      "score_max": 49,
      "tier": "trusted",
      "fee_pct_stable": 0.21,
      "fee_pct_volatile": 0.35,
      "privacy": ["open", "public", "standard", "stealth"]
    },
    {
      "score_min": 50,
      "score_max": 74,
      "tier": "verified",
      "fee_pct_stable": 0.17,
      "fee_pct_volatile": 0.29,
      "privacy": ["open", "public", "standard", "stealth", "private"]
    },
    {
      "score_min": 75,
      "score_max": 99,
      "tier": "premium",
      "fee_pct_stable": 0.14,
      "fee_pct_volatile": 0.25,
      "privacy": ["open", "public", "standard", "stealth", "private", "sovereign"]
    },
    {
      "score_min": 100,
      "score_max": null,
      "tier": "institutional",
      "fee_pct_stable": 0.12,
      "fee_pct_volatile": 0.22,
      "privacy": ["all", "custom"]
    }
  ],
  "agent_sdks": [
    {
      "language": "elixir",
      "name": "raxol_payments",
      "url": "https://github.com/axol-io/raxol/tree/main/packages/raxol_payments",
      "description": "Elixir agent SDK. Provides Raxol.Payments.Router for x402 (same-chain), Xochi (cross-chain), and MPP (Stripe/Tempo)."
    }
  ],
  "rate_limits": {
    "note": "Per-caller anti-abuse ceilings, not the aggregate throughput cap. Both an IP and a wallet limit apply to writes; the tighter of the two governs. Sliding 60s window. Only the categories below are limited -- quote, limit-quote, status and read-by-id are unmetered. Source of truth: RATE_LIMITS / WALLET_RATE_LIMITS in worker-lib.",
    "window_seconds": 60,
    "limits": {
      "execute": { "per_ip": 60, "per_wallet": 30 },
      "limit_submit": { "per_ip": 60, "per_wallet": 30 },
      "attestation": { "per_ip": 20, "per_wallet": 10 },
      "tier_update": { "per_ip": 10, "per_wallet": 5 },
      "claim": { "per_ip": 5, "per_wallet": 3 },
      "mandate_revoke": { "per_ip": 20 },
      "report": { "per_ip": 10 }
    },
    "claim_scope": "The claim ceiling governs POST /api/settlement/claim and both stealth claim routes (/api/stealth/claim/prepare, /api/stealth/claim/submit). The per-wallet key is the authenticated caller wallet (SIWE JWT / Mandate), never the request body.",
    "pacing_headers": "Successful responses on limited routes carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (unix seconds) so clients pace before hitting the ceiling.",
    "retry_contract": "429 (limit exceeded) and 503 (solver saturated/unavailable) both carry Retry-After (seconds). Back off for that interval, then retry; both are retryable. A 4xx (e.g. 422 unsolvable quote) is not."
  },
  "bot_policy": {
    "indexing": "allowed",
    "training": "allowed for public docs (whitepaper, learn, llms.txt)",
    "transacting": "allowed via x402 or wallet-signature JWT"
  }
}
