Skip to content

Commit 1854b5c

Browse files
committed
Update auto-updated Java files
1 parent 5fd405f commit 1854b5c

File tree

371 files changed

+13519
-3397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+13519
-3397
lines changed

java_strings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def __init__(self, DEBUG: bool, target: Target, **kwargs):
106106
import org.ldk.enums.*;
107107
import org.ldk.util.*;
108108
import java.util.Arrays;
109+
import java.lang.ref.Reference;
109110
import javax.annotation.Nullable;
110111
111112
public class UtilMethods {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package org.ldk.enums;
2+
3+
/**
4+
* An enum which can either contain a or not
5+
*/
6+
public enum COption_NoneZ {
7+
/**
8+
* When we're in this state, this COption_NoneZ contains a
9+
*/
10+
LDKCOption_NoneZ_Some,
11+
/**
12+
* When we're in this state, this COption_NoneZ contains nothing
13+
*/
14+
LDKCOption_NoneZ_None,
15+
; static native void init();
16+
static { init(); }
17+
}

src/main/java/org/ldk/enums/CreationError.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public enum CreationError {
2020
* The supplied expiry time could cause an overflow if added to a `PositiveTimestamp`
2121
*/
2222
LDKCreationError_ExpiryTimeOutOfBounds,
23+
/**
24+
* The supplied millisatoshi amount was greater than the total bitcoin supply.
25+
*/
26+
LDKCreationError_InvalidAmount,
2327
; static native void init();
2428
static { init(); }
2529
}

src/main/java/org/ldk/enums/Level.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
* An enum representing the available verbosity levels of the logger.
55
*/
66
public enum Level {
7+
/**
8+
* Designates extremely verbose information, including gossip-induced messages
9+
*/
10+
LDKLevel_Gossip,
711
/**
812
* Designates very low priority, often extremely verbose, information
913
*/

src/main/java/org/ldk/impl/bindings.java

Lines changed: 263 additions & 113 deletions
Large diffs are not rendered by default.

src/main/java/org/ldk/structs/APIError.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.ldk.enums.*;
55
import org.ldk.util.*;
66
import java.util.Arrays;
7+
import java.lang.ref.Reference;
78
import javax.annotation.Nullable;
89

910

@@ -139,6 +140,7 @@ private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleSh
139140
}
140141
long clone_ptr() {
141142
long ret = bindings.APIError_clone_ptr(this.ptr);
143+
Reference.reachabilityFence(this);
142144
return ret;
143145
}
144146

@@ -147,6 +149,7 @@ long clone_ptr() {
147149
*/
148150
public APIError clone() {
149151
long ret = bindings.APIError_clone(this.ptr);
152+
Reference.reachabilityFence(this);
150153
if (ret >= 0 && ret <= 4096) { return null; }
151154
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
152155
ret_hu_conv.ptrs_to.add(this);
@@ -158,6 +161,7 @@ public APIError clone() {
158161
*/
159162
public static APIError apimisuse_error(java.lang.String err) {
160163
long ret = bindings.APIError_apimisuse_error(err);
164+
Reference.reachabilityFence(err);
161165
if (ret >= 0 && ret <= 4096) { return null; }
162166
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
163167
ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -169,6 +173,8 @@ public static APIError apimisuse_error(java.lang.String err) {
169173
*/
170174
public static APIError fee_rate_too_high(java.lang.String err, int feerate) {
171175
long ret = bindings.APIError_fee_rate_too_high(err, feerate);
176+
Reference.reachabilityFence(err);
177+
Reference.reachabilityFence(feerate);
172178
if (ret >= 0 && ret <= 4096) { return null; }
173179
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
174180
ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -180,6 +186,7 @@ public static APIError fee_rate_too_high(java.lang.String err, int feerate) {
180186
*/
181187
public static APIError route_error(java.lang.String err) {
182188
long ret = bindings.APIError_route_error(err);
189+
Reference.reachabilityFence(err);
183190
if (ret >= 0 && ret <= 4096) { return null; }
184191
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
185192
ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -191,6 +198,7 @@ public static APIError route_error(java.lang.String err) {
191198
*/
192199
public static APIError channel_unavailable(java.lang.String err) {
193200
long ret = bindings.APIError_channel_unavailable(err);
201+
Reference.reachabilityFence(err);
194202
if (ret >= 0 && ret <= 4096) { return null; }
195203
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
196204
ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -213,6 +221,7 @@ public static APIError monitor_update_failed() {
213221
*/
214222
public static APIError incompatible_shutdown_script(ShutdownScript script) {
215223
long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr & ~1);
224+
Reference.reachabilityFence(script);
216225
if (ret >= 0 && ret <= 4096) { return null; }
217226
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
218227
ret_hu_conv.ptrs_to.add(ret_hu_conv);

src/main/java/org/ldk/structs/AcceptChannel.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.ldk.enums.*;
55
import org.ldk.util.*;
66
import java.util.Arrays;
7+
import java.lang.ref.Reference;
78
import javax.annotation.Nullable;
89

910

@@ -24,6 +25,7 @@ protected void finalize() throws Throwable {
2425
*/
2526
public byte[] get_temporary_channel_id() {
2627
byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
28+
Reference.reachabilityFence(this);
2729
return ret;
2830
}
2931

@@ -32,13 +34,16 @@ public byte[] get_temporary_channel_id() {
3234
*/
3335
public void set_temporary_channel_id(byte[] val) {
3436
bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
37+
Reference.reachabilityFence(this);
38+
Reference.reachabilityFence(val);
3539
}
3640

3741
/**
3842
* The threshold below which outputs on transactions broadcast by sender will be omitted
3943
*/
4044
public long get_dust_limit_satoshis() {
4145
long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
46+
Reference.reachabilityFence(this);
4247
return ret;
4348
}
4449

@@ -47,13 +52,16 @@ public long get_dust_limit_satoshis() {
4752
*/
4853
public void set_dust_limit_satoshis(long val) {
4954
bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
55+
Reference.reachabilityFence(this);
56+
Reference.reachabilityFence(val);
5057
}
5158

5259
/**
5360
* The maximum inbound HTLC value in flight towards sender, in milli-satoshi
5461
*/
5562
public long get_max_htlc_value_in_flight_msat() {
5663
long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
64+
Reference.reachabilityFence(this);
5765
return ret;
5866
}
5967

@@ -62,13 +70,16 @@ public long get_max_htlc_value_in_flight_msat() {
6270
*/
6371
public void set_max_htlc_value_in_flight_msat(long val) {
6472
bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
73+
Reference.reachabilityFence(this);
74+
Reference.reachabilityFence(val);
6575
}
6676

6777
/**
6878
* The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
6979
*/
7080
public long get_channel_reserve_satoshis() {
7181
long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this.ptr);
82+
Reference.reachabilityFence(this);
7283
return ret;
7384
}
7485

@@ -77,13 +88,16 @@ public long get_channel_reserve_satoshis() {
7788
*/
7889
public void set_channel_reserve_satoshis(long val) {
7990
bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val);
91+
Reference.reachabilityFence(this);
92+
Reference.reachabilityFence(val);
8093
}
8194

8295
/**
8396
* The minimum HTLC size incoming to sender, in milli-satoshi
8497
*/
8598
public long get_htlc_minimum_msat() {
8699
long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
100+
Reference.reachabilityFence(this);
87101
return ret;
88102
}
89103

@@ -92,13 +106,16 @@ public long get_htlc_minimum_msat() {
92106
*/
93107
public void set_htlc_minimum_msat(long val) {
94108
bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
109+
Reference.reachabilityFence(this);
110+
Reference.reachabilityFence(val);
95111
}
96112

97113
/**
98114
* Minimum depth of the funding transaction before the channel is considered open
99115
*/
100116
public int get_minimum_depth() {
101117
int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
118+
Reference.reachabilityFence(this);
102119
return ret;
103120
}
104121

@@ -107,13 +124,16 @@ public int get_minimum_depth() {
107124
*/
108125
public void set_minimum_depth(int val) {
109126
bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
127+
Reference.reachabilityFence(this);
128+
Reference.reachabilityFence(val);
110129
}
111130

112131
/**
113132
* The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
114133
*/
115134
public short get_to_self_delay() {
116135
short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
136+
Reference.reachabilityFence(this);
117137
return ret;
118138
}
119139

@@ -122,13 +142,16 @@ public short get_to_self_delay() {
122142
*/
123143
public void set_to_self_delay(short val) {
124144
bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
145+
Reference.reachabilityFence(this);
146+
Reference.reachabilityFence(val);
125147
}
126148

127149
/**
128150
* The maximum number of inbound HTLCs towards sender
129151
*/
130152
public short get_max_accepted_htlcs() {
131153
short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
154+
Reference.reachabilityFence(this);
132155
return ret;
133156
}
134157

@@ -137,13 +160,16 @@ public short get_max_accepted_htlcs() {
137160
*/
138161
public void set_max_accepted_htlcs(short val) {
139162
bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
163+
Reference.reachabilityFence(this);
164+
Reference.reachabilityFence(val);
140165
}
141166

142167
/**
143168
* The sender's key controlling the funding transaction
144169
*/
145170
public byte[] get_funding_pubkey() {
146171
byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
172+
Reference.reachabilityFence(this);
147173
return ret;
148174
}
149175

@@ -152,13 +178,16 @@ public byte[] get_funding_pubkey() {
152178
*/
153179
public void set_funding_pubkey(byte[] val) {
154180
bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
181+
Reference.reachabilityFence(this);
182+
Reference.reachabilityFence(val);
155183
}
156184

157185
/**
158186
* Used to derive a revocation key for transactions broadcast by counterparty
159187
*/
160188
public byte[] get_revocation_basepoint() {
161189
byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
190+
Reference.reachabilityFence(this);
162191
return ret;
163192
}
164193

@@ -167,13 +196,16 @@ public byte[] get_revocation_basepoint() {
167196
*/
168197
public void set_revocation_basepoint(byte[] val) {
169198
bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
199+
Reference.reachabilityFence(this);
200+
Reference.reachabilityFence(val);
170201
}
171202

172203
/**
173204
* A payment key to sender for transactions broadcast by counterparty
174205
*/
175206
public byte[] get_payment_point() {
176207
byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
208+
Reference.reachabilityFence(this);
177209
return ret;
178210
}
179211

@@ -182,13 +214,16 @@ public byte[] get_payment_point() {
182214
*/
183215
public void set_payment_point(byte[] val) {
184216
bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
217+
Reference.reachabilityFence(this);
218+
Reference.reachabilityFence(val);
185219
}
186220

187221
/**
188222
* Used to derive a payment key to sender for transactions broadcast by sender
189223
*/
190224
public byte[] get_delayed_payment_basepoint() {
191225
byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
226+
Reference.reachabilityFence(this);
192227
return ret;
193228
}
194229

@@ -197,13 +232,16 @@ public byte[] get_delayed_payment_basepoint() {
197232
*/
198233
public void set_delayed_payment_basepoint(byte[] val) {
199234
bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
235+
Reference.reachabilityFence(this);
236+
Reference.reachabilityFence(val);
200237
}
201238

202239
/**
203240
* Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
204241
*/
205242
public byte[] get_htlc_basepoint() {
206243
byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
244+
Reference.reachabilityFence(this);
207245
return ret;
208246
}
209247

@@ -212,13 +250,16 @@ public byte[] get_htlc_basepoint() {
212250
*/
213251
public void set_htlc_basepoint(byte[] val) {
214252
bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
253+
Reference.reachabilityFence(this);
254+
Reference.reachabilityFence(val);
215255
}
216256

217257
/**
218258
* The first to-be-broadcast-by-sender transaction's per commitment point
219259
*/
220260
public byte[] get_first_per_commitment_point() {
221261
byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
262+
Reference.reachabilityFence(this);
222263
return ret;
223264
}
224265

@@ -227,10 +268,13 @@ public byte[] get_first_per_commitment_point() {
227268
*/
228269
public void set_first_per_commitment_point(byte[] val) {
229270
bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
271+
Reference.reachabilityFence(this);
272+
Reference.reachabilityFence(val);
230273
}
231274

232275
long clone_ptr() {
233276
long ret = bindings.AcceptChannel_clone_ptr(this.ptr);
277+
Reference.reachabilityFence(this);
234278
return ret;
235279
}
236280

@@ -239,6 +283,7 @@ long clone_ptr() {
239283
*/
240284
public AcceptChannel clone() {
241285
long ret = bindings.AcceptChannel_clone(this.ptr);
286+
Reference.reachabilityFence(this);
242287
if (ret >= 0 && ret <= 4096) { return null; }
243288
AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AcceptChannel(null, ret); }
244289
ret_hu_conv.ptrs_to.add(this);
@@ -250,6 +295,7 @@ public AcceptChannel clone() {
250295
*/
251296
public byte[] write() {
252297
byte[] ret = bindings.AcceptChannel_write(this.ptr);
298+
Reference.reachabilityFence(this);
253299
return ret;
254300
}
255301

@@ -258,6 +304,7 @@ public byte[] write() {
258304
*/
259305
public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) {
260306
long ret = bindings.AcceptChannel_read(ser);
307+
Reference.reachabilityFence(ser);
261308
if (ret >= 0 && ret <= 4096) { return null; }
262309
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
263310
return ret_hu_conv;

0 commit comments

Comments
 (0)