← 返回
未分类 中文

Sfaeflow Solana Skill

Use when running SafeFlow against a deployed Solana program. Trigger for tasks such as generating an agent keypair, asking the owner to fund gas and create w...
用于在已部署的 Solana 程序上运行 SafeFlow,触发任务包括生成代理密钥对、请求所有者提供 gas 费用并创建 w...
fwangzil fwangzil 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 295
下载
💾 0
安装
1
版本
#latest

概述

SafeFlow Solana Agent Skill

Operate this as a payment skill for AI agents on Solana with on-chain rate limiting.

Default program ID (devnet):

  • DwYEDn6xRpSbnNA7mkszQgDAUoHGfgdBNSi6pwy4qJKy

Quick Start (Owner-Handoff)

  1. Bootstrap agent keypair and print owner handoff instructions:
cd safe-flow-solana-skill/scripts
chmod +x ./*.sh
./bootstrap.sh \
  --program-id DwYEDn6xRpSbnNA7mkszQgDAUoHGfgdBNSi6pwy4qJKy \
  --cluster devnet
  1. Ask owner to:
    • Fund the agent address with SOL for gas (~0.01 SOL)
    • Open the SafeFlow dashboard and create a wallet + session for the agent address
    • Return with walletOwner public key
  1. Save owner-provided config:
./save_config.sh \
  --wallet-owner <OWNER_PUBKEY>
  1. Execute payment:
./execute_payment.sh \
  --recipient <RECIPIENT_ADDRESS> \
  --amount 500000000 \
  --evidence-id "reasoning:task_completed"

How It Works

  1. Agent generates a Solana keypair (stored locally in .safeflow/agent-keypair.json)
  2. Owner creates an AgentWallet PDA + deposits SOL + creates a SessionCap for the agent
  3. Agent uses the SessionCap to execute rate-limited payments autonomously
  4. All payments are enforced on-chain: rate limit, total cap, expiration, and revocation

Session Query

Check remaining budget before attempting payment:

./execute_payment.sh --query --wallet-owner <OWNER_PUBKEY>

Error Handling

The skill classifies payment failures:

ErrorMeaningAgent Action
-----------------------------
ExceedsRateLimitToo fastWait, retry with smaller amount
ExceedsTotalLimitBudget exhaustedStop, notify owner
SessionExpiredTime's upAsk owner for new session
SessionRevokedOwner killed itStop immediately

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 20:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,400
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 201 📥 68,573
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 689 📥 332,752