微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🛡️

AI Agent 的区块链安全卫士

Hackathon · v1.0.0
专业技能 安全 B 级 作者 swiftadviser 公开目录收录
1.8k 下载 0 安装 6.6k 收藏 5 浏览

简介

专为AI Agent设计的区块链安全扫描工具,通过x402协议付费使用Base Sepolia测试网USDC,支持代币风险检测、地址信誉查询和交易模拟。

原始描述

Blockchain security scanner for AI agents (testnet). Pay with Base Sepolia USDC via x402 protocol.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/hackathon-26866/
其它 Agent解压到它自己的 skills 目录,目录名用 hackathon-26866

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

中文使用说明 来自收录源

核心用法

Aegis402 Shield Protocol 是一款面向 AI Agent 的区块链安全 API,采用 x402 支付协议,允许智能体按需付费获取安全扫描服务。核心功能包括:

  1. 代币风险扫描($0.01):检测代币是否为蜜罐合约、计算信任评分
  2. 地址信誉检查($0.005):识别钓鱼地址、中毒地址,返回声誉标签
  3. 交易模拟($0.05):预执行交易,预测余额变化,评估风险等级

集成流程:安装 @x402/fetch → 注册 EVM 钱包 → 包装 fetch 函数 → 调用付费端点。测试网使用 Base Sepolia USDC,可通过 Coinbase Faucet 获取。

显著优点

  • Agent 原生设计:专为 AI 智能体优化,JSON API 响应结构化,易于解析
  • 即时付费即服务:无需订阅,按调用付费,契合自动化高频场景
  • 多链覆盖:支持 Ethereum、Base、Polygon、Arbitrum、Optimism、BSC 六大主流链
  • 风险分级清晰:SAFE → LOW → MEDIUM → HIGH → CRITICAL 五级预警体系
  • x402 协议生态:与 Coinbase 主导的支付标准对齐,未来主网迁移成本低

潜在局限

  • 测试网限制:当前仅部署于 Base Sepolia,资产无实际价值,无法验证经济模型健壮性
  • 付费门槛:即使测试网也需配置 EVM 钱包和获取 USDC,对新用户不够友好
  • 定价透明度:未说明计费精度(如 $0.005 对应多少链上单位)、是否含 gas 费
  • 数据溯源:未披露风险评分算法、地址标签的数据来源和更新频率
  • 合规盲区:未提及是否遵循 FATF 旅行规则或链上隐私合规要求

适合人群

  • 开发 DeFi Agent 的 AI 工程师
  • 需要自动化安全风控的量化交易团队
  • 构建链上分析工具的开发者
  • 参加 hackathon 的快速原型验证

常规风险

  1. 智能合约风险:x402 支付合约若存在漏洞,可能导致资金损失
  2. API 可用性:测试网服务稳定性无 SLA 保障,生产环境需切换主网
  3. 数据滞后:蜜罐检测依赖已知模式,新型攻击可能漏报
  4. 误报率:自动化评分可能将合法合约标记为风险,需人工复核
  5. 测试网→主网迁移成本:当前代码需修改网络和代币配置,非无缝切换

技能正文


name: aegis-security-hackathon version: 1.0.0 description: Blockchain security scanner for AI agents (testnet). Pay with Base Sepolia USDC via x402 protocol. homepage: https://hackathon.aegis402.xyz metadata: {"emoji":"🛡️","category":"blockchain-security","api_base":"https://hackathon.aegis402.xyz/v1","network":"testnet"}

Aegis402 Shield Protocol (Hackathon/Testnet)

Blockchain security API for AI agents. Testnet version - pay with Base Sepolia USDC.

⚠️ This is the hackathon/testnet deployment. For production, use aegis-security.

Skill Files

File URL
SKILL.md (this file) https://hackathon.aegis402.xyz/skill.md
package.json (metadata) https://hackathon.aegis402.xyz/skill.json

Base URL: https://hackathon.aegis402.xyz/v1

Quick Start

npm install @x402/fetch @x402/evm
import { x402Client, wrapFetchWithPayment } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';

const client = new x402Client()
  .register('eip155:*', new ExactEvmScheme(yourEvmWallet));

const fetch402 = wrapFetchWithPayment(fetch, client);

// Payments on Base Sepolia (testnet USDC)
const res = await fetch402('https://hackathon.aegis402.xyz/v1/check-token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?chain_id=1');
const data = await res.json();

Requirements: Testnet USDC on Base Sepolia (chain ID 84532)

Get testnet USDC: Base Sepolia Faucet


Pricing (Testnet USDC)

Endpoint Price Use Case
POST /simulate-tx $0.05 Transaction simulation, DeFi safety
GET /check-token/:address $0.01 Token honeypot detection
GET /check-address/:address $0.005 Address reputation check

Endpoints

Check Token ($0.01)

Scan any token for honeypots, scams, and risks.

curl "https://hackathon.aegis402.xyz/v1/check-token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?chain_id=1"

Response:

{
  "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "isHoneypot": false,
  "trustScore": 95,
  "risks": [],
  "_meta": { "requestId": "uuid", "duration": 320 }
}

Check Address ($0.005)

Verify if address is flagged for phishing or poisoning.

curl "https://hackathon.aegis402.xyz/v1/check-address/0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

Response:

{
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "isPoisoned": false,
  "reputation": "NEUTRAL",
  "tags": ["wallet", "established"],
  "_meta": { "requestId": "uuid", "duration": 180 }
}

Simulate Transaction ($0.05)

Predict balance changes and detect threats before signing.

curl -X POST "https://hackathon.aegis402.xyz/v1/simulate-tx" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "0xYourWallet...",
    "to": "0xContract...",
    "value": "1000000000000000000",
    "data": "0x...",
    "chain_id": 8453
  }'

Response:

{
  "isSafe": true,
  "riskLevel": "LOW",
  "simulation": {
    "balanceChanges": [
      { "asset": "USDC", "amount": "-100.00", "address": "0x..." }
    ]
  },
  "warnings": [],
  "_meta": { "requestId": "uuid", "duration": 450 }
}

x402 Payment Flow (Testnet)

  1. Agent calls any paid endpoint
  2. Receives 402 Payment Required with Base Sepolia payment instructions
  3. Pays testnet USDC on Base Sepolia (chain ID: 84532)
  4. Retries request with payment proof header
  5. Gets security scan result

Network: Base Sepolia (eip155:84532) Currency: Testnet USDC


Use Cases for AI Agents

Before Swapping Tokens

const tokenCheck = await fetch402(`https://hackathon.aegis402.xyz/v1/check-token/${tokenAddress}?chain_id=8453`);
const { isHoneypot, trustScore } = await tokenCheck.json();

if (isHoneypot || trustScore < 50) {
  console.log('⚠️ Risky token detected!');
}

Before Signing Transactions

const simulation = await fetch402('https://hackathon.aegis402.xyz/v1/simulate-tx', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ from, to, value, data, chain_id: 8453 })
});

const { isSafe, riskLevel, warnings } = await simulation.json();

if (!isSafe || riskLevel === 'CRITICAL') {
  console.log('🚨 Dangerous transaction!', warnings);
}

Risk Levels

Level Meaning
SAFE No issues detected
LOW Minor concerns, generally safe
MEDIUM Some risks, proceed with caution
HIGH Significant risks detected
CRITICAL Do not proceed

Supported Chains (for scanning)

Chain ID check-token check-address simulate-tx
Ethereum 1 ✅ ✅ ✅
Base 8453 ✅ ✅ ✅
Polygon 137 ✅ ✅ ✅
Arbitrum 42161 ✅ ✅ ✅
Optimism 10 ✅ ✅ ✅
BSC 56 ✅ ✅ ✅

Health Check (Free)

curl https://hackathon.aegis402.xyz/health

Links


🛡️ Built for the Agentic Economy. Powered by x402 Protocol.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

blockchainsecurityai-agentdefismart-contracttoken-scannerx402testnetbase-sepolia

同类 Skill