Skip to content

Commit 7fcc5f0

Browse files
committed
fix multi-dimensional array conversion both ways
1 parent 360f169 commit 7fcc5f0

27 files changed

+574
-335
lines changed

bindings/LDK/Bindings.swift

Lines changed: 342 additions & 272 deletions
Large diffs are not rendered by default.

bindings/LDK/structs/BuiltCommitmentTransaction.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ class BuiltCommitmentTransaction {
115115

116116
}
117117

118-
return Bindings.LDKSignature_to_array(nativeType: BuiltCommitmentTransaction_sign(this_argPointer, Bindings.array_to_tuple32(array: funding_key), Bindings.new_LDKu8slice(array: funding_redeemscript), channel_value_satoshis));
118+
119+
let funding_keyPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: funding_key)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
120+
121+
pointer
122+
123+
}
124+
125+
return Bindings.LDKSignature_to_array(nativeType: BuiltCommitmentTransaction_sign(this_argPointer, funding_keyPointer, Bindings.new_LDKu8slice(array: funding_redeemscript), channel_value_satoshis));
119126
}
120127

121128

bindings/LDK/structs/ChannelManager.swift

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ class ChannelManager {
7272

7373
}
7474

75-
return Result_NoneAPIErrorZ(pointer: ChannelManager_close_channel(this_argPointer, Bindings.array_to_tuple32(array: channel_id)));
75+
76+
let channel_idPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: channel_id)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
77+
78+
pointer
79+
80+
}
81+
82+
return Result_NoneAPIErrorZ(pointer: ChannelManager_close_channel(this_argPointer, channel_idPointer));
7683
}
7784

7885
func force_close_channel(this_arg: ChannelManager, channel_id: [UInt8]) -> Result_NoneAPIErrorZ {
@@ -84,7 +91,14 @@ class ChannelManager {
8491

8592
}
8693

87-
return Result_NoneAPIErrorZ(pointer: ChannelManager_force_close_channel(this_argPointer, Bindings.array_to_tuple32(array: channel_id)));
94+
95+
let channel_idPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: channel_id)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
96+
97+
pointer
98+
99+
}
100+
101+
return Result_NoneAPIErrorZ(pointer: ChannelManager_force_close_channel(this_argPointer, channel_idPointer));
88102
}
89103

90104
func force_close_all_channels(this_arg: ChannelManager) -> Void {
@@ -127,10 +141,17 @@ class ChannelManager {
127141

128142
}
129143

130-
return Result_NoneAPIErrorZ(pointer: ChannelManager_funding_transaction_generated(this_argPointer, Bindings.array_to_tuple32(array: temporary_channel_id), Bindings.new_LDKTransaction(array: funding_transaction)));
144+
145+
let temporary_channel_idPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: temporary_channel_id)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
146+
147+
pointer
148+
149+
}
150+
151+
return Result_NoneAPIErrorZ(pointer: ChannelManager_funding_transaction_generated(this_argPointer, temporary_channel_idPointer, Bindings.new_LDKTransaction(array: funding_transaction)));
131152
}
132153

133-
func broadcast_node_announcement(this_arg: ChannelManager, rgb: [UInt8], alias: [UInt8], addresses: [NetAddress]) -> Void {
154+
func broadcast_node_announcement(this_arg: ChannelManager, rgb: [UInt8], alias: [UInt8], addresses: [LDKNetAddress]) -> Void {
134155

135156

136157
let this_argPointer = withUnsafePointer(to: this_arg.cOpaqueStruct!) { (pointer: UnsafePointer<LDKChannelManager>) in
@@ -175,7 +196,14 @@ class ChannelManager {
175196

176197
}
177198

178-
return ChannelManager_fail_htlc_backwards(this_argPointer, Bindings.array_to_tuple32(array: payment_hash));
199+
200+
let payment_hashPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: payment_hash)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
201+
202+
pointer
203+
204+
}
205+
206+
return ChannelManager_fail_htlc_backwards(this_argPointer, payment_hashPointer);
179207
}
180208

181209
func claim_funds(this_arg: ChannelManager, payment_preimage: [UInt8]) -> Bool {

bindings/LDK/structs/ChannelManagerReadArgs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class ChannelManagerReadArgs {
33
var cOpaqueStruct: LDKChannelManagerReadArgs?;
44

55
/* DEFAULT_CONSTRUCTOR_START */
6-
init(keys_manager: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: Watch, tx_broadcaster: BroadcasterInterface, logger: Logger, default_config: UserConfig, channel_monitors: [ChannelMonitor]) {
6+
init(keys_manager: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: Watch, tx_broadcaster: BroadcasterInterface, logger: Logger, default_config: UserConfig, channel_monitors: [LDKChannelMonitor]) {
77

88
let converted_channel_monitors = Bindings.new_LDKCVec_ChannelMonitorZ(array: channel_monitors)
99
self.cOpaqueStruct = ChannelManagerReadArgs_new(keys_manager.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, chain_monitor.cOpaqueStruct!, tx_broadcaster.cOpaqueStruct!, logger.cOpaqueStruct!, default_config.cOpaqueStruct!, converted_channel_monitors)

bindings/LDK/structs/ChannelMonitor.swift

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class ChannelMonitor {
153153
return Bindings.LDKCVec_EventZ_to_array(nativeType: ChannelMonitor_get_and_clear_pending_events(this_argPointer));
154154
}
155155

156-
func get_latest_holder_commitment_txn(this_arg: ChannelMonitor, logger: Logger) -> [LDK[LDKUInt8]] {
156+
func get_latest_holder_commitment_txn(this_arg: ChannelMonitor, logger: Logger) -> [[UInt8]] {
157157

158158

159159
let this_argPointer = withUnsafePointer(to: this_arg.cOpaqueStruct!) { (pointer: UnsafePointer<LDKChannelMonitor>) in
@@ -172,7 +172,7 @@ class ChannelMonitor {
172172
return Bindings.LDKCVec_TransactionZ_to_array(nativeType: ChannelMonitor_get_latest_holder_commitment_txn(this_argPointer, loggerPointer));
173173
}
174174

175-
func block_connected(this_arg: ChannelMonitor, header: [UInt8], txdata: [C2Tuple_usizeTransactionZ], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> [LDKTransactionOutputs] {
175+
func block_connected(this_arg: ChannelMonitor, header: [UInt8], txdata: [LDKC2Tuple_usizeTransactionZ], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> [LDKTransactionOutputs] {
176176

177177

178178
let this_argPointer = withUnsafePointer(to: this_arg.cOpaqueStruct!) { (pointer: UnsafePointer<LDKChannelMonitor>) in
@@ -181,7 +181,14 @@ class ChannelMonitor {
181181

182182
}
183183

184-
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_block_connected(this_argPointer, Bindings.array_to_tuple80(array: header), Bindings.new_LDKCVec_C2Tuple_usizeTransactionZZ(array: txdata), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
184+
185+
let headerPointer = withUnsafePointer(to: Bindings.array_to_tuple80(array: header)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
186+
187+
pointer
188+
189+
}
190+
191+
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_block_connected(this_argPointer, headerPointer, Bindings.new_LDKCVec_C2Tuple_usizeTransactionZZ(array: txdata), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
185192
}
186193

187194
func block_disconnected(this_arg: ChannelMonitor, header: [UInt8], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> Void {
@@ -193,10 +200,17 @@ class ChannelMonitor {
193200

194201
}
195202

196-
return ChannelMonitor_block_disconnected(this_argPointer, Bindings.array_to_tuple80(array: header), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!);
203+
204+
let headerPointer = withUnsafePointer(to: Bindings.array_to_tuple80(array: header)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
205+
206+
pointer
207+
208+
}
209+
210+
return ChannelMonitor_block_disconnected(this_argPointer, headerPointer, height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!);
197211
}
198212

199-
func transactions_confirmed(this_arg: ChannelMonitor, header: [UInt8], txdata: [C2Tuple_usizeTransactionZ], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> [LDKTransactionOutputs] {
213+
func transactions_confirmed(this_arg: ChannelMonitor, header: [UInt8], txdata: [LDKC2Tuple_usizeTransactionZ], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> [LDKTransactionOutputs] {
200214

201215

202216
let this_argPointer = withUnsafePointer(to: this_arg.cOpaqueStruct!) { (pointer: UnsafePointer<LDKChannelMonitor>) in
@@ -205,7 +219,14 @@ class ChannelMonitor {
205219

206220
}
207221

208-
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_transactions_confirmed(this_argPointer, Bindings.array_to_tuple80(array: header), Bindings.new_LDKCVec_C2Tuple_usizeTransactionZZ(array: txdata), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
222+
223+
let headerPointer = withUnsafePointer(to: Bindings.array_to_tuple80(array: header)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
224+
225+
pointer
226+
227+
}
228+
229+
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_transactions_confirmed(this_argPointer, headerPointer, Bindings.new_LDKCVec_C2Tuple_usizeTransactionZZ(array: txdata), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
209230
}
210231

211232
func transaction_unconfirmed(this_arg: ChannelMonitor, txid: [UInt8], broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> Void {
@@ -217,7 +238,14 @@ class ChannelMonitor {
217238

218239
}
219240

220-
return ChannelMonitor_transaction_unconfirmed(this_argPointer, Bindings.array_to_tuple32(array: txid), broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!);
241+
242+
let txidPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: txid)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
243+
244+
pointer
245+
246+
}
247+
248+
return ChannelMonitor_transaction_unconfirmed(this_argPointer, txidPointer, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!);
221249
}
222250

223251
func best_block_updated(this_arg: ChannelMonitor, header: [UInt8], height: UInt32, broadcaster: BroadcasterInterface, fee_estimator: FeeEstimator, logger: Logger) -> [LDKTransactionOutputs] {
@@ -229,7 +257,14 @@ class ChannelMonitor {
229257

230258
}
231259

232-
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_best_block_updated(this_argPointer, Bindings.array_to_tuple80(array: header), height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
260+
261+
let headerPointer = withUnsafePointer(to: Bindings.array_to_tuple80(array: header)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
262+
263+
pointer
264+
265+
}
266+
267+
return Bindings.LDKCVec_TransactionOutputsZ_to_array(nativeType: ChannelMonitor_best_block_updated(this_argPointer, headerPointer, height, broadcaster.cOpaqueStruct!, fee_estimator.cOpaqueStruct!, logger.cOpaqueStruct!));
233268
}
234269

235270
func get_relevant_txids(this_arg: ChannelMonitor) -> [LDKTxid] {

bindings/LDK/structs/CommitmentUpdate.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class CommitmentUpdate {
33
var cOpaqueStruct: LDKCommitmentUpdate?;
44

55
/* DEFAULT_CONSTRUCTOR_START */
6-
init(update_add_htlcs_arg: [UpdateAddHTLC], update_fulfill_htlcs_arg: [UpdateFulfillHTLC], update_fail_htlcs_arg: [UpdateFailHTLC], update_fail_malformed_htlcs_arg: [UpdateFailMalformedHTLC], update_fee_arg: UpdateFee, commitment_signed_arg: CommitmentSigned) {
6+
init(update_add_htlcs_arg: [LDKUpdateAddHTLC], update_fulfill_htlcs_arg: [LDKUpdateFulfillHTLC], update_fail_htlcs_arg: [LDKUpdateFailHTLC], update_fail_malformed_htlcs_arg: [LDKUpdateFailMalformedHTLC], update_fee_arg: UpdateFee, commitment_signed_arg: CommitmentSigned) {
77

88
let converted_update_add_htlcs_arg = Bindings.new_LDKCVec_UpdateAddHTLCZ(array: update_add_htlcs_arg)
99
let converted_update_fulfill_htlcs_arg = Bindings.new_LDKCVec_UpdateFulfillHTLCZ(array: update_fulfill_htlcs_arg)
@@ -19,7 +19,7 @@ class CommitmentUpdate {
1919

2020
/* STRUCT_METHODS_START */
2121

22-
func set_update_add_htlcs(val: [UpdateAddHTLC]) -> Void {
22+
func set_update_add_htlcs(val: [LDKUpdateAddHTLC]) -> Void {
2323

2424

2525
let this_ptrPointer = withUnsafeMutablePointer(to: &self.cOpaqueStruct!) { (pointer: UnsafeMutablePointer<LDKCommitmentUpdate>) in
@@ -31,7 +31,7 @@ class CommitmentUpdate {
3131
return CommitmentUpdate_set_update_add_htlcs(this_ptrPointer, Bindings.new_LDKCVec_UpdateAddHTLCZ(array: val));
3232
}
3333

34-
func set_update_fulfill_htlcs(val: [UpdateFulfillHTLC]) -> Void {
34+
func set_update_fulfill_htlcs(val: [LDKUpdateFulfillHTLC]) -> Void {
3535

3636

3737
let this_ptrPointer = withUnsafeMutablePointer(to: &self.cOpaqueStruct!) { (pointer: UnsafeMutablePointer<LDKCommitmentUpdate>) in
@@ -43,7 +43,7 @@ class CommitmentUpdate {
4343
return CommitmentUpdate_set_update_fulfill_htlcs(this_ptrPointer, Bindings.new_LDKCVec_UpdateFulfillHTLCZ(array: val));
4444
}
4545

46-
func set_update_fail_htlcs(val: [UpdateFailHTLC]) -> Void {
46+
func set_update_fail_htlcs(val: [LDKUpdateFailHTLC]) -> Void {
4747

4848

4949
let this_ptrPointer = withUnsafeMutablePointer(to: &self.cOpaqueStruct!) { (pointer: UnsafeMutablePointer<LDKCommitmentUpdate>) in
@@ -55,7 +55,7 @@ class CommitmentUpdate {
5555
return CommitmentUpdate_set_update_fail_htlcs(this_ptrPointer, Bindings.new_LDKCVec_UpdateFailHTLCZ(array: val));
5656
}
5757

58-
func set_update_fail_malformed_htlcs(val: [UpdateFailMalformedHTLC]) -> Void {
58+
func set_update_fail_malformed_htlcs(val: [LDKUpdateFailMalformedHTLC]) -> Void {
5959

6060

6161
let this_ptrPointer = withUnsafeMutablePointer(to: &self.cOpaqueStruct!) { (pointer: UnsafeMutablePointer<LDKCommitmentUpdate>) in

bindings/LDK/structs/KeysManager.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ class KeysManager {
2424

2525
}
2626

27-
return InMemorySigner(pointer: KeysManager_derive_channel_keys(this_argPointer, channel_value_satoshis, Bindings.array_to_tuple32(array: params)));
27+
28+
let paramsPointer = withUnsafePointer(to: Bindings.array_to_tuple32(array: params)) { (pointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
29+
30+
pointer
31+
32+
}
33+
34+
return InMemorySigner(pointer: KeysManager_derive_channel_keys(this_argPointer, channel_value_satoshis, paramsPointer));
2835
}
2936

30-
func spend_spendable_outputs(this_arg: KeysManager, descriptors: [SpendableOutputDescriptor], outputs: [TxOut], change_destination_script: [UInt8], feerate_sat_per_1000_weight: UInt32) -> Result_TransactionNoneZ {
37+
func spend_spendable_outputs(this_arg: KeysManager, descriptors: [LDKSpendableOutputDescriptor], outputs: [LDKTxOut], change_destination_script: [UInt8], feerate_sat_per_1000_weight: UInt32) -> Result_TransactionNoneZ {
3138

3239

3340
let this_argPointer = withUnsafePointer(to: this_arg.cOpaqueStruct!) { (pointer: UnsafePointer<LDKKeysManager>) in

bindings/LDK/structs/NetGraphMsgHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class NetGraphMsgHandler {
2222

2323
/* STRUCT_METHODS_START */
2424

25-
func add_chain_access(&this_arg: NetGraphMsgHandler, &chain_access: Access) -> Void {
25+
func add_chain_access(this_arg: NetGraphMsgHandler, chain_access: Access) -> Void {
2626

2727

2828
let this_argPointer = withUnsafeMutablePointer(to: &this_arg.cOpaqueStruct!) { (pointer: UnsafeMutablePointer<LDKNetGraphMsgHandler>) in

0 commit comments

Comments
 (0)