{"discovery_version":"1.0.0","documentation_root":"https://raw.githubusercontent.com/michaelxmchn/aims-gateway/main/docs/MASTER_INDEX.md","api":{"name":"AIMS Gateway","version":"1.0.0","description":"AI-Mediated Skill Network — Task Dispatch & Settlement Gateway","protocol":"REST over HTTP","content_type":"application/json"},"server":{"current_time":1781094767.5523272,"timezone":"UTC"},"authentication":{"scheme":"EIP-191","description":"Every POST to /api/* endpoints must include three signed headers. GET /api/discovery, GET /api/health, and POST /api/skills/upload are exempt.","headers":{"X-Wallet-Address":{"type":"string","description":"EVM wallet address (0x-prefixed, 42 chars)"},"X-Signature":{"type":"string","description":"EIP-191 personal_sign hex signature over the raw body"},"X-Timestamp":{"type":"string","description":"UNIX epoch seconds (float). Must be within 300s."}},"example_curl":"# EIP-191 personal_sign — see bootstrap_helper.py for the full flow\nWALLET=\"0x...\"; TS=$(date +%s)\nBODY='{\"skill_id\":\"amazon_scraper\",\"params\":{},\"user_id\":\"$WALLET\"}'\n# Sign the raw body bytes via Python (eth_account):\n# from eth_account.messages import encode_defunct\n# sig = wallet.sign_message(encode_defunct(primitive=body.encode()))\ncurl -X POST \"$BASE_URL/api/run\" \\\n  -H \"X-Wallet-Address: $WALLET\" -H \"X-Signature: $SIG\" \\\n  -H \"X-Timestamp: $TS\" \\\n  -H \"Content-Type: application/json\" -d \"$BODY\""},"skills":[{"id":"amazon_scraper","description":"Scrape Amazon product listings for a given search term and return structured competitor data including prices, ratings, review counts, and ASINs.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/amazon_scraper/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["web-scraping","e-commerce","price-tracking"],"manifest":{"name":"amazon_scraper","description":"Scrape Amazon product listings for a given search term and return structured competitor data including prices, ratings, review counts, and ASINs.","version":"1.0.0","author":"aims_seed","tags":["scraping","amazon","competitor","ecommerce","data"],"input_schema":{"type":"object","properties":{"search_term":{"type":"string","description":"The product search term to look up on Amazon"},"max_results":{"type":"number","description":"Maximum number of results to return (default: 10, max: 50)"},"sort_by":{"type":"string","enum":["relevance","price_low_high","price_high_low","rating","newest"],"description":"Sort order for results"}},"required":["search_term"]},"output_schema":{"type":"object","properties":{"products":{"type":"array","description":"List of scraped product data"},"total_found":{"type":"number","description":"Total number of products found"},"search_term":{"type":"string","description":"The original search term used"}},"required":["products","total_found","search_term"]},"price_points":2,"staked_points":12.0}},{"id":"buggy_skill","description":"Intentional failing skill for testing the cool-down jail mechanism. Always raises an exception during execution.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/buggy_skill/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["testing","debugging"],"manifest":{"name":"buggy_skill","description":"Intentional failing skill for testing the cool-down jail mechanism. Always raises an exception during execution.","version":"0.0.1","author":"buggy_dev","tags":["test","debug","fail"],"input_schema":{"type":"object","properties":{"input":{"type":"string","description":"Any input (will be ignored — this skill always fails)"}},"required":["input"]},"output_schema":{"type":"object","properties":{"result":{"type":"string","description":"Never reached — skill always fails before output"}},"required":["result"]},"price_points":0,"staked_points":5.0}},{"id":"code_security_audit","description":"Analyse Solidity source code for common vulnerability patterns including reentrancy, access control, and arithmetic issues. Returns a severity-ranked report.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/code_security_audit/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["code-analysis","security","static-analysis"],"manifest":{"name":"code_security_audit","description":"Analyse Solidity source code for common vulnerability patterns including reentrancy, access control, and arithmetic issues. Returns a severity-ranked report.","version":"1.0.0","author":"aims_seed","tags":["security","solidity","audit"],"input_schema":{"type":"object","properties":{"source_code":{"type":"string","description":"The Solidity source code to audit"},"contract_name":{"type":"string","description":"Name of the primary contract"}},"required":["source_code"]},"output_schema":{"type":"string","description":"A markdown-formatted audit report"},"price_points":1,"staked_points":10.0}},{"id":"dashboard_skill","description":"Generate a live DePIN ecosystem dashboard with wealth distribution charts, task analytics, and slashing logs. Opens the dashboard in the user's default browser.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/dashboard_skill/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["visualization","monitoring","dashboard"],"manifest":{"name":"dashboard_skill","description":"Generate a live DePIN ecosystem dashboard with wealth distribution charts, task analytics, and slashing logs. Opens the dashboard in the user's default browser.","version":"1.0.0","author":"aims_protocol","tags":["dashboard","visualization","analytics"],"input_schema":{"type":"object","properties":{},"required":[]},"output_schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"required":["status","message"]},"price_points":0,"staked_points":0.0}},{"id":"data_analyzer","description":"Analyse a CSV dataset and return statistical summaries, correlation insights, and data quality reports. Useful for quick data exploration.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/data_analyzer/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["data-analysis","visualization"],"manifest":{"name":"data_analyzer","description":"Analyse a CSV dataset and return statistical summaries, correlation insights, and data quality reports. Useful for quick data exploration.","version":"1.0.0","author":"aims_seed","tags":["data","analysis","csv"],"input_schema":{"type":"object","properties":{"file_path":{"type":"string","description":"Absolute path to the CSV file"},"analysis_type":{"type":"string","enum":["summary","correlation","quality","full"],"description":"Type of analysis to perform"}},"required":["file_path"]},"output_schema":{"type":"object","properties":{"report":{"type":"string","description":"The analysis report in markdown"},"row_count":{"type":"number","description":"Number of rows processed"}},"required":["report"]},"price_points":2,"staked_points":8.0}},{"id":"git_changelog","description":"Generate a formatted changelog from git commit history between two refs. Supports conventional commits parsing.","execution":{"endpoint":"/api/run","method":"POST"},"resources":{"logic_script_url":"https://api.aimsgateway.com/api/skills/git_changelog/logic","manifest_url":"https://api.aimsgateway.com/api/discovery"},"capabilities":["git","automation","documentation"],"manifest":{"name":"git_changelog","description":"Generate a formatted changelog from git commit history between two refs. Supports conventional commits parsing.","version":"1.0.0","author":"aims_seed","tags":["git","changelog","markdown"],"input_schema":{"type":"object","properties":{"repo_path":{"type":"string","description":"Absolute path to the git repository"},"from_ref":{"type":"string","description":"Starting git ref (tag, branch, or commit hash)"},"to_ref":{"type":"string","description":"Ending git ref (defaults to HEAD)"},"format":{"type":"string","enum":["markdown","json"],"description":"Output format"}},"required":["repo_path","from_ref"]},"output_schema":{"type":"string","description":"Formatted changelog text"},"price_points":0,"staked_points":5.0}}],"endpoints":[{"category":"Task Management","description":"Claim, submit, and monitor tasks.","operations":[{"method":"POST","path":"/api/tasks/claim","summary":"Claim a PENDING task.","auth_required":true},{"method":"POST","path":"/api/tasks/submit","summary":"Submit completed task result.","auth_required":true},{"method":"GET","path":"/api/tasks/{task_id}/status","summary":"Poll task status.","auth_required":false},{"method":"GET","path":"/api/tasks/{task_id}/pot","summary":"Fetch Proof-of-Task.","auth_required":false}]},{"category":"Skill Management","description":"Upload, inspect, and execute skills.","operations":[{"method":"POST","path":"/api/skills/upload","summary":"Upload skill zip.","auth_required":false},{"method":"GET","path":"/api/skills/{skill_id}/logic","summary":"Fetch skill logic.py.","auth_required":false},{"method":"POST","path":"/api/run","summary":"Execute a skill.","auth_required":true}]},{"category":"Worker","description":"Worker registration and liveness.","operations":[{"method":"POST","path":"/api/workers/heartbeat","summary":"Send keep-alive.","auth_required":true}]},{"category":"System","description":"Health check, discovery, admin.","operations":[{"method":"GET","path":"/api/health","summary":"Return system health.","auth_required":false},{"method":"GET","path":"/api/discovery","summary":"This document.","auth_required":false}]},{"category":"Wallet & Credits","description":"On-chain wallet operations.","operations":[{"method":"POST","path":"/api/wallet/deposit","summary":"Deposit USDC (proxy).","auth_required":true},{"method":"GET","path":"/api/wallet/balance","summary":"Check USDC balance.","auth_required":true}]}],"links":{"openclaw_manifest":{"url":"https://api.aimsgateway.com/manifests/openclaw_skill.json","description":"OpenClaw-compatible manifest for agent orchestration"},"health":{"url":"https://api.aimsgateway.com/api/health","description":"Quick health check."}},"notes":["Auth uses EIP-712 typed data signatures (not HMAC-SHA256).","X-User-ID must be an EVM address (0x + 40 hex chars).","X-Timestamp must be within 300s of server time (replay protection).","X-Nonce must be monotonic per address (replay protection).","X-Deadline prevents signature reuse beyond the specified time.","Contract: AIMSSettlement on Base (USDC 6-decimals, 80/20 split)."]}