6 namespace org { namespace ldk { namespace structs {
10 * The minimum and maximum fees which the sender is willing to place on the closing transaction.
11 * This is provided in [`ClosingSigned`] by both sides to indicate the fee range they are willing
14 public class ClosingSignedFeeRange : CommonBase {
15 internal ClosingSignedFeeRange(object _dummy, long ptr) : base(ptr) { }
16 ~ClosingSignedFeeRange() {
17 if (ptr != 0) { bindings.ClosingSignedFeeRange_free(ptr); }
21 * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
24 public long get_min_fee_satoshis() {
25 long ret = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr);
31 * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
34 public void set_min_fee_satoshis(long val) {
35 bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val);
41 * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
44 public long get_max_fee_satoshis() {
45 long ret = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr);
51 * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
54 public void set_max_fee_satoshis(long val) {
55 bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val);
61 * Constructs a new ClosingSignedFeeRange given each field
63 public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) {
64 long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
65 GC.KeepAlive(min_fee_satoshis_arg);
66 GC.KeepAlive(max_fee_satoshis_arg);
67 if (ret >= 0 && ret <= 4096) { return null; }
68 org.ldk.structs.ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSignedFeeRange(null, ret); }
69 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
73 internal long clone_ptr() {
74 long ret = bindings.ClosingSignedFeeRange_clone_ptr(this.ptr);
80 * Creates a copy of the ClosingSignedFeeRange
82 public ClosingSignedFeeRange clone() {
83 long ret = bindings.ClosingSignedFeeRange_clone(this.ptr);
85 if (ret >= 0 && ret <= 4096) { return null; }
86 org.ldk.structs.ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSignedFeeRange(null, ret); }
87 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
92 * Checks if two ClosingSignedFeeRanges contain equal inner contents.
93 * This ignores pointers and is_owned flags and looks at the values in fields.
94 * Two objects with NULL inner values will be considered "equal" here.
96 public bool eq(org.ldk.structs.ClosingSignedFeeRange b) {
97 bool ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr);
100 if (this != null) { this.ptrs_to.AddLast(b); };
104 public override bool Equals(object o) {
105 if (!(o is ClosingSignedFeeRange)) return false;
106 return this.eq((ClosingSignedFeeRange)o);
109 * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
111 public byte[] write() {
112 byte[] ret = bindings.ClosingSignedFeeRange_write(this.ptr);
118 * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write
120 public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) {
121 long ret = bindings.ClosingSignedFeeRange_read(ser);
123 if (ret >= 0 && ret <= 4096) { return null; }
124 Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);