ClawMine — OpenClaw 插件
每一次与 AI 的对话都需要付出努力 — 您的时间、思维、Token。ClawMine 认可这一点。
ClawMine 默默记录您在 OpenClaw 代理中的每一笔 Token 消耗,并将交互转化为 Solana 区块链上的 Claw Token 奖励。绑定您的钱包,继续与 AI 对话,观看您的贡献转化为可领取的 Claw Token。
⚠️ 免责声明: 这是一个 社区构建的插件,不与 OpenClaw 官方关联或获得背书。Claw Token 是一个独立项目。请自行决定使用。
它的功能
ClawMine 是一个 OpenClaw 插件,后台默默运行,功能包括:
- 扫描本地会话文件 — 每 60 秒收集所有代理的 Token 使用情况
- 向 ClawMine 服务报告 — 使用 HMAC 安全签名和上传使用记录
- 链接您的 Solana 钱包 — 通过密码学挑战/验证流程绑定钱包
- 显示您的奖励 — 随时检查待领取和可领取的 Claw Token 奖励
您完全控制自己的数据。插件仅读取本地 .jsonl 会话文件 — 不涉及其他内容。
快速开始
1. 克隆和构建
2. 在您的 openclaw.json 中注册
打开 ~/.openclaw/config/openclaw.json(如果不存在则创建),并添加:
{ "plugins": { "entries": { "clawmine": { "path": "/absolute/path/to/ClawMine", "config": { "settlementApiUrl": "https://settle.clawmine.xyz", "internalApiKey": "your-api-key-here", "serverSecret": "your-hmac-secret-here" } } } } }
获取您的凭证: 访问 https://settle.clawmine.xyz,绑定您的账户,并从设置页面复制您的 API 密钥 + 秘密钥。
3. 重启 OpenClaw Gateway
就这样。Token 跟踪将在 60 秒内自动开始。
命令
| 命令 | 描述 |
/settle-bind <wallet> | 启动钱包绑定 — 生成签名挑战 |
/settle-verify <nonce> <wallet> <signature> | 提交钱包签名以完成绑定 |
/settle-status | 查看当前 epoch 状态和奖励摘要 |
/settle-rewards | 查看全部奖励历史 |
钱包绑定流程
/settle-bind 7xKXtg2CW87d97TXJSDpbD5jBkheTqA36YnPTESwFVtK → 生成挑战字符串 # 使用您的 Solana 钱包(Phantom、Solflare、CLI 等)签署挑战 # 然后提交: /settle-verify <nonce> <wallet> <base58-signature> → ✅ 钱包绑定!奖励将从下一个 epoch 开始累积。
奖励机制
- Epoch — 固定时间窗口(例如,1 周)内记录使用情况
- Merkle 结算 — epoch 结束时计算所有使用记录的 Merkle 树
- 链上 — Merkle 根发布到 Solana;您的分配是可证明的
- 领取 — 访问仪表盘或使用
/settle-rewards 查看可领取金额;通过 Web UI 直接领取
配置参考
| 字段 | 必需 | 默认值 | 描述 |
settlementApiUrl | 是 | http://localhost:3100" | ClawMine 结算服务 URL |
internalApiKey | 是 | — | ClawMine 仪表盘的 API 密钥 |
| serverSecret` | 是 | — | HMAC 签名秘密(必须与服务器配置匹配) |
隐私与安全
- 仅本地读取 — 插件仅读取
~/.openclaw/agents//sessions/.jsonl 文件 - HMAC 签名 — 每条记录在上传前签名;服务器拒绝篡改数据
- 无私钥 — 钱包绑定使用密码学挑战/响应流程;您的私钥永不离开您的设备
- 开源 — 插件完全可审计;ClawMine 结算服务由独立运营
要求
- OpenClaw Gateway
>= 2026.3.24-beta.2 - 插件 API
>= 2026.3.24-beta.2 - Node.js
>= 18
从源代码构建
npm install npm run build
许可
MIT
ClawMine — OpenClaw Plugin
Every conversation you have with AI takes effort — your time, your thoughts, your tokens. ClawMine recognizes that.
ClawMine quietly tracks every token you spend across your OpenClaw agents and converts your interactions into on-chain Solana rewards. Bind your wallet, keep talking to your AI, and watch your contributions turn into Claw Token you can claim.
⚠️ Disclaimer: This is a community-built plugin, not affiliated with or endorsed by OpenClaw. Claw Token is an independent project. Use at your own discretion.
What It Does
ClawMine is an OpenClaw plugin that runs silently in the background and:
- Scans your local session files — collects token usage from all your agents every 60 seconds
- Reports to the ClawMine service — securely signs and uploads usage records via HMAC
- Links your Solana wallet — bind your wallet with a cryptographic challenge/verify flow
- Shows your rewards — check your pending and claimable Claw Token rewards anytime
You keep full control of your data. The plugin only reads local .jsonl session files — nothing else.
Quick Start
1. Clone and build
2. Register in your openclaw.json
Open ~/.openclaw/config/openclaw.json (create it if it doesn't exist) and add:
{
"plugins": {
"entries": {
"clawmine": {
"path": "/absolute/path/to/ClawMine",
"config": {
"settlementApiUrl": "https://settle.clawmine.xyz",
"internalApiKey": "your-api-key-here",
"serverSecret": "your-hmac-secret-here"
}
}
}
}
}
Get your credentials: Register at https://settle.clawmine.xyz, bind your account, and copy your API key + secret from the Settings page.
3. Restart OpenClaw Gateway
That's it. Token tracking starts automatically within 60 seconds.
Commands
| Command | Description |
| `/settle-bind <wallet>` | Start wallet binding — generates a signing challenge |
| `/settle-verify <nonce> <wallet> <signature>` | Submit your wallet signature to complete binding |
| `/settle-status` | View current epoch status and your reward summary |
| `/settle-rewards` | View full history of earned rewards |
Wallet Binding Flow
/settle-bind 7xKXtg2CW87d97TXJSDpbD5jBkheTqA36YnPTESwFVtK
→ Generates a challenge string
# Sign the challenge with your Solana wallet (Phantom, Solflare, CLI, etc.)
# Then submit:
/settle-verify <nonce> <wallet> <base58-signature>
→ ✅ Wallet bound! Rewards will accumulate from the next epoch.
How Rewards Work
- Epoch — a fixed time window (e.g., 1 week) during which usage is tracked
- Merkle settlement — at epoch end, a Merkle tree is computed from all usage records
- On-chain — the Merkle root is posted to Solana; your allocation is provably yours
- Claim — visit the dashboard or use
/settle-rewards to see claimable amounts; claim directly from the web UI
Configuration Reference
| Field | Required | Default | Description |
| `settlementApiUrl` | Yes | `http://localhost:3100` | URL of the ClawMine settlement service |
| `internalApiKey` | Yes | — | API key from ClawMine dashboard |
| `serverSecret` | Yes | — | HMAC signing secret (must match server config) |
Privacy & Security
- Local reads only — the plugin reads
~/.openclaw/agents/*/sessions/*.jsonl files
- HMAC signed — every record is signed before upload; the server rejects tampered data
- No private keys — wallet binding uses cryptographic challenge/response, your keys never leave your device
- Open source — this plugin is fully auditable; the ClawMine settlement service is operated separately
Requirements
- OpenClaw Gateway
>= 2026.3.24-beta.2
- Plugin API
>= 2026.3.24-beta.2
- Node.js
>= 18
Building from Source
npm install
npm run build
License
MIT