{"id":13574805,"url":"https://github.com/lightningdevkit/ldk-node","last_synced_at":"2025-04-14T06:06:58.372Z","repository":{"id":104032761,"uuid":"529259159","full_name":"lightningdevkit/ldk-node","owner":"lightningdevkit","description":"A ready-to-go node implementation built using LDK.","archived":false,"fork":false,"pushed_at":"2025-04-03T19:39:08.000Z","size":1740,"stargazers_count":174,"open_issues_count":77,"forks_count":101,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-14T06:06:33.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightningdevkit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-26T13:00:53.000Z","updated_at":"2025-04-09T22:24:26.000Z","dependencies_parsed_at":"2024-11-29T16:08:21.641Z","dependency_job_id":"3f1fc605-9f95-4576-aa56-e71c3eb21135","html_url":"https://github.com/lightningdevkit/ldk-node","commit_stats":{"total_commits":494,"total_committers":26,"mean_commits":19.0,"dds":"0.20647773279352222","last_synced_commit":"20a6927909f413c8279d61bb7b4831798cbb6f3a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightningdevkit","download_url":"https://codeload.github.com/lightningdevkit/ldk-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830397,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:54.832Z","updated_at":"2025-04-14T06:06:58.346Z","avatar_url":"https://github.com/lightningdevkit.png","language":"Rust","readme":"# LDK Node\n\n[![Crate](https://img.shields.io/crates/v/ldk-node.svg?logo=rust)](https://crates.io/crates/ldk-node)\n[![Documentation](https://img.shields.io/static/v1?logo=read-the-docs\u0026label=docs.rs\u0026message=ldk-node\u0026color=informational)](https://docs.rs/ldk-node)\n[![Maven Central Android](https://img.shields.io/maven-central/v/org.lightningdevkit/ldk-node-android)](https://central.sonatype.com/artifact/org.lightningdevkit/ldk-node-android)\n[![Maven Central JVM](https://img.shields.io/maven-central/v/org.lightningdevkit/ldk-node-jvm)](https://central.sonatype.com/artifact/org.lightningdevkit/ldk-node-jvm)\n[![Security Audit](https://github.com/lightningdevkit/ldk-node/actions/workflows/audit.yml/badge.svg)](https://github.com/lightningdevkit/ldk-node/actions/workflows/audit.yml)\n\nA ready-to-go Lightning node library built using [LDK][ldk] and [BDK][bdk].\n\nLDK Node is a self-custodial Lightning node in library form. Its central goal is to provide a small, simple, and straightforward interface that enables users to easily set up and run a Lightning node with an integrated on-chain wallet. While minimalism is at its core, LDK Node aims to be sufficiently modular and configurable to be useful for a variety of use cases.\n\n## Getting Started\nThe primary abstraction of the library is the [`Node`][api_docs_node], which can be retrieved by setting up and configuring a [`Builder`][api_docs_builder] to your liking and calling one of the `build` methods. `Node` can then be controlled via commands such as `start`, `stop`, `open_channel`, `send`, etc.\n\n```rust\nuse ldk_node::Builder;\nuse ldk_node::lightning_invoice::Bolt11Invoice;\nuse ldk_node::lightning::ln::msgs::SocketAddress;\nuse ldk_node::bitcoin::secp256k1::PublicKey;\nuse ldk_node::bitcoin::Network;\nuse std::str::FromStr;\n\nfn main() {\n\tlet mut builder = Builder::new();\n\tbuilder.set_network(Network::Testnet);\n\tbuilder.set_chain_source_esplora(\"https://blockstream.info/testnet/api\".to_string(), None);\n\tbuilder.set_gossip_source_rgs(\"https://rapidsync.lightningdevkit.org/testnet/snapshot\".to_string());\n\n\tlet node = builder.build().unwrap();\n\n\tnode.start().unwrap();\n\n\tlet funding_address = node.onchain_payment().new_address();\n\n\t// .. fund address ..\n\n\tlet node_id = PublicKey::from_str(\"NODE_ID\").unwrap();\n\tlet node_addr = SocketAddress::from_str(\"IP_ADDR:PORT\").unwrap();\n\tnode.open_channel(node_id, node_addr, 10000, None, None).unwrap();\n\n\tlet event = node.wait_next_event();\n\tprintln!(\"EVENT: {:?}\", event);\n\tnode.event_handled();\n\n\tlet invoice = Bolt11Invoice::from_str(\"INVOICE_STR\").unwrap();\n\tnode.bolt11_payment().send(\u0026invoice, None).unwrap();\n\n\tnode.stop().unwrap();\n}\n```\n\n## Modularity\n\nLDK Node currently comes with a decidedly opinionated set of design choices:\n\n- On-chain data is handled by the integrated [BDK][bdk] wallet.\n- Chain data may currently be sourced from the Bitcoin Core RPC interface or an [Esplora][esplora] server, while support for Electrum will follow soon.\n- Wallet and channel state may be persisted to an [SQLite][sqlite] database, to file system, or to a custom back-end to be implemented by the user.\n- Gossip data may be sourced via Lightning's peer-to-peer network or the [Rapid Gossip Sync](https://docs.rs/lightning-rapid-gossip-sync/*/lightning_rapid_gossip_sync/) protocol.\n- Entropy for the Lightning and on-chain wallets may be sourced from raw bytes or a [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonic. In addition, LDK Node offers the means to generate and persist the entropy bytes to disk.\n\n## Language Support\nLDK Node itself is written in [Rust][rust] and may therefore be natively added as a library dependency to any `std` Rust program. However, beyond its Rust API it also offers language bindings for [Swift][swift], [Kotlin][kotlin], and [Python][python] based on the [UniFFI](https://github.com/mozilla/uniffi-rs/). Moreover, [Flutter bindings][flutter_bindings] are also available.\n\n## MSRV\nThe Minimum Supported Rust Version (MSRV) is currently 1.75.0.\n\n[api_docs]: https://docs.rs/ldk-node/*/ldk_node/\n[api_docs_node]: https://docs.rs/ldk-node/*/ldk_node/struct.Node.html\n[api_docs_builder]: https://docs.rs/ldk-node/*/ldk_node/struct.Builder.html\n[rust_crate]: https://crates.io/\n[ldk]: https://lightningdevkit.org/\n[bdk]: https://bitcoindevkit.org/\n[esplora]: https://github.com/Blockstream/esplora\n[sqlite]: https://sqlite.org/\n[rust]: https://www.rust-lang.org/\n[swift]: https://www.swift.org/\n[kotlin]: https://kotlinlang.org/\n[python]: https://www.python.org/\n[flutter_bindings]: https://github.com/LtbLightning/ldk-node-flutter\n","funding_links":[],"categories":["Ecosystem"],"sub_categories":["Lightning Implementations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningdevkit%2Fldk-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightningdevkit%2Fldk-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningdevkit%2Fldk-node/lists"}