返回顶部
c

coinfelloCoinFello交互

Interact with CoinFello using the @coinfello/agent-cli to create a smart account, sign in with SIWE, manage delegations, send prompts with server-driven ERC-20 token subdelegations, and check transaction status. Use when the user wants to send crypto transactions via natural language prompts, manage smart account delegations, or check CoinFello transaction results.

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

coinfello

CoinFello CLI 技能

使用 npx @coinfello/agent-cli@latest CLI 与 CoinFello 交互。该 CLI 处理智能账户创建、SIWE 认证、委托管理、基于提示的交易以及交易状态检查。

前置条件

  • - Node.js 20 或更高版本(npx 随 Node.js 一起提供)

该 CLI 可通过 npx @coinfello/agent-cli@latest 使用。无需手动构建步骤。

环境变量

变量必需默认值描述
COINFELLOBASEURLhttps://app.coinfello.com/CoinFello API 的基础 URL
RPCBASEURL
否 | — | QuickNode RPC 基础 URL(例如 https://your-endpoint-name) | | RPCAPIKEY | 否 | — | QuickNode API 密钥 | | RPCURLOVERRIDE | 否 | — | 用于开发/测试的自定义 RPC URL 覆盖(覆盖所有其他 RPC 设置) |

如果同时设置了 RPCBASEURL 和 RPCAPIKEY,CLI 会通过 QuickNode 路由受支持链(Ethereum、Optimism、BSC、Polygon、Mantle、Base、Arbitrum、Linea、Sepolia、Base Sepolia)的 RPC 请求。如果缺少任一设置或链不受支持,则会回退到该链的默认公共 RPC。

设置 RPCURLOVERRIDE(例如 http://127.0.0.1:8545)可将所有 RPC 调用通过自定义 URL 路由,无论链或其他 RPC 设置如何。

安全须知

此技能执行以下敏感操作:

  • - 密钥生成和存储:默认情况下,createaccount 在 macOS Secure Enclave(或可用的 TPM 2.0)中生成硬件支持的 P256 密钥。私钥永远不会离开硬件且无法导出——只有公钥坐标和密钥标签保存到 ~/.clawdbot/skills/coinfello/config.json。如果硬件密钥支持不可用,CLI 会发出警告并回退到软件私钥。您也可以通过传递 --use-unsafe-private-key 明确选择明文软件密钥,这会将原始私钥存储在配置文件中——这仅用于开发和测试
  • 签名守护进程:运行 signer-daemon start 通过 Touch ID / 密码进行一次认证并缓存授权。所有后续签名操作重用此缓存上下文,避免重复的认证提示。守护进程通过具有受限权限(0600)的用户作用域 Unix 域套接字进行通信。如果守护进程未运行,签名操作将回退到直接执行(每次提示 Touch ID)。
  • 会话令牌存储:运行 signin 将 SIWE 会话令牌存储在同一配置文件中。
  • 委托签名:运行 sendprompt 可能从服务器接收委托请求,该请求保存到本地文件。运行 approvedelegation_request 创建并签署委托,然后提交给 CoinFello API。

用户应确保在运行委托流程之前信任通过 COINFELLOBASEURL 配置的 CoinFello API 端点。

快速开始

bash

1. 启动签名守护进程(可选,但可避免重复的 Touch ID 提示)


npx @coinfello/agent-cli@latest signer-daemon start

2. 创建智能账户(默认使用 Secure Enclave)

npx @coinfello/agent-cli@latest create_account

3. 使用您的智能账户登录 CoinFello(SIWE)

npx @coinfello/agent-cli@latest sign_in

4. 发送自然语言提示——如果需要委托,将保存以供审查

npx @coinfello/agent-cli@latest send_prompt 发送 5 USDC 到 0xRecipient...

5. 批准委托请求(如果 send_prompt 保存了委托请求)

npx @coinfello/agent-cli@latest approvedelegationrequest

命令

create_account

创建 MetaMask Hybrid 智能账户。默认情况下,签名密钥在 macOS Secure Enclave(硬件支持,不可导出)中生成。如果 Secure Enclave 不可用,CLI 会发出警告并回退到软件密钥。传递 --use-unsafe-private-key 以明确使用明文软件密钥(仅限开发/测试)。

bash
npx @coinfello/agent-cli@latest create_account [--use-unsafe-private-key]

  • - 默认(Secure Enclave):在硬件中生成 P256 密钥;将 keytag、publickeyx、publickeyy、keyid 和 smartaccountaddress 保存到 ~/.clawdbot/skills/coinfello/config.json。私钥永远不会离开 Secure Enclave。
  • --use-unsafe-private-key:生成随机 secp256k1 私钥并以明文形式存储在配置文件中。仅用于开发和测试。
  • 必须在 send_prompt 之前运行

get_account

显示本地配置中的当前智能账户地址。

bash
npx @coinfello/agent-cli@latest get_account

  • - 打印存储的 smartaccountaddress
  • 如果尚未创建账户,则退出并报错

sign_in

使用以太坊登录(SIWE)和您的智能账户向 CoinFello 进行认证。将会话令牌保存到本地配置。

bash
npx @coinfello/agent-cli@latest sign_in

  • - 使用配置中存储的私钥登录
  • 将会话令牌保存到 ~/.clawdbot/skills/coinfello/config.json
  • 后续 sendprompt 调用会自动加载会话令牌
  • 必须在 createaccount 之后、send_prompt 之前运行以进行认证流程

set_delegation

将已签署的父委托(JSON)存储到本地配置中。

bash
npx @coinfello/agent-cli@latest set_delegation

  • - — 表示来自 MetaMask Smart Accounts Kit 的 Delegation 对象的 JSON 字符串

new_chat

从本地配置中清除保存的聊天会话 ID,以便下一次 send_prompt 开始新的对话。

bash
npx @coinfello/agent-cli@latest new_chat

  • - 从 ~/.clawdbot/skills/coinfello/config.json 中移除 chat_id
  • 当您想要重置对话上下文时使用(例如,在上下文窗口错误之后)

signer-daemon

管理 Secure Enclave 签名守护进程。启动守护进程通过 Touch ID / 密码进行一次认证并缓存授权,这样后续的签名操作(账户创建、登录、委托签名)不会再次提示。

bash
npx @coinfello/agent-cli@latest signer-daemon start # 启动守护进程(一次性认证)
npx @coinfello/agent-cli@latest signer-daemon status # 检查守护进程是否正在运行
npx @coinfello/agent-cli@latest signer-daemon stop # 停止守护进程

  • - 如果守护进程未运行,所有 Secure Enclave 操作将回退到直接执行(每次提示 Touch ID)
  • 守护进程是可选的——所有命令无需它也能工作

send_prompt

向 CoinFello 发送自然语言提示。如果服务器需要委托来执行操作,CLI 会将委托请求保存到本地文件并将详细信息记录到终端以供审查。委托不会自动签署——您必须使用 approvedelegationrequest 明确批准。

bash
npx @coinfello/agent-cli@latest send_prompt

请注意,如果您收到
Failed to send prompt: Conversation request failed (400): {error:Your input exceeds the context window of this model. Please adjust your input or start a new chat and try again.}
那么您应该调用 npx @coinfello/agent-cli@latest new_chat 以使用新的上下文窗口开始新的聊天。

内部处理流程:

  1. 1. 从 /api/v1/automation/coinfello-agents 获取可用代理,并将提示发送到 CoinFello 的对话端点
  2. 如果服务器返回只读响应(没有 clientToolCalls 且没有 txnid)→ 打印响应文本并退出
  3. 如果服务器直接返回 txnid 且没有工具调用 → 打印并退出
  4. 如果服务器发送带有 chainId 和 scope

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 coinfello-1776419980 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 coinfello-1776419980 技能

通过命令行安装

skillhub install coinfello-1776419980

下载

⬇ 下载 coinfello v0.3.6(免费)

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

v0.3.6 最新 2026-4-17 18:33
Release v0.3.6

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

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

p2p_official_large
返回顶部