← 返回 Skills 市场
matbalez

Get a clank.money Human Bitcoin Address

作者 matbalez · GitHub ↗ · v1.0.3
cross-platform ✓ 安全检测通过
499
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install get-hba
功能描述
Agent-first service to register and manage Human Bitcoin Addresses (BIP-353) on clank.money with L402 bitcoin payments.
使用说明 (SKILL.md)

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 \x3Cmacaroon>:\x3Cpreimage>
    • 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\
' "$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 \x3CmanagementToken>
    • 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\"}"
安全使用建议
This skill appears to implement exactly the clank.money registration and update flow. Before installing/using it: 1) Verify you trust https://clank.money and confirm the API endpoints and TLS certificate manually. 2) Ensure your runtime has curl and python3 (SKILL.md uses them) and that you are comfortable the skill will write a secret token to $HOME/.clank/<username>.management_token (it sets chmod 600). Treat that managementToken as a sensitive secret — back it up securely and never share it. 3) The SKILL.md expects interactive pasting of the Lightning payment preimage; if you plan to run this non-interactively or via an autonomous agent, ensure the process for supplying the preimage and protecting the managementToken is secure. 4) Minor metadata mismatch: the skill declares no required binaries or config paths but uses curl/python3 and writes a token file; consider this a documentation gap and verify your environment before use.
功能分析
Type: OpenClaw Skill Name: get-hba Version: 1.0.3 The skill bundle provides instructions and bash scripts for registering and managing Human Bitcoin Addresses on clank.money. The code primarily uses `curl` to interact with the specified API and `python3 -c` for JSON parsing. It handles a `managementToken` by storing it in `$HOME/.clank/` with `chmod 600` permissions, which is a reasonable security practice for a client-side token. There is no evidence of data exfiltration to unauthorized endpoints, malicious code execution, persistence mechanisms, or prompt injection attempts designed to subvert the agent's core function. All actions are directly related to the stated purpose of interacting with the clank.money service.
能力评估
Purpose & Capability
Name and description match the actions described in SKILL.md: creating and updating Human Bitcoin Addresses on clank.money using the L402 payment flow and a managementToken for authenticated updates.
Instruction Scope
SKILL.md is specific about calling clank.money endpoints, creating a payment-challenge, paying a Lightning invoice, and saving a managementToken to a local file; it does not instruct reading unrelated files or exfiltrating data. It does rely on network access, writing to $HOME/.clank/<username>.management_token and temporary /tmp files, and interactive input of a preimage.
Install Mechanism
Instruction-only skill with no install/spec — nothing is written by an installer. Runtime commands are plain curl/python3 shell snippets rather than installed packages.
Credentials
The skill declares no required environment variables or credentials (correct for a flow where the service returns a managementToken after payment). However the instructions expect the runtime to have curl and python3 available and to permit writing a token file under $HOME; those expectations are not listed in the metadata (minor inconsistency). The managementToken is treated as a local secret and must be protected.
Persistence & Privilege
Skill is not always-enabled and is user-invocable. It does instruct storing a per-username management token locally, but it does not request elevated privileges or system-wide config changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install get-hba
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /get-hba 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
Summary: Registration flow clarified, token storage made critical, price updated, and new bash example added. - Skill name is now "Clank Human Bitcoin Address" and description is updated for clarity. - Registration flow rewritten with step-by-step "Strict Registration Checklist" and explicit error handling. - Registration fee changed from 200 sats to 999 sats. - Bash copy-paste example for full registration, payment, and token storage now included. - Management token handling is emphasized as critical: lost tokens mean updates are impossible. - API details and update procedure remain, but with reinforced input and security requirements.
v1.0.2
- Clarified that bip321Uri is required for registration, not optional. - Strongly recommended including a BOLT12 offer (lno=...) in bip321Uri for Lightning compatibility. - Updated the registration example to use a BOLT12 offer format. - Revised the minimal agent procedure and input validation to emphasize the BOLT12 suggestion. - No code changes in this version.
v1.0.1
- Clarified payment flow terminology and mechanics: updated from MDK402 to MoneyDevKit L402, including new wire format and field names. - Adjusted API authentication example headers and instructions to use L402 (`Authorization: L402 <macaroon>:<preimage>`) instead of MDK402. - Updated documentation to explain that Clank uses MoneyDevKit L402 with `@moneydevkit/nextjs` 0.12.0. - Improved clarity for users in following the new L402 challenge-response process.
v1.0.0
- Initial release of the Clank Registration skill for registering and updating Human Bitcoin Addresses (BIP-353) on clank.money. - Supports secure registration, update, and DNS publishing of Bitcoin payment URIs with pay-per-call MDK402 Lightning payment flow. - Returns and requires secure management tokens for updates. - Full support for error handling, payment challenges, and critical registration metadata management. - Includes detailed local input validation rules and complete cURL usage patterns.
元数据
Slug get-hba
版本 1.0.3
许可证
累计安装 0
当前安装数 0
历史版本数 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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 499 次。

如何安装 Get a clank.money Human Bitcoin Address?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install get-hba」即可一键安装,无需额外配置。

Get a clank.money Human Bitcoin Address 是免费的吗?

是的,Get a clank.money Human Bitcoin Address 完全免费(开源免费),可自由下载、安装和使用。

Get a clank.money Human Bitcoin Address 支持哪些平台?

Get a clank.money Human Bitcoin Address 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Get a clank.money Human Bitcoin Address?

由 matbalez(@matbalez)开发并维护,当前版本 v1.0.3。

💬 留言讨论