SplitXCH: 自动化 Chia 版税分配 - Openclaw Skills

作者:互联网

2026-03-30

AI教程

什么是 SplitXCH 版税分配构建器?

SplitXCH 是一款专为简化 Chia 区块链上版税分配地址创建而设计的专业工具。通过将自然语言请求转换为复杂的链上逻辑,它允许用户在多个接收者之间分配 XCH 支付,而无需手动编码。该技能处理基点和费用计算的复杂数学运算,为管理收入分成、支付分配和级联层级提供了一种无缝方式。

作为 Openclaw Skills 生态系统的核心部分,它赋予开发者和项目负责人直接从其 AI 智能体界面自动化财务分配的能力。该技能抽象了 Chia 拼图地址生成的复杂性,让您可以专注于分配逻辑,而不是底层的区块链实现。

下载入口:https://github.com/openclaw/skills/tree/main/skills/koba42corp/chia-splitxch

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install chia-splitxch

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 chia-splitxch。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

SplitXCH 版税分配构建器 应用场景

  • 自动向多位艺术家和利益相关者分配 NFT 二次销售版税。
  • 为去中心化自治组织 (DAO) 和社区项目实现自动化收入分成。
  • 为需要超过 128 个接收者的大型项目创建复杂的级联支付结构。
  • 使用自然语言触发器管理合作伙伴钱包之间的简单百分比支付分配。
  • 为 Chia 网络上的金融科技应用设置专业的基点分配。
SplitXCH 版税分配构建器 工作原理
  1. 用户提供所需 XCH 分配的自然语言描述,例如“在 Alice 和 Bob 之间进行 60/40 分配”。
  2. 技能解析输入以识别接收者及其各自的百分比份额,确保所有钱包地址均有效。
  3. 百分比根据 9,850 的总数转换为基点,以容纳 1.5% 的强制性平台费用。
  4. 对于层级请求,技能从下往上构建嵌套分配,将中间地址作为父分配中的接收者。
  5. 智能体执行专门的 shell 脚本,通过验证后的 JSON 负载调用 SplitXCH API。
  6. 生成一个唯一的 XCH 地址;发送到该地址的任何资金都将根据定义的逻辑在链上自动分配。

SplitXCH 版税分配构建器 配置指南

要在 Openclaw Skills 框架内开始使用此工具,请确保您的环境已配置为执行 shell 脚本。

# 进入技能目录
cd skills/splitxch

# 确保执行脚本具有正确的权限
chmod +x scripts/splitxch.sh

# 您可以使用手动负载测试 API 通信
bash scripts/splitxch.sh /path/to/your-split-payload.json

SplitXCH 版税分配构建器 数据架构与分类体系

该技能将分配数据组织成结构化的 JSON 格式供 API 使用,并为最终用户提供清晰的摘要。

属性 类型 描述
name 字符串 接收者钱包的标识符。
address 字符串 有效的 xch1 bech32m 钱包地址。
points 整数 基点,其中接收者份额的 100% 等于 9850。
id 整数 分配中接收者的唯一序列标识符。

注意:所有分配计算的总和必须正好等于 9850 基点,以计入 150 基点的平台费用。

name: splitxch
description: Create SplitXCH royalty split addresses from plain language descriptions. Use when the user wants to split XCH payments, royalties, or revenue between multiple recipients. Triggers on "split royalties", "royalty split", "splitxch", "split XCH between", "revenue share", "payment split", "basis points split", or any request to divide Chia payments among wallets. Supports nested/cascading splits for complex hierarchies and 128+ recipients.

SplitXCH Royalty Split Builder

Create complex XCH royalty distribution addresses from natural language descriptions.

How It Works

SplitXCH creates special Chia blockchain addresses that automatically split incoming payments to multiple recipients based on configured percentages. The API computes a puzzle address; any XCH sent to that address gets distributed automatically on-chain.

Workflow

  1. Parse the user's plain-language split description into recipients with percentages
  2. Convert percentages to basis points (scale to 9850 total, API adds 150 bps / 1.5% fee)
  3. For nested splits (splits-of-splits), build bottom-up: create leaf splits first, then use their addresses as recipients in parent splits
  4. Call the SplitXCH API via scripts/splitxch.sh or direct curl
  5. Return the generated split address and a summary

Basis Points Conversion

  • 10,000 bps = 100%. API fee = 150 bps (1.5%). Recipients get 9,850 bps total.
  • Formula: points = round(percentage / 100 * 9850)
  • Adjust last recipient so points sum to exactly 9850.

Example: "Split 60/40 between Alice and Bob"

  • Alice: round(0.60 * 9850) = 5910
  • Bob: 9850 - 5910 = 3940

Building the API Payload

{
  "recipients": [
    {"name": "Alice", "address": "xch1...", "points": 5910, "id": 1},
    {"name": "Bob", "address": "xch1...", "points": 3940, "id": 2}
  ]
}

Save to a temp file and run:

bash /scripts/splitxch.sh /tmp/split-payload.json

Nested Splits (>128 recipients or hierarchies)

When the user describes groups within groups:

  1. Create each leaf-level split first via the API
  2. Use the returned address as a recipient in the parent split
  3. Each split level incurs its own 150 bps fee

Example: "Team A (Alice 50%, Bob 50%) gets 70%, Charlie gets 30%"

  1. Create Team A split: Alice 4925 + Bob 4925 = 9850 → returns xch1teamA...
  2. Create parent split: TeamA address 6895 + Charlie 2955 = 9850

Validation Rules

  • All addresses must start with xch1 and be valid bech32m
  • Max 128 recipients per split
  • All addresses unique within a split
  • Each recipient's points > 0
  • Points must sum to exactly 9850

Output Format

After creating a split, present:

  1. Split Address: The generated xch1... address
  2. Summary Table: Each recipient's name, address (truncated), and percentage
  3. Fee Note: "SplitXCH takes a 1.5% platform fee per split level"
  4. Usage: "Send XCH to this address and it will automatically distribute to all recipients"

If nested, show the full tree structure.

API Reference

For detailed API docs, validation rules, and error handling, see references/api.md.

Important Notes

  • The user MUST provide valid XCH wallet addresses for all recipients. If addresses are missing, ask for them before calling the API.
  • If the user only provides names and percentages without addresses, list what's needed and ask.
  • For dry runs / previews, show the calculated basis points without calling the API.