@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.
Files changed (68) hide show
  1. package/.claude-plugin/marketplace.json +36 -0
  2. package/.claude-plugin/plugin.json +12 -0
  3. package/README.md +307 -0
  4. package/bin/lightning-mcp-server +15 -0
  5. package/docs/architecture.md +455 -0
  6. package/docs/commerce.md +357 -0
  7. package/docs/l402-and-lnget.md +267 -0
  8. package/docs/mcp-server.md +285 -0
  9. package/docs/quickref.md +263 -0
  10. package/docs/security.md +298 -0
  11. package/docs/two-agent-setup.md +394 -0
  12. package/package.json +52 -0
  13. package/postinstall.js +160 -0
  14. package/skills/aperture/SKILL.md +330 -0
  15. package/skills/aperture/scripts/install.sh +68 -0
  16. package/skills/aperture/scripts/setup.sh +155 -0
  17. package/skills/aperture/scripts/start.sh +81 -0
  18. package/skills/aperture/scripts/stop.sh +57 -0
  19. package/skills/aperture/templates/aperture-regtest.yaml +36 -0
  20. package/skills/aperture/templates/aperture.yaml.template +64 -0
  21. package/skills/aperture/templates/docker-compose-aperture.yml +59 -0
  22. package/skills/commerce/SKILL.md +211 -0
  23. package/skills/lib/config-gen.sh +127 -0
  24. package/skills/lib/rest.sh +69 -0
  25. package/skills/lightning-security-module/SKILL.md +253 -0
  26. package/skills/lightning-security-module/references/architecture.md +133 -0
  27. package/skills/lightning-security-module/scripts/docker-start.sh +117 -0
  28. package/skills/lightning-security-module/scripts/docker-stop.sh +53 -0
  29. package/skills/lightning-security-module/scripts/export-credentials.sh +268 -0
  30. package/skills/lightning-security-module/scripts/install.sh +178 -0
  31. package/skills/lightning-security-module/scripts/setup-signer.sh +307 -0
  32. package/skills/lightning-security-module/scripts/start-signer.sh +152 -0
  33. package/skills/lightning-security-module/scripts/stop-signer.sh +240 -0
  34. package/skills/lightning-security-module/templates/docker-compose-signer.yml +35 -0
  35. package/skills/lightning-security-module/templates/signer-lnd.conf.template +69 -0
  36. package/skills/lnd/SKILL.md +441 -0
  37. package/skills/lnd/profiles/debug.env +4 -0
  38. package/skills/lnd/profiles/default.env +3 -0
  39. package/skills/lnd/profiles/regtest.env +4 -0
  40. package/skills/lnd/profiles/taproot.env +3 -0
  41. package/skills/lnd/profiles/wumbo.env +3 -0
  42. package/skills/lnd/references/security.md +156 -0
  43. package/skills/lnd/scripts/create-wallet.sh +464 -0
  44. package/skills/lnd/scripts/docker-start.sh +256 -0
  45. package/skills/lnd/scripts/docker-stop.sh +109 -0
  46. package/skills/lnd/scripts/import-credentials.sh +145 -0
  47. package/skills/lnd/scripts/install.sh +195 -0
  48. package/skills/lnd/scripts/lncli.sh +150 -0
  49. package/skills/lnd/scripts/start-lnd.sh +241 -0
  50. package/skills/lnd/scripts/stop-lnd.sh +218 -0
  51. package/skills/lnd/scripts/unlock-wallet.sh +134 -0
  52. package/skills/lnd/templates/docker-compose-regtest.yml +122 -0
  53. package/skills/lnd/templates/docker-compose-watchonly.yml +71 -0
  54. package/skills/lnd/templates/docker-compose.yml +49 -0
  55. package/skills/lnd/templates/litd-regtest.conf.template +61 -0
  56. package/skills/lnd/templates/litd-watchonly.conf.template +57 -0
  57. package/skills/lnd/templates/litd.conf.template +88 -0
  58. package/skills/lnd/templates/lnd.conf.template +91 -0
  59. package/skills/lnget/SKILL.md +288 -0
  60. package/skills/lnget/scripts/install.sh +69 -0
  61. package/skills/macaroon-bakery/SKILL.md +179 -0
  62. package/skills/macaroon-bakery/scripts/bake.sh +337 -0
  63. package/skills/mcp-lnc/SKILL.md +280 -0
  64. package/skills/mcp-lnc/scripts/configure.sh +130 -0
  65. package/skills/mcp-lnc/scripts/install.sh +103 -0
  66. package/skills/mcp-lnc/scripts/setup-claude-config.sh +162 -0
  67. package/skills/mcp-lnc/templates/env.template +16 -0
  68. package/versions.env +23 -0
@@ -0,0 +1,35 @@
1
+ # Standalone remote signer container using lnd.
2
+ #
3
+ # The signer holds the wallet seed and signs transactions on behalf of a
4
+ # watch-only litd node. It does not route payments or open channels.
5
+ #
6
+ # All runtime configuration lives in the mounted config file
7
+ # (signer-lnd.conf.template by default). Use docker-start.sh to generate
8
+ # a config with custom network or debug level.
9
+ #
10
+ # Usage:
11
+ # skills/lightning-security-module/scripts/docker-start.sh # Recommended
12
+ # docker compose -f docker-compose-signer.yml up -d
13
+ #
14
+ # Environment variables (with defaults):
15
+ # LND_VERSION — lnd image tag (default: from versions.env)
16
+ # LND_IMAGE — lnd image name (default: from versions.env)
17
+ # SIGNER_CONF_PATH — path to generated signer config
18
+
19
+ services:
20
+ signer:
21
+ image: ${LND_IMAGE:-lightninglabs/lnd}:${LND_VERSION:-v0.20.0-beta}
22
+ container_name: litd-signer
23
+ restart: unless-stopped
24
+ entrypoint: ["/bin/sh", "-c", "touch /root/.lnd/wallet-password.txt && cp /tmp/lnd.conf /root/.lnd/lnd.conf && exec lnd"]
25
+ ports:
26
+ # RPC for watch-only node connections.
27
+ - "${SIGNER_RPC_PORT:-10012}:10012"
28
+ # REST for wallet creation and management.
29
+ - "${SIGNER_REST_PORT:-10013}:10013"
30
+ volumes:
31
+ - signer-data:/root/.lnd
32
+ - ${SIGNER_CONF_PATH:-./signer-lnd.conf.template}:/tmp/lnd.conf:ro
33
+
34
+ volumes:
35
+ signer-data:
@@ -0,0 +1,69 @@
1
+ # LND Configuration for Remote Signer
2
+ #
3
+ # Minimal config: holds keys, signs transactions, no routing.
4
+ # Flat format (no section headers) to avoid go-flags double-prefixing.
5
+ # Used by both docker-compose-signer.yml and docker-compose-watchonly.yml.
6
+
7
+ # Node alias (not visible on network — signer doesn't peer).
8
+ alias=lnget-signer
9
+
10
+ # Log level: trace, debug, info, warn, error, critical.
11
+ debuglevel=info
12
+
13
+ # No p2p listening — signer does not route or open channels.
14
+ listen=
15
+
16
+ # RPC on all interfaces so watch-only node can connect.
17
+ rpclisten=0.0.0.0:10012
18
+
19
+ # REST on all interfaces for Docker port mapping.
20
+ restlisten=0.0.0.0:10013
21
+
22
+ # Auto-unlock wallet on startup using stored passphrase.
23
+ wallet-unlock-password-file=/root/.lnd/wallet-password.txt
24
+ wallet-unlock-allow-create=true
25
+
26
+ # TLS: allow connections from any IP (watch-only on different machine).
27
+ tlsextraip=0.0.0.0
28
+
29
+ # TLS: include Docker service and container names so the watch-only node
30
+ # can verify the signer's cert when connecting by hostname.
31
+ tlsextradomain=signer
32
+ tlsextradomain=litd-signer
33
+
34
+ # Maximum pending channels (none — signer doesn't manage channels).
35
+ maxpendingchannels=0
36
+
37
+ # Activate Bitcoin.
38
+ bitcoin.active=true
39
+
40
+ # Network: mainnet, testnet, signet, regtest.
41
+ # Override via NETWORK env var or --network flag.
42
+ bitcoin.testnet=true
43
+
44
+ # Use neutrino light client (signer needs chain awareness for signing).
45
+ bitcoin.node=neutrino
46
+
47
+ # Peers for neutrino block header sync.
48
+ neutrino.addpeer=btcd0.lightning.computer
49
+ neutrino.addpeer=mainnet1-btcd.zaphq.io
50
+ neutrino.addpeer=mainnet2-btcd.zaphq.io
51
+
52
+ # Fee estimation URL (required for neutrino on mainnet).
53
+ # Testnet: https://nodes.lightning.computer/fees/v1/btctestnet-fee-estimates.json
54
+ fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
55
+
56
+ # Maximum peers for neutrino.
57
+ neutrino.maxpeers=8
58
+
59
+ # Persist compact filters to disk for faster restarts.
60
+ neutrino.persistfilters=true
61
+
62
+ # Use SQLite for all databases.
63
+ db.backend=sqlite
64
+
65
+ # Autopilot disabled — signer does not manage channels.
66
+ autopilot.active=false
67
+
68
+ # Tor disabled by default.
69
+ tor.active=false
@@ -0,0 +1,441 @@
1
+ ---
2
+ name: lnd
3
+ description: 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.
4
+ ---
5
+
6
+ # Lightning Terminal (litd) — Lightning Network Node
7
+
8
+ Install and operate a Lightning Terminal (litd) node for agent-driven payments.
9
+ litd bundles lnd with loop, pool, tapd, and faraday — giving agents access to
10
+ liquidity management, channel marketplace, and taproot assets in a single
11
+ container.
12
+
13
+ **Default:** Docker container, neutrino backend, SQLite storage, testnet. No full
14
+ Bitcoin node required. Use `--network mainnet` for real coins.
15
+
16
+ **Default mode: watch-only with remote signer.** Private keys stay on a separate
17
+ signer container — the agent never touches key material. For quick testing, use
18
+ `--mode standalone` (keys on disk, less secure).
19
+
20
+ ## Quick Start (Container — Recommended)
21
+
22
+ ### Watch-Only with Remote Signer (Production)
23
+
24
+ ```bash
25
+ # 1. Install litd image
26
+ skills/lnd/scripts/install.sh
27
+
28
+ # 2. Start litd + signer containers
29
+ skills/lnd/scripts/start-lnd.sh --watchonly
30
+
31
+ # 3. Set up signer wallet (first run only)
32
+ skills/lightning-security-module/scripts/setup-signer.sh --container litd-signer
33
+
34
+ # 4. Import credentials and create watch-only wallet
35
+ skills/lnd/scripts/import-credentials.sh --bundle ~/.lnget/signer/credentials-bundle
36
+ skills/lnd/scripts/create-wallet.sh
37
+
38
+ # 5. Check status
39
+ skills/lnd/scripts/lncli.sh getinfo
40
+ ```
41
+
42
+ ### Standalone (Testing Only)
43
+
44
+ ```bash
45
+ # 1. Install litd image
46
+ skills/lnd/scripts/install.sh
47
+
48
+ # 2. Start litd container
49
+ skills/lnd/scripts/start-lnd.sh
50
+
51
+ # 3. Create standalone wallet (generates seed — keys on disk)
52
+ skills/lnd/scripts/create-wallet.sh --mode standalone
53
+
54
+ # 4. Check status
55
+ skills/lnd/scripts/lncli.sh getinfo
56
+ ```
57
+
58
+ > **Warning:** Standalone mode stores the seed mnemonic and wallet passphrase on
59
+ > disk. Do not use for mainnet funds you cannot afford to lose.
60
+
61
+ ### Regtest Development
62
+
63
+ ```bash
64
+ # Start litd + bitcoind for local development
65
+ skills/lnd/scripts/start-lnd.sh --regtest
66
+
67
+ # Create wallet and mine some blocks
68
+ skills/lnd/scripts/create-wallet.sh --container litd --mode standalone
69
+ docker exec litd-bitcoind bitcoin-cli -regtest -generate 101
70
+ ```
71
+
72
+ ## Container Modes
73
+
74
+ | Mode | Command | Containers | Use Case |
75
+ |------|---------|-----------|----------|
76
+ | Standalone | `start-lnd.sh` | litd | Testing, development |
77
+ | Watch-only | `start-lnd.sh --watchonly` | litd + litd-signer | Production |
78
+ | Regtest | `start-lnd.sh --regtest` | litd + litd-bitcoind | Local dev |
79
+
80
+ ## Profiles
81
+
82
+ Profiles customize litd behavior without editing compose files:
83
+
84
+ ```bash
85
+ # List available profiles
86
+ skills/lnd/scripts/docker-start.sh --list-profiles
87
+
88
+ # Start with a profile
89
+ skills/lnd/scripts/start-lnd.sh --profile taproot
90
+ skills/lnd/scripts/start-lnd.sh --profile debug
91
+ ```
92
+
93
+ | Profile | Purpose |
94
+ |---------|---------|
95
+ | `default` | Standard operation (info logging) |
96
+ | `debug` | Trace logging, verbose subsystems |
97
+ | `taproot` | Simple taproot channels enabled |
98
+ | `wumbo` | Large channels up to 10 BTC |
99
+ | `regtest` | Regtest network preset |
100
+
101
+ ## Network Selection
102
+
103
+ Default is testnet. Override with `--network`:
104
+
105
+ ```bash
106
+ # Testnet (default — no real coins)
107
+ skills/lnd/scripts/start-lnd.sh
108
+
109
+ # Mainnet (real coins — use with remote signer)
110
+ skills/lnd/scripts/start-lnd.sh --network mainnet --watchonly
111
+
112
+ # Signet (testing network)
113
+ skills/lnd/scripts/start-lnd.sh --network signet
114
+ ```
115
+
116
+ ## litd Sub-Daemons
117
+
118
+ litd integrates multiple daemons. Access them via the `--cli` flag:
119
+
120
+ ```bash
121
+ # lnd CLI (default)
122
+ skills/lnd/scripts/lncli.sh getinfo
123
+
124
+ # Loop — liquidity management (submarine swaps)
125
+ skills/lnd/scripts/lncli.sh --cli loop quote out 100000
126
+
127
+ # Pool — channel marketplace
128
+ skills/lnd/scripts/lncli.sh --cli pool accounts list
129
+
130
+ # Taproot Assets (tapd)
131
+ skills/lnd/scripts/lncli.sh --cli tapcli assets list
132
+
133
+ # Lightning Terminal (litd)
134
+ skills/lnd/scripts/lncli.sh --cli litcli getinfo
135
+
136
+ # Faraday — channel analytics
137
+ skills/lnd/scripts/lncli.sh --cli frcli revenue
138
+ ```
139
+
140
+ ## Installation
141
+
142
+ Default: pulls the litd Docker image.
143
+
144
+ ```bash
145
+ skills/lnd/scripts/install.sh
146
+ ```
147
+
148
+ This pulls `lightninglabs/lightning-terminal:v0.16.0-alpha` from Docker Hub and
149
+ verifies the image. The litd image includes lncli, litcli, loop, pool, tapcli,
150
+ and frcli.
151
+
152
+ ### Build from Source (Fallback)
153
+
154
+ ```bash
155
+ skills/lnd/scripts/install.sh --source
156
+ ```
157
+
158
+ Requires Go toolchain. Builds lnd and lncli with all build tags.
159
+
160
+ ## Native Mode
161
+
162
+ For running without Docker, use `--native`:
163
+
164
+ ```bash
165
+ # Start natively
166
+ skills/lnd/scripts/start-lnd.sh --native --mode standalone
167
+
168
+ # Stop natively
169
+ skills/lnd/scripts/stop-lnd.sh --native
170
+ ```
171
+
172
+ Native mode uses the config template at `skills/lnd/templates/lnd.conf.template`
173
+ and runs lnd as a background process.
174
+
175
+ ## Remote Nodes
176
+
177
+ Connect to a remote lnd node with connection credentials:
178
+
179
+ ```bash
180
+ skills/lnd/scripts/lncli.sh \
181
+ --rpcserver remote-host:10009 \
182
+ --tlscertpath ~/remote-tls.cert \
183
+ --macaroonpath ~/remote-admin.macaroon \
184
+ getinfo
185
+ ```
186
+
187
+ ## MCP / Lightning Node Connect
188
+
189
+ For read-only access without direct gRPC connectivity, use the `mcp-lnc` skill
190
+ with Lightning Node Connect (LNC). LNC uses encrypted WebSocket tunnels — no TLS
191
+ certs, macaroons, or open ports needed. Just a pairing phrase from Lightning
192
+ Terminal.
193
+
194
+ ```bash
195
+ skills/mcp-lnc/scripts/install.sh
196
+ skills/mcp-lnc/scripts/configure.sh
197
+ skills/mcp-lnc/scripts/setup-claude-config.sh
198
+ ```
199
+
200
+ ## Wallet Setup
201
+
202
+ ### Watch-Only Wallet (Default)
203
+
204
+ Imports account xpubs from the remote signer — no seed or private keys on this
205
+ machine.
206
+
207
+ ```bash
208
+ # Import credentials bundle from signer
209
+ skills/lnd/scripts/import-credentials.sh --bundle <credentials-bundle>
210
+
211
+ # Create watch-only wallet (auto-detects litd container)
212
+ skills/lnd/scripts/create-wallet.sh
213
+ ```
214
+
215
+ ### Standalone Wallet
216
+
217
+ Generates a seed locally. Use only for testing.
218
+
219
+ ```bash
220
+ skills/lnd/scripts/create-wallet.sh --mode standalone
221
+ ```
222
+
223
+ Handles the full wallet creation flow via REST API:
224
+ 1. Generates a secure random wallet passphrase
225
+ 2. Calls `/v1/genseed` to generate a 24-word seed mnemonic
226
+ 3. Calls `/v1/initwallet` with the passphrase and seed
227
+ 4. Stores credentials securely:
228
+ - `~/.lnget/lnd/wallet-password.txt` (mode 0600)
229
+ - `~/.lnget/lnd/seed.txt` (mode 0600)
230
+
231
+ ### Unlock Wallet
232
+
233
+ ```bash
234
+ skills/lnd/scripts/unlock-wallet.sh
235
+ ```
236
+
237
+ Auto-unlock is enabled by default in the container via
238
+ `--wallet-unlock-password-file`. Manual unlock is only needed if auto-unlock
239
+ is disabled.
240
+
241
+ ### Recover Wallet from Seed (Standalone Only)
242
+
243
+ ```bash
244
+ skills/lnd/scripts/create-wallet.sh --mode standalone --recover --seed-file ~/.lnget/lnd/seed.txt
245
+ ```
246
+
247
+ ## Starting and Stopping
248
+
249
+ ### Start
250
+
251
+ ```bash
252
+ # Docker standalone (default)
253
+ skills/lnd/scripts/start-lnd.sh
254
+
255
+ # Docker watch-only (production)
256
+ skills/lnd/scripts/start-lnd.sh --watchonly
257
+
258
+ # Docker with profile
259
+ skills/lnd/scripts/start-lnd.sh --profile taproot
260
+
261
+ # Mainnet
262
+ skills/lnd/scripts/start-lnd.sh --network mainnet
263
+ ```
264
+
265
+ ### Stop
266
+
267
+ ```bash
268
+ # Stop (preserve data)
269
+ skills/lnd/scripts/stop-lnd.sh
270
+
271
+ # Stop and clean (remove volumes)
272
+ skills/lnd/scripts/stop-lnd.sh --clean
273
+
274
+ # Stop all litd containers
275
+ skills/lnd/scripts/stop-lnd.sh --all
276
+ ```
277
+
278
+ ## Node Operations
279
+
280
+ All commands auto-detect the litd container:
281
+
282
+ ### Node Info
283
+
284
+ ```bash
285
+ skills/lnd/scripts/lncli.sh getinfo
286
+ skills/lnd/scripts/lncli.sh walletbalance
287
+ skills/lnd/scripts/lncli.sh channelbalance
288
+ ```
289
+
290
+ ### Funding
291
+
292
+ ```bash
293
+ skills/lnd/scripts/lncli.sh newaddress p2tr
294
+ skills/lnd/scripts/lncli.sh walletbalance
295
+ ```
296
+
297
+ ### Channel Management
298
+
299
+ ```bash
300
+ skills/lnd/scripts/lncli.sh connect <pubkey>@<host>:9735
301
+ skills/lnd/scripts/lncli.sh openchannel --node_key=<pubkey> --local_amt=1000000
302
+ skills/lnd/scripts/lncli.sh listchannels
303
+ skills/lnd/scripts/lncli.sh closechannel --funding_txid=<txid> --output_index=<n>
304
+ ```
305
+
306
+ ### Payments
307
+
308
+ ```bash
309
+ skills/lnd/scripts/lncli.sh addinvoice --amt=1000 --memo="test payment"
310
+ skills/lnd/scripts/lncli.sh decodepayreq <bolt11_invoice>
311
+ skills/lnd/scripts/lncli.sh sendpayment --pay_req=<bolt11_invoice>
312
+ skills/lnd/scripts/lncli.sh listpayments
313
+ ```
314
+
315
+ ### Macaroon Bakery
316
+
317
+ Use the `macaroon-bakery` skill for least-privilege agent credentials:
318
+
319
+ ```bash
320
+ skills/macaroon-bakery/scripts/bake.sh --role pay-only
321
+ skills/macaroon-bakery/scripts/bake.sh --role invoice-only
322
+ skills/macaroon-bakery/scripts/bake.sh --inspect <path-to-macaroon>
323
+ ```
324
+
325
+ ## Configuration
326
+
327
+ ### Container Config
328
+
329
+ The Docker compose templates pass configuration via command-line arguments. For
330
+ advanced customization, mount a custom `litd.conf`:
331
+
332
+ - **litd template:** `skills/lnd/templates/litd.conf.template`
333
+ - **lnd template (native):** `skills/lnd/templates/lnd.conf.template`
334
+
335
+ Note: litd requires `lnd.` prefix for lnd flags (e.g., `lnd.bitcoin.active`).
336
+ Standalone lnd does not use the prefix.
337
+
338
+ ### Key Defaults
339
+
340
+ - **Backend:** neutrino (BIP 157/158 light client)
341
+ - **Database:** SQLite
342
+ - **Network:** testnet (override with `--network mainnet`)
343
+ - **Auto-unlock:** enabled via password file
344
+
345
+ ## Container Naming & Ports
346
+
347
+ | Container | Purpose | Ports |
348
+ |-----------|---------|-------|
349
+ | `litd` | Main Lightning Terminal | 8443, 10009, 9735, 8080 |
350
+ | `litd-signer` | Remote signer (lnd) | 10012, 10013 |
351
+ | `litd-bitcoind` | Bitcoin Core (regtest only) | 18443, 28332, 28333 |
352
+
353
+ ### Port Reference
354
+
355
+ | Port | Service | Description |
356
+ |-------|-----------|--------------------------------|
357
+ | 8443 | litd UI | Lightning Terminal web UI |
358
+ | 9735 | Lightning | Peer-to-peer Lightning Network |
359
+ | 10009 | gRPC | lncli and programmatic access |
360
+ | 8080 | REST | REST API (wallet, etc.) |
361
+ | 10012 | Signer gRPC | Remote signer RPC |
362
+ | 10013 | Signer REST | Signer REST API |
363
+
364
+ ## File Locations
365
+
366
+ | Path | Purpose |
367
+ |------|---------|
368
+ | `~/.lnget/lnd/wallet-password.txt` | Wallet unlock passphrase (0600) |
369
+ | `~/.lnget/lnd/seed.txt` | 24-word mnemonic backup (0600, standalone only) |
370
+ | `~/.lnget/lnd/signer-credentials/` | Imported signer credentials (watch-only) |
371
+ | `versions.env` | Pinned container image versions |
372
+ | `skills/lnd/templates/` | Docker compose and config templates |
373
+ | `skills/lnd/profiles/` | Profile .env files |
374
+
375
+ ## Version Pinning
376
+
377
+ Container image versions are pinned in `versions.env` at the repo root:
378
+
379
+ ```bash
380
+ LITD_VERSION=v0.16.0-alpha
381
+ LND_VERSION=v0.20.0-beta
382
+ ```
383
+
384
+ Override at runtime:
385
+
386
+ ```bash
387
+ LITD_VERSION=v0.17.0-alpha skills/lnd/scripts/start-lnd.sh
388
+ ```
389
+
390
+ ## Integration with lnget
391
+
392
+ Once litd is running with a funded wallet and open channels:
393
+
394
+ ```bash
395
+ lnget config init
396
+ lnget ln status
397
+ lnget --max-cost 1000 https://api.example.com/paid-data
398
+ ```
399
+
400
+ ## Security Considerations
401
+
402
+ See [references/security.md](references/security.md) for detailed guidance.
403
+
404
+ **Default model (watch-only with remote signer):**
405
+ - No seed or private keys on the agent machine
406
+ - Signing delegated to signer container via gRPC
407
+ - Set up with the `lightning-security-module` skill
408
+
409
+ **Standalone model (testing only):**
410
+ - Wallet passphrase and seed stored on disk (0600)
411
+ - Suitable for testnet and quick testing
412
+
413
+ **Macaroon security:**
414
+ - Never give agents the admin macaroon in production
415
+ - Bake scoped macaroons with the `macaroon-bakery` skill
416
+
417
+ ## Troubleshooting
418
+
419
+ ### "wallet not found"
420
+ Run `skills/lnd/scripts/create-wallet.sh` to create the wallet.
421
+
422
+ ### "wallet locked"
423
+ Run `skills/lnd/scripts/unlock-wallet.sh`. Auto-unlock is enabled by default.
424
+
425
+ ### "chain backend is still syncing"
426
+ Neutrino needs time to sync headers:
427
+ ```bash
428
+ skills/lnd/scripts/lncli.sh getinfo | jq '{synced_to_chain, block_height}'
429
+ ```
430
+
431
+ ### Container not starting
432
+ ```bash
433
+ docker logs litd
434
+ docker logs litd-signer
435
+ ```
436
+
437
+ ### "remote signer not reachable"
438
+ ```bash
439
+ docker ps | grep litd-signer
440
+ docker logs litd-signer
441
+ ```
@@ -0,0 +1,4 @@
1
+ # Debug profile — verbose logging for troubleshooting.
2
+ # Per-subsystem trace levels are set directly via LND_DEBUG.
3
+ LND_DEBUG=PEER=trace,HSWC=trace,CNCT=trace,DISC=trace,RPCS=trace
4
+ LITD_EXTRA_ARGS=
@@ -0,0 +1,3 @@
1
+ # Default profile — standard operation.
2
+ LND_DEBUG=info
3
+ LITD_EXTRA_ARGS=
@@ -0,0 +1,4 @@
1
+ # Regtest development profile.
2
+ NETWORK=regtest
3
+ LND_DEBUG=debug
4
+ LITD_EXTRA_ARGS=
@@ -0,0 +1,3 @@
1
+ # Taproot channels profile — enable simple taproot channels.
2
+ LND_DEBUG=debug
3
+ LITD_EXTRA_ARGS=--lnd.protocol.simple-taproot-chans
@@ -0,0 +1,3 @@
1
+ # Wumbo channels profile — enable large channels up to 10 BTC.
2
+ LND_DEBUG=debug
3
+ LITD_EXTRA_ARGS="--lnd.protocol.wumbo-channels --lnd.maxchansize=1000000000"