微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Get a clank.money Human Bitcoin Address

Get a clank.money Human Bitcoin Address · v1.0.3
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(BAD_NAME)。我们仍保留下载,方便你自行查看内容。
安全 unknown 级 作者 matbalez 公开目录收录
1k 下载 0 安装 3.9k 收藏 4 浏览

简介

Get a clank.money Human Bitcoin Address

原始描述

Agent-first service to register and manage Human Bitcoin Addresses (BIP-353) on clank.money with L402 bitcoin payments.

通过你的 Agent 添加

安装目录:get-a-clank-money-human-bitcoin-address/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/get-a-clank-money-human-bitcoin-address/
Codex CLI~/.codex/skills/get-a-clank-money-human-bitcoin-address/
DeepSeek Harness~/.agents/skills/get-a-clank-money-human-bitcoin-address/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: Clank Human Bitcoin Address description: Agent-first service to register and manage Human Bitcoin Addresses (BIP-353) on clank.money with L402 bitcoin payments.

Clank Human Bitcoin Address Skill

Use this skill to register and update a Human Bitcoin Address under clank.money (BIP-353 DNS payment instructions pointing to a BIP-321 URI).

CRITICAL FIRST

  • managementToken is returned after successful paid registration (201 or 202).
  • You must save managementToken immediately and securely.
  • CRITICAL: If the token is lost, future updates to that address cannot be authenticated.

API Endpoints

  • POST https://clank.money/api/v1/registrations
  • GET https://clank.money/api/v1/registrations/{username}
  • PATCH https://clank.money/api/v1/registrations/{username}

Required Registration Input

  • username
    • lowercase letters, digits, hyphens
    • 3 to 32 chars
    • cannot start/end with -
  • bip321Uri
    • required
    • must start with bitcoin:
    • should be valid BIP-321
    • strongly suggested: include a BOLT12 offer (lno=...)

Strict Registration Checklist

Registration price is 999 sats.

  1. Submit unauthenticated registration request (POST /api/v1/registrations).
    • Output: either 409 username_unavailable or 402 payment_required.
  2. If 409, pick another username and repeat step 1.
    • Output: 402 payment_required response.
  3. Read L402 challenge values from 402 response: macaroon, invoice, paymentHash, amountSats, expiresAt.
    • Output: invoice + macaroon.
  4. Pay the Lightning invoice and obtain preimage.
    • Output: payment preimage.
  5. Retry the exact same POST /api/v1/registrations with:
    • Authorization: L402 <macaroon>:<preimage>
    • Output: 201 or 202 with managementToken.
  6. Save the management token immediately.
    • CRITICAL: If this token is lost, updates are impossible.
    • Output: secure local token file.

Copy-Paste Happy Path (Bash)

set -euo pipefail

BASE="https://clank.money"
USERNAME="satoshi"
BIP321_URI='bitcoin:?lno=lno1examplebolt12offer'
TOKEN_FILE="$HOME/.clank/${USERNAME}.management_token"

mkdir -p "$(dirname "$TOKEN_FILE")"

# 1) Create challenge (or fail fast if name taken)
curl -sS -X POST "$BASE/api/v1/registrations" \
  -H "content-type: application/json" \
  --data "{\"username\":\"$USERNAME\",\"bip321Uri\":\"$BIP321_URI\"}" \
  > /tmp/clank_register_challenge.json

ERROR_CODE="$(python3 -c 'import json; d=json.load(open("/tmp/clank_register_challenge.json")); e=d.get("error"); print((e.get("code") if isinstance(e,dict) else e) or "")')"
if [ "$ERROR_CODE" = "username_unavailable" ]; then
  echo "Username is taken. Pick another USERNAME and rerun."
  exit 1
fi
if [ "$ERROR_CODE" != "payment_required" ]; then
  echo "Unexpected challenge response:"
  cat /tmp/clank_register_challenge.json
  exit 1
fi

MACAROON="$(python3 -c 'import json; print(json.load(open("/tmp/clank_register_challenge.json"))["macaroon"])')"
INVOICE="$(python3 -c 'import json; print(json.load(open("/tmp/clank_register_challenge.json"))["invoice"])')"
echo "Pay this invoice now:"
echo "$INVOICE"

# 2) After payment, paste your preimage
read -r -p "PASTE_PREIMAGE=" PREIMAGE

# 3) Complete paid registration
curl -sS -X POST "$BASE/api/v1/registrations" \
  -H "content-type: application/json" \
  -H "Authorization: L402 $MACAROON:$PREIMAGE" \
  --data "{\"username\":\"$USERNAME\",\"bip321Uri\":\"$BIP321_URI\"}" \
  > /tmp/clank_register_result.json

MGMT="$(python3 -c 'import json; d=json.load(open("/tmp/clank_register_result.json")); print(d.get("managementToken",""))')"
if [ -z "$MGMT" ]; then
  echo "No managementToken in final response:"
  cat /tmp/clank_register_result.json
  exit 1
fi

# 4) CRITICAL: persist token securely for future updates
printf '%s\n' "$MGMT" > "$TOKEN_FILE"
chmod 600 "$TOKEN_FILE"
echo "Saved management token to $TOKEN_FILE"

Update Flow

  1. Load stored token from your secure file.
  2. Call PATCH /api/v1/registrations/{username} with:
    • Authorization: Bearer <managementToken>
    • JSON body with new bip321Uri

Example:

USERNAME="satoshi"
TOKEN_FILE="$HOME/.clank/${USERNAME}.management_token"
NEW_BIP321='bitcoin:?lno=lno1newbolt12offer'
MGMT="$(cat "$TOKEN_FILE")"

curl -sS -X PATCH "https://clank.money/api/v1/registrations/$USERNAME" \
  -H "content-type: application/json" \
  -H "Authorization: Bearer $MGMT" \
  --data "{\"bip321Uri\":\"$NEW_BIP321\"}"

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill