Skip to content

Commit c3ae2d6

Browse files
committed
Update auto-generated bindings
1 parent a9a6f17 commit c3ae2d6

File tree

212 files changed

+7058
-1390
lines changed

Some content is hidden

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

212 files changed

+7058
-1390
lines changed

liblightningjni_debug.so

361 KB
Binary file not shown.

liblightningjni_release.so

57 KB
Binary file not shown.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.ldk.enums;
22

3+
/**
4+
* An enum representing the possible Bitcoin or test networks which we can run on
5+
*/
36
public enum LDKNetwork {
47
LDKNetwork_Bitcoin,
58
LDKNetwork_Testnet,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.ldk.enums;
22

3+
/**
4+
* Represents an error returned from libsecp256k1 during validation of some secp256k1 data
5+
*/
36
public enum LDKSecp256k1Error {
47
LDKSecp256k1Error_IncorrectSignature,
58
LDKSecp256k1Error_InvalidMessage,

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

Lines changed: 128 additions & 11 deletions
Large diffs are not rendered by default.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,14 @@ private MonitorUpdateFailed(long ptr, bindings.LDKAPIError.MonitorUpdateFailed o
7373
super(null, ptr);
7474
}
7575
}
76+
/**
77+
* Creates a copy of the APIError
78+
*/
79+
public APIError clone() {
80+
long ret = bindings.APIError_clone(this.ptr);
81+
APIError ret_hu_conv = APIError.constr_from_ptr(ret);
82+
ret_hu_conv.ptrs_to.add(this);
83+
return ret_hu_conv;
84+
}
85+
7686
}

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,25 @@ public void set_channel_id(byte[] val) {
3939
bindings.ChannelDetails_set_channel_id(this.ptr, val);
4040
}
4141

42+
/**
43+
* The position of the funding transaction in the chain. None if the funding transaction has
44+
* not yet been confirmed and the channel fully opened.
45+
*/
46+
public Option_u64Z get_short_channel_id() {
47+
long ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
48+
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
49+
ret_hu_conv.ptrs_to.add(this);
50+
return ret_hu_conv;
51+
}
52+
53+
/**
54+
* The position of the funding transaction in the chain. None if the funding transaction has
55+
* not yet been confirmed and the channel fully opened.
56+
*/
57+
public void set_short_channel_id(Option_u64Z val) {
58+
bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
59+
}
60+
4261
/**
4362
* The node_id of our counterparty
4463
*/

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,23 @@ public void set_two_to_one(DirectionalChannelInfo val) {
103103
this.ptrs_to.add(val);
104104
}
105105

106+
/**
107+
* The channel capacity as seen on-chain, if chain lookup is available.
108+
*/
109+
public Option_u64Z get_capacity_sats() {
110+
long ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
111+
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
112+
ret_hu_conv.ptrs_to.add(this);
113+
return ret_hu_conv;
114+
}
115+
116+
/**
117+
* The channel capacity as seen on-chain, if chain lookup is available.
118+
*/
119+
public void set_capacity_sats(Option_u64Z val) {
120+
bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
121+
}
122+
106123
/**
107124
* An initial announcement of the channel
108125
* Mostly redundant with the data we store in fields explicitly.
@@ -127,6 +144,20 @@ public void set_announcement_message(ChannelAnnouncement val) {
127144
this.ptrs_to.add(val);
128145
}
129146

147+
/**
148+
* Constructs a new ChannelInfo given each field
149+
*/
150+
public static ChannelInfo constructor_new(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
151+
long ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
152+
ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
153+
ret_hu_conv.ptrs_to.add(ret_hu_conv);
154+
ret_hu_conv.ptrs_to.add(features_arg);
155+
ret_hu_conv.ptrs_to.add(one_to_two_arg);
156+
ret_hu_conv.ptrs_to.add(two_to_one_arg);
157+
ret_hu_conv.ptrs_to.add(announcement_message_arg);
158+
return ret_hu_conv;
159+
}
160+
130161
/**
131162
* Creates a copy of the ChannelInfo
132163
*/

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ public void set_htlc_minimum_msat(long val) {
8181
bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
8282
}
8383

84+
/**
85+
* The maximum value which may be relayed to the next hop via the channel.
86+
*/
87+
public Option_u64Z get_htlc_maximum_msat() {
88+
long ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
89+
Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
90+
ret_hu_conv.ptrs_to.add(this);
91+
return ret_hu_conv;
92+
}
93+
94+
/**
95+
* The maximum value which may be relayed to the next hop via the channel.
96+
*/
97+
public void set_htlc_maximum_msat(Option_u64Z val) {
98+
bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr);
99+
}
100+
84101
/**
85102
* Fees charged when the channel is used for routing
86103
*/
@@ -123,6 +140,18 @@ public void set_last_update_message(ChannelUpdate val) {
123140
this.ptrs_to.add(val);
124141
}
125142

143+
/**
144+
* Constructs a new DirectionalChannelInfo given each field
145+
*/
146+
public static DirectionalChannelInfo constructor_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
147+
long ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
148+
DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
149+
ret_hu_conv.ptrs_to.add(ret_hu_conv);
150+
ret_hu_conv.ptrs_to.add(fees_arg);
151+
ret_hu_conv.ptrs_to.add(last_update_message_arg);
152+
return ret_hu_conv;
153+
}
154+
126155
/**
127156
* Creates a copy of the DirectionalChannelInfo
128157
*/

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,14 @@ private SendErrorMessage(long ptr, bindings.LDKErrorAction.SendErrorMessage obj)
5656
this.msg = msg_hu_conv;
5757
}
5858
}
59+
/**
60+
* Creates a copy of the ErrorAction
61+
*/
62+
public ErrorAction clone() {
63+
long ret = bindings.ErrorAction_clone(this.ptr);
64+
ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
65+
ret_hu_conv.ptrs_to.add(this);
66+
return ret_hu_conv;
67+
}
68+
5969
}

0 commit comments

Comments
 (0)