Skip to content

Commit ff9782b

Browse files
authored
Merge pull request #582 from tnull/2025-06-cut-0.6.1-main
Update `main` post-0.6.1 release
2 parents 2a0d2b6 + ec2b24d commit ff9782b

File tree

4 files changed

+61
-15
lines changed

4 files changed

+61
-15
lines changed

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

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import PackageDescription
55

6-
let tag = "v0.6.0"
7-
let checksum = "8bda396624134e0b592bfcc2f977b9aa5ce8c2ee359c032ae3520869ece8851c"
6+
let tag = "v0.6.1"
7+
let checksum = "73f53b615d5bfdf76f2e7233bde17a2a62631292ce506763a7150344230859c8"
88
let url = "https://github.com/lightningdevkit/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"
99

1010
let package = Package(

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

@@ -9451,15 +9479,15 @@ private var initializationResult: InitializationResult {
94519479
if (uniffi_ldk_node_checksum_method_bolt11invoice_currency() != 32179) {
94529480
return InitializationResult.apiChecksumMismatch
94539481
}
9454-
if (uniffi_ldk_node_checksum_method_bolt11invoice_description() != 9887) {
9455-
return InitializationResult.apiChecksumMismatch
9456-
}
94579482
if (uniffi_ldk_node_checksum_method_bolt11invoice_expiry_time_seconds() != 23625) {
94589483
return InitializationResult.apiChecksumMismatch
94599484
}
94609485
if (uniffi_ldk_node_checksum_method_bolt11invoice_fallback_addresses() != 55276) {
94619486
return InitializationResult.apiChecksumMismatch
94629487
}
9488+
if (uniffi_ldk_node_checksum_method_bolt11invoice_invoice_description() != 395) {
9489+
return InitializationResult.apiChecksumMismatch
9490+
}
94639491
if (uniffi_ldk_node_checksum_method_bolt11invoice_is_expired() != 15932) {
94649492
return InitializationResult.apiChecksumMismatch
94659493
}

src/ffi/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ mod tests {
12621262
let (ldk_invoice, wrapped_invoice) = create_test_bolt11_invoice();
12631263

12641264
let ldk_description = ldk_invoice.description();
1265-
let wrapped_description = wrapped_invoice.description();
1265+
let wrapped_description = wrapped_invoice.invoice_description();
12661266

12671267
match (ldk_description, &wrapped_description) {
12681268
(

0 commit comments

Comments
 (0)