@@ -4501,6 +4501,40 @@ withUnsafePointer(to: scorer.cOpaqueStruct!) { (scorerPointer: UnsafePointer<LDK
4501
4501
4502
4502
Result_RouteLightningErrorZ ( pointer: get_keysend_route ( Bindings . new_LDKPublicKey ( array: our_node_pubkey) , networkPointer, Bindings . new_LDKPublicKey ( array: payee) , first_hopsPointer, last_hopsWrapper. dangle ( ) . cOpaqueStruct!, final_value_msat, final_cltv, logger. cOpaqueStruct!, scorerPointer) )
4503
4503
4504
+ }
4505
+ }
4506
+
4507
+ }
4508
+ public class func swift_get_route( our_node_pubkey: [ UInt8 ] , network: NetworkGraph , payee: [ UInt8 ] , payee_features: InvoiceFeatures , first_hops: [ ChannelDetails ] ? , last_hops: [ RouteHint ] , final_value_msat: UInt64 , final_cltv: UInt32 , logger: Logger , scorer: Score ) -> Result_RouteLightningErrorZ {
4509
+
4510
+
4511
+ var first_hopsPointer : UnsafeMutablePointer < LDKCVec_ChannelDetailsZ > ? = nil
4512
+ if let first_hopsUnwrapped = first_hops {
4513
+
4514
+ let first_hopsUnwrapped = first_hopsUnwrapped. map { ( first_hopsCurrentValue) in
4515
+ first_hopsCurrentValue
4516
+ . danglingClone ( ) . cOpaqueStruct!
4517
+ }
4518
+
4519
+ first_hopsPointer = UnsafeMutablePointer< LDKCVec_ChannelDetailsZ> . allocate( capacity: 1 )
4520
+ first_hopsPointer!. initialize ( to: Bindings . new_LDKCVec_ChannelDetailsZWrapper ( array: first_hopsUnwrapped) . cOpaqueStruct!)
4521
+ }
4522
+
4523
+ let last_hopsUnwrapped = last_hops. map { ( last_hopsCurrentValue) in
4524
+ last_hopsCurrentValue
4525
+ . danglingClone ( ) . cOpaqueStruct!
4526
+ }
4527
+
4528
+ let last_hopsWrapper = Bindings . new_LDKCVec_RouteHintZWrapper ( array: last_hopsUnwrapped)
4529
+ defer {
4530
+ last_hopsWrapper. noOpRetain ( )
4531
+ }
4532
+
4533
+ return withUnsafePointer ( to: network. cOpaqueStruct!) { ( networkPointer: UnsafePointer < LDKNetworkGraph > ) in
4534
+ withUnsafePointer ( to: scorer. cOpaqueStruct!) { ( scorerPointer: UnsafePointer < LDKScore > ) in
4535
+
4536
+ Result_RouteLightningErrorZ ( pointer: get_route ( Bindings . new_LDKPublicKey ( array: our_node_pubkey) , networkPointer, Bindings . new_LDKPublicKey ( array: payee) , payee_features. danglingClone ( ) . cOpaqueStruct!, first_hopsPointer, last_hopsWrapper. dangle ( ) . cOpaqueStruct!, final_value_msat, final_cltv, logger. cOpaqueStruct!, scorerPointer) )
4537
+
4504
4538
}
4505
4539
}
4506
4540
@@ -4684,6 +4718,7 @@ withUnsafePointer(to: scorer.cOpaqueStruct!) { (scorerPointer: UnsafePointer<LDK
4684
4718
}
4685
4719
}
4686
4720
4721
+ /*
4687
4722
public class func getRoute(our_node_id: [UInt8], network: NetworkGraph, payee: [UInt8], payee_features: InvoiceFeatures, first_hops: [LDKChannelDetails], last_hops: [LDKRouteHint], final_value_msat: UInt64, final_cltv: UInt32, logger: Logger) -> Result_RouteLightningErrorZ {
4688
4723
return withUnsafePointer(to: network.cOpaqueStruct!) { (networkPointer: UnsafePointer<LDKNetworkGraph>) in
4689
4724
var mutableHops = Bindings.new_LDKCVec_ChannelDetailsZWrapper(array: first_hops).cOpaqueStruct!
@@ -4692,9 +4727,10 @@ withUnsafePointer(to: scorer.cOpaqueStruct!) { (scorerPointer: UnsafePointer<LDK
4692
4727
}
4693
4728
}
4694
4729
}
4730
+ */
4695
4731
4696
4732
public class func get_ldk_swift_bindings_version( ) -> String {
4697
- return " c57f422ea3fecd28800deabc7d81ffed507baa36 "
4733
+ return " 556d959a4572b40920b57394eef4a3c04a514839 "
4698
4734
}
4699
4735
4700
4736
}
0 commit comments