Skip to content

Commit ec2b24d

Browse files
committed
Update Swift files for v0.6.1
1 parent efa5b73 commit ec2b24d

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

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
}

0 commit comments

Comments
 (0)