NAC_Blockchain/config/api-server.toml

42 lines
1005 B
TOML
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 API服务器原生配置
# 彻底移除以太坊架构依赖
# 版本: 2.0.0
# 日期: 2026-02-20
[server]
# 监听地址
host = "0.0.0.0"
# API端口不使用8080使用NAC专用端口
port = 9550
[blockchain]
# CBPP节点连接使用NRPC4.0协议)
# ❌ 不连接到localhost:3000那是量子浏览器
# ✅ 直接从CBPP节点日志读取区块高度
cbpp_log_source = "systemd"
cbpp_service_name = "nac-cbpp-node.service"
# NVM节点连接
# ❌ 不使用8546以太坊端口
# ✅ 使用NAC原生端口
nvm_node_url = "http://localhost:9549"
[network]
# NAC网络ID
chain_id = 20260131
# 网络类型
network_type = "mainnet"
[cors]
# CORS配置
enabled = true
origins = ["*"]
methods = ["GET", "POST", "OPTIONS"]
headers = ["DNT", "X-Mx-ReqToken", "Keep-Alive", "User-Agent", "X-Requested-With", "If-Modified-Since", "Cache-Control", "Content-Type", "Authorization"]
[logging]
# 日志级别
level = "info"
# 日志文件
log_file = "/var/log/nac/api-server.log"