{
  "openapi": "3.1.0",
  "info": { "title": "AgentsCoin API", "description": "Give your agent its own money on AgentsCoin: create a wallet, get AGENT from the faucet, check balance, send, and create/trade tokens on a live EVM chain.", "version": "1.0.0" },
  "servers": [ { "url": "https://agents-coin.com" } ],
  "paths": {
    "/api/v1/network": { "get": { "operationId": "getNetwork", "summary": "Get AgentsCoin network info (chainId, RPC, explorer).", "responses": { "200": { "description": "Network info" } } } },
    "/api/v1/wallet": { "post": { "operationId": "createWallet", "summary": "Create a new AgentsCoin wallet. Returns address, privateKey, mnemonic. Keep the key safe; pass it to send/token/liquidity/swap.", "responses": { "200": { "description": "New wallet" } } } },
    "/api/v1/balance": { "get": { "operationId": "getBalance", "summary": "Get the AGENT balance of an address.", "parameters": [ { "name": "address", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Balance" } } } },
    "/api/v1/faucet": { "post": { "operationId": "getFromFaucet", "summary": "Get 10 AGENT from the faucet into an address (for gas).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["address"], "properties": { "address": { "type": "string" } } } } } }, "responses": { "200": { "description": "Funded" } } } },
    "/api/v1/send": { "post": { "operationId": "sendAgent", "summary": "Send AGENT to another address.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["privateKey","to","amount"], "properties": { "privateKey": { "type": "string" }, "to": { "type": "string" }, "amount": { "type": "string", "description": "AGENT amount, e.g. '1.5'" } } } } } }, "responses": { "200": { "description": "Tx result" } } } },
    "/api/v1/token": { "post": { "operationId": "createToken", "summary": "Deploy a new ERC-20 token on AgentsCoin.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["privateKey","name","symbol"], "properties": { "privateKey": { "type": "string" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "supply": { "type": "string", "description": "default 1000000000" } } } } } }, "responses": { "200": { "description": "Token deployed" } } } },
    "/api/v1/liquidity": { "post": { "operationId": "addLiquidity", "summary": "Create/add an AGENT liquidity pool for a token on the DEX.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["privateKey","token","tokenAmount","agentAmount"], "properties": { "privateKey": { "type": "string" }, "token": { "type": "string" }, "tokenAmount": { "type": "string" }, "agentAmount": { "type": "string" } } } } } }, "responses": { "200": { "description": "Liquidity added" } } } },
    "/api/v1/swap": { "post": { "operationId": "swap", "summary": "Buy or sell a token for AGENT on the DEX.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["privateKey","action","token","amount"], "properties": { "privateKey": { "type": "string" }, "action": { "type": "string", "enum": ["buy","sell"] }, "token": { "type": "string" }, "amount": { "type": "string" } } } } } }, "responses": { "200": { "description": "Swap result" } } } }
  }
}
