关于 Revettr
Revettr 是用于 Agent 商务交易对手风险评分的 Python SDK。它评估提供的域名、IP、钱包和公司信息,并提供可在 x402 交易前检查风险的支付客户端。
主要功能
- 01交易对手风险评分
- 02域名与 IP 检查
- 03钱包历史分析
- 04制裁名单筛查
- 05机器可读的风险标记
- 06基于风险门槛的 x402 支付
适用场景
- 01创建任务前评估卖方 Agent
- 02付款前检查钱包
- 03通过域名和 IP 检查网络服务
- 04阻止低于指定风险分的支付
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://revettr.com/mcpclaude mcp add --transport http revettr-python https://revettr.com/mcp{"mcpServers":{"revettr-python":{"type":"http","url":"https://revettr.com/mcp"}}}在 Cursor 中打开{"servers":{"revettr-python":{"type":"http","url":"https://revettr.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"revettr-python":{"type":"http","url":"https://revettr.com/mcp"}}}{"mcpServers":{"revettr-python":{"serverUrl":"https://revettr.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
3| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| ip | any | 否 | |
| chain | string | 否 | |
| domain | any | 否 | |
| company_name | any | 否 | |
| stellar_wallet | any | 否 | |
| wallet_address | any | 否 |
详细介绍
Revettr
为智能商业提供交易对手风险评分。一次 API 调用即可回答:“这个 Agent 是否应该向这个交易对手汇款?”
Revettr 通过分析域名情报、IP 信誉、链上钱包历史记录和制裁名单,为交易对手评分。它专为通过 x402 在 Base 上进行交易的 AI Agent 设计。
安装
pip install revettr
快速开始
from revettr import Revettr
client = Revettr()
# Score a counterparty — send whatever data you have
score = client.score(
domain="uniswap.org",
ip="104.18.28.72",
wallet_address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
)
print(f"Score: {score.score}/100 ({score.tier})")
print(f"Confidence: {score.confidence}")
print(f"Flags: {score.flags}")
if score.tier == "critical":
print("DO NOT TRANSACT")
评分内容
发送任意组合的输入。数据越多,置信度越高。
| 输入 | 信号组 | 检查内容 |
|---|---|---|
domain | 域名情报 | WHOIS 注册时间、DNS 配置(MX、SPF、DMARC)、SSL 证书 |
ip | IP 情报 | 地理位置、VPN/代理/Tor 检测、数据中心还是住宅网络 |
wallet_address | 钱包分析 | 交易次数、钱包存续时间、交易对手多样性、链上行为 |
company_name | 制裁筛查 | OFAC SDN、欧盟合并制裁名单、联合国合并制裁名单 |
响应
{
"score": 90,
"tier": "low",
"confidence": 0.75,
"signals_checked": 3,
"flags": [],
"signal_scores": {
"domain": {
"score": 80,
"flags": [],
"available": true,
"details": {
"domain_age_days": 2673,
"dns": {"has_mx": true, "has_spf": true, "has_dmarc": true}
}
},
"ip": {
"score": 100,
"flags": [],
"available": true,
"details": {
"country": "US",
"asn_org": "Cloudflare, Inc.",
"is_private": false
}
},
"wallet": {
"score": 100,
"flags": [],
"available": true,
"details": {
"blockchain": {"tx_count": 100, "unique_counterparties": 29},
"onchain": {"nonce": 16, "eth_balance": 0.072}
}
}
},
"metadata": {
"inputs_provided": ["domain", "ip", "wallet_address"],
"latency_ms": 1185,
"version": "0.1.0"
}
}
评分等级
| 分数 | 等级 | 含义 |
|---|---|---|
| 80-100 | low | 交易对手看起来合法 |
| 60-79 | medium | 部分信号值得警惕 |
| 30-59 | high | 存在多个风险指标 |
| 0-29 | critical | 风险信号强烈——请勿交易 |
分数为 0 表示硬性匹配(例如,精确命中制裁名单)。这会覆盖所有其他信号。
风险标记
标记会明确指出哪些因素导致分数降低。它们按信号类别分组:
| 类别 | 示例 | 涵盖内容 |
|---|---|---|
| 域名 | domain_age_under_*、no_mx_records、ssl_* | 域名存续时间、DNS 卫生状况、SSL 有效性 |
| IP | tor_exit_node、known_vpn、high_risk_country_* | 匿名化、地理位置风险 |
| 钱包 | wallet_never_transacted、wallet_age_under_* | 链上历史记录、活动模式 |
| 制裁 | sanctions_exact_match、sanctions_high_confidence_match | OFAC/欧盟/联合国制裁筛查 |
API 响应会返回完整的标记集及其说明。标记名称稳定且可供机器读取。
使用示例
仅钱包(最精简)
score = client.score(wallet_address="0xabc...")
域名 + IP(Web 服务检查)
score = client.score(domain="some-api.xyz", ip="185.220.101.42")
完整检查
score = client.score(
domain="merchant.com",
ip="104.18.28.72",
wallet_address="0xabc...",
company_name="Merchant LLC",
)
使用 x402 自动付款
客户端会自动处理 x402 付款。你需要准备一个已注资的钱包:
from revettr import Revettr
client = Revettr(
wallet_private_key="0xYOUR_PRIVATE_KEY", # Wallet that pays for the API call
)
# Client automatically handles the 402 → payment → retry flow
score = client.score(wallet_address="0xabc...")
安全:切勿将私钥硬编码。生产环境中请使用环境变量或密钥管理器。
使用 Virtuals Protocol(ACP)
在 Agent Commerce Protocol 上创建任务之前,为卖家 Agent 评分:
from revettr import Revettr
client = Revettr()
result = client.score(wallet_address=seller_wallet)
if result.score >= 60:
# Safe to create ACP job
job_id = chosen_offering.initiate_job(
service_requirement={"task": "Analyze Q1 sales data"},
evaluator_address=evaluator_address,
)
完整的买家 Agent 工作流请参阅 examples/virtuals_acp_safe_buyer.py。
安全 Agent 付款
可直接替换 x402 付款,并在汇款前自动检查交易对手风险。如果交易对手的评分低于你的阈值,则会阻止付款。
from revettr import SafeX402Client, PaymentBlocked
async with SafeX402Client(
wallet_private_key="0x...",
min_score=60, # Block "high" and "critical" risk
on_fail="block", # Raise PaymentBlocked (default)
) as http:
try:
# Automatically scores the counterparty before paying
response = await http.post("https://some-api.com/endpoint", json=data)
except PaymentBlocked as e:
print(f"Blocked: {e.url} scored {e.score}/100")
on_fail | 行为 |
|---|---|
"block"(默认) | 抛出 PaymentBlocked 异常 |
"warn" | 记录警告,然后继续付款 |
"log" | 静默记录日志,然后继续付款 |
定价
| 等级 | 价格 | 提供内容 |
|---|---|---|
| 标准 | $0.01 USDC | 根据提供的输入,获取所有可用信号 |
通过 x402 协议付款——使用 Base 网络上的 USDC。无需 API 密钥、账号或合约。
API 参考
POST /v1/score
付款:x402 — 每次请求在 Base 上支付 $0.01 USDC
请求正文(JSON):
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
domain | string | 否 | 域名或 URL |
ip | string | 否 | IPv4 地址 |
wallet_address | string | 否 | EVM 地址(0x...) |
chain | string | 否 | 区块链网络(默认值:base) |
company_name | string | 否 | 用于筛查制裁名单的名称 |
email | string | 否 | 电子邮件(未来支持——目前尚未评分) |
amount | float | 否 | 以 USD 计的交易金额(仅供参考) |
必须至少提供 domain、ip、wallet_address 或 company_name 中的一项。
GET /health
付款:无(始终免费)
返回 API 状态和信号源可用性。
直接使用 HTTP(不使用 SDK)
# Without payment (returns 402):
curl -X POST https://revettr.com/v1/score \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# Returns HTTP 402 with payment-required header containing x402 payment terms
免责声明
Revettr 是一种信息工具。它汇总公开可用的信号并返回风险评分。它不是合规认证、法律建议,也不保证交易对手的合法性。您需自行对交易决策负责。
构建者
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。