Skip to content

Commit 201962d

Browse files
authored
Merge pull request #22 from synonymdev/ldk-v0-7-clean
Rebase fork onto upstream LDK 0.7
2 parents 198ff30 + fd72630 commit 201962d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+42144
-4973
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,15 @@ swift.swiftdoc
2727
/bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
2828
/bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
2929
/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/
30+
31+
# fork
32+
!/bindings/kotlin/ldk-node-android/lib/src/main/jniLibs
33+
!/bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
34+
35+
# IDE and local files
36+
.idea
37+
.build
38+
.cursor
39+
.claude
40+
*.local.*
41+
CLAUDE.md

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
# Unreleased
2+
3+
## Feature and API updates
4+
- Added reactive event system for wallet monitoring without polling:
5+
- **Onchain Transaction Events** (fully implemented):
6+
- `OnchainTransactionReceived`: Emitted when a new unconfirmed transaction is
7+
first detected in the mempool (instant notification for incoming payments!)
8+
- `OnchainTransactionConfirmed`: Emitted when a transaction receives confirmations
9+
- `OnchainTransactionReplaced`: Emitted when a transaction is replaced (via RBF or different transaction using a common input). Includes the replaced transaction ID and the list of conflicting replacement transaction IDs.
10+
- `OnchainTransactionReorged`: Emitted when a previously confirmed transaction
11+
becomes unconfirmed due to a blockchain reorg
12+
- `OnchainTransactionEvicted`: Emitted when a transaction is evicted from the mempool
13+
- **Sync Completion Event** (fully implemented):
14+
- `SyncCompleted`: Emitted when onchain wallet sync finishes successfully
15+
- **Balance Change Event** (fully implemented):
16+
- `BalanceChanged`: Emitted when onchain or Lightning balances change, allowing
17+
applications to update balance displays immediately without polling
18+
- Added `TransactionDetails`, `TxInput`, and `TxOutput` structs to provide comprehensive
19+
transaction information in onchain events, including inputs and outputs. This enables
20+
applications to analyze transaction data themselves to detect channel funding, closures,
21+
and other transaction types.
22+
- Added `Node::get_transaction_details()` method to retrieve transaction details for any
23+
transaction ID that exists in the wallet, returning `None` if the transaction is not found.
24+
- Added `Node::get_address_balance()` method to retrieve the current balance (in satoshis) for
25+
any Bitcoin address. This queries the chain source (Esplora or Electrum) to get the balance.
26+
Throws `InvalidAddress` if the address string cannot be parsed or doesn't match the node's
27+
network. Returns 0 if the balance cannot be queried (e.g., chain source unavailable). Note: This
28+
method is not available for BitcoindRpc chain source.
29+
- Added `SyncType` enum to distinguish between onchain wallet sync, Lightning
30+
wallet sync, and fee rate cache updates.
31+
- Balance tracking is now persisted in `NodeMetrics` to detect changes across restarts.
32+
- Added RBF (Replace-By-Fee) support via `OnchainPayment::bump_fee_by_rbf()` to replace
33+
unconfirmed transactions with higher fee versions. Prevents RBF of channel funding
34+
transactions to protect channel integrity.
35+
- Added CPFP (Child-Pays-For-Parent) support via `OnchainPayment::accelerate_by_cpfp()` and
36+
`OnchainPayment::calculate_cpfp_fee_rate()` to accelerate unconfirmed transactions by
37+
creating child transactions with higher effective fee rates.
38+
- Added UTXO management APIs:
39+
- `OnchainPayment::list_spendable_outputs()`: Lists all UTXOs safe to spend (excludes channel funding UTXOs).
40+
- `OnchainPayment::select_utxos_with_algorithm()`: Selects UTXOs using configurable coin selection algorithms (BranchAndBound, LargestFirst, OldestFirst, SingleRandomDraw).
41+
- `SpendableUtxo` struct and `CoinSelectionAlgorithm` enum for UTXO management.
42+
- Added fee estimation APIs:
43+
- `OnchainPayment::calculate_total_fee()`: Calculates transaction fees before sending.
44+
- `Bolt11Payment::estimate_routing_fees()`: Estimates Lightning routing fees before sending.
45+
- `Bolt11Payment::estimate_routing_fees_using_amount()`: Estimates fees for amount-less invoices.
46+
- Enhanced `OnchainPayment::send_to_address()` to accept optional `utxos_to_spend` parameter
47+
for manual UTXO selection.
48+
149
# 0.7.0 - Dec. 3, 2025
250
This seventh minor release introduces numerous new features, bug fixes, and API improvements. In particular, it adds support for channel Splicing, Async Payments, as well as sourcing chain data from a Bitcoin Core REST backend.
351

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ldk-node"
3-
version = "0.8.0+git"
3+
version = "0.7.0"
44
authors = ["Elias Rohrer <[email protected]>"]
55
homepage = "https://lightningdevkit.org/"
66
license = "MIT OR Apache-2.0"

0 commit comments

Comments
 (0)