@@ -82,46 +82,28 @@ public long get_latest_update_id() {
8282 /**
8383 * Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
8484 */
85- public TwoTuple < OutPoint , byte []> get_funding_txo () {
85+ public TwoTuple_OutPointScriptZ get_funding_txo () {
8686 long ret = bindings .ChannelMonitor_get_funding_txo (this .ptr );
8787 if (ret < 1024 ) { return null ; }
88- long ret_a = bindings .LDKC2Tuple_OutPointScriptZ_get_a (ret );
89- OutPoint ret_a_hu_conv = new OutPoint (null , ret_a );
90- ret_a_hu_conv .ptrs_to .add (this );;
91- byte [] ret_b = bindings .LDKC2Tuple_OutPointScriptZ_get_b (ret );
92- TwoTuple <OutPoint , byte []> ret_conv = new TwoTuple <OutPoint , byte []>(ret_a_hu_conv , ret_b , () -> {
93- bindings .C2Tuple_OutPointScriptZ_free (ret );
94- });
95- ret_a_hu_conv .ptrs_to .add (ret_conv );
96- return ret_conv ;
88+ TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ (null , ret );
89+ ret_hu_conv .ptrs_to .add (this );
90+ return ret_hu_conv ;
9791 }
9892
9993 /**
10094 * Gets a list of txids, with their output scripts (in the order they appear in the
10195 * transaction), which we must learn about spends of via block_connected().
10296 */
103- public TwoTuple < byte [], TwoTuple < Integer , byte []>[]> [] get_outputs_to_watch () {
97+ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ [] get_outputs_to_watch () {
10498 long [] ret = bindings .ChannelMonitor_get_outputs_to_watch (this .ptr );
105- TwoTuple <byte [], TwoTuple <Integer , byte []>[]>[] ret_conv_47_arr = new TwoTuple [ret .length ];
106- for (int v = 0 ; v < ret .length ; v ++) {
107- long ret_conv_47 = ret [v ];
108- byte [] ret_conv_47_a = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a (ret_conv_47 );
109- long [] ret_conv_47_b = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b (ret_conv_47 );
110- TwoTuple <Integer , byte []>[] ret_conv_47_b_conv_27_arr = new TwoTuple [ret_conv_47_b .length ];
111- for (int b = 0 ; b < ret_conv_47_b .length ; b ++) {
112- long ret_conv_47_b_conv_27 = ret_conv_47_b [b ];
113- int ret_conv_47_b_conv_27_a = bindings .LDKC2Tuple_u32ScriptZ_get_a (ret_conv_47_b_conv_27 );
114- byte [] ret_conv_47_b_conv_27_b = bindings .LDKC2Tuple_u32ScriptZ_get_b (ret_conv_47_b_conv_27 );
115- TwoTuple <Integer , byte []> ret_conv_47_b_conv_27_conv = new TwoTuple <Integer , byte []>(ret_conv_47_b_conv_27_a , ret_conv_47_b_conv_27_b , () -> {
116- bindings .C2Tuple_u32ScriptZ_free (ret_conv_47_b_conv_27 );
117- });
118- ret_conv_47_b_conv_27_arr [b ] = ret_conv_47_b_conv_27_conv ;
119- };
120- TwoTuple <byte [], TwoTuple <Integer , byte []>[]> ret_conv_47_conv = new TwoTuple <byte [], TwoTuple <Integer , byte []>[]>(ret_conv_47_a , ret_conv_47_b_conv_27_arr );
121- // Warning: We may not free the C tuple object!
122- ret_conv_47_arr [v ] = ret_conv_47_conv ;
99+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ [] ret_conv_40_arr = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ [ret .length ];
100+ for (int o = 0 ; o < ret .length ; o ++) {
101+ long ret_conv_40 = ret [o ];
102+ TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_conv_40_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ (null , ret_conv_40 );
103+ ret_conv_40_hu_conv .ptrs_to .add (this );
104+ ret_conv_40_arr [o ] = ret_conv_40_hu_conv ;
123105 }
124- return ret_conv_47_arr ;
106+ return ret_conv_40_arr ;
125107 }
126108
127109 /**
@@ -200,33 +182,19 @@ public byte[][] get_latest_holder_commitment_txn(Logger logger) {
200182 *
201183 * [`get_outputs_to_watch`]: #method.get_outputs_to_watch
202184 */
203- public TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>[] block_connected (byte [] header , TwoTuple <Long , byte []>[] txdata , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
204- long [] ret = bindings .ChannelMonitor_block_connected (this .ptr , header , txdata != null ? Arrays .stream (txdata ).mapToLong (txdata_conv_24 -> bindings .C2Tuple_usizeTransactionZ_new (txdata_conv_24 .a , txdata_conv_24 .b )).toArray () : null , height , broadcaster == null ? 0 : broadcaster .ptr , fee_estimator == null ? 0 : fee_estimator .ptr , logger == null ? 0 : logger .ptr );
205- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>[] ret_conv_46_arr = new TwoTuple [ret .length ];
206- for (int u = 0 ; u < ret .length ; u ++) {
207- long ret_conv_46 = ret [u ];
208- byte [] ret_conv_46_a = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a (ret_conv_46 );
209- long [] ret_conv_46_b = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b (ret_conv_46 );
210- TwoTuple <Integer , TxOut >[] ret_conv_46_b_conv_26_arr = new TwoTuple [ret_conv_46_b .length ];
211- for (int a = 0 ; a < ret_conv_46_b .length ; a ++) {
212- long ret_conv_46_b_conv_26 = ret_conv_46_b [a ];
213- int ret_conv_46_b_conv_26_a = bindings .LDKC2Tuple_u32TxOutZ_get_a (ret_conv_46_b_conv_26 );
214- long ret_conv_46_b_conv_26_b = bindings .TxOut_clone (bindings .LDKC2Tuple_u32TxOutZ_get_b (ret_conv_46_b_conv_26 ));
215- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut (null , ret_conv_46_b_conv_26_b );;
216- TwoTuple <Integer , TxOut > ret_conv_46_b_conv_26_conv = new TwoTuple <Integer , TxOut >(ret_conv_46_b_conv_26_a , ret_conv_46_b_conv_26_b_conv , () -> {
217- bindings .C2Tuple_u32TxOutZ_free (ret_conv_46_b_conv_26 );
218- });
219- ret_conv_46_b_conv_26_b_conv .ptrs_to .add (ret_conv_46_b_conv_26_conv );
220- ret_conv_46_b_conv_26_arr [a ] = ret_conv_46_b_conv_26_conv ;
221- };
222- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]> ret_conv_46_conv = new TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>(ret_conv_46_a , ret_conv_46_b_conv_26_arr );
223- // Warning: We may not free the C tuple object!
224- ret_conv_46_arr [u ] = ret_conv_46_conv ;
185+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] block_connected (byte [] header , TwoTuple_usizeTransactionZ [] txdata , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
186+ long [] ret = bindings .ChannelMonitor_block_connected (this .ptr , header , txdata != null ? Arrays .stream (txdata ).mapToLong (txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28 .ptr : 0 ).toArray () : null , height , broadcaster == null ? 0 : broadcaster .ptr , fee_estimator == null ? 0 : fee_estimator .ptr , logger == null ? 0 : logger .ptr );
187+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [ret .length ];
188+ for (int n = 0 ; n < ret .length ; n ++) {
189+ long ret_conv_39 = ret [n ];
190+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ (null , ret_conv_39 );
191+ ret_conv_39_hu_conv .ptrs_to .add (this );
192+ ret_conv_39_arr [n ] = ret_conv_39_hu_conv ;
225193 }
226194 this .ptrs_to .add (broadcaster );
227195 this .ptrs_to .add (fee_estimator );
228196 this .ptrs_to .add (logger );
229- return ret_conv_46_arr ;
197+ return ret_conv_39_arr ;
230198 }
231199
232200 /**
@@ -249,33 +217,19 @@ public void block_disconnected(byte[] header, int height, BroadcasterInterface b
249217 *
250218 * [`block_connected`]: Self::block_connected
251219 */
252- public TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>[] transactions_confirmed (byte [] header , TwoTuple <Long , byte []>[] txdata , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
253- long [] ret = bindings .ChannelMonitor_transactions_confirmed (this .ptr , header , txdata != null ? Arrays .stream (txdata ).mapToLong (txdata_conv_24 -> bindings .C2Tuple_usizeTransactionZ_new (txdata_conv_24 .a , txdata_conv_24 .b )).toArray () : null , height , broadcaster == null ? 0 : broadcaster .ptr , fee_estimator == null ? 0 : fee_estimator .ptr , logger == null ? 0 : logger .ptr );
254- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>[] ret_conv_46_arr = new TwoTuple [ret .length ];
255- for (int u = 0 ; u < ret .length ; u ++) {
256- long ret_conv_46 = ret [u ];
257- byte [] ret_conv_46_a = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a (ret_conv_46 );
258- long [] ret_conv_46_b = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b (ret_conv_46 );
259- TwoTuple <Integer , TxOut >[] ret_conv_46_b_conv_26_arr = new TwoTuple [ret_conv_46_b .length ];
260- for (int a = 0 ; a < ret_conv_46_b .length ; a ++) {
261- long ret_conv_46_b_conv_26 = ret_conv_46_b [a ];
262- int ret_conv_46_b_conv_26_a = bindings .LDKC2Tuple_u32TxOutZ_get_a (ret_conv_46_b_conv_26 );
263- long ret_conv_46_b_conv_26_b = bindings .TxOut_clone (bindings .LDKC2Tuple_u32TxOutZ_get_b (ret_conv_46_b_conv_26 ));
264- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut (null , ret_conv_46_b_conv_26_b );;
265- TwoTuple <Integer , TxOut > ret_conv_46_b_conv_26_conv = new TwoTuple <Integer , TxOut >(ret_conv_46_b_conv_26_a , ret_conv_46_b_conv_26_b_conv , () -> {
266- bindings .C2Tuple_u32TxOutZ_free (ret_conv_46_b_conv_26 );
267- });
268- ret_conv_46_b_conv_26_b_conv .ptrs_to .add (ret_conv_46_b_conv_26_conv );
269- ret_conv_46_b_conv_26_arr [a ] = ret_conv_46_b_conv_26_conv ;
270- };
271- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]> ret_conv_46_conv = new TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>(ret_conv_46_a , ret_conv_46_b_conv_26_arr );
272- // Warning: We may not free the C tuple object!
273- ret_conv_46_arr [u ] = ret_conv_46_conv ;
220+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] transactions_confirmed (byte [] header , TwoTuple_usizeTransactionZ [] txdata , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
221+ long [] ret = bindings .ChannelMonitor_transactions_confirmed (this .ptr , header , txdata != null ? Arrays .stream (txdata ).mapToLong (txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28 .ptr : 0 ).toArray () : null , height , broadcaster == null ? 0 : broadcaster .ptr , fee_estimator == null ? 0 : fee_estimator .ptr , logger == null ? 0 : logger .ptr );
222+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [ret .length ];
223+ for (int n = 0 ; n < ret .length ; n ++) {
224+ long ret_conv_39 = ret [n ];
225+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ (null , ret_conv_39 );
226+ ret_conv_39_hu_conv .ptrs_to .add (this );
227+ ret_conv_39_arr [n ] = ret_conv_39_hu_conv ;
274228 }
275229 this .ptrs_to .add (broadcaster );
276230 this .ptrs_to .add (fee_estimator );
277231 this .ptrs_to .add (logger );
278- return ret_conv_46_arr ;
232+ return ret_conv_39_arr ;
279233 }
280234
281235 /**
@@ -302,33 +256,19 @@ public void transaction_unconfirmed(byte[] txid, BroadcasterInterface broadcaste
302256 *
303257 * [`block_connected`]: Self::block_connected
304258 */
305- public TwoTuple < byte [], TwoTuple < Integer , TxOut >[]> [] best_block_updated (byte [] header , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
259+ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] best_block_updated (byte [] header , int height , BroadcasterInterface broadcaster , FeeEstimator fee_estimator , Logger logger ) {
306260 long [] ret = bindings .ChannelMonitor_best_block_updated (this .ptr , header , height , broadcaster == null ? 0 : broadcaster .ptr , fee_estimator == null ? 0 : fee_estimator .ptr , logger == null ? 0 : logger .ptr );
307- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>[] ret_conv_46_arr = new TwoTuple [ret .length ];
308- for (int u = 0 ; u < ret .length ; u ++) {
309- long ret_conv_46 = ret [u ];
310- byte [] ret_conv_46_a = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a (ret_conv_46 );
311- long [] ret_conv_46_b = bindings .LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b (ret_conv_46 );
312- TwoTuple <Integer , TxOut >[] ret_conv_46_b_conv_26_arr = new TwoTuple [ret_conv_46_b .length ];
313- for (int a = 0 ; a < ret_conv_46_b .length ; a ++) {
314- long ret_conv_46_b_conv_26 = ret_conv_46_b [a ];
315- int ret_conv_46_b_conv_26_a = bindings .LDKC2Tuple_u32TxOutZ_get_a (ret_conv_46_b_conv_26 );
316- long ret_conv_46_b_conv_26_b = bindings .TxOut_clone (bindings .LDKC2Tuple_u32TxOutZ_get_b (ret_conv_46_b_conv_26 ));
317- TxOut ret_conv_46_b_conv_26_b_conv = new TxOut (null , ret_conv_46_b_conv_26_b );;
318- TwoTuple <Integer , TxOut > ret_conv_46_b_conv_26_conv = new TwoTuple <Integer , TxOut >(ret_conv_46_b_conv_26_a , ret_conv_46_b_conv_26_b_conv , () -> {
319- bindings .C2Tuple_u32TxOutZ_free (ret_conv_46_b_conv_26 );
320- });
321- ret_conv_46_b_conv_26_b_conv .ptrs_to .add (ret_conv_46_b_conv_26_conv );
322- ret_conv_46_b_conv_26_arr [a ] = ret_conv_46_b_conv_26_conv ;
323- };
324- TwoTuple <byte [], TwoTuple <Integer , TxOut >[]> ret_conv_46_conv = new TwoTuple <byte [], TwoTuple <Integer , TxOut >[]>(ret_conv_46_a , ret_conv_46_b_conv_26_arr );
325- // Warning: We may not free the C tuple object!
326- ret_conv_46_arr [u ] = ret_conv_46_conv ;
261+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [] ret_conv_39_arr = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ [ret .length ];
262+ for (int n = 0 ; n < ret .length ; n ++) {
263+ long ret_conv_39 = ret [n ];
264+ TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_conv_39_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ (null , ret_conv_39 );
265+ ret_conv_39_hu_conv .ptrs_to .add (this );
266+ ret_conv_39_arr [n ] = ret_conv_39_hu_conv ;
327267 }
328268 this .ptrs_to .add (broadcaster );
329269 this .ptrs_to .add (fee_estimator );
330270 this .ptrs_to .add (logger );
331- return ret_conv_46_arr ;
271+ return ret_conv_39_arr ;
332272 }
333273
334274 /**
0 commit comments