NAC_Blockchain/docs/api/CEE_API_REFERENCE.md

95 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# NAC CEE 集成服务 API 参考
**版本**: 1.0.0
**协议**: NAC_Lens/4.0
**端口**: 9558
**状态**: 生产级
---
## 健康检查接口
**端点**: `GET /health`
**描述**: 返回 CEE 集成服务的完整健康状态
**响应示例**:
```json
{
"service": "nac-cee-integration",
"version": "1.0.0",
"status": "healthy",
"jurisdictions_loaded": 31,
"total_tests_passed": 252,
"cbpp_principles": {
"constitutional_law_is_governance": true,
"constitution_is_rules": true,
"participation_is_consensus": true,
"nodes_produce_blocks": true
},
"modules": {
"nac-jurisdiction-rules": {
"name": "NAC辖区宪法规则验证插件集31辖区",
"status": "running",
"test_count": 225,
"version": "1.0.0"
}
}
}
```
---
## 交易验证接口
**端点**: `POST /validate`
**描述**: 对指定辖区的交易进行宪法规则验证
**请求体**:
```json
{
"jurisdiction": "CN",
"tx_hash": "0xabcdef1234567890",
"amount_usd": 5000.0,
"asset_type": "RWA_REAL_ESTATE",
"kyc_level": "Institutional",
"aml_cleared": true,
"is_cross_border": false,
"sanctions_cleared": true
}
```
**响应体**:
```json
{
"jurisdiction": "CN",
"tx_hash": "0xabcdef1234567890",
"valid": true,
"cr_issued": true,
"rules_passed": ["CN_AML_001", "CN_KYC_001", "CN_SANCTIONS_001"],
"violation": null,
"protocol": "NAC_Lens/4.0"
}
```
---
## 支持的辖区列表
| 层级 | 辖区代码 |
|------|---------|
| Tier 1 | CN, HK, SG, AE, US, EU, JP, KR, AU, CH, GB |
| Tier 2 | BM, KY, VG, MT, LU, GI, JE, IM, PA, MU |
| Tier 3 | BR, IN, TH, ID, NG, MX, ZA, TR, SA, RU |
---
## 错误码
| 错误码 | 描述 |
|--------|------|
| `{JUR}_AML_001` | AML 金额超限,需要反洗钱清除 |
| `{JUR}_KYC_001` | KYC 验证缺失 |
| `{JUR}_SANCTIONS_001` | 制裁筛查未通过 |
| `Jurisdiction not supported` | 不支持的辖区代码 |