Skip to content

Commit

Permalink
Merge pull request #36 from getAlby/chore/update-v0.3.0
Browse files Browse the repository at this point in the history
Chore: update to v0.3.0
  • Loading branch information
rolznz authored Jun 24, 2024
2 parents 2c5998a + 61efbac commit 6797574
Show file tree
Hide file tree
Showing 33 changed files with 5,847 additions and 1,357 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
cargo update -p proptest --precise "1.2.0" --verbose # proptest 1.3.0 requires rustc 1.64.0
cargo update -p regex --precise "1.9.6" --verbose # regex 1.10.0 requires rustc 1.65.0
cargo update -p home --precise "0.5.5" --verbose # home v0.5.9 requires rustc 1.70 or newer
cargo update -p url --precise "2.5.0" --verbose # url v2.5.1 requires rustc 1.67 or newer
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == 'stable'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
Expand Down
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
# 0.3.0 - June 21, 2024

This third minor release notably adds support for BOLT12 payments, Anchor
channels, and sourcing inbound liquidity via LSPS2 just-in-time channels.

## Feature and API updates
- Support for creating and paying BOLT12 offers and refunds has been added (#265).
- Support for Anchor channels has been added (#141).
- Support for sourcing inbound liquidity via LSPS2 just-in-time (JIT) channels has been added (#223).
- The node's local view of the network graph can now be accessed via interface methods (#293).
- A new `next_event_async` method was added that allows polling the event queue asynchronously (#224).
- A `default_config` method was introduced that allows to retrieve sane default values, also in bindings (#242).
- The `PaymentFailed` and `ChannelClosed` events now include `reason` fields (#260).
- All available balances outside of channel balances are now exposed via a unified `list_balances` interface method (#250).
- The maximum in-flight HTLC value has been bumped to 100% of the channel capacity for private outbound channels (#303) and, if JIT channel support is enabled, for inbound channels (#262).
- The fee paid is now exposed via the `PaymentSuccessful` event (#271).
- A `status` method has been added allowing to retrieve information about the `Node`'s status (#272).
- `Node` no longer takes a `KVStore` type parameter, allowing to use the filesystem storage backend in bindings (#244).
- The payment APIs have been restructured to use per-type (`bolt11`, `onchain`, `bolt12`, ..) payment handlers which can be accessed via corresponding `Node::{type}_payment` methods (#270).
- Fully resolved channel monitors are now eventually moved to an archive location (#307).
- The ability to register and claim from custom payment hashes generated outside of LDK Node has been added (#308).

## Bug Fixes
- Node announcements are now correctly only broadcast if we have any public, sufficiently confirmed channels (#248, #314).
- Falling back to default fee values is now disallowed on mainnet, ensuring we won't startup without a successful fee cache update (#249).
- Persisted peers are now correctly reconnected after startup (#265).
- Concurrent connection attempts to the same peer are no longer overriding each other (#266).
- Several steps have been taken to reduce the risk of blocking node operation on wallet syncing in the face of unresponsive Esplora services (#281).

## Compatibility Notes
- LDK has been updated to version 0.0.123 (#291).

In total, this release features 54 files changed, 7282 insertions, 2410 deletions in 165 commits from 3 authors, in alphabetical order:

- Elias Rohrer
- jbesraa
- Srikanth Iyengar

# 0.2.2 - May 21, 2024

This is a bugfix release that reestablishes compatibility of Swift packages
with Xcode 15.3 and later.

## Bug Fixes

- Swift bindings can now be built using Xcode 15.3 and later again (#294)

In total, this release features 5 files changed, 66 insertions, 2 deletions
deletions in 2 commits from 1 author, in alphabetical order:

- Elias Rohrer

# 0.2.1 - Jan 26, 2024

This is a bugfix release bumping the used LDK and BDK dependencies to the
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ldk-node"
version = "0.2.1"
version = "0.3.0"
authors = ["Elias Rohrer <dev@tnull.de>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.2.1"
let checksum = "cca3d5f380c3c216c22ac892cb04a792f3982730e570df71d824462f14c1350e"
let tag = "v0.3.0"
let checksum = "07c8741768956bf1a51d1c25f751b5e29d1ae9ee2fd786c4282031c9a8a92f0c"
let url = "https://github.com/lightningdevkit/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
libraryVersion=0.2.1
libraryVersion=0.3.0
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-jvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
libraryVersion=0.2.1
libraryVersion=0.3.0
53 changes: 52 additions & 1 deletion bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ interface Node {
PublicKey node_id();
sequence<SocketAddress>? listening_addresses();
Bolt11Payment bolt11_payment();
Bolt12Payment bolt12_payment();
SpontaneousPayment spontaneous_payment();
OnchainPayment onchain_payment();
[Throws=NodeError]
Expand All @@ -69,7 +70,9 @@ interface Node {
[Throws=NodeError]
UserChannelId connect_open_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, ChannelConfig? channel_config, boolean announce_channel);
[Throws=NodeError]
void close_channel([ByRef]UserChannelId user_channel_id, PublicKey counterparty_node_id, boolean force);
void close_channel([ByRef]UserChannelId user_channel_id, PublicKey counterparty_node_id);
[Throws=NodeError]
void force_close_channel([ByRef]UserChannelId user_channel_id, PublicKey counterparty_node_id);
[Throws=NodeError]
void update_channel_config([ByRef]UserChannelId user_channel_id, PublicKey counterparty_node_id, ChannelConfig channel_config);
[Throws=NodeError]
Expand Down Expand Up @@ -97,15 +100,38 @@ interface Bolt11Payment {
[Throws=NodeError]
void send_probes_using_amount([ByRef]Bolt11Invoice invoice, u64 amount_msat);
[Throws=NodeError]
void claim_for_hash(PaymentHash payment_hash, u64 claimable_amount_msat, PaymentPreimage preimage);
[Throws=NodeError]
void fail_for_hash(PaymentHash payment_hash);
[Throws=NodeError]
Bolt11Invoice receive(u64 amount_msat, [ByRef]string description, u32 expiry_secs);
[Throws=NodeError]
Bolt11Invoice receive_for_hash(u64 amount_msat, [ByRef]string description, u32 expiry_secs, PaymentHash payment_hash);
[Throws=NodeError]
Bolt11Invoice receive_variable_amount([ByRef]string description, u32 expiry_secs);
[Throws=NodeError]
Bolt11Invoice receive_variable_amount_for_hash([ByRef]string description, u32 expiry_secs, PaymentHash payment_hash);
[Throws=NodeError]
Bolt11Invoice receive_via_jit_channel(u64 amount_msat, [ByRef]string description, u32 expiry_secs, u64? max_lsp_fee_limit_msat);
[Throws=NodeError]
Bolt11Invoice receive_variable_amount_via_jit_channel([ByRef]string description, u32 expiry_secs, u64? max_proportional_lsp_fee_limit_ppm_msat);
};

interface Bolt12Payment {
[Throws=NodeError]
PaymentId send([ByRef]Offer offer, string? payer_note);
[Throws=NodeError]
PaymentId send_using_amount([ByRef]Offer offer, string? payer_note, u64 amount_msat);
[Throws=NodeError]
Offer receive(u64 amount_msat, [ByRef]string description);
[Throws=NodeError]
Offer receive_variable_amount([ByRef]string description);
[Throws=NodeError]
Bolt12Invoice request_refund_payment([ByRef]Refund refund);
[Throws=NodeError]
Refund initiate_refund(u64 amount_msat, u32 expiry_secs);
};

interface SpontaneousPayment {
[Throws=NodeError]
PaymentId send(u64 amount_msat, PublicKey node_id, sequence<TlvEntry> custom_tlvs);
Expand All @@ -129,6 +155,9 @@ enum NodeError {
"OnchainTxCreationFailed",
"ConnectionFailed",
"InvoiceCreationFailed",
"InvoiceRequestCreationFailed",
"OfferCreationFailed",
"RefundCreationFailed",
"PaymentSendingFailed",
"ProbeSendingFailed",
"ChannelCreationFailed",
Expand All @@ -142,24 +171,29 @@ enum NodeError {
"OnchainTxSigningFailed",
"MessageSigningFailed",
"TxSyncFailed",
"TxSyncTimeout",
"GossipUpdateFailed",
"GossipUpdateTimeout",
"LiquidityRequestFailed",
"InvalidAddress",
"InvalidSocketAddress",
"InvalidPublicKey",
"InvalidSecretKey",
"InvalidOfferId",
"InvalidNodeId",
"InvalidPaymentId",
"InvalidPaymentHash",
"InvalidPaymentPreimage",
"InvalidPaymentSecret",
"InvalidAmount",
"InvalidInvoice",
"InvalidOffer",
"InvalidRefund",
"InvalidChannelId",
"InvalidNetwork",
"InvalidCustomTlv",
"DuplicatePayment",
"UnsupportedCurrency",
"InsufficientFunds",
"LiquiditySourceUnavailable",
"LiquidityFeeTooHigh",
Expand Down Expand Up @@ -201,6 +235,7 @@ interface Event {
PaymentSuccessful(PaymentId? payment_id, PaymentHash payment_hash, u64? fee_paid_msat);
PaymentFailed(PaymentId? payment_id, PaymentHash payment_hash, PaymentFailureReason? reason);
PaymentReceived(PaymentId? payment_id, PaymentHash payment_hash, u64 amount_msat);
PaymentClaimable(PaymentId payment_id, PaymentHash payment_hash, u64 claimable_amount_msat, u32? claim_deadline);
ChannelPending(ChannelId channel_id, UserChannelId user_channel_id, ChannelId former_temporary_channel_id, PublicKey counterparty_node_id, OutPoint funding_txo);
ChannelReady(ChannelId channel_id, UserChannelId user_channel_id, PublicKey? counterparty_node_id);
ChannelClosed(ChannelId channel_id, UserChannelId user_channel_id, PublicKey? counterparty_node_id, ClosureReason? reason);
Expand Down Expand Up @@ -237,6 +272,8 @@ interface PaymentKind {
Onchain();
Bolt11(PaymentHash hash, PaymentPreimage? preimage, PaymentSecret? secret, string? bolt11_invoice);
Bolt11Jit(PaymentHash hash, PaymentPreimage? preimage, PaymentSecret? secret, LSPFeeLimits lsp_fee_limits);
Bolt12Offer(PaymentHash? hash, PaymentPreimage? preimage, PaymentSecret? secret, OfferId offer_id);
Bolt12Refund(PaymentHash? hash, PaymentPreimage? preimage, PaymentSecret? secret);
Spontaneous(PaymentHash hash, PaymentPreimage? preimage, sequence<TlvEntry> custom_tlvs);
};

Expand All @@ -262,9 +299,11 @@ dictionary PaymentDetails {
u64? amount_msat;
PaymentDirection direction;
PaymentStatus status;
// TODO: remove - use latest_update_timestamp
u64 last_update;
u64? fee_msat;
u64 created_at;
u64 latest_update_timestamp;
};

// [NonExhaustive]
Expand Down Expand Up @@ -444,6 +483,18 @@ typedef string Address;
[Custom]
typedef string Bolt11Invoice;

[Custom]
typedef string Offer;

[Custom]
typedef string Refund;

[Custom]
typedef string Bolt12Invoice;

[Custom]
typedef string OfferId;

[Custom]
typedef string PaymentId;

Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ldk_node"
version = "0.2.1"
version = "0.3.0"
authors = [
{ name="Elias Rohrer", email="dev@tnull.de" },
]
Expand Down
6 changes: 6 additions & 0 deletions bindings/swift/LDKNodeFFI.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
Expand All @@ -31,6 +33,8 @@
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
Expand All @@ -43,6 +47,8 @@
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>org.lightningdevkit.LDKNodeFFI</string>
<key>CFBundleName</key>
<string>LDKNodeFFI</string>
<key>CFBundleVersion</key>
<string>0.3.0</string>
<key>CFBundleShortVersionString</key>
<string>0.3.0</string>
<key>CFBundleExecutable</key>
<string>LDKNodeFFI</string>
<key>MinimumOSVersion</key>
<string>100.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>org.lightningdevkit.LDKNodeFFI</string>
<key>CFBundleName</key>
<string>LDKNodeFFI</string>
<key>CFBundleVersion</key>
<string>0.3.0</string>
<key>CFBundleShortVersionString</key>
<string>0.3.0</string>
<key>CFBundleExecutable</key>
<string>LDKNodeFFI</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>org.lightningdevkit.LDKNodeFFI</string>
<key>CFBundleName</key>
<string>LDKNodeFFI</string>
<key>CFBundleVersion</key>
<string>0.3.0</string>
<key>CFBundleShortVersionString</key>
<string>0.3.0</string>
<key>CFBundleExecutable</key>
<string>LDKNodeFFI</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
</dict>
</plist>
Loading

0 comments on commit 6797574

Please sign in to comment.