Skip to content

Commit 209f789

Browse files
committed
[Java] Update auto-generated bindings
1 parent 9e43343 commit 209f789

File tree

547 files changed

+70323
-50490
lines changed

Some content is hidden

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

547 files changed

+70323
-50490
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.ldk.enums;
2+
3+
/**
4+
* Indicates whether the balance is derived from a cooperative close, a force-close
5+
* (for holder or counterparty), or whether it is for an HTLC.
6+
*/
7+
public enum BalanceSource {
8+
/**
9+
* The channel was force closed by the holder.
10+
*/
11+
LDKBalanceSource_HolderForceClosed,
12+
/**
13+
* The channel was force closed by the counterparty.
14+
*/
15+
LDKBalanceSource_CounterpartyForceClosed,
16+
/**
17+
* The channel was cooperatively closed.
18+
*/
19+
LDKBalanceSource_CoopClose,
20+
/**
21+
* This balance is the result of an HTLC.
22+
*/
23+
LDKBalanceSource_Htlc,
24+
; static native void init();
25+
static { org.ldk.impl.bindings.run_statics(); init(); }
26+
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public enum Bolt12SemanticError {
112112
* An invoice payment hash was expected but was missing.
113113
*/
114114
LDKBolt12SemanticError_MissingPaymentHash,
115+
/**
116+
* An invoice payment hash was provided but was not expected.
117+
*/
118+
LDKBolt12SemanticError_UnexpectedPaymentHash,
115119
/**
116120
* A signature was expected but was missing.
117121
*/

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@
55
* estimation.
66
*/
77
public enum ConfirmationTarget {
8+
/**
9+
* The most aggressive (i.e. highest) feerate estimate available.
10+
*
11+
* This is used to sanity-check our counterparty's feerates and should be as conservative as
12+
* possible to ensure that we don't confuse a peer using a very conservative estimator for one
13+
* trying to burn channel balance to dust.
14+
*/
15+
LDKConfirmationTarget_MaximumFeeEstimate,
816
/**
917
* We have some funds available on chain which we need to spend prior to some expiry time at
10-
* which point our counterparty may be able to steal them. Generally we have in the high tens
11-
* to low hundreds of blocks to get our transaction on-chain, but we shouldn't risk too low a
12-
* fee - this should be a relatively high priority feerate.
18+
* which point our counterparty may be able to steal them.
19+
*
20+
* Generally we have in the high tens to low hundreds of blocks to get our transaction
21+
* on-chain (it doesn't have to happen in the next few blocks!), but we shouldn't risk too low
22+
* a fee - this should be a relatively high priority feerate.
1323
*/
14-
LDKConfirmationTarget_OnChainSweep,
24+
LDKConfirmationTarget_UrgentOnChainSweep,
1525
/**
1626
* This is the lowest feerate we will allow our channel counterparty to have in an anchor
1727
* channel in order to close the channel if a channel party goes away.
@@ -93,14 +103,18 @@ public enum ConfirmationTarget {
93103
*/
94104
LDKConfirmationTarget_ChannelCloseMinimum,
95105
/**
96-
* The feerate [`OutputSweeper`] will use on transactions spending
97-
* [`SpendableOutputDescriptor`]s after a channel closure.
106+
* The feerate used to claim on-chain funds when there is no particular urgency to do so.
107+
*
108+
* It is used to get commitment transactions without any HTLCs confirmed in [`ChannelMonitor`]
109+
* and by [`OutputSweeper`] on transactions spending [`SpendableOutputDescriptor`]s after a
110+
* channel closure.
98111
*
99112
* Generally spending these outputs is safe as long as they eventually confirm, so a value
100113
* (slightly above) the mempool minimum should suffice. However, as this value will influence
101114
* how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors
102115
* might want to choose a higher feerate to regain control over funds faster.
103116
*
117+
* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
104118
* [`OutputSweeper`]: crate::util::sweep::OutputSweeper
105119
* [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
106120
*/

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,11 @@ public enum CreationError {
2121
*/
2222
LDKCreationError_InvalidAmount,
2323
/**
24-
* Route hints were required for this invoice and were missing. Applies to
25-
* [phantom invoices].
26-
*
27-
* [phantom invoices]: crate::utils::create_phantom_invoice
24+
* Route hints were required for this invoice and were missing.
2825
*/
2926
LDKCreationError_MissingRouteHints,
3027
/**
31-
* The provided `min_final_cltv_expiry_delta` was less than [`MIN_FINAL_CLTV_EXPIRY_DELTA`].
32-
*
33-
* [`MIN_FINAL_CLTV_EXPIRY_DELTA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
28+
* The provided `min_final_cltv_expiry_delta` was less than rust-lightning's minimum.
3429
*/
3530
LDKCreationError_MinFinalCltvExpiryDeltaTooShort,
3631
; static native void init();

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

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

33
/**
4-
* The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines
5-
* which nodes is which in the [`ChannelAnnouncement`] message.
4+
* The side of a channel that is the [`IntroductionNode`] in a blinded path. [BOLT 7] defines which
5+
* nodes is which in the [`ChannelAnnouncement`] message.
66
*
77
* [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
88
* [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package org.ldk.enums;
2+
3+
/**
4+
* Exposes the state of pending inbound HTLCs.
5+
*
6+
* At a high level, an HTLC being forwarded from one Lightning node to another Lightning node goes
7+
* through the following states in the state machine:
8+
* - Announced for addition by the originating node through the update_add_htlc message.
9+
* - Added to the commitment transaction of the receiving node and originating node in turn
10+
* through the exchange of commitment_signed and revoke_and_ack messages.
11+
* - Announced for resolution (fulfillment or failure) by the receiving node through either one of
12+
* the update_fulfill_htlc, update_fail_htlc, and update_fail_malformed_htlc messages.
13+
* - Removed from the commitment transaction of the originating node and receiving node in turn
14+
* through the exchange of commitment_signed and revoke_and_ack messages.
15+
*
16+
* This can be used to inspect what next message an HTLC is waiting for to advance its state.
17+
*/
18+
public enum InboundHTLCStateDetails {
19+
/**
20+
* We have added this HTLC in our commitment transaction by receiving commitment_signed and
21+
* returning revoke_and_ack. We are awaiting the appropriate revoke_and_ack's from the remote
22+
* before this HTLC is included on the remote commitment transaction.
23+
*/
24+
LDKInboundHTLCStateDetails_AwaitingRemoteRevokeToAdd,
25+
/**
26+
* This HTLC has been included in the commitment_signed and revoke_and_ack messages on both sides
27+
* and is included in both commitment transactions.
28+
*
29+
* This HTLC is now safe to either forward or be claimed as a payment by us. The HTLC will
30+
* remain in this state until the forwarded upstream HTLC has been resolved and we resolve this
31+
* HTLC correspondingly, or until we claim it as a payment. If it is part of a multipart
32+
* payment, it will only be claimed together with other required parts.
33+
*/
34+
LDKInboundHTLCStateDetails_Committed,
35+
/**
36+
* We have received the preimage for this HTLC and it is being removed by fulfilling it with
37+
* update_fulfill_htlc. This HTLC is still on both commitment transactions, but we are awaiting
38+
* the appropriate revoke_and_ack's from the remote before this HTLC is removed from the remote
39+
* commitment transaction after update_fulfill_htlc.
40+
*/
41+
LDKInboundHTLCStateDetails_AwaitingRemoteRevokeToRemoveFulfill,
42+
/**
43+
* The HTLC is being removed by failing it with update_fail_htlc or update_fail_malformed_htlc.
44+
* This HTLC is still on both commitment transactions, but we are awaiting the appropriate
45+
* revoke_and_ack's from the remote before this HTLC is removed from the remote commitment
46+
* transaction.
47+
*/
48+
LDKInboundHTLCStateDetails_AwaitingRemoteRevokeToRemoveFail,
49+
; static native void init();
50+
static { org.ldk.impl.bindings.run_statics(); init(); }
51+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package org.ldk.enums;
2+
3+
/**
4+
* Exposes the state of pending outbound HTLCs.
5+
*
6+
* At a high level, an HTLC being forwarded from one Lightning node to another Lightning node goes
7+
* through the following states in the state machine:
8+
* - Announced for addition by the originating node through the update_add_htlc message.
9+
* - Added to the commitment transaction of the receiving node and originating node in turn
10+
* through the exchange of commitment_signed and revoke_and_ack messages.
11+
* - Announced for resolution (fulfillment or failure) by the receiving node through either one of
12+
* the update_fulfill_htlc, update_fail_htlc, and update_fail_malformed_htlc messages.
13+
* - Removed from the commitment transaction of the originating node and receiving node in turn
14+
* through the exchange of commitment_signed and revoke_and_ack messages.
15+
*
16+
* This can be used to inspect what next message an HTLC is waiting for to advance its state.
17+
*/
18+
public enum OutboundHTLCStateDetails {
19+
/**
20+
* We are awaiting the appropriate revoke_and_ack's from the remote before the HTLC is added
21+
* on the remote's commitment transaction after update_add_htlc.
22+
*/
23+
LDKOutboundHTLCStateDetails_AwaitingRemoteRevokeToAdd,
24+
/**
25+
* The HTLC has been added to the remote's commitment transaction by sending commitment_signed
26+
* and receiving revoke_and_ack in return.
27+
*
28+
* The HTLC will remain in this state until the remote node resolves the HTLC, or until we
29+
* unilaterally close the channel due to a timeout with an uncooperative remote node.
30+
*/
31+
LDKOutboundHTLCStateDetails_Committed,
32+
/**
33+
* The HTLC has been fulfilled successfully by the remote with a preimage in update_fulfill_htlc,
34+
* and we removed the HTLC from our commitment transaction by receiving commitment_signed and
35+
* returning revoke_and_ack. We are awaiting the appropriate revoke_and_ack's from the remote
36+
* for the removal from its commitment transaction.
37+
*/
38+
LDKOutboundHTLCStateDetails_AwaitingRemoteRevokeToRemoveSuccess,
39+
/**
40+
* The HTLC has been failed by the remote with update_fail_htlc or update_fail_malformed_htlc,
41+
* and we removed the HTLC from our commitment transaction by receiving commitment_signed and
42+
* returning revoke_and_ack. We are awaiting the appropriate revoke_and_ack's from the remote
43+
* for the removal from its commitment transaction.
44+
*/
45+
LDKOutboundHTLCStateDetails_AwaitingRemoteRevokeToRemoveFailure,
46+
; static native void init();
47+
static { org.ldk.impl.bindings.run_statics(); init(); }
48+
}

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
public enum PaymentFailureReason {
77
/**
88
* The intended recipient rejected our payment.
9+
*
10+
* Also used for [`UnknownRequiredFeatures`] and [`InvoiceRequestRejected`] when downgrading to
11+
* version prior to 0.0.124.
12+
*
13+
* [`UnknownRequiredFeatures`]: Self::UnknownRequiredFeatures
14+
* [`InvoiceRequestRejected`]: Self::InvoiceRequestRejected
915
*/
1016
LDKPaymentFailureReason_RecipientRejected,
1117
/**
@@ -27,7 +33,10 @@ public enum PaymentFailureReason {
2733
* The payment expired while retrying, based on the provided
2834
* [`PaymentParameters::expiry_time`].
2935
*
36+
* Also used for [`InvoiceRequestExpired`] when downgrading to version prior to 0.0.124.
37+
*
3038
* [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
39+
* [`InvoiceRequestExpired`]: Self::InvoiceRequestExpired
3140
*/
3241
LDKPaymentFailureReason_PaymentExpired,
3342
/**
@@ -43,6 +52,20 @@ public enum PaymentFailureReason {
4352
* your router.
4453
*/
4554
LDKPaymentFailureReason_UnexpectedError,
55+
/**
56+
* An invoice was received that required unknown features.
57+
*/
58+
LDKPaymentFailureReason_UnknownRequiredFeatures,
59+
/**
60+
* A [`Bolt12Invoice`] was not received in a reasonable amount of time.
61+
*/
62+
LDKPaymentFailureReason_InvoiceRequestExpired,
63+
/**
64+
* An [`InvoiceRequest`] for the payment was rejected by the recipient.
65+
*
66+
* [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
67+
*/
68+
LDKPaymentFailureReason_InvoiceRequestRejected,
4669
; static native void init();
4770
static { org.ldk.impl.bindings.run_statics(); init(); }
4871
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ public enum RetryableSendFailure {
2929
* [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
3030
*/
3131
LDKRetryableSendFailure_DuplicatePayment,
32+
/**
33+
* The [`RecipientOnionFields::payment_metadata`], [`RecipientOnionFields::custom_tlvs`], or
34+
* [`BlindedPaymentPath`]s provided are too large and caused us to exceed the maximum onion
35+
* packet size of 1300 bytes.
36+
*
37+
* [`BlindedPaymentPath`]: crate::blinded_path::payment::BlindedPaymentPath
38+
*/
39+
LDKRetryableSendFailure_OnionPacketSizeExceeded,
3240
; static native void init();
3341
static { org.ldk.impl.bindings.run_statics(); init(); }
3442
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ public enum Secp256k1Error {
4848
* The only valid parity values are 0 or 1.
4949
*/
5050
LDKSecp256k1Error_InvalidParityValue,
51+
/**
52+
* Invalid Elligator Swift Value
53+
*/
54+
LDKSecp256k1Error_InvalidEllSwift,
5155
; static native void init();
5256
static { org.ldk.impl.bindings.run_statics(); init(); }
5357
}

0 commit comments

Comments
 (0)