6 namespace org { namespace ldk { namespace structs {
10 * 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
15 public class ClosingSignedFeeRange : CommonBase {
16 internal ClosingSignedFeeRange(object _dummy, long ptr) : base(ptr) { }
17 ~ClosingSignedFeeRange() {
18 if (ptr != 0) { bindings.ClosingSignedFeeRange_free(ptr); }
22 * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
25 public long get_min_fee_satoshis() {
26 long ret = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr);
32 * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing
35 public void set_min_fee_satoshis(long val) {
36 bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val);
42 * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
45 public long get_max_fee_satoshis() {
46 long ret = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr);
52 * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing
55 public void set_max_fee_satoshis(long val) {
56 bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val);
62 * Constructs a new ClosingSignedFeeRange given each field
64 public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) {
65 long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
66 GC.KeepAlive(min_fee_satoshis_arg);
67 GC.KeepAlive(max_fee_satoshis_arg);
68 if (ret >= 0 && ret <= 4096) { return null; }
69 org.ldk.structs.ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSignedFeeRange(null, ret); }
70 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
74 internal long clone_ptr() {
75 long ret = bindings.ClosingSignedFeeRange_clone_ptr(this.ptr);
81 * Creates a copy of the ClosingSignedFeeRange
83 public ClosingSignedFeeRange clone() {
84 long ret = bindings.ClosingSignedFeeRange_clone(this.ptr);
86 if (ret >= 0 && ret <= 4096) { return null; }
87 org.ldk.structs.ClosingSignedFeeRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSignedFeeRange(null, ret); }
88 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
93 * Generates a non-cryptographic 64-bit hash of the ClosingSignedFeeRange.
96 long ret = bindings.ClosingSignedFeeRange_hash(this.ptr);
101 public override int GetHashCode() {
102 return (int)this.hash();
105 * Checks if two ClosingSignedFeeRanges contain equal inner contents.
106 * This ignores pointers and is_owned flags and looks at the values in fields.
107 * Two objects with NULL inner values will be considered "equal" here.
109 public bool eq(org.ldk.structs.ClosingSignedFeeRange b) {
110 bool ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b.ptr);
113 if (this != null) { this.ptrs_to.AddLast(b); };
117 public override bool Equals(object o) {
118 if (!(o is ClosingSignedFeeRange)) return false;
119 return this.eq((ClosingSignedFeeRange)o);
122 * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
124 public byte[] write() {
125 long ret = bindings.ClosingSignedFeeRange_write(this.ptr);
127 if (ret >= 0 && ret <= 4096) { return null; }
128 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
133 * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write
135 public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) {
136 long ret = bindings.ClosingSignedFeeRange_read(InternalUtils.encodeUint8Array(ser));
138 if (ret >= 0 && ret <= 4096) { return null; }
139 Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);