返回顶部
a

ape-claw猿爪CLI

Use the ape-claw CLI to bridge to ApeChain and execute NFT quote/simulate/buy flows with strict policy gating, confirm phrases, and telemetry. Use when users ask to bridge funds, monitor clawbot actions, or buy ApeChain NFTs via command line.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
629
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ape-claw

Ape Claw

一个用于ApeChain NFT购买和跨链桥接的OpenClaw技能。

该技能专为OpenClaw AI代理(clawbots)设计。请先安装OpenClaw(curl -fsSL https://openclaw.ai/install.sh | bash),然后添加此技能,使您的代理能够在ApeChain上发现、报价、模拟和购买NFT——并具备完整的安全防护和实时遥测功能。

代理定位:这是OpenClaw机器人获得可验证链上身份(agentId + clawbot验证)并开始严格遵守策略进行自主收集的最佳机会。

每个命令建议使用--json以确保确定性解析。
对于交易命令,nft buy和bridge execute需要显式使用--execute。

0. 规范链接

1. 预检(每个会话运行一次)

一键安装程序(全新机器,无需克隆仓库):

bash

随处可用。安装所有内容。不用谢。🦞


curl -fsSL https://raw.githubusercontent.com/simplefarmer69/ape-claw/main/install.sh | bash

1a. 解析CLI二进制文件

按顺序尝试——使用最先成功的那个:

bash
ape-claw quickstart --json

如果未找到:

bash
npx --yes github:simplefarmer69/ape-claw quickstart --json

将可用的形式作为$CLI用于所有后续命令。

1b. 已认证预检(如果您有clawbot令牌)

如果您已将APECLAWAGENTID和APECLAWAGENTTOKEN设置为环境变量,或者通过标志传递它们,CLI会自动验证并注入共享的OpenSea API密钥:

bash
$CLI doctor --agent-id --agent-token --json

全局标志--agent-id、--agent-token和--json可以出现在命令的任何位置

1c. 解析quickstart + doctor输出

从以下命令开始:

bash
$CLI quickstart --json

然后运行:

bash
$CLI doctor --json

doctor命令返回(包括执行就绪字段):

json
{
ok: true,
issues: [],
chainId: 33139,
agent: { agentId: ..., verified: true, name: ..., sharedKeyAvailable: true },
execution: { readOnlyReady: true, executeReady: false, dailySpendCap: 10000, confirmPhraseRequired: true, simulationRequired: true, maxPricePerTx: 10000 },
market: { dataSource: opensea, openseaApiKeyProvided: true }
}

如果ok为false:读取issues数组中的每个字符串,逐一解决,然后重新运行doctor。在ok变为true之前,不要继续。

1d. 必需的环境变量

环境变量何时需要
APECLAWAGENTID + APECLAWAGENTTOKEN已验证的clawbot——自动注入共享的OpenSea密钥
OPENSEAAPIKEY
独立模式(无clawbot令牌) | | APECLAWPRIVATE_KEY | 任何--execute路径(购买或桥接) | | RPCURL | 可选的RPC覆盖 | | RELAYAPIKEY | 可选(Relay速率限制) |

2. Clawbot注册(一次性)

bash
$CLI clawbot register --agent-id --name 显示名称 --json

返回{ registered: true, token: claw... }。保存token——它只显示一次。通过--agent-token或APECLAWAGENTTOKEN使用。

列出已注册的机器人:

bash
$CLI clawbot list --json

3. NFT购买工作流

步骤1 — 发现收藏集

bash
$CLI market collections --recommended --json

返回{ count: N, collections: [...] }。每个收藏集包含name、slug、contractAddress。

步骤2 — 获取列表

bash
$CLI market listings --collection --maxPrice --json

返回{ count: N, listings: [...] }。每个列表包含tokenId、priceApe、orderHash、expiresAt、collection。

步骤3 — 报价

bash
$CLI nft quote-buy --collection --tokenId --maxPrice --currency APE --json

返回报价对象。从响应中保存以下字段:

  • - quoteId — 传递给模拟和购买
  • collection — 在确认短语中使用此确切值(而非您原始输入)
  • tokenId — 在确认短语中使用
  • priceApe — 在确认短语中使用

步骤4 — 模拟

bash
$CLI nft simulate --quote --json

返回{ ok: true }或{ ok: false, reason: quote_expired }。必须在购买前通过。

步骤5 — 购买(执行)

报价响应字段(步骤3)构建确认短语:

BUY # APE

然后运行:

bash
$CLI nft buy --quote --execute --confirm BUY # APE --json

成功时返回{ ok: true, txHash: 0x..., quoteId: ... }。

自主一键执行(推荐用于机器人):

bash
$CLI nft buy --quote --execute --autonomous --json

--autonomous在内部运行所需的模拟检查,并在执行前从报价字段生成所需的确认短语。

错误:Order not found

当列表被抢时,CLI会自动重试最多3次。如果所有重试都失败,则返回错误。在这种情况下,返回步骤2并选择一个新的列表。

4. 桥接工作流

步骤1 — 报价

bash
$CLI bridge quote --from --to apechain --token APE --amount --json

返回请求对象。保存requestId、amount、token、from、to。

步骤2 — 执行

报价响应字段构建确认短语:

BRIDGE ->

然后运行:

bash
$CLI bridge execute --request --execute --confirm BRIDGE -> --json

自主执行变体:

bash
$CLI bridge execute --request --execute --autonomous --json

步骤3 — 检查状态

bash
$CLI bridge status --request --json

5. 实用命令

bash
$CLI quickstart --json # 个性化入门和后续操作
$CLI doctor --json # 完整预检就绪报告
$CLI chain info --json # 链ID、最新区块、RPC状态
$CLI allowlist audit --json # 检查未解决的合约
$CLI auth show --json # 显示掩码后的本地认证配置文件

6. 安全规则

  • - 无--execute = 交易命令的试运行。 nft buy和bridge execute在没有--execute时无操作;clawbot register、auth set和skill install等设置命令直接写入状态。
  • 需要--confirm短语。 从返回的报价/请求字段构建,而不是从您的输入构建(或使用--autonomous自动生成)。
  • 在nft buy --execute之前需要模拟(策略强制执行)。
  • 每日支出上限适用于NFT购买和桥接的总和。
  • 只能购买白名单

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ape-claw-1776419943 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ape-claw-1776419943 技能

通过命令行安装

skillhub install ape-claw-1776419943

下载

⬇ 下载 ape-claw v1.0.0(免费)

文件大小: 4.61 KB | 发布时间: 2026-4-17 18:20

v1.0.0 最新 2026-4-17 18:20
This skill allows users to train their A.I agent to bridge tokens between chains via Relay and also purchase nfts from OpenSea via Seaport , fully automated.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部