LNBits Wallet wtih QR Code
About This Skill
Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
Use Cases
Documentation (Original)
Source: README.mdLNbits Wallet Manager Skill for OpenClaw
Enable your OpenClaw assistant to safely and effectively manage an LNbits Lightning Network wallet.
Features
- Check Balance: Get your current wallet balance in Satoshis.
- Create Invoice: Generate Bolt11 invoices to receive funds, with automatic QR code generation.
- Pay Invoice: Safely pay Bolt11 invoices after confirmation and balance checks.
- Decode Invoice: Inspect Bolt11 invoices to verify amount and memo.
- Generate QR Code: Create a QR code image from any Bolt11 invoice string.
- Create Wallet: Easily set up a new LNbits wallet on the demo server.
🛑 Critical Protocols for Safe Usage 🛑
To ensure secure and responsible handling of your LNbits wallet, this skill enforces strict protocols:
- NEVER Expose Secrets: The assistant is programmed to NEVER display Admin Keys, User IDs, or Wallet IDs in chat. Credentials are handled via environment variables.
- Explicit Payment Confirmation: The assistant MUST ask for "Yes/No" confirmation before sending any payment.
- Confirmation Format: "I am about to send [Amount] sats to [Memo/Destination]. Proceed? (y/n)"
- Balance Check Before Pay: The assistant will always check your wallet balance before attempting to pay an invoice to prevent failed transactions.
- Invoice + QR Output: When generating an invoice, the assistant will ALWAYS provide:
- The
payment_requesttext string for easy copying. - An
IMAGE:link to the generated QR code file on a single line, allowing direct display of the QR code.
- The
Installation
This skill requires the qrcode[pil] Python library.
- Install ClawHub CLI:
npm i -g clawhub - Install the Skill:
clawhub install lnbits
Configuration
The skill uses environment variables for LNbits API credentials. It's recommended to add these to your OpenClaw configuration or your agent's .env file.
LNBITS_BASE_URL: The base URL of your LNbits instance (e.g.,https://legend.lnbits.comor your self-hosted URL).LNBITS_API_KEY: Your LNbits wallet's Admin Key.
Example .env entries:
export LNBITS_BASE_URL=https://legend.lnbits.com
export LNBITS_API_KEY=YOUR_ADMIN_KEY_HERE
Usage Examples
Here's how you can use the lnbits skill with your OpenClaw assistant:
0. Setup / Create Wallet
If you don't have an LNbits wallet, you can create one (defaults to the demo server for ease of setup):
(User): Create a new lnbits wallet named "My OpenClaw Wallet"
The create command prints your new adminkey and base_url in the terminal output. Copy those from the command output and save them securely in your environment variables (e.g. .env). The assistant will not repeat or display the adminkey in chat.
1. Check Balance
Ask your assistant for the current balance:
(User): What's my lnbits balance?
2. Create Invoice (Receive Funds)
Generate an invoice for receiving funds:
(User): Create an invoice for 5000 sats for "Coffee"
The assistant will provide the Bolt11 invoice string and a QR code image.
2b. Generate QR Code from Existing Invoice
If you have a Bolt11 string and need a QR code:
(User): Generate a QR code for this invoice: lnbc1u1p...
3. Pay Invoice (Send Funds)
To pay an invoice, the assistant will first decode it and then ask for confirmation:
(User): Pay this invoice: lnbc1u1p...
The assistant will then prompt: "I am about to send [Amount] sats to [Memo/Dest]. Proceed? (y/n)"
Error Handling
The skill is designed to catch and summarize API errors from LNbits, providing clear feedback to the user without exposing raw technical details or stack traces.
Developed for OpenClaw - The AI Orchestration Layer
Security Audit
Summary
Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
ToxicSkills Analysis
Toxic Flags
No Toxic signals detected by current static checks.
Key Risks 0 items
Deterministic Findings (Evidence)
| Rule | Severity | File | Snippet |
|---|---|---|---|
| NET_HTTP_REQUEST | medium | skills/JamesTsetsekas/lnbits-with-qrcode/scripts/lnbits_cli.py Line 9 | import urllib.request |
| NET_HTTP_REQUEST | medium | skills/JamesTsetsekas/lnbits-with-qrcode/scripts/lnbits_cli.py Line 95 | req = urllib.request.Request(url, method=method, headers=headers, data=body) |
| NET_HTTP_REQUEST | medium | skills/JamesTsetsekas/lnbits-with-qrcode/scripts/lnbits_cli.py Line 97 | with urllib.request.urlopen(req, timeout=20) as resp: |
| NET_HTTP_REQUEST | medium | skills/JamesTsetsekas/lnbits-with-qrcode/scripts/lnbits_cli.py Line 140 | req = urllib.request.Request( |
| NET_HTTP_REQUEST | medium | skills/JamesTsetsekas/lnbits-with-qrcode/scripts/lnbits_cli.py Line 146 | with urllib.request.urlopen(req, timeout=20) as resp: |
| QUALITY_README_PRESENT | low | README Line n/a | README detected |
Scoring Criteria
Each skill is scored across 5 dimensions. The weighted total determines the star rating.
Star Rating Scale
Why This Score?
The following dimensions scored below 60, dragging the overall rating down:
- Privacy Risk: 40/100