Skip to content

Commit 7926bd3

Browse files
committed
Update bindings to latest upstream + ChannelMonitor_clone patch
1 parent d58fdeb commit 7926bd3

File tree

13 files changed

+461
-38
lines changed

13 files changed

+461
-38
lines changed

liblightningjni_debug.so

67.2 MB
Binary file not shown.

liblightningjni_release.so

-3.55 KB
Binary file not shown.

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

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ public final static class SendShortIdsQuery extends LDKMessageSendEvent {
237237
public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
238238
public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
239239
public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
240+
public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
241+
public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
242+
public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
240243
public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
241244
public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
242245
public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
@@ -1023,6 +1026,12 @@ public interface LDKSocketDescriptor {
10231026
public static native long CResult_ChannelFeaturesDecodeErrorZ_err(long e);
10241027
// void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
10251028
public static native void CResult_ChannelFeaturesDecodeErrorZ_free(long _res);
1029+
// struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
1030+
public static native long CResult_InvoiceFeaturesDecodeErrorZ_ok(long o);
1031+
// struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
1032+
public static native long CResult_InvoiceFeaturesDecodeErrorZ_err(long e);
1033+
// void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
1034+
public static native void CResult_InvoiceFeaturesDecodeErrorZ_free(long _res);
10261035
// struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
10271036
public static native long CResult_ChannelConfigDecodeErrorZ_ok(long o);
10281037
// struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
@@ -3005,8 +3014,8 @@ public interface LDKSocketDescriptor {
30053014
public static native void PeerManager_socket_disconnected(long this_arg, long descriptor);
30063015
// void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
30073016
public static native void PeerManager_disconnect_by_node_id(long this_arg, byte[] node_id, boolean no_connection_possible);
3008-
// void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
3009-
public static native void PeerManager_timer_tick_occured(long this_arg);
3017+
// void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
3018+
public static native void PeerManager_timer_tick_occurred(long this_arg);
30103019
// struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
30113020
public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
30123021
// struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
@@ -3255,12 +3264,16 @@ public interface LDKSocketDescriptor {
32553264
public static native long NodeFeatures_clone(long orig);
32563265
// struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
32573266
public static native long ChannelFeatures_clone(long orig);
3267+
// struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
3268+
public static native long InvoiceFeatures_clone(long orig);
32583269
// void InitFeatures_free(struct LDKInitFeatures this_obj);
32593270
public static native void InitFeatures_free(long this_obj);
32603271
// void NodeFeatures_free(struct LDKNodeFeatures this_obj);
32613272
public static native void NodeFeatures_free(long this_obj);
32623273
// void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
32633274
public static native void ChannelFeatures_free(long this_obj);
3275+
// void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
3276+
public static native void InvoiceFeatures_free(long this_obj);
32643277
// MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
32653278
public static native long InitFeatures_empty();
32663279
// MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
@@ -3273,18 +3286,26 @@ public interface LDKSocketDescriptor {
32733286
public static native long ChannelFeatures_empty();
32743287
// MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
32753288
public static native long ChannelFeatures_known();
3289+
// MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
3290+
public static native long InvoiceFeatures_empty();
3291+
// MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
3292+
public static native long InvoiceFeatures_known();
32763293
// struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
32773294
public static native byte[] InitFeatures_write(long obj);
32783295
// struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
32793296
public static native byte[] NodeFeatures_write(long obj);
32803297
// struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
32813298
public static native byte[] ChannelFeatures_write(long obj);
3299+
// struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
3300+
public static native byte[] InvoiceFeatures_write(long obj);
32823301
// struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
32833302
public static native long InitFeatures_read(byte[] ser);
32843303
// struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
32853304
public static native long NodeFeatures_read(byte[] ser);
32863305
// struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
32873306
public static native long ChannelFeatures_read(byte[] ser);
3307+
// struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
3308+
public static native long InvoiceFeatures_read(byte[] ser);
32883309
// void RouteHop_free(struct LDKRouteHop this_obj);
32893310
public static native void RouteHop_free(long this_obj);
32903311
// struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
@@ -3347,8 +3368,8 @@ public interface LDKSocketDescriptor {
33473368
public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, short val);
33483369
// struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
33493370
public static native long RouteHint_clone(long orig);
3350-
// struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
3351-
public static native long get_route(byte[] our_node_id, long network, byte[] payee, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
3371+
// struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
3372+
public static native long get_route(byte[] our_node_id, long network, byte[] payee, long payee_features, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
33523373
// void NetworkGraph_free(struct LDKNetworkGraph this_obj);
33533374
public static native void NetworkGraph_free(long this_obj);
33543375
// struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public ChannelConfig clone() {
133133
}
134134

135135
/**
136-
* Creates a "default" ChannelConfig. See other documentaiton for details on what this implies.
136+
* Creates a "default" ChannelConfig. See struct and individual field documentaiton for details on which values are used.
137137
*/
138138
public static ChannelConfig constructor_default() {
139139
long ret = bindings.ChannelConfig_default();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public ChannelHandshakeConfig clone() {
128128
}
129129

130130
/**
131-
* Creates a "default" ChannelHandshakeConfig. See other documentaiton for details on what this implies.
131+
* Creates a "default" ChannelHandshakeConfig. See struct and individual field documentaiton for details on which values are used.
132132
*/
133133
public static ChannelHandshakeConfig constructor_default() {
134134
long ret = bindings.ChannelHandshakeConfig_default();

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ public void set_force_announced_channel_preference(boolean val) {
243243
* Not checking this value would be a security issue, as our peer would be able to set it to
244244
* max relative lock-time (a year) and we would \"lose\" money as it would be locked for a long time.
245245
*
246-
* Default value: MAX_LOCAL_BREAKDOWN_TIMEOUT (1008), which we also enforce as a maximum value
247-
* so you can tweak config to reduce the loss of having useless locked funds (if your peer accepts)
246+
* Default value: 2016, which we also enforce as a maximum value so you can tweak config to
247+
* reduce the loss of having useless locked funds (if your peer accepts)
248248
*/
249249
public short get_their_to_self_delay() {
250250
short ret = bindings.ChannelHandshakeLimits_get_their_to_self_delay(this.ptr);
@@ -257,8 +257,8 @@ public short get_their_to_self_delay() {
257257
* Not checking this value would be a security issue, as our peer would be able to set it to
258258
* max relative lock-time (a year) and we would \"lose\" money as it would be locked for a long time.
259259
*
260-
* Default value: MAX_LOCAL_BREAKDOWN_TIMEOUT (1008), which we also enforce as a maximum value
261-
* so you can tweak config to reduce the loss of having useless locked funds (if your peer accepts)
260+
* Default value: 2016, which we also enforce as a maximum value so you can tweak config to
261+
* reduce the loss of having useless locked funds (if your peer accepts)
262262
*/
263263
public void set_their_to_self_delay(short val) {
264264
bindings.ChannelHandshakeLimits_set_their_to_self_delay(this.ptr, val);
@@ -285,7 +285,7 @@ public ChannelHandshakeLimits clone() {
285285
}
286286

287287
/**
288-
* Creates a "default" ChannelHandshakeLimits. See other documentaiton for details on what this implies.
288+
* Creates a "default" ChannelHandshakeLimits. See struct and individual field documentaiton for details on which values are used.
289289
*/
290290
public static ChannelHandshakeLimits constructor_default() {
291291
long ret = bindings.ChannelHandshakeLimits_default();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ public void disconnect_by_node_id(byte[] node_id, boolean no_connection_possible
169169
* It will send pings to each peer and disconnect those which did not respond to the last round of pings.
170170
* Will most likely call send_data on all of the registered descriptors, thus, be very careful with reentrancy issues!
171171
*/
172-
public void timer_tick_occured() {
173-
bindings.PeerManager_timer_tick_occured(this.ptr);
172+
public void timer_tick_occurred() {
173+
bindings.PeerManager_timer_tick_occurred(this.ptr);
174174
}
175175

176176
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public UserConfig clone() {
9999
}
100100

101101
/**
102-
* Creates a "default" UserConfig. See other documentaiton for details on what this implies.
102+
* Creates a "default" UserConfig. See struct and individual field documentaiton for details on which values are used.
103103
*/
104104
public static UserConfig constructor_default() {
105105
long ret = bindings.UserConfig_default();

0 commit comments

Comments
 (0)