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