@@ -18,111 +18,66 @@ public class BuiltCommitmentTransaction {
1818 /* STRUCT_METHODS_START */
1919
2020 public func get_transaction( ) -> [ UInt8 ] {
21-
22-
23- let this_ptrPointer = withUnsafePointer ( to: self . cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
24-
25- pointer
26-
27- }
28-
29- return Bindings . LDKTransaction_to_array ( nativeType: BuiltCommitmentTransaction_get_transaction ( this_ptrPointer) ) ;
21+ /* NATIVE_CALL_PREP */
22+ return Bindings . LDKTransaction_to_array ( nativeType: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
23+ BuiltCommitmentTransaction_get_transaction ( this_ptrPointer)
24+ } ) ;
3025 }
3126
3227 public func set_transaction( val: [ UInt8 ] ) -> Void {
33-
34-
35- let this_ptrPointer = withUnsafeMutablePointer ( to: & self . cOpaqueStruct!) { ( pointer: UnsafeMutablePointer < LDKBuiltCommitmentTransaction > ) in
36-
37- pointer
38-
39- }
40-
41- return BuiltCommitmentTransaction_set_transaction ( this_ptrPointer, Bindings . new_LDKTransaction ( array: val) ) ;
28+ /* NATIVE_CALL_PREP */
29+ return withUnsafeMutablePointer ( to: & self . cOpaqueStruct!) { ( this_ptrPointer: UnsafeMutablePointer < LDKBuiltCommitmentTransaction > ) in
30+ BuiltCommitmentTransaction_set_transaction ( this_ptrPointer, Bindings . new_LDKTransaction ( array: val) )
31+ } ;
4232 }
4333
4434 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 ) {
45-
46-
47- let this_ptrPointer = withUnsafePointer ( to: self . cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
48-
49- pointer
50-
51- }
52-
53- return BuiltCommitmentTransaction_get_txid ( this_ptrPointer) . pointee;
35+ /* NATIVE_CALL_PREP */
36+ return withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
37+ BuiltCommitmentTransaction_get_txid ( this_ptrPointer)
38+ } . pointee;
5439 }
5540
5641 public func set_txid( val: [ UInt8 ] ) -> Void {
57-
58-
59- let this_ptrPointer = withUnsafeMutablePointer ( to: & self . cOpaqueStruct!) { ( pointer: UnsafeMutablePointer < LDKBuiltCommitmentTransaction > ) in
60-
61- pointer
62-
63- }
64-
65- return BuiltCommitmentTransaction_set_txid ( this_ptrPointer, Bindings . new_LDKThirtyTwoBytes ( array: val) ) ;
42+ /* NATIVE_CALL_PREP */
43+ return withUnsafeMutablePointer ( to: & self . cOpaqueStruct!) { ( this_ptrPointer: UnsafeMutablePointer < LDKBuiltCommitmentTransaction > ) in
44+ BuiltCommitmentTransaction_set_txid ( this_ptrPointer, Bindings . new_LDKThirtyTwoBytes ( array: val) )
45+ } ;
6646 }
6747
6848 public func clone( orig: BuiltCommitmentTransaction ) -> BuiltCommitmentTransaction {
69-
70-
71- let origPointer = withUnsafePointer ( to: orig. cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
72-
73- pointer
74-
75- }
76-
77- return BuiltCommitmentTransaction ( pointer: BuiltCommitmentTransaction_clone ( origPointer) ) ;
49+ /* NATIVE_CALL_PREP */
50+ return withUnsafePointer ( to: orig. cOpaqueStruct!) { ( origPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
51+ BuiltCommitmentTransaction ( pointer: BuiltCommitmentTransaction_clone ( origPointer) )
52+ } ;
7853 }
7954
8055 public func write( obj: BuiltCommitmentTransaction ) -> [ UInt8 ] {
81-
82-
83- let objPointer = withUnsafePointer ( to: obj. cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
84-
85- pointer
86-
87- }
88-
89- return Bindings . LDKCVec_u8Z_to_array ( nativeType: BuiltCommitmentTransaction_write ( objPointer) ) ;
56+ /* NATIVE_CALL_PREP */
57+ return Bindings . LDKCVec_u8Z_to_array ( nativeType: withUnsafePointer ( to: obj. cOpaqueStruct!) { ( objPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
58+ BuiltCommitmentTransaction_write ( objPointer)
59+ } ) ;
9060 }
9161
9262 public func read( ser: [ UInt8 ] ) -> Result_BuiltCommitmentTransactionDecodeErrorZ {
93-
63+ /* NATIVE_CALL_PREP */
9464 return Result_BuiltCommitmentTransactionDecodeErrorZ ( pointer: BuiltCommitmentTransaction_read ( Bindings . new_LDKu8slice ( array: ser) ) ) ;
9565 }
9666
9767 public func get_sighash_all( this_arg: BuiltCommitmentTransaction , funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
98-
99-
100- let this_argPointer = withUnsafePointer ( to: this_arg. cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
101-
102- pointer
103-
104- }
105-
106- return Bindings . LDKThirtyTwoBytes_to_array ( nativeType: BuiltCommitmentTransaction_get_sighash_all ( this_argPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis) ) ;
68+ /* NATIVE_CALL_PREP */
69+ return Bindings . LDKThirtyTwoBytes_to_array ( nativeType: withUnsafePointer ( to: this_arg. cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
70+ BuiltCommitmentTransaction_get_sighash_all ( this_argPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
71+ } ) ;
10772 }
10873
10974 public func sign( this_arg: BuiltCommitmentTransaction , funding_key: [ UInt8 ] , funding_redeemscript: [ UInt8 ] , channel_value_satoshis: UInt64 ) -> [ UInt8 ] {
110-
111-
112- let this_argPointer = withUnsafePointer ( to: this_arg. cOpaqueStruct!) { ( pointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
113-
114- pointer
115-
116- }
117-
118-
119- let funding_keyPointer = withUnsafePointer ( to: Bindings . array_to_tuple32 ( array: funding_key) ) { ( pointer: 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
120-
121- pointer
122-
123- }
124-
125- return Bindings . LDKSignature_to_array ( nativeType: BuiltCommitmentTransaction_sign ( this_argPointer, funding_keyPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis) ) ;
75+ /* NATIVE_CALL_PREP */
76+ return Bindings . LDKSignature_to_array ( nativeType: withUnsafePointer ( to: this_arg. cOpaqueStruct!) { ( this_argPointer: UnsafePointer < LDKBuiltCommitmentTransaction > ) in
77+ return 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+ BuiltCommitmentTransaction_sign ( this_argPointer, funding_keyPointer, Bindings . new_LDKu8slice ( array: funding_redeemscript) , channel_value_satoshis)
79+ }
80+ } ) ;
12681 }
12782
12883
0 commit comments