Ldk

From claude-dev-suite/claude-dev-suite · View interactive version

Ldk is an AI agent skill from the GitHub repository claude-dev-suite/claude-dev-suite. Lightning Dev Kit (LDK): modular Rust crates for embedding Lightning in apps. ldk-node for opinionated quick-start. Bindings to Swift / Kotlin / Python. USE WHEN: embedding Lightning in mobile/desktop apps, building custom LN logic.

How to use this skill

Skill file

LDK (Lightning Dev Kit)

Modular Rust library for Lightning. Used by Cash App, Casa, ldk-node,

more. Mutiny Wallet was a prominent early user; the shutdown was

announced 2024-08-05 and the hosted wallet closed 2024-12-31. Its

repos took their last commits in September 2024 and are archived

today, so treat Mutiny references below as history, not as a live

deployment.

See full overview at ../../lightning/ldk/SKILL.md.

Crates

Release lines (as of September 2026)

LDK 0.1 (January 2025) was the API-stabilisation milestone; since

then the project ships features in minor releases and backports

fixes as patch releases on older minor lines.

0.2 line. main carries an unreleased 0.8.0.

0.35.0-rc1, both published 2026-08-31. No stable 0.3 yet.

ldk-node 0.7.0 added experimental channel splicing, async payments

(serving and paying static invoices), a Bitcoin Core REST chain

source, and persisted liquidity-service state.

ldk-node quickstart

[dependencies]
ldk-node = "0.7"
use ldk_node::Builder;
use ldk_node::bitcoin::Network;
use ldk_node::lightning_invoice::{Bolt11InvoiceDescription, Description};

let mut builder = Builder::new();
builder.set_network(Network::Bitcoin);
builder.set_chain_source_esplora(
    "https://mempool.space/api".to_string(), None);
builder.set_storage_dir_path("/path/to/data".to_string());

let node = builder.build()?;
node.start()?;

let description = Bolt11InvoiceDescription::Direct(
    Description::new("Test".to_string())?);
let invoice = node.bolt11_payment().receive(
    100_000,        // 100k msat
    &description, 3600,
)?;

Builder setters take &mut self, so build the builder in a `let

mut binding rather than chaining off a temporary. Network` is

re-exported as ldk_node::bitcoin::Network, not ldk_node::Network.

Bindings (as of September 2026)

Two separate binding families exist and are not interchangeable:

ldk-node 0.7.0 ships UniFFI bindings for Swift, Kotlin and Python

(plus community Flutter bindings), while an older family is generated

directly over the raw lightning crate on top of ldk-c-bindings.

Each entry below says which family it belongs to.

ldk-node; the SwiftPM product is named LightningDevKit. Not

archived, but no release or commit since 0.0.125 (2025-02-27), so it

is still on the pre-0.1 0.0.x line and does not track

lightning 0.2.

lightning. Java ships as org.lightningdevkit:ldk-java 0.2.5.0 on

Maven Central and TypeScript/WASM as the npm lightningdevkit

package 0.2.5-0, both published 2026-09-01. There is no separate

Kotlin/Android binding over raw lightning — Android consumers use

the Java bindings.

bindings, both 0.7.0 on Maven Central (2025-12-03).

LtbLightning.

lightningdevkit/ldk-nodejs — an older Node.js binding — is archived

and took its last commit in May 2022. The maintained JS/WASM path is

the lightningdevkit npm package above, which wraps raw lightning;

there is still no ldk-node WASM/JS binding.

Use cases

shutting down in 2024; the pattern is still viable, but there is no

maintained ldk-node WASM/JS binding to build on.

Compared

See ../../lightning/ldk/SKILL.md for

LND/CLN comparison and full feature matrix.

Version floor and security history (as of September 2026)

denial-of-service where a bogus HTLC that is immediately rejected,

after a second HTLC with the same payment_hash was already

forwarded, could leave the ChannelManager unreadable on

deserialization; and a fee-inflation bug letting a malicious splice

counterparty make us over-allocate fee into their output when we

contribute to a splice.

funds-theft vulnerability for forwarding nodes that accept channels

from untrusted peers — ChannelMonitor confused two HTLCs with

equal payment_hash and amount and resolved them incorrectly —

plus several remote-panic DoS vectors (oversized protocol messages,

invalid onion-message reply paths, reorg-time claim batching, and

the 50-unfunded-peer limit not being enforced).

knowing about: it fixed anchor-reserve underestimates that could

leave a node unable to properly force-close, possiblyrandom not

generating random data unless explicitly configured (leaving LDK

open to HashDoS), and several remote-triggerable panics.

not a current floor. Move to 0.2.6.

caret requirement — a fresh resolve picks up 0.2.6, but an existing

Cargo.lock needs cargo update -p lightning to actually land on

it. Check the lockfile, not the manifest.

Migrating to 0.3 (release candidate as of September 2026)

lightning 0.3.0-rc1 changes defaults and invalidates some persisted

state. Plan for:

defaults to true.

always on, so inbound channels must be accepted explicitly from

event handling. ChannelHandshakeLimits::max_funding_satoshis went

with it.

**BOLT11 invoices already issued with payment metadata are

invalidated on upgrade** (and newly issued ones on downgrade). This

bites anyone holding long-lived invoices.

0.3+ will not accept payments over blinded paths created by earlier

versions. Existing BOLT12 offers stay valid; issued-but-unclaimed

BOLT12 refunds do not.

splice. A splice negotiated on an earlier version cannot be RBF'd,

and downgrade after an RBF is unsupported.

During the 0.3 cycle primary rust-lightning development moved to

git.rust-bitcoin.org; GitHub remains a synchronised mirror with

issues forwarded.

Common pitfalls

security fixes as patch releases, so 0.2 alone is not a floor.

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.