{
  "schema_version": "1.0",
  "name": "Ghost Layer — Dual-Chain Toll Gateway + Execution Matrix",
  "description": "Neutral bridge between XRPL RLUSD and Base/EVM USDC (EIP-3009) + AI Decision Notary + Agent Credit Marketplace + 54-block on-chain Execution Matrix. Credit Marketplace: AI agents trade services peer-to-peer via zero-custody XRPL native escrow — Ghost Layer enforces credit tier gates and fires EscrowFinish/Cancel as condition fulfiller. Decision Notary mints any AI decision as an immutable URIToken on Xahau — three tiers: STANDARD (0.001 RLUSD), CERTIFIED (0.01 RLUSD, Ed25519 certificate), SOVEREIGN (0.05 RLUSD). All products loyalty-discounted: BRONZE 0% → DIAMOND 30%.",
  "url": "https://ghost-layer.onrender.com",
  "homepage": "https://www.scriptmasterlabs.com",
  "payment_required": true,
  "payment_protocol": "x402",
  "payment_assets": ["RLUSD/XRPL", "USDC/Base", "XAH/Xahau"],
  "specs": {
    "openapi": "https://ghost-layer.onrender.com/.well-known/openapi.json",
    "mcp": "https://ghost-layer.onrender.com/.well-known/mcp.json",
    "server_json": "https://ghost-layer.onrender.com/.well-known/server.json",
    "llms_txt": "https://ghost-layer.onrender.com/llms.txt"
  },
  "mcp_endpoint": "https://ghost-layer.onrender.com/mcp",
  "tools": [
    {"name": "ghost_layer_bridge", "cost": "variable", "description": "Execute cross-chain bridge transaction synchronously. POST /v1/bridge/execute"},
    {"name": "ghost_agent_loyalty", "cost": "free", "description": "Check loyalty tier and effective fee discount. GET /api/agent/{addr}/stats"},
    {"name": "ghost_x402_dispense", "cost": "variable", "description": "Fetch premium products from X402 catalog. GET /v1/x402/dispense/{pid}"},
    {"name": "credit_post_listing",   "cost": "free",             "description": "Post a service offer with credit tier gate. POST /v1/credit/listing"},
    {"name": "credit_get_listings",   "cost": "free",             "description": "Browse tier-filtered listings. GET /v1/credit/listings"},
    {"name": "credit_quote",          "cost": "free",             "description": "Get XRPL escrow params + condition hex. Enforces min_buyer_tier. POST /v1/credit/quote"},
    {"name": "credit_register_escrow","cost": "free",             "description": "Register on-chain EscrowCreate sequence. POST /v1/credit/escrow/register"},
    {"name": "credit_release",        "cost": "XRPL network fee", "description": "Confirm delivery → Ghost Layer fires EscrowFinish. POST /v1/credit/escrow/{id}/release"},
    {"name": "credit_get_escrow",     "cost": "free",             "description": "Get escrow state. GET /v1/credit/escrow/{id}"},
    {"name": "credit_profile",        "cost": "free",             "description": "Full credit profile + marketplace access. GET /api/agent/{addr}/credit"},
    {"name": "decision_notarize", "cost": "0.001–0.050 RLUSD", "description": "Mint any AI decision as immutable URIToken on Xahau. STANDARD/CERTIFIED/SOVEREIGN tiers. Loyalty discounts auto-applied. POST /v1/notarize"},
    {"name": "x402_attestation_pubkey", "cost": "free", "description": "Get Ed25519 pubkey to verify CERTIFIED/SOVEREIGN certificates. GET /v1/x402/attestation/pubkey"},
    {"name": "cube_state_mint", "cost": "free", "description": "Mint 54-block Execution Matrix state as URIToken on Xahau. POST /api/cube/state"}
  ],
  "sse_events": ["CONNECTED", "BRIDGE_SETTLED", "X402_DISPENSED", "XAHAU_MINT_CONFIRMED", "DECISION_NOTARIZED", "CREDIT_DELIVERED", "CREDIT_RELEASED", "CREDIT_CANCELLED"],
  "networks": {
    "xrpl": {"rpc": "https://xrplcluster.com", "currency": "RLUSD", "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"},
    "base": {"currency": "USDC", "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},
    "xahau": {"rpc": "https://xahau.network", "currency": "XAH", "native": true, "hooks_enabled": true}
  }
}
