3 public class ChannelHandshakeLimits {
5 public internal(set) var cOpaqueStruct: LDKChannelHandshakeLimits?;
7 /* DEFAULT_CONSTRUCTOR_START */
10 self.cOpaqueStruct = ChannelHandshakeLimits_default()
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKChannelHandshakeLimits){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_min_funding_satoshis() -> UInt64 {
22 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
23 ChannelHandshakeLimits_get_min_funding_satoshis(this_ptrPointer)
27 public func set_min_funding_satoshis(val: UInt64) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptrPointer, val);
35 public func get_max_htlc_minimum_msat() -> UInt64 {
37 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
38 ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptrPointer)
42 public func set_max_htlc_minimum_msat(val: UInt64) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptrPointer, val);
50 public func get_min_max_htlc_value_in_flight_msat() -> UInt64 {
52 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
53 ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptrPointer)
57 public func set_min_max_htlc_value_in_flight_msat(val: UInt64) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptrPointer, val);
65 public func get_max_channel_reserve_satoshis() -> UInt64 {
67 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
68 ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptrPointer)
72 public func set_max_channel_reserve_satoshis(val: UInt64) -> Void {
74 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
75 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
77 return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptrPointer, val);
80 public func get_min_max_accepted_htlcs() -> UInt16 {
82 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
83 ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptrPointer)
87 public func set_min_max_accepted_htlcs(val: UInt16) -> Void {
89 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
90 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
92 return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptrPointer, val);
95 public func get_max_minimum_depth() -> UInt32 {
97 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
98 ChannelHandshakeLimits_get_max_minimum_depth(this_ptrPointer)
102 public func set_max_minimum_depth(val: UInt32) -> Void {
104 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
105 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
107 return ChannelHandshakeLimits_set_max_minimum_depth(this_ptrPointer, val);
110 public func get_force_announced_channel_preference() -> Bool {
112 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
113 ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptrPointer)
117 public func set_force_announced_channel_preference(val: Bool) -> Void {
119 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
120 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
122 return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptrPointer, val);
125 public func get_their_to_self_delay() -> UInt16 {
127 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
128 ChannelHandshakeLimits_get_their_to_self_delay(this_ptrPointer)
132 public func set_their_to_self_delay(val: UInt16) -> Void {
134 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
135 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
137 return ChannelHandshakeLimits_set_their_to_self_delay(this_ptrPointer, val);
140 public func clone(orig: ChannelHandshakeLimits) -> ChannelHandshakeLimits {
142 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
143 ChannelHandshakeLimits(pointer: ChannelHandshakeLimits_clone(origPointer))
149 if self.cOpaqueStruct?.is_owned == false {
153 ChannelHandshakeLimits_free(self.cOpaqueStruct!)
159 /* STRUCT_METHODS_END */