Skip to content

Commit 22eef0d

Browse files
Merge pull request #55 from LtbLightning/upgrade-0.4.3
Upgrade 0.4.3
2 parents 2540633 + 500036b commit 22eef0d

File tree

100 files changed

+34329
-14917
lines changed

Some content is hidden

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

100 files changed

+34329
-14917
lines changed

.github/workflows/precompile_binaries.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [main, v0.3.0]
3+
branches: '*'
44

55
name: Precompile Binaries
66

@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
os: [ubuntu-20.04, macOS-latest]
12+
os: [ubuntu-latest, macOS-latest]
1313
runs-on: ${{ matrix.os }}
1414
steps:
1515
- uses: actions/checkout@v4
@@ -30,6 +30,12 @@ jobs:
3030
- uses: subosito/flutter-action@v2
3131
with:
3232
channel: 'stable'
33+
- name: Set up Android SDK
34+
if: (matrix.os == 'ubuntu-latest')
35+
uses: android-actions/setup-android@v2
36+
- name: Install Specific NDK
37+
if: (matrix.os == 'ubuntu-latest')
38+
run: sdkmanager --install "ndk;25.1.8937393"
3339
- name: Precompile (with iOS)
3440
if: matrix.os == 'macOS-latest'
3541
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/ldk-node-flutter
@@ -38,8 +44,8 @@ jobs:
3844
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
3945
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
4046
- name: Precompile (with Android)
41-
if: matrix.os == 'ubuntu-20.04'
42-
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/ldk-node-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23
47+
if: matrix.os == 'ubuntu-latest'
48+
run: dart run build_tool precompile-binaries -v --target=aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android --manifest-dir=../../rust --repository=LtbLightning/ldk-node-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=25.1.8937393 --android-min-sdk-version=23
4349
working-directory: cargokit/build_tool
4450
env:
4551
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

.metadata

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
8-
channel: stable
7+
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
8+
channel: "stable"
99

1010
project_type: plugin
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
17-
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
16+
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
17+
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
1818
- platform: android
19-
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
20-
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
19+
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
20+
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
2121
- platform: ios
22-
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
23-
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
22+
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
23+
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
24+
- platform: macos
25+
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
26+
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
2427

2528
# User provided section
2629

CHANGELOG.md

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,47 @@
1+
## [0.4.3]
2+
3+
Updated `flutter_rust_bridge` to `2.6.0`.
4+
Updated `ldk-node` to `0.4.3`.
5+
6+
## [0.4.2]
7+
8+
Updated `flutter_rust_bridge` to `2.6.0`.
9+
Updated `ldk-node` to `0.4.2`.
10+
11+
#### APIs added
12+
13+
- Support for multiple chain sources has been added. The `setChainSourceBitcoinRpc` method has been introduced in the Builder class to allow the use of
14+
Bitcoin Core RPC.
15+
- Support for sourcing chain and fee estimation data from a Bitcoin Core RPC backed.
16+
- Initial experimental support for an encrypted VSS remote storage backend has been added using `builder.buildWithVssStore` &
17+
`builder.buildWithVssStoreAndFixedHeaders` methods.
18+
- **Caution**: VSS support is in **alpha** and is considered experimental. Using VSS (or any remote persistence) may cause LDK to throw an exception
19+
if persistence failures are unrecoverable, i.e., if they remain unresolved after internal retries are exhausted.
20+
- Support for setting the `NodeAlias` in public node announcements using `builder.setNodeAlias` has been added.
21+
- Exposed `node.unifiedQrPayment` & `UnifiedQrPayment` handler for generating and paying unified QR codes.
22+
- Support for `quantity` and `payerNote` fields when sending or receiving `BOLT12` payments have been added.
23+
- Support for setting `SendingParameters` when sending `BOLT11` payments has been added.
24+
25+
#### API changed
26+
27+
- `node.connectOpenChannel` was split into `openChannel` and `openAnnouncedChannel`.
28+
- The `setEsploraServer` method has been renamed to `setChainSourceEsplora`, and Esplora-specific configuration options can now be provided using
29+
`EsploraSyncConfig`.
30+
31+
#### Fixed
32+
33+
- The `ChannelConfig` object has been refactored, now allowing to query the currently applied `MaxDustHTLCExposure` limit.
34+
- The `Node` no longer throws an exception when hitting a persistence failure during event handling. Instead, events will be replayed until successful.
35+
- The `Node` is no longer prohibited from using available confirmed on-chain funds to spend/bump Anchor outputs.
36+
137
## [0.3.0]
38+
239
Updated `flutter_rust_bridge` to `2.0.0`.
40+
341
#### APIs added
42+
443
- `buildWithFsStore` method is added in the `Builder` class allowing to use the filesystem storage backend.
5-
- Exposed `setLiquiditySourceLsps2` method to `Builder` to configure the `Node` instance to source the inbound liquidity.
44+
- Exposed `setLiquiditySourceLsps2` method to `Builder` to configure the `Node` instance to source the inbound liquidity.
645
- `nextEventAsync` method is added to `Node` class that allows polling the event queue asynchronously.
746
- `status` method has been added to `Node` allowing to retrieve information about the Node's status.
847
- `config` method added to get the config with which the `Node` was initialized.
@@ -11,60 +50,84 @@ Updated `flutter_rust_bridge` to `2.0.0`.
1150
- Support for creating and paying BOLT12 offers and refunds has been added.
1251
- Added `networkGraph` handler method allowing to query the network graph.
1352
- Added `forceCloseChannel` to `Node` class.
53+
1454
#### API changed
55+
1556
- All available balances outside of channel balances are now exposed via a unified `listBalances` interface method.
57+
1658
#### Fixed
59+
1760
Persisted peers are now correctly reconnected after startup.
1861

1962
## [0.2.2-dev]
63+
2064
Updated Rust and Flutter dependencies.
65+
2166
#### APIs added
67+
2268
- Expose `isRunning()` in `Node` class.
69+
2370
#### API changed
71+
2472
- Renamed `waitUntilNextHandled()` to `waitNextHandled`.
2573
- Renamed `listeningAddress()` to `listeningAddresses`.
2674
- Upgraded `BuilderException` to handle invalid `socketAddress` & `trustedPeers.
2775
- Upgraded `NodeException` to handle invalid `txid`.
76+
2877
#### Fixed
78+
2979
- Functions hang indefinitely on iOs devices
3080
- Android support bug resolved
3181
- Thread `frb_workerpool` panic on `SocketAddress`, `PublicKey`, `Address` `Bolt11Invoice`, `Config` and `Txid`.
3282

3383
## [0.2.0]
84+
3485
Updated `Rust` and `Flutter` dependencies.
3586

3687
## [0.1.3]
88+
3789
Updated `Rust` and `Flutter` dependencies.
3890
Invalid `BuilderException` bug resolved
91+
3992
#### APIs added
40-
- Expose `generate()` in `Mnemonic` class.
93+
94+
- Expose `generate()` in `Mnemonic` class.
95+
4196
#### API changed
97+
4298
- Remove `generateEntropyMnemonic()`.
4399

44100
## [0.1.2]
101+
45102
#### APIs added
103+
46104
- Expose `generateEntropyMnemonic` function - a utility method for generating a BIP39 mnemonic.
47-
- Expose `Node` class's `updateChannelConfig`, `verifySignature`, `signMessage`, `sendPaymentProbe`, `sendSpontaneousPaymentProbe` methods.
105+
- Expose `Node` class's `updateChannelConfig`, `verifySignature`, `signMessage`, `sendPaymentProbe`, `sendSpontaneousPaymentProbe` methods.
48106
- Add `ChannelConfig?` to node.connectOpenChannel() params - a `ChannelConfig` may now be specified on channel open or updated afterwards.
49107
- Expose `counterpartyNodeId`, `funding_txo` & `channelValueSats` in `ChannelDetails`.
50108
- Expose `trustedPeers0Conf` `probingLiquidityLimitMultiplier`, `logDirPath`, `onchainWalletSyncInterval_secs`, `walletSyncIntervalSecs`, &
51-
`feeRateCacheUpdateIntervalSecs` in `Config` - allowing inbound trusted 0conf channels.
109+
`feeRateCacheUpdateIntervalSecs` in `Config` - allowing inbound trusted 0conf channels.
52110
- Non-permanently connected peers are now included in node.listPeers().
53111

54112
#### API changed
113+
55114
- node.newFundingAddress renamed to `newOnchainAddress`.
56115
- node.sendToOnChainAddress renamed to `sendToOnchainAddress`.
57116
- node.sendAllToOnChainAddress renamed to `sendAllToOnchainAddress`.
58117
- Remove node.onChainBalance.
59118

60119
## [0.1.1-alpha]
120+
61121
Support `Dart 3` and `Flutter 3.10`
62122

63123
## [0.1.1]
124+
64125
Support `Dart 3` and `Flutter 3.10`
65126

66127
### Fixed
67-
- `setEntropyBip39Mnemonic` issue resolved
128+
129+
- `setEntropyBip39Mnemonic` issue resolved
130+
68131
## [0.1.0]
69132

70133
This is the first release of `ldk_node`. It features support for sourcing chain data via an `Esplora` server, filesystem persistence, gossip sourcing via the `Lightning` peer-to-peer network, and configurble entropy sources for the integrated LDK & BDK-based wallets.
@@ -135,4 +198,4 @@ This is the first release of `ldk_node`. It features support for sourcing chain
135198

136199
`stop`- Disconnects all peers, stops all running background tasks, and shuts down Node.
137200

138-
`syncWallets`- Sync the `LDK & BDK` wallets with the current chain state.
201+
`syncWallets`- Sync the `LDK & BDK` wallets with the current chain state.

README.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To use the `ldk_node` package in your project, add it as a dependency in your pr
4040

4141
```dart
4242
dependencies:
43-
ldk_node: ^0.3.0
43+
ldk_node: ^0.4.2
4444
```
4545
or add from pub.dev using `pub add` command
4646

@@ -60,31 +60,15 @@ import 'package:ldk_node/ldk_node.dart';
6060
// Path to a directory where the application may place data that is user-generated
6161
final path = "${directory.path}/alice's_node";
6262
63-
// Your preferred `Esplora` url
64-
final esploraUrl = "https://mempool.space/testnet/api";
65-
66-
// configuration options for the node
67-
final config = Config(
68-
probingLiquidityLimitMultiplier: 3,
69-
trustedPeers0Conf: [],
70-
storageDirPath: path,
71-
network: Network.Testnet,
72-
listeningAddresses: [
73-
SocketAddress.hostname(addr: "0.0.0.0", port: 3003)
74-
],
75-
onchainWalletSyncIntervalSecs: 60,
76-
walletSyncIntervalSecs: 20,
77-
feeRateCacheUpdateIntervalSecs: 600,
78-
logLevel: ldk.LogLevel.Debug,
79-
defaultCltvExpiryDelta: 144
80-
);
81-
Builder builder = Builder.fromConfig(config);
82-
final node = await builder
83-
.setEntropyBip39Mnemonic(
84-
mnemonic: ldk.Mnemonic(
85-
'certain sense kiss guide crumble hint transfer crime much stereo warm coral'))
86-
.setEsploraServer(esploraUrl)
87-
.build();
63+
64+
// For a node on the testnet network with default config and service
65+
// esploraUrl: "https://mempool.space/testnet/api";
66+
Builder builder = Builder.testnet()
67+
.setStorageDirPath(path)
68+
.setEntropyBip39Mnemonic(
69+
mnemonic: Mnemonic(
70+
'certain sense kiss guide crumble hint transfer crime much stereo warm coral'));
71+
final node = await builder.build();
8872
8973
// Starting the node
9074
await node.start();

android/build.gradle

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
group 'io.ldk.f.ldk_node'
2-
version '1.0-SNAPSHOT'
2+
version '0.4.2'
33

44
buildscript {
5-
ext.kotlin_version = '1.6.10'
65
repositories {
76
google()
87
mavenCentral()
98
}
109

1110
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.1.2'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11+
classpath 'com.android.tools.build:gradle:7.2.1'
1412
}
1513
}
1614

@@ -22,28 +20,27 @@ allprojects {
2220
}
2321

2422
apply plugin: 'com.android.library'
25-
apply plugin: 'kotlin-android'
2623

2724
android {
28-
compileSdkVersion 31
29-
30-
compileOptions {
31-
sourceCompatibility JavaVersion.VERSION_1_8
32-
targetCompatibility JavaVersion.VERSION_1_8
25+
if (project.android.hasProperty("namespace")) {
26+
namespace "io.ldk.f.ldk_node"
3327
}
34-
35-
kotlinOptions {
36-
jvmTarget = '1.8'
28+
compileSdk = 33
29+
ndkVersion android.ndkVersion
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_17
32+
targetCompatibility JavaVersion.VERSION_17
3733
}
3834

39-
sourceSets {
40-
main.java.srcDirs += 'src/main/kotlin'
35+
defaultConfig {
36+
minSdkVersion 23
4137
}
4238

4339
defaultConfig {
44-
minSdkVersion 16
40+
minSdk = 21
4541
}
4642
}
43+
4744
apply from: "../cargokit/gradle/plugin.gradle"
4845

4946
cargokit {

0 commit comments

Comments
 (0)