{"components":{"schemas":{"AMLRequest":{"properties":{"amount":{"description":"Optional transaction amount","type":"string"},"currency":{"description":"Optional currency code","type":"string"},"entity_name":{"description":"Full legal name to screen against sanctions lists","type":"string"},"jurisdictions":{"description":"ISO country codes for jurisdiction risk assessment","items":{"type":"string"},"type":"array"},"transaction_id":{"description":"Optional transaction reference","type":"string"},"wallet_address":{"description":"Optional blockchain wallet address","type":"string"}},"required":["entity_name"],"type":"object"},"AMLResponse":{"properties":{"recommendation":{"enum":["approve","review","reject"],"type":"string"},"risk_level":{"enum":["low","medium","high","critical"],"type":"string"},"sanctions_screening":{"properties":{"matched":{"type":"boolean"},"source":{"type":"string"}},"type":"object"},"score":{"maximum":100,"minimum":0,"type":"integer"}},"required":["risk_level","score","recommendation"],"type":"object"},"KYCRequest":{"properties":{"country":{"description":"ISO 3166-1 alpha-2 country code for jurisdiction risk","type":"string"},"entity_id":{"description":"National ID, passport, or registration number","type":"string"},"entity_name":{"description":"Full legal name of the person or entity to screen","type":"string"},"wallet_address":{"description":"Blockchain wallet address (e.g. 0x...)","type":"string"}},"required":["entity_name"],"type":"object"},"KYCResponse":{"properties":{"risk_level":{"enum":["low","medium","high","critical"],"type":"string"},"sanctions_match":{"type":"boolean"},"score":{"maximum":100,"minimum":0,"type":"integer"},"status":{"enum":["verified","flagged","pending"],"type":"string"}},"required":["status","risk_level","score"],"type":"object"},"MonitorAlertsResponse":{"properties":{"alerts":{"items":{"properties":{"counterparty":{"type":"string"},"created_at":{"type":"string"},"reason":{"type":"string"},"severity":{"enum":["critical","warning"],"type":"string"},"tx_hash":{"type":"string"}},"type":"object"},"type":"array"},"count":{"type":"integer"},"wallet_address":{"type":"string"}},"required":["wallet_address","count","alerts"],"type":"object"},"MonitorRegisterRequest":{"properties":{"wallet_address":{"description":"EVM wallet address to monitor (0x + 40 hex chars)","type":"string"}},"required":["wallet_address"],"type":"object"},"MonitorRegisterResponse":{"properties":{"expires_at":{"description":"ISO 8601 expiry; re-register to renew","type":"string"},"networks":{"items":{"type":"string"},"type":"array"},"status":{"enum":["active"],"type":"string"},"wallet_address":{"type":"string"}},"required":["wallet_address","status","expires_at"],"type":"object"},"OracleRequest":{"properties":{"address":{"description":"Ethereum address to attest compliance for (0x-prefixed, 42 chars)","type":"string"},"entity_name":{"description":"Legal name to screen against OFAC SDN and UN sanctions lists","type":"string"},"investor_type":{"description":"Investor classification for tokenized-asset compliance","enum":["retail","accredited","qualified_purchaser","institutional"],"type":"string"},"jurisdiction":{"description":"ISO 3166-1 numeric country code (840=US, 826=GB, 702=SG, ...)","type":"integer"}},"required":["address"],"type":"object"},"OracleResponse":{"properties":{"address":{"type":"string"},"attestation":{"description":"EIP-712 signed compliance verdict — submit to ComplianceOracle.submitAttestation()","properties":{"account":{"type":"string"},"investor_type":{"description":"0=Unknown, 1=Retail, 2=Accredited, 3=QualifiedPurchaser, 4=Institutional","type":"integer"},"jurisdiction":{"type":"integer"},"nonce":{"type":"string"},"risk_score":{"maximum":100,"minimum":0,"type":"integer"},"signature":{"description":"0x-prefixed EIP-712 signature","type":"string"},"status_code":{"description":"0=Unknown, 1=Compliant, 2=NonCompliant, 3=Flagged","type":"integer"},"timestamp":{"type":"integer"}},"type":"object"},"investor_type":{"type":"string"},"jurisdiction":{"type":"integer"},"risk_score":{"maximum":100,"minimum":0,"type":"integer"},"status":{"enum":["compliant","non_compliant","flagged","unknown"],"type":"string"}},"required":["address","status","risk_score","attestation"],"type":"object"},"OracleStatusResponse":{"properties":{"address":{"type":"string"},"investor_type":{"type":"string"},"jurisdiction":{"type":"integer"},"last_checked":{"description":"ISO 8601 timestamp of last on-chain attestation","type":"string"},"risk_score":{"maximum":100,"minimum":0,"type":"integer"},"stale":{"description":"true if the on-chain record is older than the contract's freshness window","type":"boolean"},"status":{"enum":["compliant","non_compliant","flagged","unknown"],"type":"string"}},"required":["address","status"],"type":"object"},"RiskReportRequest":{"properties":{"entity_name":{"description":"Full legal name of entity","type":"string"},"entity_type":{"enum":["individual","company"],"type":"string"},"include_transaction_analysis":{"type":"boolean"},"jurisdictions":{"description":"ISO country codes for jurisdiction risk analysis","items":{"type":"string"},"type":"array"},"wallet_address":{"description":"Blockchain wallet address","type":"string"}},"required":["entity_name"],"type":"object"},"RiskReportResponse":{"properties":{"jurisdiction_risk":{"items":{"type":"object"},"type":"array"},"overall_risk":{"enum":["low","medium","high","critical"],"type":"string"},"overall_score":{"maximum":100,"minimum":0,"type":"integer"},"recommendations":{"items":{"type":"object"},"type":"array"},"report_id":{"type":"string"},"sanctions_result":{"type":"object"}},"required":["report_id","overall_risk","overall_score"],"type":"object"},"WalletScreenRequest":{"properties":{"wallet_address":{"description":"EVM wallet address to screen (0x + 40 hex chars)","type":"string"}},"required":["wallet_address"],"type":"object"},"WalletScreenResponse":{"properties":{"direct_sanctions_match":{"description":"true if the wallet address itself is OFAC-listed","type":"boolean"},"on_chain_risk":{"description":"On-chain exposure: sanctioned counterparties, mixer exposure, flagged token holdings, wallet age","type":"object"},"recommendation":{"enum":["approve","review","reject"],"type":"string"},"risk_level":{"enum":["low","medium","high","critical"],"type":"string"},"score":{"maximum":100,"minimum":0,"type":"integer"},"wallet_address":{"type":"string"}},"required":["wallet_address","risk_level","score","recommendation"],"type":"object"},"X402Challenge":{"description":"x402 payment-required challenge body. The client signs and retries with an X-PAYMENT header.","properties":{"accepts":{"items":{"properties":{"asset":{"type":"string"},"network":{"type":"string"},"payTo":{"type":"string"},"price":{"type":"string"},"scheme":{"type":"string"}},"type":"object"},"type":"array"},"x402Version":{"type":"integer"}},"type":"object"}},"securitySchemes":{"x402":{"description":"HTTP 402 micropayment via x402 protocol. The client retries with an X-PAYMENT header carrying a signed USDC transfer.","scheme":"x402","type":"http"}}},"info":{"contact":{"url":"https://api.netbrainis.co.za"},"description":"KYC, AML, on-chain wallet screening, address monitoring, and regulatory risk assessment powered by real OFAC and UN sanctions data plus on-chain analysis (Ethereum + Base). Pay-per-call via x402 USDC micropayments on Base.","title":"AgentEconomy Compliance API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/v1/aml/screen":{"post":{"description":"AML sanctions screening against OFAC SDN and UN Consolidated lists with jurisdiction risk and recommendation (approve/review/reject).","operationId":"amlScreen","requestBody":{"content":{"application/json":{"example":{"entity_name":"John Doe","jurisdictions":["US","GB"]},"schema":{"$ref":"#/components/schemas/AMLRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"recommendation":"approve","risk_level":"low","sanctions_screening":{"matched":false,"source":"OFAC SDN + UN Consolidated"},"score":10},"schema":{"$ref":"#/components/schemas/AMLResponse"}}},"description":"AML screening completed."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"AML sanctions screening","tags":["compliance"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.05","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/kyc/check":{"post":{"description":"Sanctions screening check against OFAC SDN and UN Consolidated lists with risk scoring (0-100) and jurisdiction risk assessment.","operationId":"kycCheck","requestBody":{"content":{"application/json":{"example":{"country":"US","entity_name":"John Doe","wallet_address":"0x1234567890abcdef1234567890abcdef12345678"},"schema":{"$ref":"#/components/schemas/KYCRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"risk_level":"low","sanctions_match":false,"score":15,"status":"verified"},"schema":{"$ref":"#/components/schemas/KYCResponse"}}},"description":"KYC check completed."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"KYC identity verification","tags":["compliance"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.01","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/monitor/alerts":{"get":{"description":"Return stored compliance alerts for a monitored wallet address. Free to poll.","operationId":"monitorAlerts","parameters":[{"description":"EVM wallet address (0x-prefixed, 42 chars)","in":"query","name":"wallet_address","required":true,"schema":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorAlertsResponse"}}},"description":"Alerts for the address (may be empty)."}},"summary":"Read monitoring alerts (free)","tags":["monitoring"]}},"/v1/monitor/register":{"post":{"description":"Monitor a wallet address for 30 days across Ethereum and Base. Raises alerts when it transacts with an OFAC-sanctioned address or known mixer. Poll GET /v1/monitor/alerts for findings (free). Re-register to renew.","operationId":"monitorRegister","requestBody":{"content":{"application/json":{"example":{"wallet_address":"0x1234567890abcdef1234567890abcdef12345678"},"schema":{"$ref":"#/components/schemas/MonitorRegisterRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorRegisterResponse"}}},"description":"Address registered for monitoring."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"Register a wallet for ongoing monitoring","tags":["monitoring"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.50","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/oracle/request":{"post":{"description":"Run AML/sanctions check and return an EIP-712 signed compliance attestation that the caller submits to the ComplianceOracle contract on-chain (caller pays gas).","operationId":"oracleRequest","requestBody":{"content":{"application/json":{"example":{"address":"0x9AFdB24A65c4059129392C1919eA2697a69bdC4D","entity_name":"Acme Corp","investor_type":"accredited","jurisdiction":840},"schema":{"$ref":"#/components/schemas/OracleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"address":"0x9AFdB24A65c4059129392C1919eA2697a69bdC4D","attestation":{"account":"0x9AFdB24A65c4059129392C1919eA2697a69bdC4D","investor_type":2,"jurisdiction":840,"nonce":"12345678901234567890","risk_score":10,"signature":"0x...","status_code":1,"timestamp":1715000000},"investor_type":"accredited","jurisdiction":840,"risk_score":10,"status":"compliant"},"schema":{"$ref":"#/components/schemas/OracleResponse"}}},"description":"Attestation signed."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"Compliance oracle attestation","tags":["oracle"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.50","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/oracle/status/{address}":{"get":{"description":"Read the current on-chain compliance status for an Ethereum address from the ComplianceOracle contract (view call, no gas).","operationId":"oracleStatus","parameters":[{"description":"Ethereum address (0x-prefixed, 42 chars)","example":"0x9AFdB24A65c4059129392C1919eA2697a69bdC4D","in":"path","name":"address","required":true,"schema":{"pattern":"^0x[a-fA-F0-9]{40}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"address":"0x9AFdB24A65c4059129392C1919eA2697a69bdC4D","investor_type":"accredited","jurisdiction":840,"last_checked":"2026-05-15T17:00:00Z","risk_score":10,"stale":false,"status":"compliant"},"schema":{"$ref":"#/components/schemas/OracleStatusResponse"}}},"description":"On-chain status read."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"On-chain compliance status","tags":["oracle"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.01","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/risk/report":{"post":{"description":"Sanctions and jurisdiction risk assessment report combining OFAC/UN screening with multi-country risk analysis.","operationId":"riskReport","requestBody":{"content":{"application/json":{"example":{"entity_name":"Acme Corp","entity_type":"company","jurisdictions":["US","GB","SG"]},"schema":{"$ref":"#/components/schemas/RiskReportRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"jurisdiction_risk":[{"country":"US","reason":"Well-regulated jurisdiction","risk_level":"low"}],"overall_risk":"low","overall_score":12,"report_id":"rpt-abc123","sanctions_result":{"highest_risk_factor":"low","sanctions_hit":false}},"schema":{"$ref":"#/components/schemas/RiskReportResponse"}}},"description":"Risk report generated."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"Regulatory risk assessment report","tags":["compliance"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.10","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}},"/v1/wallet/screen":{"post":{"description":"Screen a wallet address: direct OFAC sanctioned-address check plus on-chain exposure analysis (sanctioned counterparties, mixer exposure, flagged token holdings) across Ethereum and Base. No entity name required.","operationId":"walletScreen","requestBody":{"content":{"application/json":{"example":{"wallet_address":"0x1234567890abcdef1234567890abcdef12345678"},"schema":{"$ref":"#/components/schemas/WalletScreenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletScreenResponse"}}},"description":"Wallet screening completed."},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Challenge"}}},"description":"Payment required. Returns an x402 challenge with accepts array.","headers":{"Payment-Required":{"description":"x402 v2 challenge envelope.","schema":{"type":"string"}}}}},"security":[{"x402":[]}],"summary":"On-chain wallet screening","tags":["compliance"],"x-payment-info":{"asset":"USDC","network":"base","payTo":"0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342","price":{"amount":"0.05","currency":"USD","mode":"fixed"},"protocols":["x402"],"scheme":"exact"}}}},"servers":[{"url":"https://api.netbrainis.co.za"}],"x-discovery":{"ownershipProofs":["0x97522cA24C568be2d8E2e79aB4cBA4D074cd4342"]}}