[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / ClosingSigned.cs
index 08f6cac9e4124c5da06db4dc39604fb895ec0739..9f47f3db5fa1cc5aec04a9ab6900084ac9a6a1e2 100644 (file)
@@ -20,21 +20,23 @@ public class ClosingSigned : CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
+       public ChannelId get_channel_id() {
                long ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                GC.KeepAlive(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
-               return ret_conv;
+               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.AddLast(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
+               if (this != null) { this.ptrs_to.AddLast(val); };
        }
 
        /**
@@ -108,8 +110,8 @@ public class ClosingSigned : CommonBase {
         * 
         * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
-               long ret = bindings.ClosingSigned_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), fee_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0 : fee_range_arg.ptr);
+       public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
+               long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature_arg, 64)), fee_range_arg == null ? 0 : fee_range_arg.ptr);
                GC.KeepAlive(channel_id_arg);
                GC.KeepAlive(fee_satoshis_arg);
                GC.KeepAlive(signature_arg);
@@ -117,6 +119,7 @@ public class ClosingSigned : CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(fee_range_arg); };
                return ret_hu_conv;
        }
@@ -157,7 +160,7 @@ public class ClosingSigned : CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public bool eq(org.ldk.structs.ClosingSigned b) {
-               bool ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               bool ret = bindings.ClosingSigned_eq(this.ptr, b.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(b);
                if (this != null) { this.ptrs_to.AddLast(b); };