Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / AcceptChannel.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  * An accept_channel message to be sent or received from a peer
12  */
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class AcceptChannel extends CommonBase {
15         AcceptChannel(Object _dummy, long ptr) { super(ptr); }
16         @Override @SuppressWarnings("deprecation")
17         protected void finalize() throws Throwable {
18                 super.finalize();
19                 if (ptr != 0) { bindings.AcceptChannel_free(ptr); }
20         }
21
22         /**
23          * A temporary channel ID, until the funding outpoint is announced
24          */
25         public byte[] get_temporary_channel_id() {
26                 byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
27                 return ret;
28         }
29
30         /**
31          * A temporary channel ID, until the funding outpoint is announced
32          */
33         public void set_temporary_channel_id(byte[] val) {
34                 bindings.AcceptChannel_set_temporary_channel_id(this.ptr, val);
35         }
36
37         /**
38          * The threshold below which outputs on transactions broadcast by sender will be omitted
39          */
40         public long get_dust_limit_satoshis() {
41                 long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
42                 return ret;
43         }
44
45         /**
46          * The threshold below which outputs on transactions broadcast by sender will be omitted
47          */
48         public void set_dust_limit_satoshis(long val) {
49                 bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
50         }
51
52         /**
53          * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
54          */
55         public long get_max_htlc_value_in_flight_msat() {
56                 long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
57                 return ret;
58         }
59
60         /**
61          * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
62          */
63         public void set_max_htlc_value_in_flight_msat(long val) {
64                 bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
65         }
66
67         /**
68          * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
69          */
70         public long get_channel_reserve_satoshis() {
71                 long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this.ptr);
72                 return ret;
73         }
74
75         /**
76          * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
77          */
78         public void set_channel_reserve_satoshis(long val) {
79                 bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val);
80         }
81
82         /**
83          * The minimum HTLC size incoming to sender, in milli-satoshi
84          */
85         public long get_htlc_minimum_msat() {
86                 long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
87                 return ret;
88         }
89
90         /**
91          * The minimum HTLC size incoming to sender, in milli-satoshi
92          */
93         public void set_htlc_minimum_msat(long val) {
94                 bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
95         }
96
97         /**
98          * Minimum depth of the funding transaction before the channel is considered open
99          */
100         public int get_minimum_depth() {
101                 int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
102                 return ret;
103         }
104
105         /**
106          * Minimum depth of the funding transaction before the channel is considered open
107          */
108         public void set_minimum_depth(int val) {
109                 bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
110         }
111
112         /**
113          * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
114          */
115         public short get_to_self_delay() {
116                 short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
117                 return ret;
118         }
119
120         /**
121          * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
122          */
123         public void set_to_self_delay(short val) {
124                 bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
125         }
126
127         /**
128          * The maximum number of inbound HTLCs towards sender
129          */
130         public short get_max_accepted_htlcs() {
131                 short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
132                 return ret;
133         }
134
135         /**
136          * The maximum number of inbound HTLCs towards sender
137          */
138         public void set_max_accepted_htlcs(short val) {
139                 bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
140         }
141
142         /**
143          * The sender's key controlling the funding transaction
144          */
145         public byte[] get_funding_pubkey() {
146                 byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
147                 return ret;
148         }
149
150         /**
151          * The sender's key controlling the funding transaction
152          */
153         public void set_funding_pubkey(byte[] val) {
154                 bindings.AcceptChannel_set_funding_pubkey(this.ptr, val);
155         }
156
157         /**
158          * Used to derive a revocation key for transactions broadcast by counterparty
159          */
160         public byte[] get_revocation_basepoint() {
161                 byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
162                 return ret;
163         }
164
165         /**
166          * Used to derive a revocation key for transactions broadcast by counterparty
167          */
168         public void set_revocation_basepoint(byte[] val) {
169                 bindings.AcceptChannel_set_revocation_basepoint(this.ptr, val);
170         }
171
172         /**
173          * A payment key to sender for transactions broadcast by counterparty
174          */
175         public byte[] get_payment_point() {
176                 byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
177                 return ret;
178         }
179
180         /**
181          * A payment key to sender for transactions broadcast by counterparty
182          */
183         public void set_payment_point(byte[] val) {
184                 bindings.AcceptChannel_set_payment_point(this.ptr, val);
185         }
186
187         /**
188          * Used to derive a payment key to sender for transactions broadcast by sender
189          */
190         public byte[] get_delayed_payment_basepoint() {
191                 byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
192                 return ret;
193         }
194
195         /**
196          * Used to derive a payment key to sender for transactions broadcast by sender
197          */
198         public void set_delayed_payment_basepoint(byte[] val) {
199                 bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, val);
200         }
201
202         /**
203          * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
204          */
205         public byte[] get_htlc_basepoint() {
206                 byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
207                 return ret;
208         }
209
210         /**
211          * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
212          */
213         public void set_htlc_basepoint(byte[] val) {
214                 bindings.AcceptChannel_set_htlc_basepoint(this.ptr, val);
215         }
216
217         /**
218          * The first to-be-broadcast-by-sender transaction's per commitment point
219          */
220         public byte[] get_first_per_commitment_point() {
221                 byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
222                 return ret;
223         }
224
225         /**
226          * The first to-be-broadcast-by-sender transaction's per commitment point
227          */
228         public void set_first_per_commitment_point(byte[] val) {
229                 bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
230         }
231
232         /**
233          * Creates a copy of the AcceptChannel
234          */
235         public AcceptChannel clone() {
236                 long ret = bindings.AcceptChannel_clone(this.ptr);
237                 if (ret >= 0 && ret <= 4096) { return null; }
238                 AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AcceptChannel(null, ret); }
239                 ret_hu_conv.ptrs_to.add(this);
240                 return ret_hu_conv;
241         }
242
243         /**
244          * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
245          */
246         public byte[] write() {
247                 byte[] ret = bindings.AcceptChannel_write(this.ptr);
248                 return ret;
249         }
250
251         /**
252          * Read a AcceptChannel from a byte array, created by AcceptChannel_write
253          */
254         public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) {
255                 long ret = bindings.AcceptChannel_read(ser);
256                 if (ret >= 0 && ret <= 4096) { return null; }
257                 Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
258                 return ret_hu_conv;
259         }
260
261 }