@@ -30,11 +30,11 @@ BuiltCommitmentTransaction_get_transaction(this_ptrPointer)
30
30
return BuiltCommitmentTransaction_set_transaction ( this_ptrPointer, Bindings . new_LDKTransaction ( array: val) ) ;
31
31
}
32
32
33
- public func get_txid( ) -> ( UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 ) {
33
+ public func get_txid( ) -> [ UInt8 ] {
34
34
35
- return withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
35
+ return Bindings . tuple32_to_array ( nativeType : withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
36
36
BuiltCommitmentTransaction_get_txid ( this_ptrPointer)
37
- } . pointee;
37
+ } . pointee) ;
38
38
}
39
39
40
40
public func set_txid( val: [ UInt8 ] ) -> Void {
@@ -64,16 +64,16 @@ BuiltCommitmentTransaction_write(objPointer)
64
64
return Result_BuiltCommitmentTransactionDecodeErrorZ ( pointer: BuiltCommitmentTransaction_read ( Bindings . new_LDKu8slice ( array: ser) ) ) ;
65
65
}
66
66
67
- public func get_sighash_all( this_arg : BuiltCommitmentTransaction , funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
67
+ public func get_sighash_all( funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
68
68
69
- return Bindings . LDKThirtyTwoBytes_to_array ( nativeType: withUnsafePointer ( to: this_arg . cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
69
+ return Bindings . LDKThirtyTwoBytes_to_array ( nativeType: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
70
70
BuiltCommitmentTransaction_get_sighash_all ( this_argPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
71
71
} ) ;
72
72
}
73
73
74
- public func sign( this_arg : BuiltCommitmentTransaction , funding_key: [ UInt8 ] , funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
74
+ public func sign( funding_key: [ UInt8 ] , funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
75
75
76
- return Bindings . LDKSignature_to_array ( nativeType: withUnsafePointer ( to: this_arg . cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
76
+ return Bindings . LDKSignature_to_array ( nativeType: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
77
77
withUnsafePointer ( to: Bindings . array_to_tuple32 ( array: funding_key) ) { ( funding_keyPointer: UnsafePointer < ( UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 ) > ) in
78
78
BuiltCommitmentTransaction_sign ( this_argPointer, funding_keyPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
79
79
}
@@ -82,9 +82,13 @@ BuiltCommitmentTransaction_sign(this_argPointer, funding_keyPointer, Bindings.ne
82
82
83
83
84
84
deinit {
85
+ if self . cOpaqueStruct? . is_owned == false {
86
+
85
87
86
88
87
89
BuiltCommitmentTransaction_free ( self . cOpaqueStruct!)
90
+
91
+ }
88
92
89
93
}
90
94
0 commit comments