Skip to content

Commit ffa2387

Browse files
authored
Merge pull request #118 from tnull/2023-06-cut-0.1-alpha.1
Cut 0.1-alpha.1 release
2 parents e95f04e + 9564c77 commit ffa2387

File tree

6 files changed

+76
-29
lines changed

6 files changed

+76
-29
lines changed

CHANGELOG.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
1-
# 0.1-alpha - Apr 27, 2023
1+
# 0.1-alpha.1 - Jun 6, 2023
2+
- Generation of Swift, Kotlin (JVM and Android), and Python bindings is now supported through UniFFI (#25).
3+
- Lists of connected peers and channels may now be retrieved in bindings (#56).
4+
- Gossip data may now be sourced from the P2P network, or a Rapid Gossip Sync server (#70).
5+
- Network addresses are now stored and resolved via a `NetAddress` type (#85).
6+
- The `next_event` method has been renamed `wait_next_event` and a new non-blocking method for event queue access has been introduces as `next_event` (#91).
7+
- Node announcements are now regularly broadcasted (#93).
8+
- Duplicate payments are now only avoided if we actually sent them out (#96).
9+
- The `Node` may now be used to sign and verify arbitrary messages (#99).
10+
- A `KVStore` interface is introduced that may be used to implement custom persistence backends (#101).
11+
- An `SqliteStore` persistence backend is added and set as the new default (#100).
12+
- Successful fee rate updates are now mandatory on `Node` startup (#102).
13+
- The wallet sync intervals are now configurable (#102).
14+
- Granularity of logging can now be configured (#108).
15+
16+
17+
In total, this release includes changes in 64 commits from 4 authors:
18+
- Steve Myers
19+
- Elias Rohrer
20+
- Jurvis Tan
21+
- televis
222

23+
**Note:** This release is still considered experimental, should not be run in
24+
production, and no compatibility guarantees are given until the release of 0.1.
25+
26+
# 0.1-alpha - Apr 27, 2023
327
This is the first alpha release of LDK Node. It features support for sourcing
4-
chain data via an Esplora server, filesystem persistence, gossip sourcing via
5-
the Lightning peer-to-peer network, and configurble entropy sources for the
28+
chain data via an Esplora server, file system persistence, gossip sourcing via
29+
the Lightning peer-to-peer network, and configurable entropy sources for the
630
integrated LDK and BDK-based wallets.
731

8-
Note that this release is still considered experimental, should not be run in
32+
**Note:** This release is still considered experimental, should not be run in
933
production, and no compatibility guarantees are given until the release of 0.1.
1034

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.1.0-alpha"
3+
version = "0.1.0-alpha.1"
44
authors = ["Elias Rohrer <[email protected]>"]
55
homepage = "https://lightningdevkit.org/"
66
license = "MIT OR Apache-2.0"

README.md

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# LDK Node
2-
A ready-to-go Lightning node library built using [LDK](https://lightningdevkit.org/) and [BDK](https://bitcoindevkit.org/).
32

4-
LDK Node is a non-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.
3+
[![Crate](https://img.shields.io/crates/v/ldk-node.svg?logo=rust)](https://crates.io/crates/ldk-node)
4+
[![Documentation](https://img.shields.io/static/v1?logo=read-the-docs&label=docs.rs&message=ldk-node&color=informational)](https://docs.rs/ldk-node)
55

6-
## Getting Started
6+
A ready-to-go Lightning node library built using [LDK][ldk] and [BDK][bdk].
7+
8+
LDK 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.
79

8-
The primary abstraction of the library is the `Node`, which can be retrieved by setting up and configuring a `Builder` to your liking and calling `build()`. `Node` can then be controlled via commands such as `start`, `stop`, `connect_open_channel`, `send_payment`, etc.:
10+
## Getting Started
11+
The 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`, `connect_open_channel`, `send_payment`, etc.
912

1013
```rust
1114
use ldk_node::{Builder, NetAddress};
@@ -15,23 +18,27 @@ use ldk_node::bitcoin::Network;
1518
use std::str::FromStr;
1619

1720
fn main() {
18-
let mut builder = Builder::new();
21+
let builder = Builder::new();
1922
builder.set_network(Network::Testnet);
20-
builder.set_esplora_server_url("https://blockstream.info/testnet/api".to_string());
23+
builder.set_esplora_server("https://blockstream.info/testnet/api".to_string());
24+
builder.set_gossip_source_rgs("https://rapidsync.lightningdevkit.org/testnet/snapshot".to_string());
2125

2226
let node = builder.build();
27+
2328
node.start().unwrap();
2429

25-
let _funding_address = node.new_funding_address();
30+
let funding_address = node.new_funding_address();
2631

2732
// .. fund address ..
2833

29-
node.sync_wallets().unwrap();
30-
3134
let node_id = PublicKey::from_str("NODE_ID").unwrap();
3235
let node_addr = NetAddress::from_str("IP_ADDR:PORT").unwrap();
3336
node.connect_open_channel(node_id, node_addr, 10000, None, false).unwrap();
3437

38+
let event = node.wait_next_event();
39+
println!("EVENT: {:?}", event);
40+
node.event_handled();
41+
3542
let invoice = Invoice::from_str("INVOICE_STR").unwrap();
3643
node.send_payment(&invoice).unwrap();
3744

@@ -41,15 +48,27 @@ fn main() {
4148

4249
## Modularity
4350

44-
LDK Node currently comes with a decidedly opionated set of design choices:
45-
46-
- On-chain data is handled by the integrated BDK wallet
47-
- Chain data is accessed via Esplora (support for Electrum and `bitcoind` RPC will follow)
48-
- Wallet and channel state is persisted to file system (support for SQLite will follow)
49-
- Gossip data is sourced via Lightnings peer-to-peer network (support for [Rapid Gossip Sync](https://docs.rs/lightning-rapid-gossip-sync/*/lightning_rapid_gossip_sync/) will follow)
50-
- Entropy for the Lightning and on-chain wallets may be generated and persisted for or provided by the user (as raw bytes or [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonic)
51+
LDK Node currently comes with a decidedly opinionated set of design choices:
5152

53+
- On-chain data is handled by the integrated [BDK][bdk] wallet.
54+
- Chain data may currently be sourced from an [Esplora][esplora] server, while support for Electrum and `bitcoind` RPC will follow soon.
55+
- 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.
56+
- 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.
57+
- 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.
5258

5359
## Language Support
54-
55-
LDK Node is written in [Rust](https://www.rust-lang.org/) and may therefore be natively included in any `std` Rust program. Beyond its Rust API it also offers language bindings for Swift, Kotlin, and Python based on [UniFFI](https://github.com/mozilla/uniffi-rs/).
60+
LDK 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.
61+
62+
[api_docs]: https://docs.rs/ldk-node/*/ldk_node/
63+
[api_docs_node]: https://docs.rs/ldk-node/*/ldk_node/struct.Node.html
64+
[api_docs_builder]: https://docs.rs/ldk-node/*/ldk_node/struct.Builder.html
65+
[rust_crate]: https://crates.io/
66+
[ldk]: https://lightningdevkit.org/
67+
[bdk]: https://bitcoindevkit.org/
68+
[esplora]: https://github.com/Blockstream/esplora
69+
[sqlite]: https://sqlite.org/
70+
[rust]: https://www.rust-lang.org/
71+
[swift]: https://www.swift.org/
72+
[kotlin]: https://kotlinlang.org/
73+
[python]: https://www.python.org/
74+
[flutter_bindings]: https://github.com/LtbLightning/ldk-node-flutter

bindings/kotlin/ldk-node-android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536m
22
android.useAndroidX=true
33
android.enableJetifier=true
44
kotlin.code.style=official
5-
libraryVersion=0.0.1-SNAPSHOT
5+
libraryVersion=0.1-alpha.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536m
22
kotlin.code.style=official
3-
libraryVersion=0.0.1-SNAPSHOT
3+
libraryVersion=0.1-alpha.1

src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,27 @@
3333
//! use std::str::FromStr;
3434
//!
3535
//! fn main() {
36-
//! let mut builder = Builder::new();
36+
//! let builder = Builder::new();
3737
//! builder.set_network(Network::Testnet);
3838
//! builder.set_esplora_server("https://blockstream.info/testnet/api".to_string());
39+
//! builder.set_gossip_source_rgs("https://rapidsync.lightningdevkit.org/testnet/snapshot".to_string());
3940
//!
4041
//! let node = builder.build();
42+
//!
4143
//! node.start().unwrap();
4244
//!
43-
//! let _funding_address = node.new_funding_address();
45+
//! let funding_address = node.new_funding_address();
4446
//!
4547
//! // .. fund address ..
4648
//!
47-
//! node.sync_wallets().unwrap();
48-
//!
4949
//! let node_id = PublicKey::from_str("NODE_ID").unwrap();
5050
//! let node_addr = NetAddress::from_str("IP_ADDR:PORT").unwrap();
5151
//! node.connect_open_channel(node_id, node_addr, 10000, None, false).unwrap();
5252
//!
53+
//! let event = node.wait_next_event();
54+
//! println!("EVENT: {:?}", event);
55+
//! node.event_handled();
56+
//!
5357
//! let invoice = Invoice::from_str("INVOICE_STR").unwrap();
5458
//! node.send_payment(&invoice).unwrap();
5559
//!

0 commit comments

Comments
 (0)