Skip to content

Commit 83b1acd

Browse files
committed
Merge remote-tracking branch 'refs/remotes/upstream/release/0.6'
# Conflicts: # Cargo.toml # Package.swift # bindings/kotlin/ldk-node-android/gradle.properties
2 parents 3d89630 + 93858b3 commit 83b1acd

7 files changed

Lines changed: 66 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# 0.6.1 - Jun. 19, 2025
2+
This patch release fixes minor issues with the recently-exposed `Bolt11Invoice`
3+
type in bindings.
4+
5+
## Feature and API updates
6+
- The `Bolt11Invoice::description` method is now exposed as
7+
`Bolt11Invoice::invoice_description` in bindings, to avoid collisions with a
8+
Swift standard method of same name (#576)
9+
10+
## Bug Fixes and Improvements
11+
- The `Display` implementation of `Bolt11Invoice` is now exposed in bindings,
12+
(re-)allowing to render the invoice as a string. (#574)
13+
14+
In total, this release features 9 files changed, 549 insertions, 83 deletions,
15+
in 8 commits from 1 author in alphabetical order:
16+
17+
- Elias Rohrer
18+
119
# 0.6.0 - Jun. 9, 2025
220
This sixth minor release mainly fixes an issue that could have left the
321
on-chain wallet unable to spend funds if transactions that had previously been
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.6.0
3+
libraryVersion=0.6.1

bindings/ldk_node.udl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ dictionary RouteHintHop {
742742
RoutingFees fees;
743743
};
744744

745+
[Traits=(Debug, Display, Eq)]
745746
interface Bolt11Invoice {
746747
[Throws=NodeError, Name=from_str]
747748
constructor([ByRef] string invoice_str);
@@ -754,7 +755,7 @@ interface Bolt11Invoice {
754755
u64 seconds_until_expiry();
755756
boolean is_expired();
756757
boolean would_expire(u64 at_time_seconds);
757-
Bolt11InvoiceDescription description();
758+
Bolt11InvoiceDescription invoice_description();
758759
u64 min_final_cltv_expiry_delta();
759760
Network network();
760761
Currency currency();

bindings/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ldk_node"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
authors = [
55
{ name="Elias Rohrer", email="dev@tnull.de" },
66
]

bindings/swift/Sources/LDKNode/LDKNode.swift

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,12 @@ public protocol Bolt11InvoiceProtocol : AnyObject {
517517

518518
func currency() -> Currency
519519

520-
func description() -> Bolt11InvoiceDescription
521-
522520
func expiryTimeSeconds() -> UInt64
523521

524522
func fallbackAddresses() -> [Address]
525523

524+
func invoiceDescription() -> Bolt11InvoiceDescription
525+
526526
func isExpired() -> Bool
527527

528528
func minFinalCltvExpiryDelta() -> UInt64
@@ -548,6 +548,9 @@ public protocol Bolt11InvoiceProtocol : AnyObject {
548548
}
549549

550550
open class Bolt11Invoice:
551+
CustomDebugStringConvertible,
552+
CustomStringConvertible,
553+
Equatable,
551554
Bolt11InvoiceProtocol {
552555
fileprivate let pointer: UnsafeMutableRawPointer!
553556

@@ -610,13 +613,6 @@ open func currency() -> Currency {
610613
})
611614
}
612615

613-
open func description() -> Bolt11InvoiceDescription {
614-
return try! FfiConverterTypeBolt11InvoiceDescription.lift(try! rustCall() {
615-
uniffi_ldk_node_fn_method_bolt11invoice_description(self.uniffiClonePointer(),$0
616-
)
617-
})
618-
}
619-
620616
open func expiryTimeSeconds() -> UInt64 {
621617
return try! FfiConverterUInt64.lift(try! rustCall() {
622618
uniffi_ldk_node_fn_method_bolt11invoice_expiry_time_seconds(self.uniffiClonePointer(),$0
@@ -631,6 +627,13 @@ open func fallbackAddresses() -> [Address] {
631627
})
632628
}
633629

630+
open func invoiceDescription() -> Bolt11InvoiceDescription {
631+
return try! FfiConverterTypeBolt11InvoiceDescription.lift(try! rustCall() {
632+
uniffi_ldk_node_fn_method_bolt11invoice_invoice_description(self.uniffiClonePointer(),$0
633+
)
634+
})
635+
}
636+
634637
open func isExpired() -> Bool {
635638
return try! FfiConverterBool.lift(try! rustCall() {
636639
uniffi_ldk_node_fn_method_bolt11invoice_is_expired(self.uniffiClonePointer(),$0
@@ -709,6 +712,31 @@ open func wouldExpire(atTimeSeconds: UInt64) -> Bool {
709712
})
710713
}
711714

715+
open var debugDescription: String {
716+
return try! FfiConverterString.lift(
717+
try! rustCall() {
718+
uniffi_ldk_node_fn_method_bolt11invoice_uniffi_trait_debug(self.uniffiClonePointer(),$0
719+
)
720+
}
721+
)
722+
}
723+
open var description: String {
724+
return try! FfiConverterString.lift(
725+
try! rustCall() {
726+
uniffi_ldk_node_fn_method_bolt11invoice_uniffi_trait_display(self.uniffiClonePointer(),$0
727+
)
728+
}
729+
)
730+
}
731+
public static func == (self: Bolt11Invoice, other: Bolt11Invoice) -> Bool {
732+
return try! FfiConverterBool.lift(
733+
try! rustCall() {
734+
uniffi_ldk_node_fn_method_bolt11invoice_uniffi_trait_eq_eq(self.uniffiClonePointer(),
735+
FfiConverterTypeBolt11Invoice.lower(other),$0
736+
)
737+
}
738+
)
739+
}
712740

713741
}
714742

@@ -9717,15 +9745,15 @@ private var initializationResult: InitializationResult {
97179745
if (uniffi_ldk_node_checksum_method_bolt11invoice_currency() != 32179) {
97189746
return InitializationResult.apiChecksumMismatch
97199747
}
9720-
if (uniffi_ldk_node_checksum_method_bolt11invoice_description() != 9887) {
9721-
return InitializationResult.apiChecksumMismatch
9722-
}
97239748
if (uniffi_ldk_node_checksum_method_bolt11invoice_expiry_time_seconds() != 23625) {
97249749
return InitializationResult.apiChecksumMismatch
97259750
}
97269751
if (uniffi_ldk_node_checksum_method_bolt11invoice_fallback_addresses() != 55276) {
97279752
return InitializationResult.apiChecksumMismatch
97289753
}
9754+
if (uniffi_ldk_node_checksum_method_bolt11invoice_invoice_description() != 395) {
9755+
return InitializationResult.apiChecksumMismatch
9756+
}
97299757
if (uniffi_ldk_node_checksum_method_bolt11invoice_is_expired() != 15932) {
97309758
return InitializationResult.apiChecksumMismatch
97319759
}

src/payment/unified_qr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ impl UnifiedQrPayment {
187187
/// [BIP 21]: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
188188
/// [`PaymentId`]: lightning::ln::channelmanager::PaymentId
189189
/// [`Txid`]: bitcoin::hash_types::Txid
190+
#[derive(Debug)]
190191
pub enum QrPaymentResult {
191192
/// An on-chain payment.
192193
Onchain {

src/uniffi_types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl From<lightning::routing::router::RouteHintHop> for RouteHintHop {
471471
/// Represents a syntactically and semantically correct lightning BOLT11 invoice.
472472
#[derive(Debug, Clone, PartialEq, Eq)]
473473
pub struct Bolt11Invoice {
474-
pub inner: LdkBolt11Invoice,
474+
pub(crate) inner: LdkBolt11Invoice,
475475
}
476476

477477
impl Bolt11Invoice {
@@ -535,7 +535,7 @@ impl Bolt11Invoice {
535535
}
536536

537537
/// Return the description or a hash of it for longer ones
538-
pub fn description(&self) -> Bolt11InvoiceDescription {
538+
pub fn invoice_description(&self) -> Bolt11InvoiceDescription {
539539
self.inner.description().into()
540540
}
541541

@@ -731,7 +731,7 @@ mod tests {
731731
let (ldk_invoice, wrapped_invoice) = create_test_invoice();
732732

733733
let ldk_description = ldk_invoice.description();
734-
let wrapped_description = wrapped_invoice.description();
734+
let wrapped_description = wrapped_invoice.invoice_description();
735735

736736
match (ldk_description, &wrapped_description) {
737737
(

0 commit comments

Comments
 (0)