Skip to content

Commit c6bac88

Browse files
Matt CoralloTheBlueMatt
authored andcommitted
Update auto-generated bindings to 0.0.103
1 parent 0d48e55 commit c6bac88

File tree

338 files changed

+22502
-8058
lines changed

Some content is hidden

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

338 files changed

+22502
-8058
lines changed

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

Lines changed: 369 additions & 96 deletions
Large diffs are not rendered by default.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public final static class IncompatibleShutdownScript extends APIError {
100100
private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleShutdownScript obj) {
101101
super(null, ptr);
102102
long script = obj.script;
103-
ShutdownScript script_hu_conv = new ShutdownScript(null, script);
103+
ShutdownScript script_hu_conv = null; if (script < 0 || script > 4096) { script_hu_conv = new ShutdownScript(null, script); }
104104
script_hu_conv.ptrs_to.add(this);
105105
this.script = script_hu_conv;
106106
}
@@ -110,7 +110,7 @@ private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleSh
110110
*/
111111
public APIError clone() {
112112
long ret = bindings.APIError_clone(this.ptr);
113-
if (ret >= 0 && ret < 1024) { return null; }
113+
if (ret >= 0 && ret <= 4096) { return null; }
114114
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
115115
ret_hu_conv.ptrs_to.add(this);
116116
return ret_hu_conv;
@@ -121,7 +121,7 @@ public APIError clone() {
121121
*/
122122
public static APIError apimisuse_error(java.lang.String err) {
123123
long ret = bindings.APIError_apimisuse_error(err);
124-
if (ret >= 0 && ret < 1024) { return null; }
124+
if (ret >= 0 && ret <= 4096) { return null; }
125125
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
126126
ret_hu_conv.ptrs_to.add(ret_hu_conv);
127127
return ret_hu_conv;
@@ -132,7 +132,7 @@ public static APIError apimisuse_error(java.lang.String err) {
132132
*/
133133
public static APIError fee_rate_too_high(java.lang.String err, int feerate) {
134134
long ret = bindings.APIError_fee_rate_too_high(err, feerate);
135-
if (ret >= 0 && ret < 1024) { return null; }
135+
if (ret >= 0 && ret <= 4096) { return null; }
136136
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
137137
ret_hu_conv.ptrs_to.add(ret_hu_conv);
138138
return ret_hu_conv;
@@ -143,7 +143,7 @@ public static APIError fee_rate_too_high(java.lang.String err, int feerate) {
143143
*/
144144
public static APIError route_error(java.lang.String err) {
145145
long ret = bindings.APIError_route_error(err);
146-
if (ret >= 0 && ret < 1024) { return null; }
146+
if (ret >= 0 && ret <= 4096) { return null; }
147147
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
148148
ret_hu_conv.ptrs_to.add(ret_hu_conv);
149149
return ret_hu_conv;
@@ -154,7 +154,7 @@ public static APIError route_error(java.lang.String err) {
154154
*/
155155
public static APIError channel_unavailable(java.lang.String err) {
156156
long ret = bindings.APIError_channel_unavailable(err);
157-
if (ret >= 0 && ret < 1024) { return null; }
157+
if (ret >= 0 && ret <= 4096) { return null; }
158158
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
159159
ret_hu_conv.ptrs_to.add(ret_hu_conv);
160160
return ret_hu_conv;
@@ -165,7 +165,7 @@ public static APIError channel_unavailable(java.lang.String err) {
165165
*/
166166
public static APIError monitor_update_failed() {
167167
long ret = bindings.APIError_monitor_update_failed();
168-
if (ret >= 0 && ret < 1024) { return null; }
168+
if (ret >= 0 && ret <= 4096) { return null; }
169169
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
170170
ret_hu_conv.ptrs_to.add(ret_hu_conv);
171171
return ret_hu_conv;
@@ -176,7 +176,7 @@ public static APIError monitor_update_failed() {
176176
*/
177177
public static APIError incompatible_shutdown_script(ShutdownScript script) {
178178
long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr & ~1);
179-
if (ret >= 0 && ret < 1024) { return null; }
179+
if (ret >= 0 && ret <= 4096) { return null; }
180180
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
181181
ret_hu_conv.ptrs_to.add(ret_hu_conv);
182182
return ret_hu_conv;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ public void set_first_per_commitment_point(byte[] val) {
234234
*/
235235
public AcceptChannel clone() {
236236
long ret = bindings.AcceptChannel_clone(this.ptr);
237-
if (ret >= 0 && ret < 1024) { return null; }
238-
AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
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); }
239239
ret_hu_conv.ptrs_to.add(this);
240240
return ret_hu_conv;
241241
}
@@ -253,7 +253,7 @@ public byte[] write() {
253253
*/
254254
public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) {
255255
long ret = bindings.AcceptChannel_read(ser);
256-
if (ret >= 0 && ret < 1024) { return null; }
256+
if (ret >= 0 && ret <= 4096) { return null; }
257257
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
258258
return ret_hu_conv;
259259
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static Access new_impl(AccessInterface arg) {
5555
*/
5656
public Result_TxOutAccessErrorZ get_utxo(byte[] genesis_hash, long short_channel_id) {
5757
long ret = bindings.Access_get_utxo(this.ptr, genesis_hash, short_channel_id);
58-
if (ret >= 0 && ret < 1024) { return null; }
58+
if (ret >= 0 && ret <= 4096) { return null; }
5959
Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
6060
return ret_hu_conv;
6161
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public void set_bitcoin_signature(byte[] val) {
8484
*/
8585
public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) {
8686
long ret = bindings.AnnouncementSignatures_new(channel_id_arg, short_channel_id_arg, node_signature_arg, bitcoin_signature_arg);
87-
if (ret >= 0 && ret < 1024) { return null; }
88-
AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
87+
if (ret >= 0 && ret <= 4096) { return null; }
88+
AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AnnouncementSignatures(null, ret); }
8989
ret_hu_conv.ptrs_to.add(ret_hu_conv);
9090
return ret_hu_conv;
9191
}
@@ -95,8 +95,8 @@ public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channe
9595
*/
9696
public AnnouncementSignatures clone() {
9797
long ret = bindings.AnnouncementSignatures_clone(this.ptr);
98-
if (ret >= 0 && ret < 1024) { return null; }
99-
AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
98+
if (ret >= 0 && ret <= 4096) { return null; }
99+
AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AnnouncementSignatures(null, ret); }
100100
ret_hu_conv.ptrs_to.add(this);
101101
return ret_hu_conv;
102102
}
@@ -114,7 +114,7 @@ public byte[] write() {
114114
*/
115115
public static Result_AnnouncementSignaturesDecodeErrorZ read(byte[] ser) {
116116
long ret = bindings.AnnouncementSignatures_read(ser);
117-
if (ret >= 0 && ret < 1024) { return null; }
117+
if (ret >= 0 && ret <= 4096) { return null; }
118118
Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
119119
return ret_hu_conv;
120120
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ protected void finalize() throws Throwable {
7777
*
7878
* Note that net_graph_msg_handler (or a relevant inner pointer) may be NULL or all-0s to represent None
7979
*/
80-
public static BackgroundProcessor start(ChannelManagerPersister persister, EventHandler event_handler, ChainMonitor chain_monitor, ChannelManager channel_manager, NetGraphMsgHandler net_graph_msg_handler, PeerManager peer_manager, Logger logger) {
80+
public static BackgroundProcessor start(ChannelManagerPersister persister, EventHandler event_handler, ChainMonitor chain_monitor, ChannelManager channel_manager, @Nullable NetGraphMsgHandler net_graph_msg_handler, PeerManager peer_manager, Logger logger) {
8181
long ret = bindings.BackgroundProcessor_start(persister == null ? 0 : persister.ptr, event_handler == null ? 0 : event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr & ~1, channel_manager == null ? 0 : channel_manager.ptr & ~1, net_graph_msg_handler == null ? 0 : net_graph_msg_handler.ptr & ~1, peer_manager == null ? 0 : peer_manager.ptr & ~1, logger == null ? 0 : logger.ptr);
82-
if (ret >= 0 && ret < 1024) { return null; }
83-
BackgroundProcessor ret_hu_conv = new BackgroundProcessor(null, ret);
82+
if (ret >= 0 && ret <= 4096) { return null; }
83+
BackgroundProcessor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new BackgroundProcessor(null, ret); }
8484
ret_hu_conv.ptrs_to.add(ret_hu_conv);
8585
ret_hu_conv.ptrs_to.add(persister);
8686
ret_hu_conv.ptrs_to.add(event_handler);
@@ -105,7 +105,7 @@ public static BackgroundProcessor start(ChannelManagerPersister persister, Event
105105
*/
106106
public Result_NoneErrorZ join() {
107107
long ret = bindings.BackgroundProcessor_join(this.ptr);
108-
if (ret >= 0 && ret < 1024) { return null; }
108+
if (ret >= 0 && ret <= 4096) { return null; }
109109
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
110110
this.ptrs_to.add(this);
111111
// Due to rust's strict-ownership memory model, in some cases we need to "move"
@@ -132,7 +132,7 @@ public Result_NoneErrorZ join() {
132132
*/
133133
public Result_NoneErrorZ stop() {
134134
long ret = bindings.BackgroundProcessor_stop(this.ptr);
135-
if (ret >= 0 && ret < 1024) { return null; }
135+
if (ret >= 0 && ret <= 4096) { return null; }
136136
Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
137137
this.ptrs_to.add(this);
138138
// Due to rust's strict-ownership memory model, in some cases we need to "move"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private MaybeClaimableHTLCAwaitingTimeout(long ptr, bindings.LDKBalance.MaybeCla
105105
*/
106106
public Balance clone() {
107107
long ret = bindings.Balance_clone(this.ptr);
108-
if (ret >= 0 && ret < 1024) { return null; }
108+
if (ret >= 0 && ret <= 4096) { return null; }
109109
Balance ret_hu_conv = Balance.constr_from_ptr(ret);
110110
ret_hu_conv.ptrs_to.add(this);
111111
return ret_hu_conv;
@@ -116,7 +116,7 @@ public Balance clone() {
116116
*/
117117
public static Balance claimable_on_channel_close(long claimable_amount_satoshis) {
118118
long ret = bindings.Balance_claimable_on_channel_close(claimable_amount_satoshis);
119-
if (ret >= 0 && ret < 1024) { return null; }
119+
if (ret >= 0 && ret <= 4096) { return null; }
120120
Balance ret_hu_conv = Balance.constr_from_ptr(ret);
121121
ret_hu_conv.ptrs_to.add(ret_hu_conv);
122122
return ret_hu_conv;
@@ -127,7 +127,7 @@ public static Balance claimable_on_channel_close(long claimable_amount_satoshis)
127127
*/
128128
public static Balance claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height) {
129129
long ret = bindings.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
130-
if (ret >= 0 && ret < 1024) { return null; }
130+
if (ret >= 0 && ret <= 4096) { return null; }
131131
Balance ret_hu_conv = Balance.constr_from_ptr(ret);
132132
ret_hu_conv.ptrs_to.add(ret_hu_conv);
133133
return ret_hu_conv;
@@ -138,7 +138,7 @@ public static Balance claimable_awaiting_confirmations(long claimable_amount_sat
138138
*/
139139
public static Balance contentious_claimable(long claimable_amount_satoshis, int timeout_height) {
140140
long ret = bindings.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
141-
if (ret >= 0 && ret < 1024) { return null; }
141+
if (ret >= 0 && ret <= 4096) { return null; }
142142
Balance ret_hu_conv = Balance.constr_from_ptr(ret);
143143
ret_hu_conv.ptrs_to.add(ret_hu_conv);
144144
return ret_hu_conv;
@@ -149,7 +149,7 @@ public static Balance contentious_claimable(long claimable_amount_satoshis, int
149149
*/
150150
public static Balance maybe_claimable_htlcawaiting_timeout(long claimable_amount_satoshis, int claimable_height) {
151151
long ret = bindings.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
152-
if (ret >= 0 && ret < 1024) { return null; }
152+
if (ret >= 0 && ret <= 4096) { return null; }
153153
Balance ret_hu_conv = Balance.constr_from_ptr(ret);
154154
ret_hu_conv.ptrs_to.add(ret_hu_conv);
155155
return ret_hu_conv;

0 commit comments

Comments
 (0)