Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / CounterpartyForwardingInfo.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  * Information needed for constructing an invoice route hint for this channel.
12  */
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class CounterpartyForwardingInfo extends CommonBase {
15         CounterpartyForwardingInfo(Object _dummy, long ptr) { super(ptr); }
16         @Override @SuppressWarnings("deprecation")
17         protected void finalize() throws Throwable {
18                 super.finalize();
19                 if (ptr != 0) { bindings.CounterpartyForwardingInfo_free(ptr); }
20         }
21
22         /**
23          * Base routing fee in millisatoshis.
24          */
25         public int get_fee_base_msat() {
26                 int ret = bindings.CounterpartyForwardingInfo_get_fee_base_msat(this.ptr);
27                 return ret;
28         }
29
30         /**
31          * Base routing fee in millisatoshis.
32          */
33         public void set_fee_base_msat(int val) {
34                 bindings.CounterpartyForwardingInfo_set_fee_base_msat(this.ptr, val);
35         }
36
37         /**
38          * Amount in millionths of a satoshi the channel will charge per transferred satoshi.
39          */
40         public int get_fee_proportional_millionths() {
41                 int ret = bindings.CounterpartyForwardingInfo_get_fee_proportional_millionths(this.ptr);
42                 return ret;
43         }
44
45         /**
46          * Amount in millionths of a satoshi the channel will charge per transferred satoshi.
47          */
48         public void set_fee_proportional_millionths(int val) {
49                 bindings.CounterpartyForwardingInfo_set_fee_proportional_millionths(this.ptr, val);
50         }
51
52         /**
53          * The minimum difference in cltv_expiry between an ingoing HTLC and its outgoing counterpart,
54          * such that the outgoing HTLC is forwardable to this counterparty. See `msgs::ChannelUpdate`'s
55          * `cltv_expiry_delta` for more details.
56          */
57         public short get_cltv_expiry_delta() {
58                 short ret = bindings.CounterpartyForwardingInfo_get_cltv_expiry_delta(this.ptr);
59                 return ret;
60         }
61
62         /**
63          * The minimum difference in cltv_expiry between an ingoing HTLC and its outgoing counterpart,
64          * such that the outgoing HTLC is forwardable to this counterparty. See `msgs::ChannelUpdate`'s
65          * `cltv_expiry_delta` for more details.
66          */
67         public void set_cltv_expiry_delta(short val) {
68                 bindings.CounterpartyForwardingInfo_set_cltv_expiry_delta(this.ptr, val);
69         }
70
71         /**
72          * Constructs a new CounterpartyForwardingInfo given each field
73          */
74         public static CounterpartyForwardingInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg) {
75                 long ret = bindings.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
76                 if (ret >= 0 && ret <= 4096) { return null; }
77                 CounterpartyForwardingInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new CounterpartyForwardingInfo(null, ret); }
78                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
79                 return ret_hu_conv;
80         }
81
82         /**
83          * Creates a copy of the CounterpartyForwardingInfo
84          */
85         public CounterpartyForwardingInfo clone() {
86                 long ret = bindings.CounterpartyForwardingInfo_clone(this.ptr);
87                 if (ret >= 0 && ret <= 4096) { return null; }
88                 CounterpartyForwardingInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new CounterpartyForwardingInfo(null, ret); }
89                 ret_hu_conv.ptrs_to.add(this);
90                 return ret_hu_conv;
91         }
92
93 }