[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / ReceiveTlvs.cs
index 63b088ee9511d0703626a60fc70c2a232db38331..bccc65e3b89213fe5a55f0f04daaff2085403fd3 100644 (file)
@@ -52,7 +52,29 @@ public class ReceiveTlvs : CommonBase {
         * Constraints for the receiver of this payment.
         */
        public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
-               bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val.ptr);
+               GC.KeepAlive(this);
+               GC.KeepAlive(val);
+               if (this != null) { this.ptrs_to.AddLast(val); };
+       }
+
+       /**
+        * Context for the receiver of this payment.
+        */
+       public PaymentContext get_payment_context() {
+               long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr);
+               GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Context for the receiver of this payment.
+        */
+       public void set_payment_context(org.ldk.structs.PaymentContext val) {
+               bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(val);
                if (this != null) { this.ptrs_to.AddLast(val); };
@@ -61,14 +83,16 @@ public class ReceiveTlvs : CommonBase {
        /**
         * Constructs a new ReceiveTlvs given each field
         */
-       public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg) {
-               long ret = bindings.ReceiveTlvs_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr);
+       public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) {
+               long ret = bindings.ReceiveTlvs_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg.ptr, payment_context_arg.ptr);
                GC.KeepAlive(payment_secret_arg);
                GC.KeepAlive(payment_constraints_arg);
+               GC.KeepAlive(payment_context_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReceiveTlvs(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(payment_constraints_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(payment_context_arg); };
                return ret_hu_conv;
        }