Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / ClosingSignedFeeRange.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
8
9
10 /**
11  * The minimum and maximum fees which the sender is willing to place on the closing transaction.
12  * This is provided in [`ClosingSigned`] by both sides to indicate the fee range they are willing
13  * to use.
14  */
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class ClosingSignedFeeRange extends CommonBase {
17         ClosingSignedFeeRange(Object _dummy, long ptr) { super(ptr); }
18         @Override @SuppressWarnings("deprecation")
19         protected void finalize() throws Throwable {
20                 super.finalize();
21                 if (ptr != 0) { bindings.ClosingSignedFeeRange_free(ptr); }
22         }
23
24         /**
25          * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
26          * transaction.
27          */
28         public long get_min_fee_satoshis() {
29                 long ret = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr);
30                 return ret;
31         }
32
33         /**
34          * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
35          * transaction.
36          */
37         public void set_min_fee_satoshis(long val) {
38                 bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val);
39         }
40
41         /**
42          * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
43          * transaction.
44          */
45         public long get_max_fee_satoshis() {
46                 long ret = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr);
47                 return ret;
48         }
49
50         /**
51          * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
52          * transaction.
53          */
54         public void set_max_fee_satoshis(long val) {
55                 bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val);
56         }
57
58         /**
59          * Constructs a new ClosingSignedFeeRange given each field
60          */
61         public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) {
62                 long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
63                 if (ret >= 0 && ret <= 4096) { return null; }
64                 ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); }
65                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
66                 return ret_hu_conv;
67         }
68
69         /**
70          * Creates a copy of the ClosingSignedFeeRange
71          */
72         public ClosingSignedFeeRange clone() {
73                 long ret = bindings.ClosingSignedFeeRange_clone(this.ptr);
74                 if (ret >= 0 && ret <= 4096) { return null; }
75                 ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSignedFeeRange(null, ret); }
76                 ret_hu_conv.ptrs_to.add(this);
77                 return ret_hu_conv;
78         }
79
80         /**
81          * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
82          */
83         public byte[] write() {
84                 byte[] ret = bindings.ClosingSignedFeeRange_write(this.ptr);
85                 return ret;
86         }
87
88         /**
89          * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write
90          */
91         public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) {
92                 long ret = bindings.ClosingSignedFeeRange_read(ser);
93                 if (ret >= 0 && ret <= 4096) { return null; }
94                 Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
95                 return ret_hu_conv;
96         }
97
98 }