lnbits
Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- lnbits
- homepage
- https://lnbits.com
- metadata
- { "clawdbot": { "emoji": "⚡", "requires": { "env": [ "LNBITS_API_KEY", "LNBITS_BASE_URL" ], "pip": [ "qrcode[pil]" ], "bins": [ "python3" ] }, "primaryEnv": "LNBITS_API_KEY" } }
- description
- Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
02 资源文件 3
- 参考文档_meta.json482 B
- 参考文档README.md3.8 KB
- 脚本scripts/lnbits_cli.py7.7 KB
03 SKILL.md 正文
LNbits Wallet Manager
Enable the assistant to safely and effectively manage an LNbits Lightning Network wallet.
? CRITICAL PROTOCOLS ?
- NEVER Expose Secrets: Do NOT display Admin Keys, User IDs, or Wallet IDs.
- Explicit Confirmation: You MUST ask for "Yes/No" confirmation before paying.
- Format: "I am about to send [Amount] sats to [Memo/Dest]. Proceed? (y/n)"
- Check Balance First: Always call
balancebeforepayto prevent errors. - ALWAYS Include Invoice + QR: When generating an invoice, you MUST: (a) show the
payment_requesttext for copying, and (b) outputMEDIA:followed by theqr_filepath on ONE line. NEVER skip this.
Usage
0. Setup / Create Wallet
If the user does not have an LNbits wallet, you can create one for them on the demo server.
python3 {baseDir}/scripts/lnbits_cli.py create --name "My Wallet"
Action:
- Run the command. The CLI prints JSON containing
adminkeyandbase_urlto stdout (visible in the terminal). - NEVER Expose Secrets (applies here): Do NOT repeat, quote, or display the
adminkeyor any secret from the output in your chat response. The user sees the command output in their terminal; that is the only place the key should appear. - Instruct the user in plain language only, e.g.:
"A new wallet was created. The command output above contains your adminkey and base_url. Copy those values from the terminal and add them to your configuration or
.envasLNBITS_API_KEYandLNBITS_BASE_URL. Do not paste the adminkey here or in any chat."
1. Check Balance
Get the current wallet balance in Satoshis.
python3 {baseDir}/scripts/lnbits_cli.py balance
2. Create Invoice (Receive)
Generate a Bolt11 invoice to receive funds. QR code is always included by default.
- amount: Amount in Satoshis (Integer).
- memo: Optional description.
- --no-qr: Skip QR code generation (if not needed).
# Invoice with QR code (default)
python3 {baseDir}/scripts/lnbits_cli.py invoice --amount 1000 --memo "Pizza"
# Invoice without QR code
python3 {baseDir}/scripts/lnbits_cli.py invoice --amount 1000 --memo "Pizza" --no-qr
⚠️ MANDATORY RESPONSE FORMAT: When generating an invoice, your response MUST include:
- Invoice text for copying: Show the full
payment_requeststring so user can copy it - QR code image: Output
MEDIA:followed by theqr_filepath on ONE line
EXACT FORMAT (follow precisely):
Here is your 100 sat invoice:
lnbc1u1p5abc123...
MEDIA:./clawd/.lnbits_qr/invoice_xxx.png
CRITICAL: The MEDIA: and file path MUST be on the SAME LINE. This sends the QR code image to the user.
2b. Generate QR Code from Existing Invoice
Convert any Bolt11 string to a QR code image file.
python3 {baseDir}/scripts/lnbits_cli.py qr <bolt11_string>
Returns: {"qr_file": "./.lnbits_qr/invoice_xxx.png", "bolt11": "..."}
3. Pay Invoice (Send)
⚠️ REQUIRES CONFIRMATION: Decode first, verify balance, ask user, then execute.
# Step 1: Decode to verify amount/memo
python3 {baseDir}/scripts/lnbits_cli.py decode <bolt11_string>
# Step 2: Pay (Only after user CONFIRMS)
python3 {baseDir}/scripts/lnbits_cli.py pay <bolt11_string>
Error Handling
If the CLI returns a JSON error (e.g., {"error": "Insufficient funds"}), summarize it clearly for the user. Do not show raw stack traces.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.