Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8ec07fa
resolved error decoding exceptions
BitcoinZavior May 12, 2025
e799c9d
set ListeningAddress for alice and bob
BitcoinZavior May 12, 2025
6a2ddde
fix(buildWithVssStoreAndFixedHeaders): renamed store_id param to storeId
BitcoinZavior May 14, 2025
132022f
replaced build with buildWithVssStoreAndFixedHeaders
BitcoinZavior May 16, 2025
782ea8c
made create_builder synchronous
BitcoinZavior May 17, 2025
3bf12d9
resolved ReadFailed exception on buildWithVssStoreAndFixedHeaders
BitcoinZavior May 18, 2025
97425e0
flutter analyze issue resolved
BitcoinZavior May 21, 2025
8495f0d
flutter_rust_bridge upgraded to 2.6.0
BitcoinZavior May 22, 2025
0d84196
CHANGELOG updated
BitcoinZavior May 25, 2025
4de459b
README updated
BitcoinZavior May 26, 2025
bb64095
dependencies updated
BitcoinZavior May 28, 2025
3bcc823
fix: incompatable gradle version error; Java updated to version 17
BitcoinZavior May 28, 2025
fe73266
dependency updated
BitcoinZavior May 29, 2025
8604b71
dependency updated
BitcoinZavior May 30, 2025
db3e70d
feat(Frb): exposed flutter_rust_bridge init exception
BitcoinZavior Jun 12, 2025
ad3a3c5
branches updated
BitcoinZavior Jun 14, 2025
e329e16
android ndk version updated to 25.1.8937393
BitcoinZavior Jun 14, 2025
52ebc72
fix: i686-linux-android removed
BitcoinZavior Jun 15, 2025
2ca7648
removed i686-linux-android from debug targets
BitcoinZavior Jun 16, 2025
c5ca2a1
Merge pull request #47 from nuCode-Tech/v0.4.2
BitcoinZavior Jun 17, 2025
46df690
chore: upgrade ldk-node to version 0.4.3
BitcoinZavior Jun 18, 2025
fd554b2
changelog added
BitcoinZavior Jun 21, 2025
d07fb47
Merge pull request #50 from nuCode-Tech/v0.4.3
BitcoinZavior Jun 24, 2025
500036b
Update precompile_binaries.yml
BitcoinZavior Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/precompile_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [main, v0.3.0]
branches: '*'

name: Precompile Binaries

Expand All @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, macOS-latest]
os: [ubuntu-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -30,6 +30,12 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Set up Android SDK
if: (matrix.os == 'ubuntu-latest')
uses: android-actions/setup-android@v2
- name: Install Specific NDK
if: (matrix.os == 'ubuntu-latest')
run: sdkmanager --install "ndk;25.1.8937393"
- name: Precompile (with iOS)
if: matrix.os == 'macOS-latest'
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/ldk-node-flutter
Expand All @@ -38,8 +44,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
- name: Precompile (with Android)
if: matrix.os == 'ubuntu-20.04'
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
if: matrix.os == 'ubuntu-latest'
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
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
Expand Down
21 changes: 12 additions & 9 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
channel: stable
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable"

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: android
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: ios
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: macos
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49

# User provided section

Expand Down
75 changes: 69 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,47 @@
## [0.4.3]

Updated `flutter_rust_bridge` to `2.6.0`.
Updated `ldk-node` to `0.4.3`.

## [0.4.2]

Updated `flutter_rust_bridge` to `2.6.0`.
Updated `ldk-node` to `0.4.2`.

#### APIs added

- Support for multiple chain sources has been added. The `setChainSourceBitcoinRpc` method has been introduced in the Builder class to allow the use of
Bitcoin Core RPC.
- Support for sourcing chain and fee estimation data from a Bitcoin Core RPC backed.
- Initial experimental support for an encrypted VSS remote storage backend has been added using `builder.buildWithVssStore` &
`builder.buildWithVssStoreAndFixedHeaders` methods.
- **Caution**: VSS support is in **alpha** and is considered experimental. Using VSS (or any remote persistence) may cause LDK to throw an exception
if persistence failures are unrecoverable, i.e., if they remain unresolved after internal retries are exhausted.
- Support for setting the `NodeAlias` in public node announcements using `builder.setNodeAlias` has been added.
- Exposed `node.unifiedQrPayment` & `UnifiedQrPayment` handler for generating and paying unified QR codes.
- Support for `quantity` and `payerNote` fields when sending or receiving `BOLT12` payments have been added.
- Support for setting `SendingParameters` when sending `BOLT11` payments has been added.

#### API changed

- `node.connectOpenChannel` was split into `openChannel` and `openAnnouncedChannel`.
- The `setEsploraServer` method has been renamed to `setChainSourceEsplora`, and Esplora-specific configuration options can now be provided using
`EsploraSyncConfig`.

#### Fixed

- The `ChannelConfig` object has been refactored, now allowing to query the currently applied `MaxDustHTLCExposure` limit.
- The `Node` no longer throws an exception when hitting a persistence failure during event handling. Instead, events will be replayed until successful.
- The `Node` is no longer prohibited from using available confirmed on-chain funds to spend/bump Anchor outputs.

## [0.3.0]

Updated `flutter_rust_bridge` to `2.0.0`.

#### APIs added

- `buildWithFsStore` method is added in the `Builder` class allowing to use the filesystem storage backend.
- Exposed `setLiquiditySourceLsps2` method to `Builder` to configure the `Node` instance to source the inbound liquidity.
- Exposed `setLiquiditySourceLsps2` method to `Builder` to configure the `Node` instance to source the inbound liquidity.
- `nextEventAsync` method is added to `Node` class that allows polling the event queue asynchronously.
- `status` method has been added to `Node` allowing to retrieve information about the Node's status.
- `config` method added to get the config with which the `Node` was initialized.
Expand All @@ -11,60 +50,84 @@ Updated `flutter_rust_bridge` to `2.0.0`.
- Support for creating and paying BOLT12 offers and refunds has been added.
- Added `networkGraph` handler method allowing to query the network graph.
- Added `forceCloseChannel` to `Node` class.

#### API changed

- All available balances outside of channel balances are now exposed via a unified `listBalances` interface method.

#### Fixed

Persisted peers are now correctly reconnected after startup.

## [0.2.2-dev]

Updated Rust and Flutter dependencies.

#### APIs added

- Expose `isRunning()` in `Node` class.

#### API changed

- Renamed `waitUntilNextHandled()` to `waitNextHandled`.
- Renamed `listeningAddress()` to `listeningAddresses`.
- Upgraded `BuilderException` to handle invalid `socketAddress` & `trustedPeers.
- Upgraded `NodeException` to handle invalid `txid`.

#### Fixed

- Functions hang indefinitely on iOs devices
- Android support bug resolved
- Thread `frb_workerpool` panic on `SocketAddress`, `PublicKey`, `Address` `Bolt11Invoice`, `Config` and `Txid`.

## [0.2.0]

Updated `Rust` and `Flutter` dependencies.

## [0.1.3]

Updated `Rust` and `Flutter` dependencies.
Invalid `BuilderException` bug resolved

#### APIs added
- Expose `generate()` in `Mnemonic` class.

- Expose `generate()` in `Mnemonic` class.

#### API changed

- Remove `generateEntropyMnemonic()`.

## [0.1.2]

#### APIs added

- Expose `generateEntropyMnemonic` function - a utility method for generating a BIP39 mnemonic.
- Expose `Node` class's `updateChannelConfig`, `verifySignature`, `signMessage`, `sendPaymentProbe`, `sendSpontaneousPaymentProbe` methods.
- Expose `Node` class's `updateChannelConfig`, `verifySignature`, `signMessage`, `sendPaymentProbe`, `sendSpontaneousPaymentProbe` methods.
- Add `ChannelConfig?` to node.connectOpenChannel() params - a `ChannelConfig` may now be specified on channel open or updated afterwards.
- Expose `counterpartyNodeId`, `funding_txo` & `channelValueSats` in `ChannelDetails`.
- Expose `trustedPeers0Conf` `probingLiquidityLimitMultiplier`, `logDirPath`, `onchainWalletSyncInterval_secs`, `walletSyncIntervalSecs`, &
`feeRateCacheUpdateIntervalSecs` in `Config` - allowing inbound trusted 0conf channels.
`feeRateCacheUpdateIntervalSecs` in `Config` - allowing inbound trusted 0conf channels.
- Non-permanently connected peers are now included in node.listPeers().

#### API changed

- node.newFundingAddress renamed to `newOnchainAddress`.
- node.sendToOnChainAddress renamed to `sendToOnchainAddress`.
- node.sendAllToOnChainAddress renamed to `sendAllToOnchainAddress`.
- Remove node.onChainBalance.

## [0.1.1-alpha]

Support `Dart 3` and `Flutter 3.10`

## [0.1.1]

Support `Dart 3` and `Flutter 3.10`

### Fixed
- `setEntropyBip39Mnemonic` issue resolved

- `setEntropyBip39Mnemonic` issue resolved

## [0.1.0]

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.
Expand Down Expand Up @@ -135,4 +198,4 @@ This is the first release of `ldk_node`. It features support for sourcing chain

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

`syncWallets`- Sync the `LDK & BDK` wallets with the current chain state.
`syncWallets`- Sync the `LDK & BDK` wallets with the current chain state.
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To use the `ldk_node` package in your project, add it as a dependency in your pr

```dart
dependencies:
ldk_node: ^0.3.0
ldk_node: ^0.4.2
```
or add from pub.dev using `pub add` command

Expand All @@ -60,31 +60,15 @@ import 'package:ldk_node/ldk_node.dart';
// Path to a directory where the application may place data that is user-generated
final path = "${directory.path}/alice's_node";

// Your preferred `Esplora` url
final esploraUrl = "https://mempool.space/testnet/api";

// configuration options for the node
final config = Config(
probingLiquidityLimitMultiplier: 3,
trustedPeers0Conf: [],
storageDirPath: path,
network: Network.Testnet,
listeningAddresses: [
SocketAddress.hostname(addr: "0.0.0.0", port: 3003)
],
onchainWalletSyncIntervalSecs: 60,
walletSyncIntervalSecs: 20,
feeRateCacheUpdateIntervalSecs: 600,
logLevel: ldk.LogLevel.Debug,
defaultCltvExpiryDelta: 144
);
Builder builder = Builder.fromConfig(config);
final node = await builder
.setEntropyBip39Mnemonic(
mnemonic: ldk.Mnemonic(
'certain sense kiss guide crumble hint transfer crime much stereo warm coral'))
.setEsploraServer(esploraUrl)
.build();

// For a node on the testnet network with default config and service
// esploraUrl: "https://mempool.space/testnet/api";
Builder builder = Builder.testnet()
.setStorageDirPath(path)
.setEntropyBip39Mnemonic(
mnemonic: Mnemonic(
'certain sense kiss guide crumble hint transfer crime much stereo warm coral'));
final node = await builder.build();

// Starting the node
await node.start();
Expand Down
29 changes: 13 additions & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
group 'io.ldk.f.ldk_node'
version '1.0-SNAPSHOT'
version '0.4.2'

buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:7.2.1'
}
}

Expand All @@ -22,28 +20,27 @@ allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 31

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
if (project.android.hasProperty("namespace")) {
namespace "io.ldk.f.ldk_node"
}

kotlinOptions {
jvmTarget = '1.8'
compileSdk = 33
ndkVersion android.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
defaultConfig {
minSdkVersion 23
}

defaultConfig {
minSdkVersion 16
minSdk = 21
}
}

apply from: "../cargokit/gradle/plugin.gradle"

cargokit {
Expand Down
Loading
Loading