{
  "openapi":"3.1.0",
  "info":{"title":"BUPZO Agent Commerce Gateway","version":"1.1.0","description":"Machine-readable discovery, quote, unsigned purchase preparation and on-chain purchase verification for BUPZO."},
  "servers":[{"url":"https://www.bupzotoken.com"}],
  "paths":{
    "/api/agent/discover":{"get":{"operationId":"discoverBupzoCommerce","summary":"Discover BUPZO and the complete machine purchase flow","responses":{"200":{"description":"Discovery manifest","content":{"application/json":{"schema":{"type":"object"}}}}}}},
    "/api/agent/info":{"get":{"operationId":"getBupzoInfo","summary":"Get official BUPZO sale and verification data","responses":{"200":{"description":"BUPZO information","content":{"application/json":{"schema":{"type":"object"}}}}}}},
    "/api/agent/quote":{"post":{"operationId":"getBupzoQuote","summary":"Get a deterministic BUPZ quote from a USDT amount","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountUsd":{"type":"number","minimum":100},"agentId":{"type":"string"}},"required":["amountUsd"]}}}},"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentQuote"}}}}}}},
    "/api/agent/prepare-purchase":{"post":{"operationId":"prepareBupzoPurchase","summary":"Prepare unsigned BNB Smart Chain calls for the buyer or authorized agent wallet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountUsd":{"type":"number","minimum":100},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"agentId":{"type":"string"}},"required":["amountUsd","wallet"]}}}},"responses":{"200":{"description":"Unsigned transaction plan","content":{"application/json":{"schema":{"type":"object"}}}}}}},
    "/api/agent/verify-transaction":{"post":{"operationId":"verifyBupzoPurchase","summary":"Verify a submitted BUPZO purchase transaction on-chain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string"},"agentId":{"type":"string"}},"required":["txHash"]}}}},"responses":{"200":{"description":"Verified purchase evidence","content":{"application/json":{"schema":{"type":"object"}}}}}}}
  },
  "components":{"schemas":{
    "AgentQuote":{"type":"object","properties":{"amountUsd":{"type":"number"},"bupzAmount":{"type":"number"},"priceUsd":{"type":"number"},"paymentAsset":{"type":"string"},"network":{"type":"string"},"chainId":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"}}},
    "UnsignedPurchase":{"type":"object","description":"Unsigned allowance and purchase calls. The buyer or authorized agent wallet must sign them."}
  }},
  "externalDocs":{"description":"BUPZO machine commerce manifest","url":"https://www.bupzotoken.com/buy.json"}
}
