Initial checkin
[ldk-swift-linux] / LDKSwift / Sources / LDKSwift / traits / FeeEstimator.swift
1 import LDKCHeaders
2 import LDKCHeaders
3 open class FeeEstimator {
4
5     public var cOpaqueStruct: LDKFeeEstimator?;
6
7     public init() {
8
9         /* NATIVE_CALLBACKS_START */
10
11                 func get_est_sat_per_1000_weightCallback(pointer: UnsafeRawPointer?, confirmation_target: LDKConfirmationTarget) -> UInt32 {
12                         let instance: FeeEstimator = Bindings.pointerToInstance(pointer: pointer!, sourceMarker: "FeeEstimator.swift::get_est_sat_per_1000_weight")
13                         
14                         return instance.get_est_sat_per_1000_weight(confirmation_target: confirmation_target);
15                 }
16
17                 func freeCallback(pointer: UnsafeMutableRawPointer?) -> Void {
18                         let instance: FeeEstimator = Bindings.pointerToInstance(pointer: pointer!, sourceMarker: "FeeEstimator.swift::free")
19                         
20                         return instance.free();
21                 }
22
23                 /* NATIVE_CALLBACKS_END */
24
25         self.cOpaqueStruct = LDKFeeEstimator(this_arg: Bindings.instanceToPointer(instance: self), 
26                         get_est_sat_per_1000_weight: get_est_sat_per_1000_weightCallback,
27                         free: freeCallback)
28     }
29
30     public init(pointer: LDKFeeEstimator){
31                 self.cOpaqueStruct = pointer
32         }
33
34     /* SWIFT_CALLBACKS_START */
35
36     open func get_est_sat_per_1000_weight(confirmation_target: LDKConfirmationTarget) -> UInt32 {
37         /* EDIT ME */
38                 return 0
39     }
40
41     open func free() -> Void {
42         /* EDIT ME */
43                 
44     }
45
46     /* SWIFT_CALLBACKS_END */
47
48 }
49
50
51 public class NativelyImplementedFeeEstimator: FeeEstimator {
52         /* SWIFT_DEFAULT_CALLBACKS_START */
53
54         public override func get_est_sat_per_1000_weight(confirmation_target: LDKConfirmationTarget) -> UInt32 {
55                 
56                                 return 
57                                 self.cOpaqueStruct!.get_est_sat_per_1000_weight(self.cOpaqueStruct!.this_arg, confirmation_target)
58                                 
59                         
60         }
61
62         public override func free() -> Void {
63                 
64                                 
65                                 self.cOpaqueStruct!.free(self.cOpaqueStruct!.this_arg)
66                                 
67                         
68         }
69
70         /* SWIFT_DEFAULT_CALLBACKS_END */
71 }