[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / DelayedPaymentOutputDescriptor.cs
index b5536ec450da76fd94388d61f2e58cde0122446d..3dd136d3c492c06b338ff410ac8fe9332de1b30e 100644 (file)
@@ -33,7 +33,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase {
         * The outpoint which is spendable.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
                if (this != null) { this.ptrs_to.AddLast(val); };
@@ -117,7 +117,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase {
         * derive the witnessScript for this output.
         */
        public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) {
-               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr);
+               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
                if (this != null) { this.ptrs_to.AddLast(val); };
@@ -163,11 +163,45 @@ public class DelayedPaymentOutputDescriptor : CommonBase {
                GC.KeepAlive(val);
        }
 
+       /**
+        * The channel public keys and other parameters needed to generate a spending transaction or
+        * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+        * 
+        * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public ChannelTransactionParameters get_channel_transaction_parameters() {
+               long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr);
+               GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel public keys and other parameters needed to generate a spending transaction or
+        * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+        * 
+        * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0 : val.ptr);
+               GC.KeepAlive(this);
+               GC.KeepAlive(val);
+               if (this != null) { this.ptrs_to.AddLast(val); };
+       }
+
        /**
         * Constructs a new DelayedPaymentOutputDescriptor given each field
+        * 
+        * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
-               long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg);
+       public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) {
+               long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
                GC.KeepAlive(outpoint_arg);
                GC.KeepAlive(per_commitment_point_arg);
                GC.KeepAlive(to_self_delay_arg);
@@ -175,11 +209,13 @@ public class DelayedPaymentOutputDescriptor : CommonBase {
                GC.KeepAlive(revocation_pubkey_arg);
                GC.KeepAlive(channel_keys_id_arg);
                GC.KeepAlive(channel_value_satoshis_arg);
+               GC.KeepAlive(channel_transaction_parameters_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(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(outpoint_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(revocation_pubkey_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_transaction_parameters_arg); };
                return ret_hu_conv;
        }
 
@@ -219,7 +255,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public bool eq(org.ldk.structs.DelayedPaymentOutputDescriptor b) {
-               bool ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               bool ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(b);
                if (this != null) { this.ptrs_to.AddLast(b); };