Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / AcceptChannel.java
index 09125fe31b528e7520fcaf7b0d758a1576b6f000..70157f071269742ac2f48a76868a072984dec179 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
 import javax.annotation.Nullable;
 
 
@@ -24,6 +25,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_temporary_channel_id() {
                byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -31,7 +33,9 @@ public class AcceptChannel extends CommonBase {
         * A temporary channel ID, until the funding outpoint is announced
         */
        public void set_temporary_channel_id(byte[] val) {
-               bindings.AcceptChannel_set_temporary_channel_id(this.ptr, val);
+               bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -39,6 +43,7 @@ public class AcceptChannel extends CommonBase {
         */
        public long get_dust_limit_satoshis() {
                long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -47,6 +52,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_dust_limit_satoshis(long val) {
                bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -54,6 +61,7 @@ public class AcceptChannel extends CommonBase {
         */
        public long get_max_htlc_value_in_flight_msat() {
                long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -62,6 +70,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_max_htlc_value_in_flight_msat(long val) {
                bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -69,6 +79,7 @@ public class AcceptChannel extends CommonBase {
         */
        public long get_channel_reserve_satoshis() {
                long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -77,6 +88,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_channel_reserve_satoshis(long val) {
                bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -84,6 +97,7 @@ public class AcceptChannel extends CommonBase {
         */
        public long get_htlc_minimum_msat() {
                long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -92,6 +106,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_htlc_minimum_msat(long val) {
                bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -99,6 +115,7 @@ public class AcceptChannel extends CommonBase {
         */
        public int get_minimum_depth() {
                int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -107,6 +124,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_minimum_depth(int val) {
                bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -114,6 +133,7 @@ public class AcceptChannel extends CommonBase {
         */
        public short get_to_self_delay() {
                short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -122,6 +142,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_to_self_delay(short val) {
                bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -129,6 +151,7 @@ public class AcceptChannel extends CommonBase {
         */
        public short get_max_accepted_htlcs() {
                short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -137,6 +160,8 @@ public class AcceptChannel extends CommonBase {
         */
        public void set_max_accepted_htlcs(short val) {
                bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -144,6 +169,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_funding_pubkey() {
                byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -151,7 +177,9 @@ public class AcceptChannel extends CommonBase {
         * The sender's key controlling the funding transaction
         */
        public void set_funding_pubkey(byte[] val) {
-               bindings.AcceptChannel_set_funding_pubkey(this.ptr, val);
+               bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -159,6 +187,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_revocation_basepoint() {
                byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -166,7 +195,9 @@ public class AcceptChannel extends CommonBase {
         * Used to derive a revocation key for transactions broadcast by counterparty
         */
        public void set_revocation_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_revocation_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -174,6 +205,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_payment_point() {
                byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -181,7 +213,9 @@ public class AcceptChannel extends CommonBase {
         * A payment key to sender for transactions broadcast by counterparty
         */
        public void set_payment_point(byte[] val) {
-               bindings.AcceptChannel_set_payment_point(this.ptr, val);
+               bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -189,6 +223,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_delayed_payment_basepoint() {
                byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -196,7 +231,9 @@ public class AcceptChannel extends CommonBase {
         * Used to derive a payment key to sender for transactions broadcast by sender
         */
        public void set_delayed_payment_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -204,6 +241,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_htlc_basepoint() {
                byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -211,7 +249,9 @@ public class AcceptChannel extends CommonBase {
         * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
         */
        public void set_htlc_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_htlc_basepoint(this.ptr, val);
+               bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -219,6 +259,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] get_first_per_commitment_point() {
                byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -226,7 +267,15 @@ public class AcceptChannel extends CommonBase {
         * The first to-be-broadcast-by-sender transaction's per commitment point
         */
        public void set_first_per_commitment_point(byte[] val) {
-               bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
+               bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       long clone_ptr() {
+               long ret = bindings.AcceptChannel_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
        }
 
        /**
@@ -234,6 +283,7 @@ public class AcceptChannel extends CommonBase {
         */
        public AcceptChannel clone() {
                long ret = bindings.AcceptChannel_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AcceptChannel(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -245,6 +295,7 @@ public class AcceptChannel extends CommonBase {
         */
        public byte[] write() {
                byte[] ret = bindings.AcceptChannel_write(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -253,6 +304,7 @@ public class AcceptChannel extends CommonBase {
         */
        public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) {
                long ret = bindings.AcceptChannel_read(ser);
+               Reference.reachabilityFence(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;