@@ -30,11 +30,11 @@ BuiltCommitmentTransaction_get_transaction(this_ptrPointer)
3030 return BuiltCommitmentTransaction_set_transaction ( this_ptrPointer, Bindings . new_LDKTransaction ( array: val) ) ;
3131 }
3232
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 ] {
3434
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
3636BuiltCommitmentTransaction_get_txid ( this_ptrPointer)
37- } . pointee;
37+ } . pointee) ;
3838 }
3939
4040 public func set_txid( val: [ UInt8 ] ) -> Void {
@@ -64,16 +64,16 @@ BuiltCommitmentTransaction_write(objPointer)
6464 return Result_BuiltCommitmentTransactionDecodeErrorZ ( pointer: BuiltCommitmentTransaction_read ( Bindings . new_LDKu8slice ( array: ser) ) ) ;
6565 }
6666
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 ] {
6868
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
7070BuiltCommitmentTransaction_get_sighash_all ( this_argPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
7171} ) ;
7272 }
7373
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 ] {
7575
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
7777withUnsafePointer ( 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
7878BuiltCommitmentTransaction_sign ( this_argPointer, funding_keyPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
7979}
@@ -82,9 +82,13 @@ BuiltCommitmentTransaction_sign(this_argPointer, funding_keyPointer, Bindings.ne
8282
8383
8484 deinit {
85+ if self . cOpaqueStruct? . is_owned == false {
86+
8587
8688
8789 BuiltCommitmentTransaction_free ( self . cOpaqueStruct!)
90+
91+ }
8892
8993 }
9094
0 commit comments