You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document the project architecture including core components, module
organization, key design patterns, lifecycle management, and important
type aliases. This provides context for AI assistants working with
the codebase.
Generated with Claude Code (AI-assisted)
Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>
Copy file name to clipboardExpand all lines: CLAUDE.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,3 +9,59 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
9
9
- Never add new dependencies unless explicitly requested
10
10
- Please always disclose the use of any AI tools in commit messages and PR descriptions
11
11
- When adding new `.rs` files, please ensure to always add the licensing header as found in all other files.
12
+
13
+
## Architecture Overview
14
+
15
+
LDK-Node is a self-custodial Lightning Network node library built on top of **LDK** (Lightning Development Kit) for Lightning functionality and **BDK** (Bitcoin Development Kit) for on-chain wallet operations. It provides a simple, ready-to-go interface for building Lightning applications with language bindings for Swift, Kotlin, and Python via UniFFI.
16
+
17
+
### Core Components
18
+
19
+
| Component | Location | Responsibility |
20
+
|-----------|----------|----------------|
21
+
|`Node`|`src/lib.rs`| Central abstraction containing all subsystems; entry point for API |
22
+
|`Builder`|`src/builder.rs`| Fluent configuration interface for constructing `Node` instances |
23
+
|`Wallet`|`src/wallet/`| BDK-based on-chain wallet with SQLite persistence |
24
+
|`ChainSource`|`src/chain/`| Chain data abstraction (Esplora, Electrum, Bitcoin Core) |
25
+
|`EventHandler`|`src/event.rs`| Translates LDK events to user-facing `Node` events |
26
+
|`PaymentStore`|`src/payment/store.rs`| Persistent payment tracking with status and metadata |
0 commit comments