返回顶部
l

lnd安装运行闪电终端

Install and run Lightning Terminal (litd) which bundles lnd, loop, pool, tapd, and faraday in a single Docker container. Defaults to neutrino backend with SQLite storage on testnet. Supports watch-only mode with remote signer, standalone mode, and regtest development. Use when setting up a Lightning node for payments, channel management, liquidity management (loop), channel marketplace (pool), taproot assets (tapd), or enabling agent L402 commerce.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,118
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

lnd

Lightning Terminal (litd) — 闪电网络节点

安装并运行一个用于代理驱动的支付的 Lightning Terminal (litd) 节点。
litd 将 lnd 与 loop、pool、tapd 和 faraday 捆绑在一起——使代理能够在一个容器中访问流动性管理、通道市场和 taproot 资产。

默认配置: Docker 容器、neutrino 后端、SQLite 存储、测试网。无需完整的比特币节点。使用 --network mainnet 处理真实币。

默认模式:仅监视模式,带远程签名器。 私钥保存在单独的签名器容器中——代理从不接触密钥材料。如需快速测试,使用 --mode standalone(密钥在磁盘上,安全性较低)。

快速开始(容器——推荐)

带远程签名器的仅监视模式(生产环境)

bash

1. 安装 litd 镜像


skills/lnd/scripts/install.sh

2. 启动 litd + 签名器容器

skills/lnd/scripts/start-lnd.sh --watchonly

3. 设置签名器钱包(仅首次运行)

skills/lightning-security-module/scripts/setup-signer.sh --container litd-signer

4. 导入凭证并创建仅监视钱包

skills/lnd/scripts/import-credentials.sh --bundle ~/.lnget/signer/credentials-bundle skills/lnd/scripts/create-wallet.sh

5. 检查状态

skills/lnd/scripts/lncli.sh getinfo

独立模式(仅测试)

bash

1. 安装 litd 镜像


skills/lnd/scripts/install.sh

2. 启动 litd 容器

skills/lnd/scripts/start-lnd.sh

3. 创建独立钱包(生成种子——密钥在磁盘上)

skills/lnd/scripts/create-wallet.sh --mode standalone

4. 检查状态

skills/lnd/scripts/lncli.sh getinfo

警告: 独立模式将种子助记词和钱包密码短语存储在磁盘上。请勿用于您无法承受损失的主网资金。

Regtest 开发

bash

启动 litd + bitcoind 用于本地开发


skills/lnd/scripts/start-lnd.sh --regtest

创建钱包并挖一些区块

skills/lnd/scripts/create-wallet.sh --container litd --mode standalone docker exec litd-bitcoind bitcoin-cli -regtest -generate 101

容器模式

模式命令容器用途
独立模式start-lnd.shlitd测试、开发
仅监视模式
start-lnd.sh --watchonly | litd + litd-signer | 生产环境 | | Regtest | start-lnd.sh --regtest | litd + litd-bitcoind | 本地开发 |

配置文件

配置文件可自定义 litd 行为,无需编辑 compose 文件:

bash

列出可用配置文件


skills/lnd/scripts/docker-start.sh --list-profiles

使用配置文件启动

skills/lnd/scripts/start-lnd.sh --profile taproot skills/lnd/scripts/start-lnd.sh --profile debug
配置文件用途
default标准操作(信息日志)
debug
跟踪日志,详细子系统 | | taproot | 启用简单 taproot 通道 | | wumbo | 高达 10 BTC 的大通道 | | regtest | Regtest 网络预设 |

网络选择

默认为测试网。使用 --network 覆盖:

bash

测试网(默认——无真实币)


skills/lnd/scripts/start-lnd.sh

主网(真实币——与远程签名器一起使用)

skills/lnd/scripts/start-lnd.sh --network mainnet --watchonly

Signet(测试网络)

skills/lnd/scripts/start-lnd.sh --network signet

litd 子守护进程

litd 集成了多个守护进程。通过 --cli 标志访问它们:

bash

lnd CLI(默认)


skills/lnd/scripts/lncli.sh getinfo

Loop——流动性管理(潜艇交换)

skills/lnd/scripts/lncli.sh --cli loop quote out 100000

Pool——通道市场

skills/lnd/scripts/lncli.sh --cli pool accounts list

Taproot 资产(tapd)

skills/lnd/scripts/lncli.sh --cli tapcli assets list

Lightning Terminal(litd)

skills/lnd/scripts/lncli.sh --cli litcli getinfo

Faraday——通道分析

skills/lnd/scripts/lncli.sh --cli frcli revenue

安装

默认:拉取 litd Docker 镜像。

bash
skills/lnd/scripts/install.sh

这会从 Docker Hub 拉取 lightninglabs/lightning-terminal:v0.16.0-alpha 并验证镜像。litd 镜像包含 lncli、litcli、loop、pool、tapcli 和 frcli。

从源码构建(备用方案)

bash
skills/lnd/scripts/install.sh --source

需要 Go 工具链。使用所有构建标签构建 lnd 和 lncli。

原生模式

如需在没有 Docker 的情况下运行,使用 --native:

bash

原生启动


skills/lnd/scripts/start-lnd.sh --native --mode standalone

原生停止

skills/lnd/scripts/stop-lnd.sh --native

原生模式使用 skills/lnd/templates/lnd.conf.template 的配置模板,并将 lnd 作为后台进程运行。

远程节点

使用连接凭证连接到远程 lnd 节点:

bash
skills/lnd/scripts/lncli.sh \
--rpcserver remote-host:10009 \
--tlscertpath ~/remote-tls.cert \
--macaroonpath ~/remote-admin.macaroon \
getinfo

MCP / Lightning Node Connect

如需在没有直接 gRPC 连接的情况下进行只读访问,请使用 lightning-mcp-server 技能配合 Lightning Node Connect(LNC)。LNC 使用加密的 WebSocket 隧道——无需 TLS 证书、macaroon 或开放端口。只需 Lightning Terminal 的配对短语。

bash
skills/lightning-mcp-server/scripts/install.sh
skills/lightning-mcp-server/scripts/configure.sh
skills/lightning-mcp-server/scripts/setup-claude-config.sh

钱包设置

仅监视钱包(默认)

从远程签名器导入账户 xpub——此机器上没有种子或私钥。

bash

从签名器导入凭证包


skills/lnd/scripts/import-credentials.sh --bundle

创建仅监视钱包(自动检测 litd 容器)

skills/lnd/scripts/create-wallet.sh

独立钱包

本地生成种子。仅用于测试。

bash
skills/lnd/scripts/create-wallet.sh --mode standalone

通过 REST API 处理完整的钱包创建流程:

  1. 1. 生成安全的随机钱包密码短语
  2. 调用 /v1/genseed 生成 24 词种子助记词
  3. 使用密码短语和种子调用 /v1/initwallet
  4. 安全存储凭证:

- ~/.lnget/lnd/wallet-password.txt(模式 0600)
- ~/.lnget/lnd/seed.txt(模式 0600)

解锁钱包

bash
skills/lnd/scripts/unlock-wallet.sh

容器中默认通过 --wallet-unlock-password-file 启用自动解锁。仅当自动解锁被禁用时才需要手动解锁。

从种子恢复钱包(仅独立模式)

bash
skills/lnd/scripts/create-wallet.sh --mode standalone --recover --seed-file ~/.lnget/lnd/seed.txt

启动和停止

启动

bash

Docker 独立模式(默认)


skills/lnd/scripts/start-lnd.sh

Docker 仅监视模式(生产环境)

skills/lnd/scripts/start-lnd.sh --watchonly

Docker 使用配置文件

skills/lnd/scripts/start-lnd.sh --profile taproot

主网

skills/lnd/scripts/start-lnd.sh --network mainnet

停止

bash

停止(保留数据)


skills/lnd/scripts/stop-lnd.sh

停止并清理(移除卷)

skills/lnd/scripts/stop-lnd.sh --clean

停止所有 litd 容器

skills/lnd/scripts/stop-lnd.sh --all

节点操作

所有命令自动检测 litd 容器:

节点信息

bash
skills/lnd/scripts/lncli.sh getinfo
skills/lnd

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 lnd-1776420065 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 lnd-1776420065 技能

通过命令行安装

skillhub install lnd-1776420065

下载

⬇ 下载 lnd v1.0.1(免费)

文件大小: 31.35 KB | 发布时间: 2026-4-17 19:51

v1.0.1 最新 2026-4-17 19:51
- Removed configuration template files: `litd-regtest.toml`, `litd-watchonly.toml`, `litd.toml`, and `lnd.toml` from the templates directory.
- No changes to user-facing functionality or documentation.
- Skill version update for maintenance and cleanup.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部