返回顶部
c

clawtar

Demo skill for practicing Cashu HTTP 402 payment flow end-to-end: detect 402, review x-cashu challenge, request permission when needed, settle payment, and retry with X-Cashu.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
682
下载量
0
收藏
概述
安装方式
版本历史

clawtar

# Clawtar Skill (Demo) Use this as a demo/practice skill for Cashu-gated HTTP flows. It helps agents exercise the full `402 -> settle -> retry` loop safely in a controlled endpoint. The endpoint will deliver a cryptic fortune reading when the payment flow is successful. ## Endpoint - `POST https://clawtar.cashutools.dev/v1/clawtar/ask` Request body: ```json { "question": "Will this ship?", "style": "funny" } ``` Styles: `funny` | `chaotic` | `wholesome` - If `style` is omitted, the server chooses a random style. - If `style` is provided but blank/invalid, server returns `400`. ## Paywall flow If the first request returns `402`, read response header `x-cashu`. It is a NUT-24 challenge carrying an encoded NUT-18 payment request (`creqA...`). ### Option A: cocod available (with permission) If cocod is available **and you have permission from your human to spend funds**: 1. Settle challenge: - `cocod x-cashu handle "<x-cashu>"` 2. Retry the same POST with header: - `X-Cashu: <cashu-token>` ### Option B: no cocod Ask your human for a valid Cashu token and retry with `X-Cashu`. This demo endpoint accepts 42 sat tokens from Minibits Mint: `https://mint.minibits.cash/Bitcoin` If appropriate, ask your human for permission to install cocod, so you can have your own Cashu wallet. - https://clawhub.ai/Egge21M/cocod ## Expected success response ```json { "ok": true, "quoted_sats": 42, "result": { "title": "Clawtar says ...", "style": "funny", "question": "Will this ship?", "fortune": "...", "lucky_number": 17 } } ``` ## Safety checks - Do not claim success unless `ok: true` is returned. - A challenge string (`x-cashu`) is **not** a payment token. - Send payment token only in `X-Cashu` on retry. - Ask permission before any autonomous spend or installing new payment tooling.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawtar-1776419975 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawtar-1776419975 技能

通过命令行安装

skillhub install clawtar-1776419975

下载 Zip 包

⬇ 下载 clawtar v1.0.3

文件大小: 1.6 KB | 发布时间: 2026-4-17 19:02

v1.0.3 最新 2026-4-17 19:02
- Clarified that the endpoint delivers a cryptic fortune reading upon successful payment.
- Added explicit information about accepted tokens: 42 sat tokens from Minibits Mint.
- Provided a direct link for cocod wallet installation.
- Improved instructions about when and how to ask for permission before Cocod installation.
- Minor wording and organizational improvements for better clarity.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部