@lightninglabs/lightning-mcp-server 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +36 -0
- package/.claude-plugin/plugin.json +12 -0
- package/README.md +307 -0
- package/bin/lightning-mcp-server +15 -0
- package/docs/architecture.md +455 -0
- package/docs/commerce.md +357 -0
- package/docs/l402-and-lnget.md +267 -0
- package/docs/mcp-server.md +285 -0
- package/docs/quickref.md +263 -0
- package/docs/security.md +298 -0
- package/docs/two-agent-setup.md +394 -0
- package/package.json +52 -0
- package/postinstall.js +160 -0
- package/skills/aperture/SKILL.md +330 -0
- package/skills/aperture/scripts/install.sh +68 -0
- package/skills/aperture/scripts/setup.sh +155 -0
- package/skills/aperture/scripts/start.sh +81 -0
- package/skills/aperture/scripts/stop.sh +57 -0
- package/skills/aperture/templates/aperture-regtest.yaml +36 -0
- package/skills/aperture/templates/aperture.yaml.template +64 -0
- package/skills/aperture/templates/docker-compose-aperture.yml +59 -0
- package/skills/commerce/SKILL.md +211 -0
- package/skills/lib/config-gen.sh +127 -0
- package/skills/lib/rest.sh +69 -0
- package/skills/lightning-security-module/SKILL.md +253 -0
- package/skills/lightning-security-module/references/architecture.md +133 -0
- package/skills/lightning-security-module/scripts/docker-start.sh +117 -0
- package/skills/lightning-security-module/scripts/docker-stop.sh +53 -0
- package/skills/lightning-security-module/scripts/export-credentials.sh +268 -0
- package/skills/lightning-security-module/scripts/install.sh +178 -0
- package/skills/lightning-security-module/scripts/setup-signer.sh +307 -0
- package/skills/lightning-security-module/scripts/start-signer.sh +152 -0
- package/skills/lightning-security-module/scripts/stop-signer.sh +240 -0
- package/skills/lightning-security-module/templates/docker-compose-signer.yml +35 -0
- package/skills/lightning-security-module/templates/signer-lnd.conf.template +69 -0
- package/skills/lnd/SKILL.md +441 -0
- package/skills/lnd/profiles/debug.env +4 -0
- package/skills/lnd/profiles/default.env +3 -0
- package/skills/lnd/profiles/regtest.env +4 -0
- package/skills/lnd/profiles/taproot.env +3 -0
- package/skills/lnd/profiles/wumbo.env +3 -0
- package/skills/lnd/references/security.md +156 -0
- package/skills/lnd/scripts/create-wallet.sh +464 -0
- package/skills/lnd/scripts/docker-start.sh +256 -0
- package/skills/lnd/scripts/docker-stop.sh +109 -0
- package/skills/lnd/scripts/import-credentials.sh +145 -0
- package/skills/lnd/scripts/install.sh +195 -0
- package/skills/lnd/scripts/lncli.sh +150 -0
- package/skills/lnd/scripts/start-lnd.sh +241 -0
- package/skills/lnd/scripts/stop-lnd.sh +218 -0
- package/skills/lnd/scripts/unlock-wallet.sh +134 -0
- package/skills/lnd/templates/docker-compose-regtest.yml +122 -0
- package/skills/lnd/templates/docker-compose-watchonly.yml +71 -0
- package/skills/lnd/templates/docker-compose.yml +49 -0
- package/skills/lnd/templates/litd-regtest.conf.template +61 -0
- package/skills/lnd/templates/litd-watchonly.conf.template +57 -0
- package/skills/lnd/templates/litd.conf.template +88 -0
- package/skills/lnd/templates/lnd.conf.template +91 -0
- package/skills/lnget/SKILL.md +288 -0
- package/skills/lnget/scripts/install.sh +69 -0
- package/skills/macaroon-bakery/SKILL.md +179 -0
- package/skills/macaroon-bakery/scripts/bake.sh +337 -0
- package/skills/mcp-lnc/SKILL.md +280 -0
- package/skills/mcp-lnc/scripts/configure.sh +130 -0
- package/skills/mcp-lnc/scripts/install.sh +103 -0
- package/skills/mcp-lnc/scripts/setup-claude-config.sh +162 -0
- package/skills/mcp-lnc/templates/env.template +16 -0
- package/versions.env +23 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Unlock lnd / litd wallet using stored passphrase via REST API.
|
|
3
|
+
#
|
|
4
|
+
# Container mode (default — auto-detects litd container):
|
|
5
|
+
# unlock-wallet.sh # Auto-detect litd container
|
|
6
|
+
# unlock-wallet.sh --container litd # Explicit container
|
|
7
|
+
# unlock-wallet.sh --container litd-signer # Signer container
|
|
8
|
+
#
|
|
9
|
+
# Native mode:
|
|
10
|
+
# unlock-wallet.sh --native # Local lnd
|
|
11
|
+
# unlock-wallet.sh --native --rest-port 8080 # Custom REST port
|
|
12
|
+
#
|
|
13
|
+
# Remote mode:
|
|
14
|
+
# unlock-wallet.sh --rest-host remote.host --rest-port 8080
|
|
15
|
+
|
|
16
|
+
set -e
|
|
17
|
+
|
|
18
|
+
LNGET_LND_DIR="${LNGET_LND_DIR:-$HOME/.lnget/lnd}"
|
|
19
|
+
PASSWORD_FILE="$LNGET_LND_DIR/wallet-password.txt"
|
|
20
|
+
REST_PORT=8080
|
|
21
|
+
REST_HOST="localhost"
|
|
22
|
+
CONTAINER=""
|
|
23
|
+
NATIVE=false
|
|
24
|
+
|
|
25
|
+
# Parse arguments.
|
|
26
|
+
while [[ $# -gt 0 ]]; do
|
|
27
|
+
case $1 in
|
|
28
|
+
--password-file)
|
|
29
|
+
PASSWORD_FILE="$2"
|
|
30
|
+
shift 2
|
|
31
|
+
;;
|
|
32
|
+
--rest-port)
|
|
33
|
+
REST_PORT="$2"
|
|
34
|
+
shift 2
|
|
35
|
+
;;
|
|
36
|
+
--rest-host)
|
|
37
|
+
REST_HOST="$2"
|
|
38
|
+
shift 2
|
|
39
|
+
;;
|
|
40
|
+
--container)
|
|
41
|
+
CONTAINER="$2"
|
|
42
|
+
shift 2
|
|
43
|
+
;;
|
|
44
|
+
--native)
|
|
45
|
+
NATIVE=true
|
|
46
|
+
shift
|
|
47
|
+
;;
|
|
48
|
+
-h|--help)
|
|
49
|
+
echo "Usage: unlock-wallet.sh [options]"
|
|
50
|
+
echo ""
|
|
51
|
+
echo "Unlock lnd / litd wallet using stored passphrase."
|
|
52
|
+
echo ""
|
|
53
|
+
echo "Connection options:"
|
|
54
|
+
echo " --container NAME Unlock wallet in a Docker container"
|
|
55
|
+
echo " --native Unlock wallet on local lnd process"
|
|
56
|
+
echo " --rest-host HOST REST API host (default: localhost)"
|
|
57
|
+
echo " --rest-port PORT REST API port (default: 8080)"
|
|
58
|
+
echo ""
|
|
59
|
+
echo "Wallet options:"
|
|
60
|
+
echo " --password-file FILE Path to password file"
|
|
61
|
+
echo " (default: ~/.lnget/lnd/wallet-password.txt)"
|
|
62
|
+
echo ""
|
|
63
|
+
echo "Container auto-detection order: litd > litd-shared > lnd > lnd-shared"
|
|
64
|
+
exit 0
|
|
65
|
+
;;
|
|
66
|
+
*)
|
|
67
|
+
echo "Unknown option: $1" >&2
|
|
68
|
+
exit 1
|
|
69
|
+
;;
|
|
70
|
+
esac
|
|
71
|
+
done
|
|
72
|
+
|
|
73
|
+
# Auto-detect container if not native and no container specified.
|
|
74
|
+
if [ "$NATIVE" = false ] && [ -z "$CONTAINER" ] && [ "$REST_HOST" = "localhost" ]; then
|
|
75
|
+
if command -v docker &>/dev/null; then
|
|
76
|
+
for candidate in litd litd-shared lnd lnd-shared; do
|
|
77
|
+
if docker ps --format '{{.Names}}' 2>/dev/null | grep -qx "$candidate"; then
|
|
78
|
+
CONTAINER="$candidate"
|
|
79
|
+
break
|
|
80
|
+
fi
|
|
81
|
+
done
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
# If no container found, fall back to native.
|
|
85
|
+
if [ -z "$CONTAINER" ]; then
|
|
86
|
+
NATIVE=true
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
# Container mode: verify container is running.
|
|
91
|
+
if [ -n "$CONTAINER" ]; then
|
|
92
|
+
if ! docker ps --format '{{.Names}}' 2>/dev/null | grep -qx "$CONTAINER"; then
|
|
93
|
+
echo "Error: Container '$CONTAINER' is not running." >&2
|
|
94
|
+
echo "Start it with: skills/lnd/scripts/docker-start.sh" >&2
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Verify password file exists on the host.
|
|
100
|
+
if [ ! -f "$PASSWORD_FILE" ]; then
|
|
101
|
+
echo "Error: Password file not found: $PASSWORD_FILE" >&2
|
|
102
|
+
echo "Run create-wallet.sh first to create the wallet." >&2
|
|
103
|
+
exit 1
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
PASSWORD=$(cat "$PASSWORD_FILE")
|
|
107
|
+
|
|
108
|
+
if [ -n "$CONTAINER" ]; then
|
|
109
|
+
echo "Unlocking wallet in container '$CONTAINER' via REST API..."
|
|
110
|
+
else
|
|
111
|
+
echo "Unlocking wallet via REST API (port $REST_PORT)..."
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
# Source shared REST helpers.
|
|
115
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../lib/rest.sh"
|
|
116
|
+
|
|
117
|
+
# Build the unlock payload.
|
|
118
|
+
PAYLOAD=$(jq -n --arg pass "$(echo -n "$PASSWORD" | base64)" \
|
|
119
|
+
'{wallet_password: $pass}')
|
|
120
|
+
|
|
121
|
+
RESPONSE=$(rest_call POST "/v1/unlockwallet" "$PAYLOAD")
|
|
122
|
+
|
|
123
|
+
# Check for errors.
|
|
124
|
+
ERROR=$(echo "$RESPONSE" | jq -r '.message // empty' 2>/dev/null)
|
|
125
|
+
if [ -n "$ERROR" ]; then
|
|
126
|
+
if echo "$ERROR" | grep -q "already unlocked"; then
|
|
127
|
+
echo "Wallet is already unlocked."
|
|
128
|
+
exit 0
|
|
129
|
+
fi
|
|
130
|
+
echo "Error unlocking wallet: $ERROR" >&2
|
|
131
|
+
exit 1
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
echo "Wallet unlocked successfully."
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# litd + Bitcoin Core Regtest Stack — local development and testing.
|
|
2
|
+
#
|
|
3
|
+
# Two containers:
|
|
4
|
+
# litd — Lightning Terminal with bitcoind backend
|
|
5
|
+
# bitcoind — Bitcoin Core in regtest mode with ZMQ notifications
|
|
6
|
+
#
|
|
7
|
+
# All litd runtime configuration lives in the mounted config file
|
|
8
|
+
# (litd-regtest.conf.template by default). Use docker-start.sh --regtest
|
|
9
|
+
# to generate a config with custom profile or debug level.
|
|
10
|
+
#
|
|
11
|
+
# Usage:
|
|
12
|
+
# skills/lnd/scripts/docker-start.sh --regtest # Recommended
|
|
13
|
+
# docker compose -f docker-compose-regtest.yml up -d
|
|
14
|
+
# docker compose -f docker-compose-regtest.yml down
|
|
15
|
+
# docker compose -f docker-compose-regtest.yml down -v # Remove volumes
|
|
16
|
+
#
|
|
17
|
+
# After starting, create a wallet:
|
|
18
|
+
# skills/lnd/scripts/create-wallet.sh --container litd
|
|
19
|
+
#
|
|
20
|
+
# Mine blocks:
|
|
21
|
+
# docker exec litd-bitcoind bitcoin-cli -regtest \
|
|
22
|
+
# -rpcuser=devuser -rpcpassword=devpass \
|
|
23
|
+
# generatetoaddress 101 $(docker exec litd lncli --network=regtest newaddress p2tr | jq -r '.address')
|
|
24
|
+
#
|
|
25
|
+
# Ports:
|
|
26
|
+
# 8443 — litd HTTPS
|
|
27
|
+
# 10009 — lnd gRPC
|
|
28
|
+
# 9735 — Lightning P2P
|
|
29
|
+
# 8080 — lnd REST API
|
|
30
|
+
# 18443 — Bitcoin Core RPC
|
|
31
|
+
# 28332 — ZMQ block notifications
|
|
32
|
+
# 28333 — ZMQ tx notifications
|
|
33
|
+
|
|
34
|
+
services:
|
|
35
|
+
bitcoind:
|
|
36
|
+
image: ${BITCOIN_CORE_IMAGE:-lightninglabs/bitcoin-core}:${BITCOIN_CORE_VERSION:-30}
|
|
37
|
+
container_name: litd-bitcoind
|
|
38
|
+
restart: unless-stopped
|
|
39
|
+
command:
|
|
40
|
+
- -regtest
|
|
41
|
+
- -server=1
|
|
42
|
+
- -rpcuser=devuser
|
|
43
|
+
- -rpcpassword=devpass
|
|
44
|
+
- -rpcallowip=0.0.0.0/0
|
|
45
|
+
- -rpcbind=0.0.0.0
|
|
46
|
+
- -txindex=1
|
|
47
|
+
- -fallbackfee=0.00001
|
|
48
|
+
- -addresstype=bech32m
|
|
49
|
+
- -changetype=bech32m
|
|
50
|
+
- -zmqpubrawblock=tcp://0.0.0.0:28332
|
|
51
|
+
- -zmqpubrawtx=tcp://0.0.0.0:28333
|
|
52
|
+
- -zmqpubhashblock=tcp://0.0.0.0:28332
|
|
53
|
+
- -zmqpubhashtx=tcp://0.0.0.0:28333
|
|
54
|
+
ports:
|
|
55
|
+
- "18443:18443"
|
|
56
|
+
- "28332:28332"
|
|
57
|
+
- "28333:28333"
|
|
58
|
+
volumes:
|
|
59
|
+
- litd-bitcoind-data:/root/.bitcoin
|
|
60
|
+
networks:
|
|
61
|
+
- litd-regtest
|
|
62
|
+
healthcheck:
|
|
63
|
+
test: ["CMD", "bitcoin-cli", "-regtest", "-rpcuser=devuser",
|
|
64
|
+
"-rpcpassword=devpass", "getblockchaininfo"]
|
|
65
|
+
interval: 10s
|
|
66
|
+
timeout: 5s
|
|
67
|
+
retries: 5
|
|
68
|
+
|
|
69
|
+
litd:
|
|
70
|
+
image: ${LITD_IMAGE:-lightninglabs/lightning-terminal}:${LITD_VERSION:-v0.16.0-alpha}
|
|
71
|
+
container_name: litd
|
|
72
|
+
restart: unless-stopped
|
|
73
|
+
depends_on:
|
|
74
|
+
bitcoind:
|
|
75
|
+
condition: service_healthy
|
|
76
|
+
entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lit.conf /root/.lit/lit.conf && exec litd"]
|
|
77
|
+
ports:
|
|
78
|
+
- "${LITD_HTTPS_PORT:-8443}:8443"
|
|
79
|
+
- "${LND_GRPC_PORT:-10009}:10009"
|
|
80
|
+
- "${LND_P2P_PORT:-9735}:9735"
|
|
81
|
+
- "${LND_REST_PORT:-8080}:8080"
|
|
82
|
+
volumes:
|
|
83
|
+
- litd-data:/root/.lnd
|
|
84
|
+
- litd-lit-data:/root/.lit
|
|
85
|
+
- ${LITD_CONF_PATH:-./litd-regtest.conf.template}:/tmp/lit.conf:ro
|
|
86
|
+
networks:
|
|
87
|
+
- litd-regtest
|
|
88
|
+
|
|
89
|
+
# Second litd node (bob) for two-node regtest setups such as L402
|
|
90
|
+
# payment testing where a channel is needed between payer and payee.
|
|
91
|
+
litd-bob:
|
|
92
|
+
image: ${LITD_IMAGE:-lightninglabs/lightning-terminal}:${LITD_VERSION:-v0.16.0-alpha}
|
|
93
|
+
container_name: litd-bob
|
|
94
|
+
restart: unless-stopped
|
|
95
|
+
profiles:
|
|
96
|
+
- two-node
|
|
97
|
+
depends_on:
|
|
98
|
+
bitcoind:
|
|
99
|
+
condition: service_healthy
|
|
100
|
+
entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lit.conf /root/.lit/lit.conf && exec litd"]
|
|
101
|
+
ports:
|
|
102
|
+
- "${BOB_LITD_HTTPS_PORT:-8444}:8443"
|
|
103
|
+
- "${BOB_LND_GRPC_PORT:-10010}:10009"
|
|
104
|
+
- "${BOB_LND_P2P_PORT:-9736}:9735"
|
|
105
|
+
- "${BOB_LND_REST_PORT:-8081}:8080"
|
|
106
|
+
volumes:
|
|
107
|
+
- litd-bob-data:/root/.lnd
|
|
108
|
+
- litd-bob-lit-data:/root/.lit
|
|
109
|
+
- ${BOB_LITD_CONF_PATH:-./litd-regtest.conf.template}:/tmp/lit.conf:ro
|
|
110
|
+
networks:
|
|
111
|
+
- litd-regtest
|
|
112
|
+
|
|
113
|
+
volumes:
|
|
114
|
+
litd-bitcoind-data:
|
|
115
|
+
litd-data:
|
|
116
|
+
litd-lit-data:
|
|
117
|
+
litd-bob-data:
|
|
118
|
+
litd-bob-lit-data:
|
|
119
|
+
|
|
120
|
+
networks:
|
|
121
|
+
litd-regtest:
|
|
122
|
+
driver: bridge
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Watch-Only litd + Remote Signer — production security architecture.
|
|
2
|
+
#
|
|
3
|
+
# Two containers on a shared Docker network:
|
|
4
|
+
# litd — watch-only Lightning Terminal (no private keys)
|
|
5
|
+
# signer — lnd in signing-only mode (holds seed, signs transactions)
|
|
6
|
+
#
|
|
7
|
+
# The litd node handles networking, channels, and payments. All signing
|
|
8
|
+
# requests are forwarded to the signer container via gRPC.
|
|
9
|
+
#
|
|
10
|
+
# All runtime configuration lives in mounted config files. Use
|
|
11
|
+
# docker-start.sh --watchonly to generate configs from templates.
|
|
12
|
+
#
|
|
13
|
+
# Setup flow:
|
|
14
|
+
# 1. skills/lnd/scripts/docker-start.sh --watchonly
|
|
15
|
+
# 2. Create signer wallet:
|
|
16
|
+
# skills/lightning-security-module/scripts/setup-signer.sh --container litd-signer
|
|
17
|
+
# 3. Export and import credentials:
|
|
18
|
+
# skills/lightning-security-module/scripts/export-credentials.sh --container litd-signer
|
|
19
|
+
# 4. Create watch-only wallet on litd:
|
|
20
|
+
# skills/lnd/scripts/create-wallet.sh --container litd --mode watchonly
|
|
21
|
+
#
|
|
22
|
+
# Ports:
|
|
23
|
+
# 8443 — litd HTTPS (UI + gRPC + REST)
|
|
24
|
+
# 10009 — lnd gRPC
|
|
25
|
+
# 9735 — Lightning P2P
|
|
26
|
+
# 8080 — lnd REST API
|
|
27
|
+
# 10012 — Signer gRPC (internal, for litd->signer communication)
|
|
28
|
+
# 10013 — Signer REST API (for wallet creation)
|
|
29
|
+
|
|
30
|
+
services:
|
|
31
|
+
signer:
|
|
32
|
+
image: ${LND_IMAGE:-lightninglabs/lnd}:${LND_VERSION:-v0.20.0-beta}
|
|
33
|
+
container_name: litd-signer
|
|
34
|
+
restart: unless-stopped
|
|
35
|
+
entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lnd.conf /root/.lnd/lnd.conf && exec lnd"]
|
|
36
|
+
ports:
|
|
37
|
+
- "${SIGNER_RPC_PORT:-10012}:10012"
|
|
38
|
+
- "${SIGNER_REST_PORT:-10013}:10013"
|
|
39
|
+
volumes:
|
|
40
|
+
- signer-data:/root/.lnd
|
|
41
|
+
- ${SIGNER_CONF_PATH:-../../lightning-security-module/templates/signer-lnd.conf.template}:/tmp/lnd.conf:ro
|
|
42
|
+
networks:
|
|
43
|
+
- litd-watchonly
|
|
44
|
+
|
|
45
|
+
litd:
|
|
46
|
+
image: ${LITD_IMAGE:-lightninglabs/lightning-terminal}:${LITD_VERSION:-v0.16.0-alpha}
|
|
47
|
+
container_name: litd
|
|
48
|
+
restart: unless-stopped
|
|
49
|
+
depends_on:
|
|
50
|
+
- signer
|
|
51
|
+
entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lit.conf /root/.lit/lit.conf && exec litd"]
|
|
52
|
+
ports:
|
|
53
|
+
- "${LITD_HTTPS_PORT:-8443}:8443"
|
|
54
|
+
- "${LND_GRPC_PORT:-10009}:10009"
|
|
55
|
+
- "${LND_P2P_PORT:-9735}:9735"
|
|
56
|
+
- "${LND_REST_PORT:-8080}:8080"
|
|
57
|
+
volumes:
|
|
58
|
+
- litd-data:/root/.lnd
|
|
59
|
+
- litd-lit-data:/root/.lit
|
|
60
|
+
- ${LITD_CONF_PATH:-./litd-watchonly.conf.template}:/tmp/lit.conf:ro
|
|
61
|
+
networks:
|
|
62
|
+
- litd-watchonly
|
|
63
|
+
|
|
64
|
+
volumes:
|
|
65
|
+
signer-data:
|
|
66
|
+
litd-data:
|
|
67
|
+
litd-lit-data:
|
|
68
|
+
|
|
69
|
+
networks:
|
|
70
|
+
litd-watchonly:
|
|
71
|
+
driver: bridge
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Standalone litd (Lightning Terminal) — neutrino light client.
|
|
2
|
+
#
|
|
3
|
+
# Single container running litd with all sub-daemons integrated:
|
|
4
|
+
# lnd, loop, pool, tapd, faraday. No full Bitcoin node required.
|
|
5
|
+
#
|
|
6
|
+
# All runtime configuration lives in the mounted config file
|
|
7
|
+
# (litd.conf.template by default). Use docker-start.sh to generate
|
|
8
|
+
# a config with custom network, profile, or debug level.
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# skills/lnd/scripts/docker-start.sh # Recommended
|
|
12
|
+
# docker compose up -d # Uses template defaults
|
|
13
|
+
# docker compose down # Stop (preserve data)
|
|
14
|
+
# docker compose down -v # Stop and remove volumes
|
|
15
|
+
#
|
|
16
|
+
# After starting, create a wallet:
|
|
17
|
+
# skills/lnd/scripts/create-wallet.sh --container litd
|
|
18
|
+
#
|
|
19
|
+
# Ports:
|
|
20
|
+
# 8443 — litd HTTPS (UI + gRPC + REST unified endpoint)
|
|
21
|
+
# 10009 — lnd gRPC (lncli access)
|
|
22
|
+
# 9735 — Lightning P2P
|
|
23
|
+
# 8080 — lnd REST API (wallet creation/unlock)
|
|
24
|
+
|
|
25
|
+
services:
|
|
26
|
+
litd:
|
|
27
|
+
image: ${LITD_IMAGE:-lightninglabs/lightning-terminal}:${LITD_VERSION:-v0.16.0-alpha}
|
|
28
|
+
container_name: litd
|
|
29
|
+
restart: unless-stopped
|
|
30
|
+
entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lit.conf /root/.lit/lit.conf && exec litd"]
|
|
31
|
+
ports:
|
|
32
|
+
- "${LITD_HTTPS_PORT:-8443}:8443"
|
|
33
|
+
- "${LND_GRPC_PORT:-10009}:10009"
|
|
34
|
+
- "${LND_P2P_PORT:-9735}:9735"
|
|
35
|
+
- "${LND_REST_PORT:-8080}:8080"
|
|
36
|
+
volumes:
|
|
37
|
+
- litd-data:/root/.lnd
|
|
38
|
+
- litd-lit-data:/root/.lit
|
|
39
|
+
- ${LITD_CONF_PATH:-./litd.conf.template}:/tmp/lit.conf:ro
|
|
40
|
+
networks:
|
|
41
|
+
- litd-net
|
|
42
|
+
|
|
43
|
+
volumes:
|
|
44
|
+
litd-data:
|
|
45
|
+
litd-lit-data:
|
|
46
|
+
|
|
47
|
+
networks:
|
|
48
|
+
litd-net:
|
|
49
|
+
driver: bridge
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Lightning Terminal (litd) Configuration — Regtest with bitcoind
|
|
2
|
+
#
|
|
3
|
+
# Flat config file for litd on regtest. Uses bitcoind backend instead of
|
|
4
|
+
# neutrino. Uses litd's global network= flag (see litd.conf.template header).
|
|
5
|
+
|
|
6
|
+
# --- litd settings ---
|
|
7
|
+
|
|
8
|
+
lnd-mode=integrated
|
|
9
|
+
network=regtest
|
|
10
|
+
httpslisten=0.0.0.0:8443
|
|
11
|
+
enablerest=true
|
|
12
|
+
uipassword=agent-litd-password
|
|
13
|
+
|
|
14
|
+
# Disable litd's autopilot server (session management) — no public
|
|
15
|
+
# autopilot server exists for regtest.
|
|
16
|
+
autopilot.disable=true
|
|
17
|
+
|
|
18
|
+
# --- lnd settings ---
|
|
19
|
+
|
|
20
|
+
lnd.alias=litd-agent
|
|
21
|
+
lnd.debuglevel=debug
|
|
22
|
+
|
|
23
|
+
lnd.listen=0.0.0.0:9735
|
|
24
|
+
lnd.rpclisten=0.0.0.0:10009
|
|
25
|
+
lnd.restlisten=0.0.0.0:8080
|
|
26
|
+
lnd.tlsextraip=0.0.0.0
|
|
27
|
+
|
|
28
|
+
# TLS: include Docker service and container names so other containers
|
|
29
|
+
# (e.g. aperture, watch-only node) can verify the cert when connecting
|
|
30
|
+
# by hostname.
|
|
31
|
+
lnd.tlsextradomain=litd
|
|
32
|
+
|
|
33
|
+
lnd.wallet-unlock-password-file=/root/.lnd/wallet-password.txt
|
|
34
|
+
lnd.wallet-unlock-allow-create=true
|
|
35
|
+
|
|
36
|
+
lnd.maxpendingchannels=1
|
|
37
|
+
lnd.minchansize=20000
|
|
38
|
+
|
|
39
|
+
lnd.bitcoin.active=true
|
|
40
|
+
lnd.bitcoin.node=bitcoind
|
|
41
|
+
|
|
42
|
+
lnd.bitcoin.defaultchanconfs=1
|
|
43
|
+
lnd.bitcoin.basefee=1000
|
|
44
|
+
lnd.bitcoin.feerate=1
|
|
45
|
+
lnd.bitcoin.timelockdelta=80
|
|
46
|
+
|
|
47
|
+
# bitcoind connection (Docker service name).
|
|
48
|
+
lnd.bitcoind.rpchost=bitcoind:18443
|
|
49
|
+
lnd.bitcoind.rpcuser=devuser
|
|
50
|
+
lnd.bitcoind.rpcpass=devpass
|
|
51
|
+
lnd.bitcoind.zmqpubrawblock=tcp://bitcoind:28332
|
|
52
|
+
lnd.bitcoind.zmqpubrawtx=tcp://bitcoind:28333
|
|
53
|
+
|
|
54
|
+
lnd.db.backend=sqlite
|
|
55
|
+
|
|
56
|
+
lnd.autopilot.active=false
|
|
57
|
+
lnd.tor.active=false
|
|
58
|
+
|
|
59
|
+
# Allow self-payments so a single-node regtest setup can pay L402 invoices
|
|
60
|
+
# generated by aperture connected to the same lnd instance.
|
|
61
|
+
lnd.allow-circular-route=true
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Lightning Terminal (litd) Configuration — Watch-Only with Remote Signer
|
|
2
|
+
#
|
|
3
|
+
# Flat config file for litd in watch-only mode. The remotesigner section is
|
|
4
|
+
# active and points to the signer container on the same Docker network.
|
|
5
|
+
# Uses litd's global network= flag (see litd.conf.template header).
|
|
6
|
+
|
|
7
|
+
# --- litd settings ---
|
|
8
|
+
|
|
9
|
+
lnd-mode=integrated
|
|
10
|
+
network=testnet
|
|
11
|
+
httpslisten=0.0.0.0:8443
|
|
12
|
+
enablerest=true
|
|
13
|
+
uipassword=agent-litd-password
|
|
14
|
+
|
|
15
|
+
# --- lnd settings ---
|
|
16
|
+
|
|
17
|
+
lnd.alias=litd-agent
|
|
18
|
+
lnd.debuglevel=info
|
|
19
|
+
|
|
20
|
+
lnd.listen=0.0.0.0:9735
|
|
21
|
+
lnd.rpclisten=0.0.0.0:10009
|
|
22
|
+
lnd.restlisten=0.0.0.0:8080
|
|
23
|
+
lnd.tlsextraip=0.0.0.0
|
|
24
|
+
|
|
25
|
+
lnd.wallet-unlock-password-file=/root/.lnd/wallet-password.txt
|
|
26
|
+
lnd.wallet-unlock-allow-create=true
|
|
27
|
+
|
|
28
|
+
lnd.maxpendingchannels=1
|
|
29
|
+
lnd.minchansize=20000
|
|
30
|
+
|
|
31
|
+
lnd.bitcoin.active=true
|
|
32
|
+
lnd.bitcoin.node=neutrino
|
|
33
|
+
|
|
34
|
+
lnd.bitcoin.defaultchanconfs=3
|
|
35
|
+
lnd.bitcoin.basefee=1000
|
|
36
|
+
lnd.bitcoin.feerate=1
|
|
37
|
+
lnd.bitcoin.timelockdelta=80
|
|
38
|
+
|
|
39
|
+
# Neutrino peers.
|
|
40
|
+
lnd.neutrino.addpeer=btcd0.lightning.computer
|
|
41
|
+
lnd.neutrino.addpeer=mainnet1-btcd.zaphq.io
|
|
42
|
+
lnd.neutrino.addpeer=mainnet2-btcd.zaphq.io
|
|
43
|
+
|
|
44
|
+
# Testnet: https://nodes.lightning.computer/fees/v1/btctestnet-fee-estimates.json
|
|
45
|
+
lnd.fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
|
|
46
|
+
lnd.neutrino.persistfilters=true
|
|
47
|
+
|
|
48
|
+
lnd.db.backend=sqlite
|
|
49
|
+
|
|
50
|
+
lnd.autopilot.active=false
|
|
51
|
+
lnd.tor.active=false
|
|
52
|
+
|
|
53
|
+
# Remote signer — this node holds no private keys.
|
|
54
|
+
lnd.remotesigner.enable=true
|
|
55
|
+
lnd.remotesigner.rpchost=signer:10012
|
|
56
|
+
lnd.remotesigner.tlscertpath=/root/.lnd/signer-credentials/tls.cert
|
|
57
|
+
lnd.remotesigner.macaroonpath=/root/.lnd/signer-credentials/admin.macaroon
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Lightning Terminal (litd) Configuration — Standalone Neutrino
|
|
2
|
+
#
|
|
3
|
+
# Flat config file for litd. No section headers (go-flags double-prefixes
|
|
4
|
+
# keys under [lnd] as lnd.lnd.*). Uses litd's global network= flag instead
|
|
5
|
+
# of lnd.bitcoin.testnet=true (avoids lnd default config conflict with
|
|
6
|
+
# lnd-mode=integrated).
|
|
7
|
+
#
|
|
8
|
+
# litd reads this from ~/.lit/lit.conf automatically. Mount into container
|
|
9
|
+
# at /tmp/lit.conf and copy via entrypoint (named volumes hide bind mounts).
|
|
10
|
+
|
|
11
|
+
# --- litd settings ---
|
|
12
|
+
|
|
13
|
+
# Run lnd as an integrated sub-daemon (not remote).
|
|
14
|
+
lnd-mode=integrated
|
|
15
|
+
|
|
16
|
+
# Network: mainnet, testnet, signet, regtest.
|
|
17
|
+
# litd's global flag handles setting the correct lnd.bitcoin.* flag.
|
|
18
|
+
network=testnet
|
|
19
|
+
|
|
20
|
+
# litd web UI port (HTTPS).
|
|
21
|
+
httpslisten=0.0.0.0:8443
|
|
22
|
+
|
|
23
|
+
# Enable the REST proxy (required for wallet creation via REST API).
|
|
24
|
+
enablerest=true
|
|
25
|
+
|
|
26
|
+
# UI password for litd web interface and REST API.
|
|
27
|
+
# Override via UI_PASSWORD env var in docker-start.sh.
|
|
28
|
+
uipassword=agent-litd-password
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# --- lnd settings (prefixed with lnd.) ---
|
|
32
|
+
|
|
33
|
+
# Node alias visible on the network graph.
|
|
34
|
+
lnd.alias=litd-agent
|
|
35
|
+
|
|
36
|
+
# Log level: trace, debug, info, warn, error, critical.
|
|
37
|
+
lnd.debuglevel=info
|
|
38
|
+
|
|
39
|
+
# Listening addresses.
|
|
40
|
+
lnd.listen=0.0.0.0:9735
|
|
41
|
+
lnd.rpclisten=0.0.0.0:10009
|
|
42
|
+
lnd.restlisten=0.0.0.0:8080
|
|
43
|
+
|
|
44
|
+
# TLS: allow connections from any IP (for Docker networking).
|
|
45
|
+
lnd.tlsextraip=0.0.0.0
|
|
46
|
+
|
|
47
|
+
# Auto-unlock wallet on restart.
|
|
48
|
+
lnd.wallet-unlock-password-file=/root/.lnd/wallet-password.txt
|
|
49
|
+
lnd.wallet-unlock-allow-create=true
|
|
50
|
+
|
|
51
|
+
# Channel settings.
|
|
52
|
+
lnd.maxpendingchannels=1
|
|
53
|
+
lnd.minchansize=20000
|
|
54
|
+
|
|
55
|
+
# Activate Bitcoin.
|
|
56
|
+
lnd.bitcoin.active=true
|
|
57
|
+
|
|
58
|
+
# Use neutrino light client (no full node required).
|
|
59
|
+
lnd.bitcoin.node=neutrino
|
|
60
|
+
|
|
61
|
+
# Channel confirmation depth.
|
|
62
|
+
lnd.bitcoin.defaultchanconfs=3
|
|
63
|
+
|
|
64
|
+
# Routing fees.
|
|
65
|
+
lnd.bitcoin.basefee=1000
|
|
66
|
+
lnd.bitcoin.feerate=1
|
|
67
|
+
lnd.bitcoin.timelockdelta=80
|
|
68
|
+
|
|
69
|
+
# Peers for neutrino block header sync.
|
|
70
|
+
lnd.neutrino.addpeer=btcd0.lightning.computer
|
|
71
|
+
lnd.neutrino.addpeer=mainnet1-btcd.zaphq.io
|
|
72
|
+
lnd.neutrino.addpeer=mainnet2-btcd.zaphq.io
|
|
73
|
+
|
|
74
|
+
# Fee estimation URL (required for neutrino on mainnet).
|
|
75
|
+
# Testnet: https://nodes.lightning.computer/fees/v1/btctestnet-fee-estimates.json
|
|
76
|
+
lnd.fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
|
|
77
|
+
|
|
78
|
+
# Persist compact filters to disk.
|
|
79
|
+
lnd.neutrino.persistfilters=true
|
|
80
|
+
|
|
81
|
+
# Use SQLite for all databases.
|
|
82
|
+
lnd.db.backend=sqlite
|
|
83
|
+
|
|
84
|
+
# Autopilot disabled by default.
|
|
85
|
+
lnd.autopilot.active=false
|
|
86
|
+
|
|
87
|
+
# Tor disabled by default.
|
|
88
|
+
lnd.tor.active=false
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# LND Configuration for lnget Agent
|
|
2
|
+
#
|
|
3
|
+
# Defaults: neutrino backend, SQLite storage, mainnet.
|
|
4
|
+
# Generated by skills/lnd/scripts/start-lnd.sh
|
|
5
|
+
|
|
6
|
+
[Application Options]
|
|
7
|
+
# Node alias visible on the network graph.
|
|
8
|
+
alias=lnget-agent
|
|
9
|
+
|
|
10
|
+
# Log level: trace, debug, info, warn, error, critical.
|
|
11
|
+
debuglevel=info
|
|
12
|
+
|
|
13
|
+
# Listening addresses.
|
|
14
|
+
listen=0.0.0.0:9735
|
|
15
|
+
rpclisten=localhost:10009
|
|
16
|
+
restlisten=localhost:8080
|
|
17
|
+
|
|
18
|
+
# Auto-unlock wallet on startup using stored passphrase.
|
|
19
|
+
wallet-unlock-password-file=~/.lnget/lnd/wallet-password.txt
|
|
20
|
+
wallet-unlock-allow-create=true
|
|
21
|
+
|
|
22
|
+
# Maximum pending channels per peer.
|
|
23
|
+
maxpendingchannels=1
|
|
24
|
+
|
|
25
|
+
# Minimum channel size (satoshis).
|
|
26
|
+
minchansize=20000
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
[Bitcoin]
|
|
30
|
+
# Activate Bitcoin.
|
|
31
|
+
bitcoin.active=true
|
|
32
|
+
|
|
33
|
+
# Network: mainnet, testnet, signet, regtest.
|
|
34
|
+
bitcoin.mainnet=true
|
|
35
|
+
|
|
36
|
+
# Use neutrino light client (no full node required).
|
|
37
|
+
bitcoin.node=neutrino
|
|
38
|
+
|
|
39
|
+
# Default channel confirmation depth.
|
|
40
|
+
bitcoin.defaultchanconfs=3
|
|
41
|
+
|
|
42
|
+
# Base fee in millisatoshis for routing.
|
|
43
|
+
bitcoin.basefee=1000
|
|
44
|
+
|
|
45
|
+
# Fee rate in millionths per forwarded satoshi.
|
|
46
|
+
bitcoin.feerate=1
|
|
47
|
+
|
|
48
|
+
# CLTV delta for forwarded HTLCs.
|
|
49
|
+
bitcoin.timelockdelta=80
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
[neutrino]
|
|
53
|
+
# Peers for neutrino block header sync.
|
|
54
|
+
neutrino.addpeer=btcd0.lightning.computer
|
|
55
|
+
neutrino.addpeer=mainnet1-btcd.zaphq.io
|
|
56
|
+
neutrino.addpeer=mainnet2-btcd.zaphq.io
|
|
57
|
+
|
|
58
|
+
# Fee estimation URL (required for neutrino on mainnet).
|
|
59
|
+
# Testnet: https://nodes.lightning.computer/fees/v1/btctestnet-fee-estimates.json
|
|
60
|
+
fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
|
|
61
|
+
|
|
62
|
+
# Maximum peers for neutrino.
|
|
63
|
+
neutrino.maxpeers=8
|
|
64
|
+
|
|
65
|
+
# Persist compact filters to disk for faster restarts.
|
|
66
|
+
neutrino.persistfilters=true
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
[db]
|
|
70
|
+
# Use SQLite for all databases.
|
|
71
|
+
db.backend=sqlite
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
[autopilot]
|
|
75
|
+
# Disabled by default. Enable for automatic channel management.
|
|
76
|
+
autopilot.active=false
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
[tor]
|
|
80
|
+
# Tor disabled by default. Enable for privacy.
|
|
81
|
+
tor.active=false
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# [remotesigner]
|
|
85
|
+
# Enable remote signer for watch-only mode. When enabled, this node delegates
|
|
86
|
+
# all signing to a remote signer node and holds no private key material.
|
|
87
|
+
# Uncommented and configured automatically by start-lnd.sh --mode watchonly.
|
|
88
|
+
# remotesigner.enable=true
|
|
89
|
+
# remotesigner.rpchost=SIGNER_RPC_HOST
|
|
90
|
+
# remotesigner.tlscertpath=SIGNER_TLS_CERT
|
|
91
|
+
# remotesigner.macaroonpath=SIGNER_MACAROON
|