cred402/packages/openapi/cred402.postman_collection.json
caelum0x 2d43618725 feat: real integrations (Casper Testnet, x402/EIP-712, MCP, RealFi, cross-chain), wallet sign-in, branding
Replace the design-note docs (p1–p7) with the implemented "make it real" phase
docs (p8–p10) and wire production-grade, env-gated real integrations:

- p8 Casper Testnet: byte-exact deploys + WASM install via casper-js-sdk; live
  node reads (node.testnet.casper.network); CRED402_CHAIN=sim|testnet transport.
- p9 x402 + data + MCP: real EIP-712 typed-data digests (@casper-ecosystem/
  casper-eip-712); casper-x402 facilitator client (x402 V2); live Open-Meteo GHI;
  official @modelcontextprotocol/sdk server; casper-sidecar SSE event feed.
- p10 RealFi + cross-chain: real Stripe test-mode webhooks (HMAC-verified) and
  Plaid sandbox → privacy-preserving on-chain envelopes; Base Sepolia EVM deploy
  (Foundry); reachable via /api/realfi/* and /api/x402/facilitator routes.
- Sign-in with Casper Wallet: real extension provider + challenge/ed25519/session
  flow (/v1/auth/wallet/*), console connect + sign-in button.
- Branding: Cred402 logo mark, favicon, OG image; Vercel config for the console.

All env-gated with sim/free-API fallbacks; full suite green, all toolchains
(TS/Rust/Go/Solidity) build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 00:37:36 +03:00

90 lines
4.0 KiB
JSON

{
"info": {
"name": "Cred402 API",
"description": "Cred402 — the Casper-rooted credit bureau for autonomous AI agents. Set {{base}} and {{key}} in the collection variables.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{ "key": "base", "value": "http://localhost:4021" },
{ "key": "key", "value": "c402_replace_me" }
],
"auth": { "type": "bearer", "bearer": [{ "key": "token", "value": "{{key}}", "type": "string" }] },
"item": [
{
"name": "System",
"item": [
{ "name": "Health", "request": { "method": "GET", "url": "{{base}}/v1/health" } },
{ "name": "Metrics", "request": { "method": "GET", "url": "{{base}}/metrics" } }
]
},
{
"name": "Agents",
"item": [
{ "name": "List agents", "request": { "method": "GET", "url": "{{base}}/v1/agents?limit=50" } },
{ "name": "Get agent", "request": { "method": "GET", "url": "{{base}}/v1/agents/EvidenceSellerAgent" } },
{ "name": "Credit explain", "request": { "method": "GET", "url": "{{base}}/v1/agents/EvidenceSellerAgent/credit-explain" } },
{ "name": "Credit report", "request": { "method": "GET", "url": "{{base}}/v1/agents/EvidenceSellerAgent/credit-report" } },
{
"name": "Register agent",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }, { "key": "Idempotency-Key", "value": "reg-1" }],
"url": "{{base}}/v1/agents",
"body": { "mode": "raw", "raw": "{\n \"agent_id\": \"WeatherRiskAgent\",\n \"service_type\": \"weather_risk\"\n}" }
}
}
]
},
{
"name": "Credit",
"item": [
{ "name": "Pool", "request": { "method": "GET", "url": "{{base}}/v1/credit/pool" } },
{
"name": "Open credit line",
"request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "url": "{{base}}/v1/credit/lines", "body": { "mode": "raw", "raw": "{ \"agent_id\": \"EvidenceSellerAgent\" }" } }
},
{
"name": "Draw",
"request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "url": "{{base}}/v1/credit/lines/EvidenceSellerAgent/draw", "body": { "mode": "raw", "raw": "{ \"amount_cspr\": 6 }" } }
},
{
"name": "Underwrite batch",
"request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "url": "{{base}}/v1/credit/underwrite-batch", "body": { "mode": "raw", "raw": "{ \"agent_ids\": [\"EvidenceSellerAgent\", \"WeatherRiskAgent\"] }" } }
}
]
},
{
"name": "Marketplace",
"item": [
{ "name": "Listings", "request": { "method": "GET", "url": "{{base}}/v1/marketplace" } },
{
"name": "Purchase",
"request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "url": "{{base}}/v1/marketplace/purchase", "body": { "mode": "raw", "raw": "{ \"listing_id\": \"lst-0001\", \"buyer_agent\": \"WeatherRiskAgent\" }" } }
}
]
},
{
"name": "Analytics",
"item": [
{ "name": "Analytics", "request": { "method": "GET", "url": "{{base}}/v1/analytics" } },
{ "name": "Search", "request": { "method": "GET", "url": "{{base}}/v1/search?q=SOLAR" } }
]
},
{
"name": "GraphQL",
"item": [
{
"name": "Query agents + analytics",
"request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "url": "{{base}}/graphql", "body": { "mode": "raw", "raw": "{ \"query\": \"{ agents { agent_id reputation_score credit_score } analytics }\" }" } }
}
]
},
{
"name": "x402",
"item": [
{ "name": "402 challenge", "request": { "method": "GET", "url": "{{base}}/verify/energy_output?rwa_id=SOLAR-A17" } }
]
}
]
}