[Java] Update auto-generated Java bindings to LDK 0.0.121
[ldk-java] / src / main / java / org / ldk / structs / Confirm.java
index 8894da4ed70273b7b6a8d3896f636bae11355601..df067cae79af917e6ebbf393717458e3c7a40df4 100644 (file)
@@ -58,7 +58,19 @@ public class Confirm extends CommonBase {
        protected void finalize() throws Throwable {
                if (ptr != 0) { bindings.Confirm_free(ptr); } super.finalize();
        }
-
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.Confirm_free(ptr); }
+               ptr = 0;
+       }
        public static interface ConfirmInterface {
                /**
                 * Notifies LDK of transactions confirmed in a block with a given header and height.
@@ -97,7 +109,10 @@ public class Confirm extends CommonBase {
                void best_block_updated(byte[] header, int height);
                /**
                 * Returns transactions that must be monitored for reorganization out of the chain along
-                * with the hash of the block as part of which it had been previously confirmed.
+                * with the height and the hash of the block as part of which it had been previously confirmed.
+                * 
+                * Note that the returned `Option<BlockHash>` might be `None` for channels created with LDK
+                * 0.0.112 and prior, in which case you need to manually track previous confirmations.
                 * 
                 * Will include any transactions passed to [`transactions_confirmed`] that have insufficient
                 * confirmations to be safe from a chain reorganization. Will not include any transactions
@@ -109,13 +124,13 @@ public class Confirm extends CommonBase {
                 * given to [`transaction_unconfirmed`].
                 * 
                 * If any of the returned transactions are confirmed in a block other than the one with the
-                * given hash, they need to be unconfirmed and reconfirmed via [`transaction_unconfirmed`] and
-                * [`transactions_confirmed`], respectively.
+                * given hash at the given height, they need to be unconfirmed and reconfirmed via
+                * [`transaction_unconfirmed`] and [`transactions_confirmed`], respectively.
                 * 
                 * [`transactions_confirmed`]: Self::transactions_confirmed
                 * [`transaction_unconfirmed`]: Self::transaction_unconfirmed
                 */
-               TwoTuple_TxidBlockHashZ[] get_relevant_txids();
+               ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] get_relevant_txids();
        }
        private static class LDKConfirmHolder { Confirm held; }
        public static Confirm new_impl(ConfirmInterface arg) {
@@ -142,9 +157,9 @@ public class Confirm extends CommonBase {
                                Reference.reachabilityFence(arg);
                        }
                        @Override public long[] get_relevant_txids() {
-                               TwoTuple_TxidBlockHashZ[] ret = arg.get_relevant_txids();
+                               ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret = arg.get_relevant_txids();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 == null ? 0 : ret_conv_25.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54 == null ? 0 : ret_conv_54.clone_ptr()).toArray() : null;
                                return result;
                        }
                });
@@ -205,7 +220,10 @@ public class Confirm extends CommonBase {
 
        /**
         * Returns transactions that must be monitored for reorganization out of the chain along
-        * with the hash of the block as part of which it had been previously confirmed.
+        * with the height and the hash of the block as part of which it had been previously confirmed.
+        * 
+        * Note that the returned `Option<BlockHash>` might be `None` for channels created with LDK
+        * 0.0.112 and prior, in which case you need to manually track previous confirmations.
         * 
         * Will include any transactions passed to [`transactions_confirmed`] that have insufficient
         * confirmations to be safe from a chain reorganization. Will not include any transactions
@@ -217,24 +235,24 @@ public class Confirm extends CommonBase {
         * given to [`transaction_unconfirmed`].
         * 
         * If any of the returned transactions are confirmed in a block other than the one with the
-        * given hash, they need to be unconfirmed and reconfirmed via [`transaction_unconfirmed`] and
-        * [`transactions_confirmed`], respectively.
+        * given hash at the given height, they need to be unconfirmed and reconfirmed via
+        * [`transaction_unconfirmed`] and [`transactions_confirmed`], respectively.
         * 
         * [`transactions_confirmed`]: Self::transactions_confirmed
         * [`transaction_unconfirmed`]: Self::transaction_unconfirmed
         */
-       public TwoTuple_TxidBlockHashZ[] get_relevant_txids() {
+       public ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] get_relevant_txids() {
                long[] ret = bindings.Confirm_get_relevant_txids(this.ptr);
                Reference.reachabilityFence(this);
-               int ret_conv_25_len = ret.length;
-               TwoTuple_TxidBlockHashZ[] ret_conv_25_arr = new TwoTuple_TxidBlockHashZ[ret_conv_25_len];
-               for (int z = 0; z < ret_conv_25_len; z++) {
-                       long ret_conv_25 = ret[z];
-                       TwoTuple_TxidBlockHashZ ret_conv_25_hu_conv = new TwoTuple_TxidBlockHashZ(null, ret_conv_25);
-                       if (ret_conv_25_hu_conv != null) { ret_conv_25_hu_conv.ptrs_to.add(this); };
-                       ret_conv_25_arr[z] = ret_conv_25_hu_conv;
+               int ret_conv_54_len = ret.length;
+               ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret_conv_54_arr = new ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[ret_conv_54_len];
+               for (int c = 0; c < ret_conv_54_len; c++) {
+                       long ret_conv_54 = ret[c];
+                       ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ ret_conv_54_hu_conv = new ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ(null, ret_conv_54);
+                       if (ret_conv_54_hu_conv != null) { ret_conv_54_hu_conv.ptrs_to.add(this); };
+                       ret_conv_54_arr[c] = ret_conv_54_hu_conv;
                }
-               return ret_conv_25_arr;
+               return ret_conv_54_arr;
        }
 
 }