3 public class ClosingSigned {
5 public internal(set) var cOpaqueStruct: LDKClosingSigned?;
7 /* DEFAULT_CONSTRUCTOR_START */
8 public init(channel_id_arg: [UInt8], fee_satoshis_arg: UInt64, signature_arg: [UInt8]) {
10 self.cOpaqueStruct = ClosingSigned_new(Bindings.new_LDKThirtyTwoBytes(array: channel_id_arg), fee_satoshis_arg, Bindings.new_LDKSignature(array: signature_arg))
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKClosingSigned){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_channel_id() -> [UInt8] {
22 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKClosingSigned>) in
23 ClosingSigned_get_channel_id(this_ptrPointer)
27 public func set_channel_id(val: [UInt8]) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKClosingSigned>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return ClosingSigned_set_channel_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
35 public func get_fee_satoshis() -> UInt64 {
37 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKClosingSigned>) in
38 ClosingSigned_get_fee_satoshis(this_ptrPointer)
42 public func set_fee_satoshis(val: UInt64) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKClosingSigned>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return ClosingSigned_set_fee_satoshis(this_ptrPointer, val);
50 public func get_signature() -> [UInt8] {
52 return Bindings.LDKSignature_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKClosingSigned>) in
53 ClosingSigned_get_signature(this_ptrPointer)
57 public func set_signature(val: [UInt8]) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKClosingSigned>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return ClosingSigned_set_signature(this_ptrPointer, Bindings.new_LDKSignature(array: val));
65 public func clone(orig: ClosingSigned) -> ClosingSigned {
67 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKClosingSigned>) in
68 ClosingSigned(pointer: ClosingSigned_clone(origPointer))
72 public func write(obj: ClosingSigned) -> [UInt8] {
74 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKClosingSigned>) in
75 ClosingSigned_write(objPointer)
79 public func read(ser: [UInt8]) -> Result_ClosingSignedDecodeErrorZ {
81 return Result_ClosingSignedDecodeErrorZ(pointer: ClosingSigned_read(Bindings.new_LDKu8slice(array: ser)));
86 if self.cOpaqueStruct?.is_owned == false {
90 ClosingSigned_free(self.cOpaqueStruct!)
96 /* STRUCT_METHODS_END */