Create structs and traits that are (a bit) more human-friendly!
[ldk-java] / src / main / java / org / ldk / structs / OpenChannel.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class OpenChannel extends CommonBase {
7         OpenChannel(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.OpenChannel_free(ptr); super.finalize();
11         }
12
13         public OpenChannel(OpenChannel orig) {
14                 super(bindings.OpenChannel_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public byte[] get_chain_hash(OpenChannel this_ptr) {
19                 byte[] ret = bindings.OpenChannel_get_chain_hash(this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_chain_hash(OpenChannel this_ptr, byte[] val) {
25                 bindings.OpenChannel_set_chain_hash(this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public byte[] get_temporary_channel_id(OpenChannel this_ptr) {
30                 byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_temporary_channel_id(OpenChannel this_ptr, byte[] val) {
36                 bindings.OpenChannel_set_temporary_channel_id(this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public long get_funding_satoshis(OpenChannel this_ptr) {
41                 long ret = bindings.OpenChannel_get_funding_satoshis(this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_funding_satoshis(OpenChannel this_ptr, long val) {
47                 bindings.OpenChannel_set_funding_satoshis(this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public long get_push_msat(OpenChannel this_ptr) {
52                 long ret = bindings.OpenChannel_get_push_msat(this_ptr.ptr & ~1);
53                 this.ptrs_to.add(this_ptr);
54                 return ret;
55         }
56
57         public void set_push_msat(OpenChannel this_ptr, long val) {
58                 bindings.OpenChannel_set_push_msat(this_ptr.ptr & ~1, val);
59                 this.ptrs_to.add(this_ptr);
60         }
61
62         public long get_dust_limit_satoshis(OpenChannel this_ptr) {
63                 long ret = bindings.OpenChannel_get_dust_limit_satoshis(this_ptr.ptr & ~1);
64                 this.ptrs_to.add(this_ptr);
65                 return ret;
66         }
67
68         public void set_dust_limit_satoshis(OpenChannel this_ptr, long val) {
69                 bindings.OpenChannel_set_dust_limit_satoshis(this_ptr.ptr & ~1, val);
70                 this.ptrs_to.add(this_ptr);
71         }
72
73         public long get_max_htlc_value_in_flight_msat(OpenChannel this_ptr) {
74                 long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1);
75                 this.ptrs_to.add(this_ptr);
76                 return ret;
77         }
78
79         public void set_max_htlc_value_in_flight_msat(OpenChannel this_ptr, long val) {
80                 bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1, val);
81                 this.ptrs_to.add(this_ptr);
82         }
83
84         public long get_channel_reserve_satoshis(OpenChannel this_ptr) {
85                 long ret = bindings.OpenChannel_get_channel_reserve_satoshis(this_ptr.ptr & ~1);
86                 this.ptrs_to.add(this_ptr);
87                 return ret;
88         }
89
90         public void set_channel_reserve_satoshis(OpenChannel this_ptr, long val) {
91                 bindings.OpenChannel_set_channel_reserve_satoshis(this_ptr.ptr & ~1, val);
92                 this.ptrs_to.add(this_ptr);
93         }
94
95         public long get_htlc_minimum_msat(OpenChannel this_ptr) {
96                 long ret = bindings.OpenChannel_get_htlc_minimum_msat(this_ptr.ptr & ~1);
97                 this.ptrs_to.add(this_ptr);
98                 return ret;
99         }
100
101         public void set_htlc_minimum_msat(OpenChannel this_ptr, long val) {
102                 bindings.OpenChannel_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
103                 this.ptrs_to.add(this_ptr);
104         }
105
106         public int get_feerate_per_kw(OpenChannel this_ptr) {
107                 int ret = bindings.OpenChannel_get_feerate_per_kw(this_ptr.ptr & ~1);
108                 this.ptrs_to.add(this_ptr);
109                 return ret;
110         }
111
112         public void set_feerate_per_kw(OpenChannel this_ptr, int val) {
113                 bindings.OpenChannel_set_feerate_per_kw(this_ptr.ptr & ~1, val);
114                 this.ptrs_to.add(this_ptr);
115         }
116
117         public short get_to_self_delay(OpenChannel this_ptr) {
118                 short ret = bindings.OpenChannel_get_to_self_delay(this_ptr.ptr & ~1);
119                 this.ptrs_to.add(this_ptr);
120                 return ret;
121         }
122
123         public void set_to_self_delay(OpenChannel this_ptr, short val) {
124                 bindings.OpenChannel_set_to_self_delay(this_ptr.ptr & ~1, val);
125                 this.ptrs_to.add(this_ptr);
126         }
127
128         public short get_max_accepted_htlcs(OpenChannel this_ptr) {
129                 short ret = bindings.OpenChannel_get_max_accepted_htlcs(this_ptr.ptr & ~1);
130                 this.ptrs_to.add(this_ptr);
131                 return ret;
132         }
133
134         public void set_max_accepted_htlcs(OpenChannel this_ptr, short val) {
135                 bindings.OpenChannel_set_max_accepted_htlcs(this_ptr.ptr & ~1, val);
136                 this.ptrs_to.add(this_ptr);
137         }
138
139         public byte[] get_funding_pubkey(OpenChannel this_ptr) {
140                 byte[] ret = bindings.OpenChannel_get_funding_pubkey(this_ptr.ptr & ~1);
141                 this.ptrs_to.add(this_ptr);
142                 return ret;
143         }
144
145         public void set_funding_pubkey(OpenChannel this_ptr, byte[] val) {
146                 bindings.OpenChannel_set_funding_pubkey(this_ptr.ptr & ~1, val);
147                 this.ptrs_to.add(this_ptr);
148         }
149
150         public byte[] get_revocation_basepoint(OpenChannel this_ptr) {
151                 byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this_ptr.ptr & ~1);
152                 this.ptrs_to.add(this_ptr);
153                 return ret;
154         }
155
156         public void set_revocation_basepoint(OpenChannel this_ptr, byte[] val) {
157                 bindings.OpenChannel_set_revocation_basepoint(this_ptr.ptr & ~1, val);
158                 this.ptrs_to.add(this_ptr);
159         }
160
161         public byte[] get_payment_point(OpenChannel this_ptr) {
162                 byte[] ret = bindings.OpenChannel_get_payment_point(this_ptr.ptr & ~1);
163                 this.ptrs_to.add(this_ptr);
164                 return ret;
165         }
166
167         public void set_payment_point(OpenChannel this_ptr, byte[] val) {
168                 bindings.OpenChannel_set_payment_point(this_ptr.ptr & ~1, val);
169                 this.ptrs_to.add(this_ptr);
170         }
171
172         public byte[] get_delayed_payment_basepoint(OpenChannel this_ptr) {
173                 byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this_ptr.ptr & ~1);
174                 this.ptrs_to.add(this_ptr);
175                 return ret;
176         }
177
178         public void set_delayed_payment_basepoint(OpenChannel this_ptr, byte[] val) {
179                 bindings.OpenChannel_set_delayed_payment_basepoint(this_ptr.ptr & ~1, val);
180                 this.ptrs_to.add(this_ptr);
181         }
182
183         public byte[] get_htlc_basepoint(OpenChannel this_ptr) {
184                 byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this_ptr.ptr & ~1);
185                 this.ptrs_to.add(this_ptr);
186                 return ret;
187         }
188
189         public void set_htlc_basepoint(OpenChannel this_ptr, byte[] val) {
190                 bindings.OpenChannel_set_htlc_basepoint(this_ptr.ptr & ~1, val);
191                 this.ptrs_to.add(this_ptr);
192         }
193
194         public byte[] get_first_per_commitment_point(OpenChannel this_ptr) {
195                 byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this_ptr.ptr & ~1);
196                 this.ptrs_to.add(this_ptr);
197                 return ret;
198         }
199
200         public void set_first_per_commitment_point(OpenChannel this_ptr, byte[] val) {
201                 bindings.OpenChannel_set_first_per_commitment_point(this_ptr.ptr & ~1, val);
202                 this.ptrs_to.add(this_ptr);
203         }
204
205         public byte get_channel_flags(OpenChannel this_ptr) {
206                 byte ret = bindings.OpenChannel_get_channel_flags(this_ptr.ptr & ~1);
207                 this.ptrs_to.add(this_ptr);
208                 return ret;
209         }
210
211         public void set_channel_flags(OpenChannel this_ptr, byte val) {
212                 bindings.OpenChannel_set_channel_flags(this_ptr.ptr & ~1, val);
213                 this.ptrs_to.add(this_ptr);
214         }
215
216         // Skipped OpenChannel_write
217         // Skipped OpenChannel_read
218 }