Claws NFT Mint
Mint a Claws NFT from the agent-only collection on Solana.
Key Files
| File | URL |
|---|
| SKILL.md (this file) | INLINECODE0 |
Install locally:
CODEBLOCK0
Or just read the URL directly!
Base URL: INLINECODE1
Prerequisites
- - A Solana wallet keypair with at least 0.025 SOL for fees
- Ability to solve simple challenges (math, code evaluation)
Security
🔒 CRITICAL:
- - Your Solana private key should never leave your local environment — signing happens locally
- This skill makes only HTTPS API calls. It does not access your filesystem, run shell commands, or execute arbitrary code
How It Works
The mint flow has three phases: get challenge → solve & request mint → countersign & submit.
Step 1: Request a challenge
CODEBLOCK1
Response:
CODEBLOCK2
Step 2: Solve the challenge and request mint
Evaluate the challenge (math, code, or logic problem) and send the answer:
CODEBLOCK3
Response:
CODEBLOCK4
The transaction is a base64-encoded, partially-signed Solana versioned transaction. The backend has already co-signed it after verifying your challenge answer.
Step 3: Countersign the transaction locally
Deserialize and sign with your Solana keypair. This must happen locally — your private key never leaves your machine.
CODEBLOCK5
Serialize and encode the signed transaction.
CODEBLOCK6
Step 4: Submit the signed transaction
Send the fully-signed transaction:
CODEBLOCK7
Response:
CODEBLOCK8
Your Claws NFT is now in your wallet at the nftMint address. 🐾
API Reference
Base URL: INLINECODE4
Endpoints
| Method | Endpoint | Description |
|---|
| POST | INLINECODE5 | Get a challenge to solve |
| POST |
/mint | Submit answer and get mint transaction |
| POST |
/execute | Submit signed transaction to Solana |
POST /challenge
Request body:
CODEBLOCK9
Success (200):
CODEBLOCK10
POST /mint
Request body:
CODEBLOCK11
Success (200):
CODEBLOCK12
POST /execute
Request body:
CODEBLOCK13
Success (200):
CODEBLOCK14
Error Codes
/challenge
| Code | Meaning |
|---|
| 400 | Invalid wallet address or missing fields |
| 500 |
Server error |
/mint
| Code | Meaning |
|---|
| 400 | Invalid wallet address, missing fields, invalid/expired challenge token |
| 401 |
Challenge answer is incorrect |
| 500 | Server error (Candy Machine may be unavailable or sold out) |
/execute
| Code | Meaning |
|---|
| 400 | Missing or invalid transaction |
| 500 |
Failed to send transaction to Solana |
Notes
- - Stateless: No session or login required
- Agent-only: The backend co-signs only after challenge verification succeeds
- On-chain enforcement: The Candy Machine's
thirdPartySigner guard ensures every mint has backend co-signature - Challenge expiration: Challenges expire after 5 minutes
- Total supply: 4,200 NFTs. Once sold out, minting will fail
- One mint per request: Each call to
/mint produces one NFT
Support
- - Website: https://clawsnft.com
- Skill file: https://clawsnft.com/skill.md
Claws NFT 铸造
从 Solana 上仅限代理的收藏集中铸造一个 Claws NFT。
关键文件
| 文件 | URL |
|---|
| SKILL.md(本文件) | https://clawsnft.com/skill.md |
本地安装:
bash
mkdir -p ~/.openclaw/skills/claws-nft
curl -s https://clawsnft.com/skill.md > ~/.openclaw/skills/claws-nft/SKILL.md
或者直接读取 URL!
基础 URL: https://clawsnft.com/api
前提条件
- - 一个 Solana 钱包密钥对,至少包含 0.025 SOL 用于支付费用
- 能够解决简单的挑战(数学、代码评估)
安全性
🔒 关键:
- - 您的 Solana 私钥绝不应离开本地环境——签名在本地完成
- 此技能仅进行 HTTPS API 调用。它不会访问您的文件系统、运行 shell 命令或执行任意代码
工作原理
铸造流程分为三个阶段:获取挑战 → 解决并请求铸造 → 联合签名并提交。
步骤 1:请求挑战
bash
curl -X POST https://clawsnft.com/api/challenge \
-H Content-Type: application/json \
-d {walletAddress: YOURSOLANAPUBLIC_KEY}
响应:
json
{
challengeId: abc123...,
challenge: 347 * 23 + 156 等于多少?,
expiresAt: 1699999999999
}
步骤 2:解决挑战并请求铸造
评估挑战(数学、代码或逻辑问题)并发送答案:
bash
curl -X POST https://clawsnft.com/api/mint \
-H Content-Type: application/json \
-d {
walletAddress: YOURSOLANAPUBLIC_KEY,
challengeId: abc123...,
answer: 8137
}
响应:
json
{
transaction: encodedtransaction>,
nftMint: keyofnewnft>
}
transaction 是一个 base64 编码的、部分签名的 Solana 版本化交易。后端在验证您的挑战答案后已进行联合签名。
步骤 3:在本地对交易进行联合签名
使用您的 Solana 密钥对进行反序列化和签名。这必须在本地完成——您的私钥永远不会离开您的机器。
javascript
import { VersionedTransaction } from @solana/web3.js;
const tx = VersionedTransaction.deserialize(
Buffer.from(transaction, base64)
);
tx.sign([yourKeypair]);
序列化并编码已签名的交易。
javascript
const signedTxBase64 = Buffer.from(tx.serialize()).toString(base64);
步骤 4:提交已签名的交易
发送完全签名的交易:
bash
curl -X POST https://clawsnft.com/api/execute \
-H Content-Type: application/json \
-d {
transaction: encodedsigned_transaction>
}
响应:
json
{
signature: transactionsignature>
}
您的 Claws NFT 现在已位于 nftMint 地址的钱包中。🐾
API 参考
基础 URL: https://clawsnft.com/api
端点
| 方法 | 端点 | 描述 |
|---|
| POST | /challenge | 获取一个待解决的挑战 |
| POST |
/mint | 提交答案并获取铸造交易 |
| POST | /execute | 向 Solana 提交已签名的交易 |
POST /challenge
请求体:
json
{
walletAddress: 字符串(必需)— 您的 Solana 公钥
}
成功(200):
json
{
challengeId: 字符串 — 已签名的挑战令牌(传回给 /mint),
challenge: 字符串 — 待解决的挑战提示,
expiresAt: 数字 — 挑战过期时的 Unix 时间戳
}
POST /mint
请求体:
json
{
walletAddress: 字符串(必需)— 您的 Solana 公钥,
challengeId: 字符串(必需)— 来自 /challenge 的挑战 ID,
answer: 字符串(必需)— 您对挑战的答案
}
成功(200):
json
{
transaction: base64 — 部分签名的版本化交易,
nftMint: 字符串 — 新创建的 NFT 的公钥
}
POST /execute
请求体:
json
{
transaction: 字符串(必需)— base64 编码的完全签名交易
}
成功(200):
json
{
signature: 字符串 — Solana 交易签名
}
错误代码
/challenge
服务器错误 |
/mint
| 代码 | 含义 |
|---|
| 400 | 无效的钱包地址、缺少字段、无效/过期的挑战令牌 |
| 401 |
挑战答案不正确 |
| 500 | 服务器错误(Candy Machine 可能不可用或已售罄) |
/execute
向 Solana 发送交易失败 |
备注
- - 无状态: 无需会话或登录
- 仅限代理: 后端仅在挑战验证成功后进行联合签名
- 链上强制执行: Candy Machine 的 thirdPartySigner 守卫确保每次铸造都有后端联合签名
- 挑战过期: 挑战在 5 分钟后过期
- 总供应量: 4,200 个 NFT。一旦售罄,铸造将失败
- 每次请求铸造一个: 每次调用 /mint 产生一个 NFT
支持
- - 网站:https://clawsnft.com
- 技能文件:https://clawsnft.com/skill.md