Update auto-generated files
[ldk-java] / src / main / java / org / ldk / structs / ClosingSignedFeeRange.java
diff --git a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java
new file mode 100644 (file)
index 0000000..0dbbf6c
--- /dev/null
@@ -0,0 +1,98 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import javax.annotation.Nullable;
+
+
+/**
+ * The minimum and maximum fees which the sender is willing to place on the closing transaction.
+ * This is provided in [`ClosingSigned`] by both sides to indicate the fee range they are willing
+ * to use.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ClosingSignedFeeRange extends CommonBase {
+       ClosingSignedFeeRange(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.ClosingSignedFeeRange_free(ptr); }
+       }
+
+       /**
+        * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
+        * transaction.
+        */
+       public long get_min_fee_satoshis() {
+               long ret = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr);
+               return ret;
+       }
+
+       /**
+        * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
+        * transaction.
+        */
+       public void set_min_fee_satoshis(long val) {
+               bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val);
+       }
+
+       /**
+        * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
+        * transaction.
+        */
+       public long get_max_fee_satoshis() {
+               long ret = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr);
+               return ret;
+       }
+
+       /**
+        * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
+        * transaction.
+        */
+       public void set_max_fee_satoshis(long val) {
+               bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val);
+       }
+
+       /**
+        * Constructs a new ClosingSignedFeeRange given each field
+        */
+       public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) {
+               long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
+               if (ret < 1024) { return null; }
+               ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a copy of the ClosingSignedFeeRange
+        */
+       public ClosingSignedFeeRange clone() {
+               long ret = bindings.ClosingSignedFeeRange_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.ClosingSignedFeeRange_write(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write
+        */
+       public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.ClosingSignedFeeRange_read(ser);
+               if (ret < 1024) { return null; }
+               Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}