Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / UnsignedChannelUpdate.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
8
9 /**
10  * The unsigned part of a channel_update
11  */
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class UnsignedChannelUpdate extends CommonBase {
14         UnsignedChannelUpdate(Object _dummy, long ptr) { super(ptr); }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 super.finalize();
18                 if (ptr != 0) { bindings.UnsignedChannelUpdate_free(ptr); }
19         }
20
21         /**
22          * The genesis hash of the blockchain where the channel is to be opened
23          */
24         public byte[] get_chain_hash() {
25                 byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
26                 return ret;
27         }
28
29         /**
30          * The genesis hash of the blockchain where the channel is to be opened
31          */
32         public void set_chain_hash(byte[] val) {
33                 bindings.UnsignedChannelUpdate_set_chain_hash(this.ptr, val);
34         }
35
36         /**
37          * The short channel ID
38          */
39         public long get_short_channel_id() {
40                 long ret = bindings.UnsignedChannelUpdate_get_short_channel_id(this.ptr);
41                 return ret;
42         }
43
44         /**
45          * The short channel ID
46          */
47         public void set_short_channel_id(long val) {
48                 bindings.UnsignedChannelUpdate_set_short_channel_id(this.ptr, val);
49         }
50
51         /**
52          * A strictly monotonic announcement counter, with gaps allowed, specific to this channel
53          */
54         public int get_timestamp() {
55                 int ret = bindings.UnsignedChannelUpdate_get_timestamp(this.ptr);
56                 return ret;
57         }
58
59         /**
60          * A strictly monotonic announcement counter, with gaps allowed, specific to this channel
61          */
62         public void set_timestamp(int val) {
63                 bindings.UnsignedChannelUpdate_set_timestamp(this.ptr, val);
64         }
65
66         /**
67          * Channel flags
68          */
69         public byte get_flags() {
70                 byte ret = bindings.UnsignedChannelUpdate_get_flags(this.ptr);
71                 return ret;
72         }
73
74         /**
75          * Channel flags
76          */
77         public void set_flags(byte val) {
78                 bindings.UnsignedChannelUpdate_set_flags(this.ptr, val);
79         }
80
81         /**
82          * The number of blocks such that if:
83          * `incoming_htlc.cltv_expiry < outgoing_htlc.cltv_expiry + cltv_expiry_delta`
84          * then we need to fail the HTLC backwards. When forwarding an HTLC, cltv_expiry_delta determines
85          * the outgoing HTLC's minimum cltv_expiry value -- so, if an incoming HTLC comes in with a
86          * cltv_expiry of 100000, and the node we're forwarding to has a cltv_expiry_delta value of 10,
87          * then we'll check that the outgoing HTLC's cltv_expiry value is at least 100010 before
88          * forwarding. Note that the HTLC sender is the one who originally sets this value when
89          * constructing the route.
90          */
91         public short get_cltv_expiry_delta() {
92                 short ret = bindings.UnsignedChannelUpdate_get_cltv_expiry_delta(this.ptr);
93                 return ret;
94         }
95
96         /**
97          * The number of blocks such that if:
98          * `incoming_htlc.cltv_expiry < outgoing_htlc.cltv_expiry + cltv_expiry_delta`
99          * then we need to fail the HTLC backwards. When forwarding an HTLC, cltv_expiry_delta determines
100          * the outgoing HTLC's minimum cltv_expiry value -- so, if an incoming HTLC comes in with a
101          * cltv_expiry of 100000, and the node we're forwarding to has a cltv_expiry_delta value of 10,
102          * then we'll check that the outgoing HTLC's cltv_expiry value is at least 100010 before
103          * forwarding. Note that the HTLC sender is the one who originally sets this value when
104          * constructing the route.
105          */
106         public void set_cltv_expiry_delta(short val) {
107                 bindings.UnsignedChannelUpdate_set_cltv_expiry_delta(this.ptr, val);
108         }
109
110         /**
111          * The minimum HTLC size incoming to sender, in milli-satoshi
112          */
113         public long get_htlc_minimum_msat() {
114                 long ret = bindings.UnsignedChannelUpdate_get_htlc_minimum_msat(this.ptr);
115                 return ret;
116         }
117
118         /**
119          * The minimum HTLC size incoming to sender, in milli-satoshi
120          */
121         public void set_htlc_minimum_msat(long val) {
122                 bindings.UnsignedChannelUpdate_set_htlc_minimum_msat(this.ptr, val);
123         }
124
125         /**
126          * The base HTLC fee charged by sender, in milli-satoshi
127          */
128         public int get_fee_base_msat() {
129                 int ret = bindings.UnsignedChannelUpdate_get_fee_base_msat(this.ptr);
130                 return ret;
131         }
132
133         /**
134          * The base HTLC fee charged by sender, in milli-satoshi
135          */
136         public void set_fee_base_msat(int val) {
137                 bindings.UnsignedChannelUpdate_set_fee_base_msat(this.ptr, val);
138         }
139
140         /**
141          * The amount to fee multiplier, in micro-satoshi
142          */
143         public int get_fee_proportional_millionths() {
144                 int ret = bindings.UnsignedChannelUpdate_get_fee_proportional_millionths(this.ptr);
145                 return ret;
146         }
147
148         /**
149          * The amount to fee multiplier, in micro-satoshi
150          */
151         public void set_fee_proportional_millionths(int val) {
152                 bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
153         }
154
155         /**
156          * Creates a copy of the UnsignedChannelUpdate
157          */
158         public UnsignedChannelUpdate clone() {
159                 long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
160                 UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
161                 ret_hu_conv.ptrs_to.add(this);
162                 return ret_hu_conv;
163         }
164
165         /**
166          * Serialize the UnsignedChannelUpdate object into a byte array which can be read by UnsignedChannelUpdate_read
167          */
168         public byte[] write() {
169                 byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
170                 return ret;
171         }
172
173         /**
174          * Read a UnsignedChannelUpdate from a byte array, created by UnsignedChannelUpdate_write
175          */
176         public static Result_UnsignedChannelUpdateDecodeErrorZ read(byte[] ser) {
177                 long ret = bindings.UnsignedChannelUpdate_read(ser);
178                 Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
179                 return ret_hu_conv;
180         }
181
182 }