Skip to content

Commit 407fdf6

Browse files
committed
Fix snakeCaseToCamelCase for numbers
1 parent a7a6d63 commit 407fdf6

File tree

13 files changed

+57
-57
lines changed

13 files changed

+57
-57
lines changed

ci/LDKSwift/Tests/LDKSwiftTests/TestFeeEstimator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import LDKHeaders
1212

1313
class TestFeeEstimator: FeeEstimator {
1414

15-
override func getEstSatPer_1000Weight(confirmationTarget: Bindings.ConfirmationTarget) -> UInt32 {
15+
override func getEstSatPer1000Weight(confirmationTarget: Bindings.ConfirmationTarget) -> UInt32 {
1616
return 253
1717
}
1818

out/VersionDescriptor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
extension Bindings {
77
public class func getLDKSwiftBindingsSerializationHash() -> String {
8-
return "964b38488b436a097586f98f84951d7e3566c3d1d1d8b0bf383bf940bed08e0e"
8+
return "2fdc205fed85b2dc61e1bc11e3e7fb6baa61c5e88dfb520393f87f92d9e1bffb"
99
}
1010
public class func getLDKSwiftBindingsVersion() -> String {
11-
return "1138482"
11+
return "0.0.113-7-g49aa7e0"
1212
}
1313
public class func getLDKSwiftBindingsCommitHash() -> String {
14-
return "1138482637e1b426a7852c1af36611ba3d0ba308"
14+
return "49aa7e070bad5335a285550e89a5342bddac69f1"
1515
}
1616
}
1717

out/structs/ChannelAnnouncement.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262

6363
/// Authentication of the announcement by the first public node
64-
public func getNodeSignature_1() -> [UInt8] {
64+
public func getNodeSignature1() -> [UInt8] {
6565
// native call variable prep
6666

6767

@@ -84,7 +84,7 @@
8484
}
8585

8686
/// Authentication of the announcement by the first public node
87-
public func setNodeSignature_1(val: [UInt8]) {
87+
public func setNodeSignature1(val: [UInt8]) {
8888
// native call variable prep
8989

9090
let valPrimitiveWrapper = Signature(value: val)
@@ -112,7 +112,7 @@
112112
}
113113

114114
/// Authentication of the announcement by the second public node
115-
public func getNodeSignature_2() -> [UInt8] {
115+
public func getNodeSignature2() -> [UInt8] {
116116
// native call variable prep
117117

118118

@@ -135,7 +135,7 @@
135135
}
136136

137137
/// Authentication of the announcement by the second public node
138-
public func setNodeSignature_2(val: [UInt8]) {
138+
public func setNodeSignature2(val: [UInt8]) {
139139
// native call variable prep
140140

141141
let valPrimitiveWrapper = Signature(value: val)
@@ -163,7 +163,7 @@
163163
}
164164

165165
/// Proof of funding UTXO ownership by the first public node
166-
public func getBitcoinSignature_1() -> [UInt8] {
166+
public func getBitcoinSignature1() -> [UInt8] {
167167
// native call variable prep
168168

169169

@@ -186,7 +186,7 @@
186186
}
187187

188188
/// Proof of funding UTXO ownership by the first public node
189-
public func setBitcoinSignature_1(val: [UInt8]) {
189+
public func setBitcoinSignature1(val: [UInt8]) {
190190
// native call variable prep
191191

192192
let valPrimitiveWrapper = Signature(value: val)
@@ -214,7 +214,7 @@
214214
}
215215

216216
/// Proof of funding UTXO ownership by the second public node
217-
public func getBitcoinSignature_2() -> [UInt8] {
217+
public func getBitcoinSignature2() -> [UInt8] {
218218
// native call variable prep
219219

220220

@@ -237,7 +237,7 @@
237237
}
238238

239239
/// Proof of funding UTXO ownership by the second public node
240-
public func setBitcoinSignature_2(val: [UInt8]) {
240+
public func setBitcoinSignature2(val: [UInt8]) {
241241
// native call variable prep
242242

243243
let valPrimitiveWrapper = Signature(value: val)
@@ -311,34 +311,34 @@
311311
}
312312

313313
/// Constructs a new ChannelAnnouncement given each field
314-
public init(nodeSignature_1Arg: [UInt8], nodeSignature_2Arg: [UInt8], bitcoinSignature_1Arg: [UInt8], bitcoinSignature_2Arg: [UInt8], contentsArg: UnsignedChannelAnnouncement) {
314+
public init(nodeSignature1Arg: [UInt8], nodeSignature2Arg: [UInt8], bitcoinSignature1Arg: [UInt8], bitcoinSignature2Arg: [UInt8], contentsArg: UnsignedChannelAnnouncement) {
315315
// native call variable prep
316316

317-
let nodeSignature_1ArgPrimitiveWrapper = Signature(value: nodeSignature_1Arg)
317+
let nodeSignature1ArgPrimitiveWrapper = Signature(value: nodeSignature1Arg)
318318

319-
let nodeSignature_2ArgPrimitiveWrapper = Signature(value: nodeSignature_2Arg)
319+
let nodeSignature2ArgPrimitiveWrapper = Signature(value: nodeSignature2Arg)
320320

321-
let bitcoinSignature_1ArgPrimitiveWrapper = Signature(value: bitcoinSignature_1Arg)
321+
let bitcoinSignature1ArgPrimitiveWrapper = Signature(value: bitcoinSignature1Arg)
322322

323-
let bitcoinSignature_2ArgPrimitiveWrapper = Signature(value: bitcoinSignature_2Arg)
323+
let bitcoinSignature2ArgPrimitiveWrapper = Signature(value: bitcoinSignature2Arg)
324324

325325

326326
// native method call
327-
let nativeCallResult = ChannelAnnouncement_new(nodeSignature_1ArgPrimitiveWrapper.cType!, nodeSignature_2ArgPrimitiveWrapper.cType!, bitcoinSignature_1ArgPrimitiveWrapper.cType!, bitcoinSignature_2ArgPrimitiveWrapper.cType!, contentsArg.dynamicallyDangledClone().cType!)
327+
let nativeCallResult = ChannelAnnouncement_new(nodeSignature1ArgPrimitiveWrapper.cType!, nodeSignature2ArgPrimitiveWrapper.cType!, bitcoinSignature1ArgPrimitiveWrapper.cType!, bitcoinSignature2ArgPrimitiveWrapper.cType!, contentsArg.dynamicallyDangledClone().cType!)
328328

329329
// cleanup
330330

331331
// for elided types, we need this
332-
nodeSignature_1ArgPrimitiveWrapper.noOpRetain()
332+
nodeSignature1ArgPrimitiveWrapper.noOpRetain()
333333

334334
// for elided types, we need this
335-
nodeSignature_2ArgPrimitiveWrapper.noOpRetain()
335+
nodeSignature2ArgPrimitiveWrapper.noOpRetain()
336336

337337
// for elided types, we need this
338-
bitcoinSignature_1ArgPrimitiveWrapper.noOpRetain()
338+
bitcoinSignature1ArgPrimitiveWrapper.noOpRetain()
339339

340340
// for elided types, we need this
341-
bitcoinSignature_2ArgPrimitiveWrapper.noOpRetain()
341+
bitcoinSignature2ArgPrimitiveWrapper.noOpRetain()
342342

343343
self.initialCFreeability = nativeCallResult.is_owned
344344

out/structs/ChannelHandshakeLimits.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
/// `true` (0) and `false` (1).
468468
///
469469
/// Default value: true
470-
public func getTrustOwnFunding_0conf() -> Bool {
470+
public func getTrustOwnFunding0conf() -> Bool {
471471
// native call variable prep
472472

473473

@@ -506,7 +506,7 @@
506506
/// `true` (0) and `false` (1).
507507
///
508508
/// Default value: true
509-
public func setTrustOwnFunding_0conf(val: Bool) {
509+
public func setTrustOwnFunding0conf(val: Bool) {
510510
// native call variable prep
511511

512512

@@ -647,12 +647,12 @@
647647
}
648648

649649
/// Constructs a new ChannelHandshakeLimits given each field
650-
public init(minFundingSatoshisArg: UInt64, maxFundingSatoshisArg: UInt64, maxHtlcMinimumMsatArg: UInt64, minMaxHtlcValueInFlightMsatArg: UInt64, maxChannelReserveSatoshisArg: UInt64, minMaxAcceptedHtlcsArg: UInt16, maxMinimumDepthArg: UInt32, trustOwnFunding_0confArg: Bool, forceAnnouncedChannelPreferenceArg: Bool, theirToSelfDelayArg: UInt16) {
650+
public init(minFundingSatoshisArg: UInt64, maxFundingSatoshisArg: UInt64, maxHtlcMinimumMsatArg: UInt64, minMaxHtlcValueInFlightMsatArg: UInt64, maxChannelReserveSatoshisArg: UInt64, minMaxAcceptedHtlcsArg: UInt16, maxMinimumDepthArg: UInt32, trustOwnFunding0confArg: Bool, forceAnnouncedChannelPreferenceArg: Bool, theirToSelfDelayArg: UInt16) {
651651
// native call variable prep
652652

653653

654654
// native method call
655-
let nativeCallResult = ChannelHandshakeLimits_new(minFundingSatoshisArg, maxFundingSatoshisArg, maxHtlcMinimumMsatArg, minMaxHtlcValueInFlightMsatArg, maxChannelReserveSatoshisArg, minMaxAcceptedHtlcsArg, maxMinimumDepthArg, trustOwnFunding_0confArg, forceAnnouncedChannelPreferenceArg, theirToSelfDelayArg)
655+
let nativeCallResult = ChannelHandshakeLimits_new(minFundingSatoshisArg, maxFundingSatoshisArg, maxHtlcMinimumMsatArg, minMaxHtlcValueInFlightMsatArg, maxChannelReserveSatoshisArg, minMaxAcceptedHtlcsArg, maxMinimumDepthArg, trustOwnFunding0confArg, forceAnnouncedChannelPreferenceArg, theirToSelfDelayArg)
656656

657657
// cleanup
658658

out/structs/ChannelManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@
371371
/// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
372372
/// [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
373373
/// [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
374-
public func closeChannelWithTargetFeerate(channelId: [UInt8], counterpartyNodeId: [UInt8], targetFeerateSatsPer_1000Weight: UInt32) -> Result_NoneAPIErrorZ {
374+
public func closeChannelWithTargetFeerate(channelId: [UInt8], counterpartyNodeId: [UInt8], targetFeerateSatsPer1000Weight: UInt32) -> Result_NoneAPIErrorZ {
375375
// native call variable prep
376376

377377
let tupledChannelId = Bindings.arrayToUInt8Tuple32(array: channelId)
@@ -384,7 +384,7 @@
384384
withUnsafePointer(to: self.cType!) { (thisArgPointer: UnsafePointer<LDKChannelManager>) in
385385

386386
withUnsafePointer(to: tupledChannelId) { (tupledChannelIdPointer: UnsafePointer<UInt8Tuple32>) in
387-
ChannelManager_close_channel_with_target_feerate(thisArgPointer, tupledChannelIdPointer, counterpartyNodeIdPrimitiveWrapper.cType!, targetFeerateSatsPer_1000Weight)
387+
ChannelManager_close_channel_with_target_feerate(thisArgPointer, tupledChannelIdPointer, counterpartyNodeIdPrimitiveWrapper.cType!, targetFeerateSatsPer1000Weight)
388388
}
389389

390390
}
@@ -1247,7 +1247,7 @@
12471247
///
12481248
/// [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
12491249
/// [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
1250-
public func acceptInboundChannelFromTrustedPeer_0conf(temporaryChannelId: [UInt8], counterpartyNodeId: [UInt8], userChannelId: [UInt8]) -> Result_NoneAPIErrorZ {
1250+
public func acceptInboundChannelFromTrustedPeer0conf(temporaryChannelId: [UInt8], counterpartyNodeId: [UInt8], userChannelId: [UInt8]) -> Result_NoneAPIErrorZ {
12511251
// native call variable prep
12521252

12531253
let tupledTemporaryChannelId = Bindings.arrayToUInt8Tuple32(array: temporaryChannelId)

out/structs/KeysManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
///
175175
/// May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
176176
/// this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
177-
public func spendSpendableOutputs(descriptors: [SpendableOutputDescriptor], outputs: [TxOut], changeDestinationScript: [UInt8], feerateSatPer_1000Weight: UInt32) -> Result_TransactionNoneZ {
177+
public func spendSpendableOutputs(descriptors: [SpendableOutputDescriptor], outputs: [TxOut], changeDestinationScript: [UInt8], feerateSatPer1000Weight: UInt32) -> Result_TransactionNoneZ {
178178
// native call variable prep
179179

180180
let descriptorsVector = Vec_SpendableOutputDescriptorZ(array: descriptors).dangle()
@@ -187,7 +187,7 @@
187187
// native method call
188188
let nativeCallResult =
189189
withUnsafePointer(to: self.cType!) { (thisArgPointer: UnsafePointer<LDKKeysManager>) in
190-
KeysManager_spend_spendable_outputs(thisArgPointer, descriptorsVector.cType!, outputsVector.cType!, changeDestinationScriptVector.cType!, feerateSatPer_1000Weight)
190+
KeysManager_spend_spendable_outputs(thisArgPointer, descriptorsVector.cType!, outputsVector.cType!, changeDestinationScriptVector.cType!, feerateSatPer1000Weight)
191191
}
192192

193193

out/structs/NetworkGraph.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,28 +377,28 @@
377377
/// rapid gossip sync server)
378378
///
379379
/// All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
380-
public func addChannelFromPartialAnnouncement(shortChannelId: UInt64, timestamp: UInt64, features: ChannelFeatures, nodeId_1: [UInt8], nodeId_2: [UInt8]) -> Result_NoneLightningErrorZ {
380+
public func addChannelFromPartialAnnouncement(shortChannelId: UInt64, timestamp: UInt64, features: ChannelFeatures, nodeId1: [UInt8], nodeId2: [UInt8]) -> Result_NoneLightningErrorZ {
381381
// native call variable prep
382382

383-
let nodeId_1PrimitiveWrapper = PublicKey(value: nodeId_1)
383+
let nodeId1PrimitiveWrapper = PublicKey(value: nodeId1)
384384

385-
let nodeId_2PrimitiveWrapper = PublicKey(value: nodeId_2)
385+
let nodeId2PrimitiveWrapper = PublicKey(value: nodeId2)
386386

387387

388388
// native method call
389389
let nativeCallResult =
390390
withUnsafePointer(to: self.cType!) { (thisArgPointer: UnsafePointer<LDKNetworkGraph>) in
391-
NetworkGraph_add_channel_from_partial_announcement(thisArgPointer, shortChannelId, timestamp, features.dynamicallyDangledClone().cType!, nodeId_1PrimitiveWrapper.cType!, nodeId_2PrimitiveWrapper.cType!)
391+
NetworkGraph_add_channel_from_partial_announcement(thisArgPointer, shortChannelId, timestamp, features.dynamicallyDangledClone().cType!, nodeId1PrimitiveWrapper.cType!, nodeId2PrimitiveWrapper.cType!)
392392
}
393393

394394

395395
// cleanup
396396

397397
// for elided types, we need this
398-
nodeId_1PrimitiveWrapper.noOpRetain()
398+
nodeId1PrimitiveWrapper.noOpRetain()
399399

400400
// for elided types, we need this
401-
nodeId_2PrimitiveWrapper.noOpRetain()
401+
nodeId2PrimitiveWrapper.noOpRetain()
402402

403403

404404

out/structs/PhantomKeysManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
}
163163

164164
/// See [`KeysManager::spend_spendable_outputs`] for documentation on this method.
165-
public func spendSpendableOutputs(descriptors: [SpendableOutputDescriptor], outputs: [TxOut], changeDestinationScript: [UInt8], feerateSatPer_1000Weight: UInt32) -> Result_TransactionNoneZ {
165+
public func spendSpendableOutputs(descriptors: [SpendableOutputDescriptor], outputs: [TxOut], changeDestinationScript: [UInt8], feerateSatPer1000Weight: UInt32) -> Result_TransactionNoneZ {
166166
// native call variable prep
167167

168168
let descriptorsVector = Vec_SpendableOutputDescriptorZ(array: descriptors).dangle()
@@ -175,7 +175,7 @@
175175
// native method call
176176
let nativeCallResult =
177177
withUnsafePointer(to: self.cType!) { (thisArgPointer: UnsafePointer<LDKPhantomKeysManager>) in
178-
PhantomKeysManager_spend_spendable_outputs(thisArgPointer, descriptorsVector.cType!, outputsVector.cType!, changeDestinationScriptVector.cType!, feerateSatPer_1000Weight)
178+
PhantomKeysManager_spend_spendable_outputs(thisArgPointer, descriptorsVector.cType!, outputsVector.cType!, changeDestinationScriptVector.cType!, feerateSatPer1000Weight)
179179
}
180180

181181

out/structs/UnsignedChannelAnnouncement.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
}
209209

210210
/// One of the two node_ids which are endpoints of this channel
211-
public func getNodeId_1() -> [UInt8] {
211+
public func getNodeId1() -> [UInt8] {
212212
// native call variable prep
213213

214214

@@ -231,7 +231,7 @@
231231
}
232232

233233
/// One of the two node_ids which are endpoints of this channel
234-
public func setNodeId_1(val: [UInt8]) {
234+
public func setNodeId1(val: [UInt8]) {
235235
// native call variable prep
236236

237237
let valPrimitiveWrapper = PublicKey(value: val)
@@ -259,7 +259,7 @@
259259
}
260260

261261
/// The other of the two node_ids which are endpoints of this channel
262-
public func getNodeId_2() -> [UInt8] {
262+
public func getNodeId2() -> [UInt8] {
263263
// native call variable prep
264264

265265

@@ -282,7 +282,7 @@
282282
}
283283

284284
/// The other of the two node_ids which are endpoints of this channel
285-
public func setNodeId_2(val: [UInt8]) {
285+
public func setNodeId2(val: [UInt8]) {
286286
// native call variable prep
287287

288288
let valPrimitiveWrapper = PublicKey(value: val)
@@ -310,7 +310,7 @@
310310
}
311311

312312
/// The funding key for the first node
313-
public func getBitcoinKey_1() -> [UInt8] {
313+
public func getBitcoinKey1() -> [UInt8] {
314314
// native call variable prep
315315

316316

@@ -333,7 +333,7 @@
333333
}
334334

335335
/// The funding key for the first node
336-
public func setBitcoinKey_1(val: [UInt8]) {
336+
public func setBitcoinKey1(val: [UInt8]) {
337337
// native call variable prep
338338

339339
let valPrimitiveWrapper = PublicKey(value: val)
@@ -361,7 +361,7 @@
361361
}
362362

363363
/// The funding key for the second node
364-
public func getBitcoinKey_2() -> [UInt8] {
364+
public func getBitcoinKey2() -> [UInt8] {
365365
// native call variable prep
366366

367367

@@ -384,7 +384,7 @@
384384
}
385385

386386
/// The funding key for the second node
387-
public func setBitcoinKey_2(val: [UInt8]) {
387+
public func setBitcoinKey2(val: [UInt8]) {
388388
// native call variable prep
389389

390390
let valPrimitiveWrapper = PublicKey(value: val)

out/traits/FeeEstimator.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@
5757

5858

5959

60-
func getEstSatPer_1000WeightLambda(this_arg: UnsafeRawPointer?, confirmation_target: LDKConfirmationTarget) -> UInt32 {
61-
let instance: FeeEstimator = Bindings.pointerToInstance(pointer: this_arg!, sourceMarker: "FeeEstimator::getEstSatPer_1000WeightLambda")
60+
func getEstSatPer1000WeightLambda(this_arg: UnsafeRawPointer?, confirmation_target: LDKConfirmationTarget) -> UInt32 {
61+
let instance: FeeEstimator = Bindings.pointerToInstance(pointer: this_arg!, sourceMarker: "FeeEstimator::getEstSatPer1000WeightLambda")
6262

6363
// Swift callback variable prep
6464

6565

6666
// Swift callback call
67-
let swiftCallbackResult = instance.getEstSatPer_1000Weight(confirmationTarget: ConfirmationTarget(value: confirmation_target))
67+
let swiftCallbackResult = instance.getEstSatPer1000Weight(confirmationTarget: ConfirmationTarget(value: confirmation_target))
6868

6969
// cleanup
7070

@@ -96,7 +96,7 @@
9696

9797
self.cType = LDKFeeEstimator(
9898
this_arg: thisArg,
99-
get_est_sat_per_1000_weight: getEstSatPer_1000WeightLambda,
99+
get_est_sat_per_1000_weight: getEstSatPer1000WeightLambda,
100100
free: freeLambda
101101
)
102102
}
@@ -110,9 +110,9 @@
110110
/// The following unit conversions can be used to convert to sats/KW:
111111
/// * satoshis-per-byte * 250
112112
/// * satoshis-per-kbyte / 4
113-
open func getEstSatPer_1000Weight(confirmationTarget: ConfirmationTarget) -> UInt32 {
113+
open func getEstSatPer1000Weight(confirmationTarget: ConfirmationTarget) -> UInt32 {
114114

115-
Bindings.print("Error: FeeEstimator::getEstSatPer_1000Weight MUST be overridden! Offending class: \(String(describing: self)). Aborting.", severity: .ERROR)
115+
Bindings.print("Error: FeeEstimator::getEstSatPer1000Weight MUST be overridden! Offending class: \(String(describing: self)). Aborting.", severity: .ERROR)
116116
abort()
117117
}
118118

@@ -161,7 +161,7 @@
161161
/// The following unit conversions can be used to convert to sats/KW:
162162
/// * satoshis-per-byte * 250
163163
/// * satoshis-per-kbyte / 4
164-
public override func getEstSatPer_1000Weight(confirmationTarget: ConfirmationTarget) -> UInt32 {
164+
public override func getEstSatPer1000Weight(confirmationTarget: ConfirmationTarget) -> UInt32 {
165165
// native call variable prep
166166

167167

0 commit comments

Comments
 (0)