3 public class FundingSigned {
5 public internal(set) var cOpaqueStruct: LDKFundingSigned?;
7 /* DEFAULT_CONSTRUCTOR_START */
8 public init(channel_id_arg: [UInt8], signature_arg: [UInt8]) {
10 self.cOpaqueStruct = FundingSigned_new(Bindings.new_LDKThirtyTwoBytes(array: channel_id_arg), Bindings.new_LDKSignature(array: signature_arg))
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKFundingSigned){
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<LDKFundingSigned>) in
23 FundingSigned_get_channel_id(this_ptrPointer)
27 public func set_channel_id(val: [UInt8]) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKFundingSigned>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return FundingSigned_set_channel_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
35 public func get_signature() -> [UInt8] {
37 return Bindings.LDKSignature_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKFundingSigned>) in
38 FundingSigned_get_signature(this_ptrPointer)
42 public func set_signature(val: [UInt8]) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKFundingSigned>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return FundingSigned_set_signature(this_ptrPointer, Bindings.new_LDKSignature(array: val));
50 public func clone(orig: FundingSigned) -> FundingSigned {
52 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKFundingSigned>) in
53 FundingSigned(pointer: FundingSigned_clone(origPointer))
57 public func write(obj: FundingSigned) -> [UInt8] {
59 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKFundingSigned>) in
60 FundingSigned_write(objPointer)
64 public func read(ser: [UInt8]) -> Result_FundingSignedDecodeErrorZ {
66 return Result_FundingSignedDecodeErrorZ(pointer: FundingSigned_read(Bindings.new_LDKu8slice(array: ser)));
71 if self.cOpaqueStruct?.is_owned == false {
75 FundingSigned_free(self.cOpaqueStruct!)
81 /* STRUCT_METHODS_END */