用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill lightning-ldk命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | lightning-ldk |
| description | | Use when this capability is needed. |
LDK is a library, not a daemon. Provides Rust crates with C/Swift/ Kotlin/JS bindings. Used by Mutiny Wallet, Cash App, Casa, ldk-node, Phoenix (parts), etc.
lightning — core protocol logic.lightning-net-tokio — async TCP transport.lightning-persister — file-based persistence.lightning-background-processor — background task driver.lightning-block-sync — chain sync.lightning-transaction-sync — alternative tx-only sync.lightning-rapid-gossip-sync — fast gossip via signed snapshot.lightning-invoice — BOLT11 invoice handling.ldk-node — opinionated bundling for quick-start.lightning-liquidity — LSP client/server primitives.bdk integration crates.// Persistence trait
trait Persist<ChannelSigner> { ... }
// Channel manager — owns all channels
let chan_mgr = ChannelManager::new(...);
// Chain monitoring — watches outputs, force-close events
let chain_mon = ChainMonitor::new(...);
// Router — pathfinding
let router = DefaultRouter::new(...);
// Background processor — drives async tasks
BackgroundProcessor::start(...);
User code provides:
use ldk_node::{Builder, Network};
let builder = Builder::new()
.set_network(Network::Bitcoin)
.set_chain_source_esplora("https://blockstream.info/api".into())
.set_storage_dir_path("/path/to/data".into());
let node = builder.build().unwrap();
node.start().unwrap();
// Use the node
let address = node.onchain_payment().new_address().unwrap();
let invoice = node.bolt11_payment().receive(amount_msat, "desc", 3600).unwrap();
node.bolt11_payment().send(&invoice, None).unwrap();
ldk-node exposes a single API surface across Rust + Swift/Kotlin/JS
bindings.
For hardware wallets / remote signers:
trait NodeSigner { fn ecdh(&self, ...) -> Result<...>; ... }
trait ChannelSigner { fn sign_counterparty_commitment(&self, ...) -> ...; ... }
trait SignerProvider { fn derive_channel_signer(&self, ...) -> ChannelSigner; ... }
LDK supports async signing via EventHandler::handle_event returning
deferred sigs. Useful for hardware-wallet-backed Lightning.
LDK doesn't dictate storage. Common backends:
lightning-persister writes channel state to disk.Persist trait.lightning-block-sync polls / ZMQs.lightning-transaction-sync via Esplora REST.Mobile uses Neutrino: lightning-block-sync downloads filters, scans locally for UTXO matches, downloads only relevant blocks.
LDK provides:
lightning-c-bindings.LDKSwift and LDKNode.LDKKotlin and ldk-node-kotlin.ldk-node-js (experimental).ldk-node specifically targets Swift/Kotlin/JS so mobile devs get a single API.
LDK is light: ~10-20 MB RAM for a typical mobile node. Bitcoin Core
| Aspect | LND/CLN | LDK |
|---|---|---|
| Deployment | daemon | library, embedded |
| Mobile | no | yes (primary use) |
| Custom UI/logic | hard | easy (you own everything) |
| Default features | full | you choose |
| Memory | 200 MB+ | 10-20 MB |
Persist trait misimplementation: missed updates → state
corruption on restart.Source: claude-dev-suite/claude-dev-suite — distributed by TomeVault.