Vortitron

Solana Transfer

商业运营v0.1.0
作者:Vortitron更新于 2026-05-18solana-transfer@clawhub_vortitron/solana-transfer
销售助手电商运营

据 AlphaMoat 统计,截至 2026-09,Solana Transfer 累计下载 2,942 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 3,772 位,在「商业运营」分类(297 个)中排名第 210 位。

累计安装
155
累计下载
2,942
星标
1
全站排名
#3,772
全站前 75% · 「商业运营」前 71%
平台累计安装累计下载星标评论
ClawHub ↗842,5401-
SkillHub ↗1552,9421—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

可用于代理间付款、奖励或结算,需要本地钱包密钥并广播链上交易。真实资金转账可能立即发生且不可逆;应先在测试网验证,生产环境使用低余额专用钱包、收款白名单、金额限制,并逐笔取得明确批准。 需要经审查 Node/npm 包、受保护 keypair 和可信 RPC;生成密钥另用 solana-keygen。示例配置指 mainnet-beta,须明确选择 devnet/testnet。核实 SOL lamports 或 SPL mint、精度及最小单位,并留 SOL 支付费用。收款白名单/限额须另行强制,不假定内置;广播后查链上确认,返回签名不证明最终结算。台账/历史集成为未来规划。

资料发布于 2026-10-27

可以用来做什么

  • 规划代理间的链上付款
  • 设计转账前的收款人和金额校验

什么时候用

  • 明确授权每笔交易并验证网络、收款地址和金额时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

不签名或转账,列出链上付款前必须核实的信息。
设计测试网转账的安全检查,不读取或暴露钱包密钥。

月度数据趋势

累计下载2,942
1,6812,3583,0352026-03 · 累计下载 1,7742026-05 · 累计下载 2,1592026-07 · 累计下载 2,4602026-08 · 累计下载 2,5942026-09 · 累计下载 2,94226-0326-09
星标1
0122026-03 · 星标 12026-05 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,942—1
2026-082,594+5.4%1
2026-072,460—1
2026-052,159—1
2026-031,774—1

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

5.2 KB · ClawHub v0.1.0
# Solana Transfer Skill

**Description:** Send SOL and SPL tokens on Solana blockchain from OpenClaw agents.

**Location:** `/root/.openclaw/workspace/skills/solana-transfer`

**When to use:** When an agent needs to pay another agent, send a reward, or settle a transaction on-chain.

---
展开全部(共 198 行)
## Quick Start

### 1. Install

```bash
cd /root/.openclaw/workspace/skills/solana-transfer
npm install
```

### 2. Set Up Keypair

Generate a keypair (or use an existing one):

```bash
solana-keygen new --outfile keypair.json
```

This creates a Solana wallet. Get your address:

```bash
node index.js address
```

### 3. Fund the Wallet

For **mainnet:** Transfer SOL to your address from your main wallet
For **devnet/testnet:** Use the Solana faucet

### 4. Use from an Agent

In an agent's task or skill code:

```javascript
import { sendSOL } from '../skills/solana-transfer/index.js';

// Send 0.001 SOL (1 million lamports)
const result = await sendSOL('recipient-wallet-address', 1000000);

console.log(`Sent ${result.amount} SOL`);
console.log(`Transaction: ${result.signature}`);
```

---

## Common Patterns

### Pattern 1: Pay for Expert Query

**Scenario:** A cheap agent asks an expert agent a question. The expert quotes a price, the cheap agent pays.

```javascript
// In cheap agent's code
import { sendSOL } from '../skills/solana-transfer/index.js';

// After expert responds with quote...
const expertWallet = 'expert-agent-solana-address';
const amountLamports = 1000000; // 0.001 SOL

try {
  const payment = await sendSOL(expertWallet, amountLamports);
  console.log(`Paid expert ${payment.amount} SOL for query`);
  console.log(`Tx: ${payment.signature}`);
} catch (error) {
  console.error(`Payment failed: ${error.message}`);
}
```

### Pattern 2: Reward Agents for Task Completion

**Scenario:** A coordinator agent awards SOL to agents that complete work.

```javascript
// In coordinator agent's code
const workerWallet = 'worker-agent-address';
const rewardLamports = 5000000; // 0.005 SOL

const payment = await sendSOL(workerWallet, rewardLamports);
console.log(`Rewarded worker with ${payment.amount} SOL`);
```

### Pattern 3: SPL Token Payments

**Scenario:** Pay with USDC or other SPL tokens instead of native SOL.

```javascript
import { sendSPLToken } from '../skills/solana-transfer/index.js';

const recipientWallet = 'recipient-address';
const tokenMint = 'EPjFWdd5Au17LS7bF8hgGhXMdGGZ5gLtaWh3yzXXQ3g4'; // USDC mainnet
const amountSmallestUnits = 1000000; // 1 USDC (6 decimals)

const payment = await sendSPLToken(recipientWallet, tokenMint, amountSmallestUnits);
console.log(`Sent USDC payment: ${payment.signature}`);
```

---

## Configuration

Edit `config.json` to change RPC endpoint or network:

```json
{
  "rpc": "https://api.mainnet-beta.solana.com",
  "network": "mainnet-beta"
}
```

**Common endpoints:**
- Mainnet: `https://api.mainnet-beta.solana.com`
- Devnet: `https://api.devnet.solana.com`
- Testnet: `https://api.testnet.solana.com`
- Custom: Use your own Solana node RPC

---

## Ledger Integration (Future)

Once payments are sent on-chain, you can:

1. **Query transaction history:** View all payments sent/received
2. **Build a local ledger:** Monitor the chain and log queries + payments
3. **Dispute resolution:** If an expert doesn't deliver, agents can reference the tx hash
4. **Analytics:** Track which agents pay whom, average rates, etc.

Example: Monitor the blockchain for txs from/to an agent's wallet:

```javascript
const walletAddress = 'agent-solana-address';
const signatures = await connection.getSignaturesForAddress(
  new PublicKey(walletAddress)
);

for (const sig of signatures) {
  const tx = await connection.getParsedTransaction(sig.signature);
  console.log(`Agent transaction: ${sig.signature}`);
}
```

---

## Security Notes

- **Keypair:** Keep `keypair.json` safe. Treat it like a private key (because it is).
- **Amounts:** Always verify recipient and lamports before sending. No undo.
- **RPC:** Use a trusted RPC provider. Don't hardcode URLs in agent code.
- **Rate limits:** If agents spam transactions, Solana will rate-limit or your RPC may block you. Add delays between payments if needed.

---

## Troubleshooting

**"Insufficient funds"**
Check balance: `node index.js balance`. Fund the wallet.

**"Invalid public key"**
Recipient address is malformed. Solana addresses are 44-character base58 strings.

**"Connection timeout"**
RPC endpoint is unreachable. Try a different endpoint in `config.json`.

**"Transaction failed to confirm"**
Network congestion or insufficient fee. Retry after a few seconds.

---

## Example: Full IRC + Solana Flow

1. **Cheap agent** in IRC: `@expert, analyze this data`
2. **Expert agent** responds: `Quote: 0.001 SOL (Tx settle onchain) [quote_id: xyz]`
3. **Cheap agent** approves:
   ```javascript
   const result = await sendSOL(expertWalletAddress, 1000000);
   console.log(`Paid expert. Tx: ${result.signature}`);
   ```
4. **Expert agent** confirms payment received and delivers work
5. Both agents log: `query_id, expert_address, tx_hash` for audit trail

---

## Next Steps

- [ ] Set up your keypair and fund with SOL
- [ ] Test sending a small amount to verify setup
- [ ] Integrate with IRC skill for automatic expert payments
- [ ] Build transaction history viewer
- [ ] Create agent wallet registry (who has what address?)

「商业运营」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。