[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / ChannelDetails.cs
index dfaa9e4d36239fd006b8194b2c5acd22904ab036..2295e2ea25d4d90532282fcd11a1de87e80e07cf 100644 (file)
@@ -21,12 +21,13 @@ public class ChannelDetails : CommonBase {
         * Note that this means this value is *not* persistent - it can change once during the
         * lifetime of the channel.
         */
-       public byte[] get_channel_id() {
+       public ChannelId get_channel_id() {
                long ret = bindings.ChannelDetails_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;
        }
 
        /**
@@ -35,10 +36,11 @@ public class ChannelDetails : CommonBase {
         * Note that this means this value is *not* persistent - it can change once during the
         * lifetime of the channel.
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ChannelDetails_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ChannelDetails_set_channel_id(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
+               if (this != null) { this.ptrs_to.AddLast(val); };
        }
 
        /**
@@ -57,7 +59,7 @@ public class ChannelDetails : CommonBase {
         * Parameters which apply to our counterparty. See individual fields for more information.
         */
        public void set_counterparty(org.ldk.structs.ChannelCounterparty val) {
-               bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelDetails_set_counterparty(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
                if (this != null) { this.ptrs_to.AddLast(val); };
@@ -67,9 +69,6 @@ public class ChannelDetails : CommonBase {
         * The Channel's funding transaction output, if we've negotiated the funding transaction with
         * our counterparty already.
         * 
-        * Note that, if this has been set, `channel_id` will be equivalent to
-        * `funding_txo.unwrap().to_channel_id()`.
-        * 
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public OutPoint get_funding_txo() {
@@ -85,9 +84,6 @@ public class ChannelDetails : CommonBase {
         * The Channel's funding transaction output, if we've negotiated the funding transaction with
         * our counterparty already.
         * 
-        * Note that, if this has been set, `channel_id` will be equivalent to
-        * `funding_txo.unwrap().to_channel_id()`.
-        * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public void set_funding_txo(org.ldk.structs.OutPoint val) {
@@ -825,63 +821,6 @@ public class ChannelDetails : CommonBase {
                if (this != null) { this.ptrs_to.AddLast(val); };
        }
 
-       /**
-        * Constructs a new ChannelDetails given each field
-        * 
-        * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public static ChannelDetails of(byte[] channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, org.ldk.structs.OutPoint funding_txo_arg, org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.structs.Option_u64Z short_channel_id_arg, org.ldk.structs.Option_u64Z outbound_scid_alias_arg, org.ldk.structs.Option_u64Z inbound_scid_alias_arg, long channel_value_satoshis_arg, org.ldk.structs.Option_u64Z unspendable_punishment_reserve_arg, org.ldk.util.UInt128 user_channel_id_arg, org.ldk.structs.Option_u32Z feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, org.ldk.structs.Option_u32Z confirmations_required_arg, org.ldk.structs.Option_u32Z confirmations_arg, org.ldk.structs.Option_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, org.ldk.structs.ChannelConfig config_arg) {
-               long ret = bindings.ChannelDetails_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, InternalUtils.encodeUint8Array(user_channel_id_arg.getLEBytes()), feerate_sat_per_1000_weight_arg.ptr, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, confirmations_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg.ptr, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr);
-               GC.KeepAlive(channel_id_arg);
-               GC.KeepAlive(counterparty_arg);
-               GC.KeepAlive(funding_txo_arg);
-               GC.KeepAlive(channel_type_arg);
-               GC.KeepAlive(short_channel_id_arg);
-               GC.KeepAlive(outbound_scid_alias_arg);
-               GC.KeepAlive(inbound_scid_alias_arg);
-               GC.KeepAlive(channel_value_satoshis_arg);
-               GC.KeepAlive(unspendable_punishment_reserve_arg);
-               GC.KeepAlive(user_channel_id_arg);
-               GC.KeepAlive(feerate_sat_per_1000_weight_arg);
-               GC.KeepAlive(balance_msat_arg);
-               GC.KeepAlive(outbound_capacity_msat_arg);
-               GC.KeepAlive(next_outbound_htlc_limit_msat_arg);
-               GC.KeepAlive(next_outbound_htlc_minimum_msat_arg);
-               GC.KeepAlive(inbound_capacity_msat_arg);
-               GC.KeepAlive(confirmations_required_arg);
-               GC.KeepAlive(confirmations_arg);
-               GC.KeepAlive(force_close_spend_delay_arg);
-               GC.KeepAlive(is_outbound_arg);
-               GC.KeepAlive(is_channel_ready_arg);
-               GC.KeepAlive(channel_shutdown_state_arg);
-               GC.KeepAlive(is_usable_arg);
-               GC.KeepAlive(is_public_arg);
-               GC.KeepAlive(inbound_htlc_minimum_msat_arg);
-               GC.KeepAlive(inbound_htlc_maximum_msat_arg);
-               GC.KeepAlive(config_arg);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(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(counterparty_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_txo_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_type_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(short_channel_id_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outbound_scid_alias_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_scid_alias_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(unspendable_punishment_reserve_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(feerate_sat_per_1000_weight_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(confirmations_required_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(confirmations_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(force_close_spend_delay_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_shutdown_state_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_htlc_minimum_msat_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(inbound_htlc_maximum_msat_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(config_arg); };
-               return ret_hu_conv;
-       }
-
        internal long clone_ptr() {
                long ret = bindings.ChannelDetails_clone_ptr(this.ptr);
                GC.KeepAlive(this);