⚡ LNbits Wallet — 技能工具
v1.0.0[自动翻译] Manage LNbits Lightning Wallet (Balance, Pay, Invoice)
详细分析 ▾
运行时依赖
版本
LNbits version 1.0.0 – Initial Release - Enables wallet management for LNbits Lightning wallets: check balance, pay invoices, create/receive invoices. - Enforces critical security protocols: does not display LNbits secrets and requires explicit user confirmation before sending payments. - Automatically checks wallet balance before any payment attempt. - Provides step-by-step usage instructions for wallet setup, balance checks, receiving, and sending payments. - Summarizes errors clearly without showing raw traces for better user experience.
安装命令 点击复制
技能文档
Enable the assistant to safely and effectively manage an LNbits Lightning Network wallet.
🛑 CRITICAL SECURITY 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.
- Check Balance First: Always call
balancebeforepayto prevent errors.
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.
- Capture the
adminkey(Admin Key) andbase_url(defaults to https://demo.lnbits.com). - IMPORTANT: Instruct the user to save these credentials securely:
.env file:
> export LNBITS_BASE_URL=https://demo.lnbits.com
> export LNBITS_API_KEY="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. amount: Amount in Satoshis (Integer). * memo: Optional description.python3 {baseDir}/scripts/lnbits_cli.py invoice --amount 1000 --memo "Pizza"
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 # Step 2: Pay (Only after user CONFIRMS)
python3 {baseDir}/scripts/lnbits_cli.py pay
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.免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制