3 public class ChannelHandshakeConfig {
5 public internal(set) var cOpaqueStruct: LDKChannelHandshakeConfig?;
7 /* DEFAULT_CONSTRUCTOR_START */
10 self.cOpaqueStruct = ChannelHandshakeConfig_default()
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKChannelHandshakeConfig){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_minimum_depth() -> UInt32 {
22 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
23 ChannelHandshakeConfig_get_minimum_depth(this_ptrPointer)
27 public func set_minimum_depth(val: UInt32) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return ChannelHandshakeConfig_set_minimum_depth(this_ptrPointer, val);
35 public func get_our_to_self_delay() -> UInt16 {
37 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
38 ChannelHandshakeConfig_get_our_to_self_delay(this_ptrPointer)
42 public func set_our_to_self_delay(val: UInt16) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return ChannelHandshakeConfig_set_our_to_self_delay(this_ptrPointer, val);
50 public func get_our_htlc_minimum_msat() -> UInt64 {
52 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
53 ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptrPointer)
57 public func set_our_htlc_minimum_msat(val: UInt64) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptrPointer, val);
65 public func clone(orig: ChannelHandshakeConfig) -> ChannelHandshakeConfig {
67 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
68 ChannelHandshakeConfig(pointer: ChannelHandshakeConfig_clone(origPointer))
74 if self.cOpaqueStruct?.is_owned == false {
78 ChannelHandshakeConfig_free(self.cOpaqueStruct!)
84 /* STRUCT_METHODS_END */