[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / TxInitRbf.java
index ea1e7b01983b65996975a8cdec52761546928328..59f956d6a1fc9905f29cdecb71d3619d452e1b1f 100644 (file)
@@ -24,19 +24,23 @@ public class TxInitRbf extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxInitRbf_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxInitRbf_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxInitRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxInitRbf_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -102,8 +106,8 @@ public class TxInitRbf extends CommonBase {
        /**
         * Constructs a new TxInitRbf given each field
         */
-       public static TxInitRbf of(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
-               long ret = bindings.TxInitRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
+       public static TxInitRbf of(org.ldk.structs.ChannelId channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
+               long ret = bindings.TxInitRbf_new(channel_id_arg.ptr, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(locktime_arg);
                Reference.reachabilityFence(feerate_sat_per_1000_weight_arg);
@@ -111,6 +115,7 @@ public class TxInitRbf extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxInitRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxInitRbf(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); };
                return ret_hu_conv;
        }
@@ -151,7 +156,7 @@ public class TxInitRbf extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxInitRbf b) {
-               boolean ret = bindings.TxInitRbf_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxInitRbf_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };