LNbits Wallet

👤 talvasconcelos 📦 v1.0.0 ⭐ 4.3 ⬇️ 2.6K 下载
🏠 生活服务 免费 🔑 需 API Key

📖 技能介绍


name: lnbits description: Manage LNbits Lightning Wallet (Balance, Pay, Invoice) homepage: https://lnbits.com metadata: {"clawdbot":{"emoji":"⚡","requires":{"bins":["python3"],"env":["LNBITS_API_KEY", "LNBITS_BASE_URL"]},"primaryEnv":"LNBITS_API_KEY"}}


LNbits Wallet Manager

Enable the assistant to safely and effectively manage an LNbits Lightning Network wallet.

🛑 CRITICAL SECURITY PROTOCOLS 🛑

  1. NEVER Expose Secrets: Do NOT display Admin Keys, User IDs, or Wallet IDs.
  2. 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)"
  3. Check Balance First: Always call balance before pay to 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: 1. Run the command. 2. Capture the adminkey (Admin Key) and base_url (defaults to https://demo.lnbits.com). 3. IMPORTANT: Instruct the user to save these credentials securely: > "I've created a new wallet! Please add these to your Moltbot configuration or .env file: > export LNBITS_BASE_URL=https://demo.lnbits.com > export LNBITS_API_KEY=<adminkey>"

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 <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.

🤖 AI 评测

整体质量良好,核心功能实现完整且代码简洁,文档清晰易读,安全机制设计合理,部署无额外依赖负担。主要不足是缺少测试和示例文档,功能相对基础。对于需要管理 LNbits 闪电网络钱包的用户来说,这是一个可用且实用的 Skill,但建议开发者在使用前仔细阅读安全协议部分。

📊 多维度评分

适应性4.5
规范性4.2
有效性4.3
可靠性4.5
可信度4.3

📁 包含文件 (4 个)

📄 SKILL.md 2.2 KB
📄 _meta.json 125 B
📄 scripts/lnbits_cli.py 3.9 KB
📄 skill-card.md 1.9 KB

🔥 大家都在搜

wps 写作 pdf 苹果