{
  "schemaVersion": "1.0",
  "item": {
    "slug": "broadcast-sign-transfer",
    "name": "Broadcast Sign Transfer",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangchengming666/broadcast-sign-transfer",
    "canonicalUrl": "https://clawhub.ai/wangchengming666/broadcast-sign-transfer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/broadcast-sign-transfer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=broadcast-sign-transfer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/broadcast_sign_transfer.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/broadcast-sign-transfer"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/broadcast-sign-transfer",
    "agentPageUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "什么是这个 Skill？",
        "body": "这个 Skill 实现了完整的 EVM 链转账流程：\n\n用户输入（私钥/地址/金额）\n    ↓\n构造交易（自动获取 nonce、gas）\n    ↓\n本地签名（私钥不离开本机）\n    ↓\n通过 OKX API 广播到链上\n    ↓\n返回 tx_hash 和区块浏览器链接\n\n支持两种转账类型：\n\n原生代币转账：ETH、BNB、MATIC 等\nERC20 Token 转账：USDT、USDC 等任意 ERC20"
      },
      {
        "title": "什么时候该用这个 Skill？",
        "body": "满足以下条件时使用：\n\n用户想发起一笔链上转账\n用户提供了接收方地址和转账金额\n私钥已通过环境变量配置好\n\n不适用的情况：\n\n用户想做 Swap（代币兑换）→ 使用 Swap Skill\n用户只想查询余额或交易状态 → 使用查询工具\n用户没有配置私钥环境变量 → 先引导配置环境变量"
      },
      {
        "title": "执行流程（Step by Step）",
        "body": "Step 1: 检查输入参数\n        ├── chain_index 是否在支持列表？\n        ├── to_address 是否以 0x 开头？\n        └── amount 是否大于 0？\n\nStep 2: 获取链上数据\n        ├── 获取当前 nonce\n        └── 获取当前 gas price（Legacy 或 EIP-1559）\n\nStep 3: 构造交易\n        ├── 原生代币：直接构造 tx，gas 固定 21000\n        └── ERC20：调用 transfer()，动态估算 gas × 1.2 安全系数\n\nStep 4: 本地签名\n        └── 使用私钥对交易签名，私钥不离开本机\n\nStep 5: 广播到链上\n        └── 调用 OKX Broadcast API 发送签名交易\n\nStep 6: 返回结果\n        ├── 成功 → 返回 tx_hash 和 explorer_url\n        └── 失败 → 返回具体错误原因"
      },
      {
        "title": "chain_index（必填）",
        "body": "类型：字符串 string\n\n\n说明：区块链链 ID\n\n\n当前支持：\nchain_index链名Gas 类型支持 MEV\"56\"BSCLegacy✅\n\n\n示例：\"56\"\n\n\n注意：必须是字符串，56 ❌ \"56\" ✅"
      },
      {
        "title": "to_address（必填）",
        "body": "类型：字符串 string\n说明：接收方钱包地址\n格式：0x 开头，42 位十六进制字符\n示例：\"0xaF3e6407073b2793271dA3d45A393397517ee3d9\""
      },
      {
        "title": "amount（必填）",
        "body": "类型：浮点数 float\n说明：转账金额，人类可读单位\n示例：0.01（表示 0.01 BNB），100.0（表示 100 USDT）\n注意：脚本内部自动转换为链上精度（wei / raw units）"
      },
      {
        "title": "token_address（ERC20 转账时必填）",
        "body": "类型：字符串 string\n说明：ERC20 Token 的合约地址\n格式：0x 开头\n示例：\"0x55d398326f99059fF775485246999027B3197955\"（BSC 上的 USDT）"
      },
      {
        "title": "enable_mev_protection（选填）",
        "body": "类型：布尔值 boolean\n默认值：false\n说明：是否开启 MEV 保护，防止三明治攻击\n注意：仅支持 MEV 的链才能开启，否则报错"
      },
      {
        "title": "成功时",
        "body": "字段类型说明order_idstringOKX 平台订单 IDtx_hashstring链上交易哈希explorer_urlstring区块浏览器链接\n\n成功输出示例：\n\n✅ BSC 广播成功\nOrder ID: 1234567890\nTx Hash:  0xabc123...\n浏览器:   https://bscscan.com/tx/0xabc123..."
      },
      {
        "title": "失败时",
        "body": "返回具体错误原因，见下方错误处理章节。"
      },
      {
        "title": "环境变量（必须配置）",
        "body": "变量名说明WALLET_PRIVATE_KEY钱包私钥（0x 开头）OKX_ACCESS_KEYOKX Web3 API KeyOKX_SECRET_KEYOKX Secret KeyOKX_PASSPHRASEOKX Passphrase\n\n⚠️ 必须使用 OKX Web3 API Key，普通交易 API Key 会返回 401 错误。\n\n配置方式（写入 ~/.zshrc 永久生效）：\n\nexport WALLET_PRIVATE_KEY=\"0x你的私钥\"\nexport OKX_ACCESS_KEY=\"你的Key\"\nexport OKX_SECRET_KEY=\"你的Secret\"\nexport OKX_PASSPHRASE=\"你的Passphrase\"\n\nsource ~/.zshrc"
      },
      {
        "title": "代码调用",
        "body": "from scripts.broadcast_sign_transfer import BroadcastTransaction\n\nbt = BroadcastTransaction(chain_index=\"56\")\n\n# 原生代币转账\nresult = bt.transfer_native(\n    to_address=\"0xRecipient...\",\n    amount=0.01,\n    enable_mev_protection=False,\n)\nprint(result.summary())\n\n# ERC20 转账\nresult = bt.transfer_token(\n    token_address=\"0x55d398326f99059fF775485246999027B3197955\",  # BSC USDT\n    to_address=\"0xRecipient...\",\n    amount=100.0,\n    enable_mev_protection=False,\n)\nprint(result.summary())"
      },
      {
        "title": "命令行调用",
        "body": "# 原生代币转账\npython3 scripts/broadcast_sign_transfer.py --chain 56 native \\\n  --to 0xRecipient... \\\n  --amount 0.01\n\n# ERC20 转账\npython3 scripts/broadcast_sign_transfer.py --chain 56 token \\\n  --token 0x55d398326f99059fF775485246999027B3197955 \\\n  --to 0xRecipient... \\\n  --amount 100\n\n# 开启 MEV 保护\npython3 scripts/broadcast_sign_transfer.py --chain 56 native \\\n  --to 0xRecipient... \\\n  --amount 0.01 \\\n  --mev"
      },
      {
        "title": "Gas 处理机制",
        "body": "转账类型Gas 处理方式原生代币固定 21000（EVM 协议层常量）ERC20 Tokeneth_estimateGas 动态估算 × 1.2 安全系数\n\nGas 价格根据链类型自动切换：\n\nLegacy（BSC）：使用 gasPrice\nEIP-1559（ETH/Polygon 等）：使用 maxFeePerGas + maxPriorityFeePerGas"
      },
      {
        "title": "错误处理",
        "body": "错误信息原因解决方法暂不支持链 {chain_index}链未在支持列表中检查 chain_index 是否正确to_address 格式错误地址不以 0x 开头检查地址格式amount 必须大于 0金额为负数或 0输入正确金额余额不足ERC20 余额不够检查钱包余额链 {chain_index} 不支持 MEV 保护该链不支持 MEV关闭 enable_mev_protection401 Unauthorized使用了普通 API Key确认使用 OKX Web3 API Key广播失败（code=xxx）OKX API 返回错误检查 API 凭证和交易数据缺少 OKX API 凭证环境变量未配置配置四个环境变量后重试缺少钱包私钥WALLET_PRIVATE_KEY 未配置配置私钥环境变量"
      },
      {
        "title": "安全注意事项",
        "body": "⚠️ 私钥通过环境变量传入，不要硬编码在代码里\n⚠️ 广播成功不代表交易成功，需通过 explorer_url 确认链上状态\n⚠️ 广播后的交易无法撤销，请在调用前确认地址和金额正确\n⚠️ ~/.zshrc 是明文存储，确保只有自己能访问该文件"
      },
      {
        "title": "依赖安装",
        "body": "pip3 install requests web3"
      },
      {
        "title": "文件结构",
        "body": "broadcast-sign-transfer/\n├── broadcast_sign_transfer.md     ← 当前文件，AI 技能说明书\n└── scripts/\n    └── broadcast_sign_transfer.py ← 可执行的 Python 客户端"
      },
      {
        "title": "当前支持的链（v1.0.0）",
        "body": "chain_index链名Gas 类型MEV 保护浏览器56BSCLegacy✅bscscan.com\n\nv1.0.0 仅支持 BSC，更多链将在后续版本中陆续支持。"
      }
    ],
    "body": "Broadcast Sign Transfer Skill\n什么是这个 Skill？\n\n这个 Skill 实现了完整的 EVM 链转账流程：\n\n用户输入（私钥/地址/金额）\n    ↓\n构造交易（自动获取 nonce、gas）\n    ↓\n本地签名（私钥不离开本机）\n    ↓\n通过 OKX API 广播到链上\n    ↓\n返回 tx_hash 和区块浏览器链接\n\n\n支持两种转账类型：\n\n原生代币转账：ETH、BNB、MATIC 等\nERC20 Token 转账：USDT、USDC 等任意 ERC20\n什么时候该用这个 Skill？\n\n满足以下条件时使用：\n\n用户想发起一笔链上转账\n用户提供了接收方地址和转账金额\n私钥已通过环境变量配置好\n\n不适用的情况：\n\n用户想做 Swap（代币兑换）→ 使用 Swap Skill\n用户只想查询余额或交易状态 → 使用查询工具\n用户没有配置私钥环境变量 → 先引导配置环境变量\n执行流程（Step by Step）\nStep 1: 检查输入参数\n        ├── chain_index 是否在支持列表？\n        ├── to_address 是否以 0x 开头？\n        └── amount 是否大于 0？\n\nStep 2: 获取链上数据\n        ├── 获取当前 nonce\n        └── 获取当前 gas price（Legacy 或 EIP-1559）\n\nStep 3: 构造交易\n        ├── 原生代币：直接构造 tx，gas 固定 21000\n        └── ERC20：调用 transfer()，动态估算 gas × 1.2 安全系数\n\nStep 4: 本地签名\n        └── 使用私钥对交易签名，私钥不离开本机\n\nStep 5: 广播到链上\n        └── 调用 OKX Broadcast API 发送签名交易\n\nStep 6: 返回结果\n        ├── 成功 → 返回 tx_hash 和 explorer_url\n        └── 失败 → 返回具体错误原因\n\n输入参数\nchain_index（必填）\n\n类型：字符串 string\n\n说明：区块链链 ID\n\n当前支持：\n\nchain_index\t链名\tGas 类型\t支持 MEV\n\"56\"\tBSC\tLegacy\t✅\n\n示例：\"56\"\n\n注意：必须是字符串，56 ❌ \"56\" ✅\n\nto_address（必填）\n类型：字符串 string\n说明：接收方钱包地址\n格式：0x 开头，42 位十六进制字符\n示例：\"0xaF3e6407073b2793271dA3d45A393397517ee3d9\"\namount（必填）\n类型：浮点数 float\n说明：转账金额，人类可读单位\n示例：0.01（表示 0.01 BNB），100.0（表示 100 USDT）\n注意：脚本内部自动转换为链上精度（wei / raw units）\ntoken_address（ERC20 转账时必填）\n类型：字符串 string\n说明：ERC20 Token 的合约地址\n格式：0x 开头\n示例：\"0x55d398326f99059fF775485246999027B3197955\"（BSC 上的 USDT）\nenable_mev_protection（选填）\n类型：布尔值 boolean\n默认值：false\n说明：是否开启 MEV 保护，防止三明治攻击\n注意：仅支持 MEV 的链才能开启，否则报错\n输出结果\n成功时\n字段\t类型\t说明\norder_id\tstring\tOKX 平台订单 ID\ntx_hash\tstring\t链上交易哈希\nexplorer_url\tstring\t区块浏览器链接\n\n成功输出示例：\n\n✅ BSC 广播成功\nOrder ID: 1234567890\nTx Hash:  0xabc123...\n浏览器:   https://bscscan.com/tx/0xabc123...\n\n失败时\n\n返回具体错误原因，见下方错误处理章节。\n\n环境变量（必须配置）\n变量名\t说明\nWALLET_PRIVATE_KEY\t钱包私钥（0x 开头）\nOKX_ACCESS_KEY\tOKX Web3 API Key\nOKX_SECRET_KEY\tOKX Secret Key\nOKX_PASSPHRASE\tOKX Passphrase\n\n⚠️ 必须使用 OKX Web3 API Key，普通交易 API Key 会返回 401 错误。\n\n配置方式（写入 ~/.zshrc 永久生效）：\n\nexport WALLET_PRIVATE_KEY=\"0x你的私钥\"\nexport OKX_ACCESS_KEY=\"你的Key\"\nexport OKX_SECRET_KEY=\"你的Secret\"\nexport OKX_PASSPHRASE=\"你的Passphrase\"\n\nsource ~/.zshrc\n\n调用示例\n代码调用\nfrom scripts.broadcast_sign_transfer import BroadcastTransaction\n\nbt = BroadcastTransaction(chain_index=\"56\")\n\n# 原生代币转账\nresult = bt.transfer_native(\n    to_address=\"0xRecipient...\",\n    amount=0.01,\n    enable_mev_protection=False,\n)\nprint(result.summary())\n\n# ERC20 转账\nresult = bt.transfer_token(\n    token_address=\"0x55d398326f99059fF775485246999027B3197955\",  # BSC USDT\n    to_address=\"0xRecipient...\",\n    amount=100.0,\n    enable_mev_protection=False,\n)\nprint(result.summary())\n\n命令行调用\n# 原生代币转账\npython3 scripts/broadcast_sign_transfer.py --chain 56 native \\\n  --to 0xRecipient... \\\n  --amount 0.01\n\n# ERC20 转账\npython3 scripts/broadcast_sign_transfer.py --chain 56 token \\\n  --token 0x55d398326f99059fF775485246999027B3197955 \\\n  --to 0xRecipient... \\\n  --amount 100\n\n# 开启 MEV 保护\npython3 scripts/broadcast_sign_transfer.py --chain 56 native \\\n  --to 0xRecipient... \\\n  --amount 0.01 \\\n  --mev\n\nGas 处理机制\n转账类型\tGas 处理方式\n原生代币\t固定 21000（EVM 协议层常量）\nERC20 Token\teth_estimateGas 动态估算 × 1.2 安全系数\n\nGas 价格根据链类型自动切换：\n\nLegacy（BSC）：使用 gasPrice\nEIP-1559（ETH/Polygon 等）：使用 maxFeePerGas + maxPriorityFeePerGas\n错误处理\n错误信息\t原因\t解决方法\n暂不支持链 {chain_index}\t链未在支持列表中\t检查 chain_index 是否正确\nto_address 格式错误\t地址不以 0x 开头\t检查地址格式\namount 必须大于 0\t金额为负数或 0\t输入正确金额\n余额不足\tERC20 余额不够\t检查钱包余额\n链 {chain_index} 不支持 MEV 保护\t该链不支持 MEV\t关闭 enable_mev_protection\n401 Unauthorized\t使用了普通 API Key\t确认使用 OKX Web3 API Key\n广播失败（code=xxx）\tOKX API 返回错误\t检查 API 凭证和交易数据\n缺少 OKX API 凭证\t环境变量未配置\t配置四个环境变量后重试\n缺少钱包私钥\tWALLET_PRIVATE_KEY 未配置\t配置私钥环境变量\n安全注意事项\n⚠️ 私钥通过环境变量传入，不要硬编码在代码里\n⚠️ 广播成功不代表交易成功，需通过 explorer_url 确认链上状态\n⚠️ 广播后的交易无法撤销，请在调用前确认地址和金额正确\n⚠️ ~/.zshrc 是明文存储，确保只有自己能访问该文件\n依赖安装\npip3 install requests web3\n\n文件结构\nbroadcast-sign-transfer/\n├── broadcast_sign_transfer.md     ← 当前文件，AI 技能说明书\n└── scripts/\n    └── broadcast_sign_transfer.py ← 可执行的 Python 客户端\n\n当前支持的链（v1.0.0）\nchain_index\t链名\tGas 类型\tMEV 保护\t浏览器\n56\tBSC\tLegacy\t✅\tbscscan.com\n\nv1.0.0 仅支持 BSC，更多链将在后续版本中陆续支持。"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wangchengming666/broadcast-sign-transfer",
    "publisherUrl": "https://clawhub.ai/wangchengming666/broadcast-sign-transfer",
    "owner": "wangchengming666",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer",
    "downloadUrl": "https://openagent3.xyz/downloads/broadcast-sign-transfer",
    "agentUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/broadcast-sign-transfer/agent.md"
  }
}