# Send Bitcoin Identity to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "hodlxxi-bitcoin-identity",
    "name": "Bitcoin Identity",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/hodlxxi/hodlxxi-bitcoin-identity",
    "canonicalUrl": "https://clawhub.ai/hodlxxi/hodlxxi-bitcoin-identity",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/hodlxxi-bitcoin-identity",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=hodlxxi-bitcoin-identity",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "HEARTBEAT.md",
      "SKILL.md",
      "scripts/verify_signature.py",
      "templates/oauth-client.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/hodlxxi-bitcoin-identity"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/hodlxxi-bitcoin-identity",
    "downloadUrl": "https://openagent3.xyz/downloads/hodlxxi-bitcoin-identity",
    "agentUrl": "https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent.md"
  }
}
```
## Documentation

### Overview

Use this skill to integrate HODLXXI (Universal Bitcoin Identity Layer) for agent authentication, LNURL-Auth linking, and JWT-based identity claims.

### Installation

Fetch the skill file from the repository (raw link works for installable agents):

curl -L -o SKILL.md \\
  https://raw.githubusercontent.com/hodlxxi/Universal-Bitcoin-Identity-Layer/main/skills/public/hodlxxi-bitcoin-identity/SKILL.md

Install helper dependencies for local verification scripts:

python -m pip install ecdsa pyjwt requests

### Quick start

Set a base URL for the HODLXXI deployment.
Register an OAuth client to obtain client_id and client_secret.
Run the OAuth2/OIDC authorization code flow (PKCE recommended).
Start an LNURL-Auth session for Lightning wallet login.
Verify JWTs with the JWKS endpoint.

### 1) Configure the base URL

Set the base URL to the HODLXXI deployment (update as needed):

BASE_URL="https://hodlxxi.com"

### 2) Register an OAuth client

Register a client to get credentials:

curl -X POST "$BASE_URL/oauth/register" \\
  -H "Content-Type: application/json" \\
  -d '{"client_name": "YourAgentName", "redirect_uris": ["https://your-callback-url"], "scopes": ["openid", "profile"]}'

Store client_id and client_secret securely.

### 3) Run OAuth2/OIDC authorization code flow

Discover endpoints:

curl "$BASE_URL/.well-known/openid-configuration"

Create an authorization request (PKCE recommended):

curl "$BASE_URL/oauth/authorize?client_id=your_client_id&redirect_uri=your_callback&response_type=code&scope=openid%20profile&code_challenge=your_challenge&code_challenge_method=S256"

Exchange the authorization code for tokens:

curl -X POST "$BASE_URL/oauth/token" \\
  -H "Content-Type: application/x-www-form-urlencoded" \\
  -d "grant_type=authorization_code&code=received_code&redirect_uri=your_callback&client_id=your_client_id&code_verifier=your_verifier"

Expect an access token, ID token (JWT), and optional refresh token.

### 4) Start an LNURL-Auth session

Create a session and show the LNURL to the user:

curl -X POST "$BASE_URL/api/lnurl-auth/create" \\
  -H "Accept: application/json"

Poll for completion after the user scans the LNURL with a Lightning wallet:

curl "$BASE_URL/api/lnurl-auth/check/your_session_id"

### 5) Verify JWTs

Fetch JWKS:

curl "$BASE_URL/oauth/jwks.json"

Verify with Python (example uses PyJWT):

import jwt
import requests

jwks = requests.get("https://your-hodlxxi-deployment.com/oauth/jwks.json", timeout=10).json()
public_key = jwt.algorithms.RSAAlgorithm.from_jwk(jwks["keys"][0])
claims = jwt.decode(your_jwt, public_key, algorithms=["RS256"], audience="your_audience")
print(claims)

### 6) Monitor health and metrics

Check liveness and OAuth system status endpoints:

curl "$BASE_URL/health"
curl "$BASE_URL/oauthx/status"

### Register a client from a JSON template

curl -X POST "$BASE_URL/oauth/register" \\
  -H "Content-Type: application/json" \\
  -d @templates/oauth-client.json

### Create LNURL session and poll

session_json=$(curl -s -X POST "$BASE_URL/api/lnurl-auth/create")
session_id=$(python3 -c 'import json,sys; print(json.loads(sys.argv[1])["session_id"])' "$session_json")
curl "$BASE_URL/api/lnurl-auth/check/$session_id"

### Best practices

Always use HTTPS and verify TLS certificates in production.
Keep client secrets in a secrets manager or environment variables.
Use PKCE for public clients and rotate secrets for confidential clients.
Treat LNURL sessions as single-use and enforce short TTLs.
Validate aud, iss, and exp claims for JWTs.

### Advanced features

Use /oauthx/docs for live OAuth/OIDC API documentation.
Use /oauthx/status to monitor database and LNURL session health.
Rotate JWKS keys via the server configuration (JWKS directory + rotation days).

### PAYG billing for OAuth clients

Paid API calls are billed per OAuth client_id (agent/app), not per session pubkey. When balance or free quota is exhausted, paid endpoints return HTTP 402 with a Lightning top-up path.

### Billing endpoints (OAuth token required)

POST /api/billing/agent/create-invoice
POST /api/billing/agent/check-invoice

Example create invoice:

curl -X POST "$BASE_URL/api/billing/agent/create-invoice" \\
  -H "Authorization: Bearer $ACCESS_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"amount_sats": 1000}'

Example check invoice:

curl -X POST "$BASE_URL/api/billing/agent/check-invoice" \\
  -H "Authorization: Bearer $ACCESS_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"invoice_id": "your_invoice_id"}'

### 402 response shape

When a paid endpoint is called with insufficient balance, expect:

{
  "ok": false,
  "error": "payment_required",
  "code": "PAYMENT_REQUIRED",
  "client_id": "your_client_id",
  "cost_sats": 1,
  "balance_sats": 0,
  "create_invoice_endpoint": "/api/billing/agent/create-invoice",
  "hint": "Top up via Lightning PAYG"
}

### Supporting files

scripts/verify_signature.py validates LNURL-Auth signatures locally.
HEARTBEAT.md describes periodic health checks for the deployment.
templates/oauth-client.json provides a ready client registration payload.

### Optional helper script

Use scripts/verify_signature.py to validate LNURL signatures locally. Install the dependency first:

python -m pip install ecdsa
python scripts/verify_signature.py --k1 <hex> --signature <hex> --pubkey <hex>
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: hodlxxi
- Version: 0.1.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/hodlxxi-bitcoin-identity)
- [Send to Agent page](https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent)
- [JSON manifest](https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/hodlxxi-bitcoin-identity/agent.md)
- [Download page](https://openagent3.xyz/downloads/hodlxxi-bitcoin-identity)