Skip to content

Commit f3e670e

Browse files
committed
Update auto-generated bindings
1 parent e30b350 commit f3e670e

File tree

605 files changed

+45060
-7562
lines changed

Some content is hidden

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

605 files changed

+45060
-7562
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
* An error when accessing the chain via [`Access`].
55
*/
66
public enum AccessError {
7+
/**
8+
* The requested chain is unknown.
9+
*/
710
LDKAccessError_UnknownChain,
11+
/**
12+
* The requested transaction doesn't exist or hasn't confirmed.
13+
*/
814
LDKAccessError_UnknownTx,
915
; static native void init();
1016
static { init(); }

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,69 @@
44
* An error enum representing a failure to persist a channel monitor update.
55
*/
66
public enum ChannelMonitorUpdateErr {
7+
/**
8+
* Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
9+
* our state failed, but is expected to succeed at some point in the future).
10+
*
11+
* Such a failure will \"freeze\" a channel, preventing us from revoking old states or
12+
* submitting new commitment transactions to the counterparty. Once the update(s) that failed
13+
* have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
14+
* via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
15+
* operational state.
16+
*
17+
* Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
18+
* you return a TemporaryFailure you must ensure that it is written to disk safely before
19+
* writing out the latest ChannelManager state.
20+
*
21+
* Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
22+
* (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
23+
* to claim it on this channel) and those updates must be applied wherever they can be. At
24+
* least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
25+
* be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
26+
* the channel which would invalidate previous ChannelMonitors are not made when a channel has
27+
* been \"frozen\".
28+
*
29+
* Note that even if updates made after TemporaryFailure succeed you must still provide a
30+
* [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
31+
* normal channel operation. Note that this is normally generated through a call to
32+
* [`ChainMonitor::channel_monitor_updated`].
33+
*
34+
* Note that the update being processed here will not be replayed for you when you return a
35+
* [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
36+
* you must store the update itself on your own local disk prior to returning a
37+
* TemporaryFailure. You may, of course, employ a journaling approach, storing only the
38+
* ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
39+
* reload-time.
40+
*
41+
* For deployments where a copy of ChannelMonitors and other local state are backed up in a
42+
* remote location (with local copies persisted immediately), it is anticipated that all
43+
* updates will return TemporaryFailure until the remote copies could be updated.
44+
*
45+
* [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
46+
*/
747
LDKChannelMonitorUpdateErr_TemporaryFailure,
48+
/**
49+
* Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
50+
* different watchtower and cannot update with all watchtowers that were previously informed
51+
* of this channel).
52+
*
53+
* At reception of this error, ChannelManager will force-close the channel and return at
54+
* least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
55+
* least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
56+
* update must be rejected.
57+
*
58+
* This failure may also signal a failure to update the local persisted copy of one of
59+
* the channel monitor instance.
60+
*
61+
* Note that even when you fail a holder commitment transaction update, you must store the
62+
* update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
63+
* broadcasts it (e.g distributed channel-monitor deployment)
64+
*
65+
* In case of distributed watchtowers deployment, the new version must be written to disk, as
66+
* state may have been stored but rejected due to a block forcing a commitment broadcast. This
67+
* storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
68+
* lagging behind on block processing.
69+
*/
870
LDKChannelMonitorUpdateErr_PermanentFailure,
971
; static native void init();
1072
static { init(); }

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
* estimation.
66
*/
77
public enum ConfirmationTarget {
8+
/**
9+
* We are happy with this transaction confirming slowly when feerate drops some.
10+
*/
811
LDKConfirmationTarget_Background,
12+
/**
13+
* We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
14+
*/
915
LDKConfirmationTarget_Normal,
16+
/**
17+
* We'd like this transaction to confirm in the next few blocks.
18+
*/
1019
LDKConfirmationTarget_HighPriority,
1120
; static native void init();
1221
static { init(); }

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@
44
* Errors that may occur when constructing a new `RawInvoice` or `Invoice`
55
*/
66
public enum CreationError {
7+
/**
8+
* The supplied description string was longer than 639 __bytes__ (see [`Description::new(...)`](./struct.Description.html#method.new))
9+
*/
710
LDKCreationError_DescriptionTooLong,
11+
/**
12+
* The specified route has too many hops and can't be encoded
13+
*/
814
LDKCreationError_RouteTooLong,
15+
/**
16+
* The unix timestamp of the supplied date is <0 or can't be represented as `SystemTime`
17+
*/
918
LDKCreationError_TimestampOutOfBounds,
19+
/**
20+
* The supplied expiry time could cause an overflow if added to a `PositiveTimestamp`
21+
*/
1022
LDKCreationError_ExpiryTimeOutOfBounds,
1123
; static native void init();
1224
static { init(); }

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,25 @@
44
* Enum representing the crypto currencies (or networks) supported by this library
55
*/
66
public enum Currency {
7+
/**
8+
* Bitcoin mainnet
9+
*/
710
LDKCurrency_Bitcoin,
11+
/**
12+
* Bitcoin testnet
13+
*/
814
LDKCurrency_BitcoinTestnet,
15+
/**
16+
* Bitcoin regtest
17+
*/
918
LDKCurrency_Regtest,
19+
/**
20+
* Bitcoin simnet
21+
*/
1022
LDKCurrency_Simnet,
23+
/**
24+
* Bitcoin signet
25+
*/
1126
LDKCurrency_Signet,
1227
; static native void init();
1328
static { init(); }

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,25 @@
44
* An enum representing the available verbosity levels of the logger.
55
*/
66
public enum Level {
7+
/**
8+
* Designates very low priority, often extremely verbose, information
9+
*/
710
LDKLevel_Trace,
11+
/**
12+
* Designates lower priority information
13+
*/
814
LDKLevel_Debug,
15+
/**
16+
* Designates useful information
17+
*/
918
LDKLevel_Info,
19+
/**
20+
* Designates hazardous situations
21+
*/
1022
LDKLevel_Warn,
23+
/**
24+
* Designates very serious errors
25+
*/
1126
LDKLevel_Error,
1227
; static native void init();
1328
static { init(); }

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@
44
* An enum representing the possible Bitcoin or test networks which we can run on
55
*/
66
public enum Network {
7+
/**
8+
* The main Bitcoin blockchain.
9+
*/
710
LDKNetwork_Bitcoin,
11+
/**
12+
* The testnet3 blockchain.
13+
*/
814
LDKNetwork_Testnet,
15+
/**
16+
* A local test blockchain.
17+
*/
918
LDKNetwork_Regtest,
19+
/**
20+
* A blockchain on which blocks are signed instead of mined.
21+
*/
1022
LDKNetwork_Signet,
1123
; static native void init();
1224
static { init(); }

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,41 @@
44
* Represents an error returned from libsecp256k1 during validation of some secp256k1 data
55
*/
66
public enum Secp256k1Error {
7+
/**
8+
* Signature failed verification
9+
*/
710
LDKSecp256k1Error_IncorrectSignature,
11+
/**
12+
* Badly sized message ("messages" are actually fixed-sized digests; see the MESSAGE_SIZE constant)
13+
*/
814
LDKSecp256k1Error_InvalidMessage,
15+
/**
16+
* Bad public key
17+
*/
918
LDKSecp256k1Error_InvalidPublicKey,
19+
/**
20+
* Bad signature
21+
*/
1022
LDKSecp256k1Error_InvalidSignature,
23+
/**
24+
* Bad secret key
25+
*/
1126
LDKSecp256k1Error_InvalidSecretKey,
27+
/**
28+
* Bad recovery id
29+
*/
1230
LDKSecp256k1Error_InvalidRecoveryId,
31+
/**
32+
* Invalid tweak for add_assign or mul_assign
33+
*/
1334
LDKSecp256k1Error_InvalidTweak,
35+
/**
36+
* tweak_add_check failed on an xonly public key
37+
*/
1438
LDKSecp256k1Error_TweakCheckFailed,
39+
/**
40+
* Didn't pass enough memory to context creation with preallocated memory
41+
*/
1542
LDKSecp256k1Error_NotEnoughMemory,
1643
; static native void init();
1744
static { init(); }

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,46 @@
55
* requirements sections in BOLT #11
66
*/
77
public enum SemanticError {
8+
/**
9+
* The invoice is missing the mandatory payment hash
10+
*/
811
LDKSemanticError_NoPaymentHash,
12+
/**
13+
* The invoice has multiple payment hashes which isn't allowed
14+
*/
915
LDKSemanticError_MultiplePaymentHashes,
16+
/**
17+
* No description or description hash are part of the invoice
18+
*/
1019
LDKSemanticError_NoDescription,
20+
/**
21+
* The invoice contains multiple descriptions and/or description hashes which isn't allowed
22+
*/
1123
LDKSemanticError_MultipleDescriptions,
24+
/**
25+
* The invoice is missing the mandatory payment secret, which all modern lightning nodes
26+
* should provide.
27+
*/
1228
LDKSemanticError_NoPaymentSecret,
29+
/**
30+
* The invoice contains multiple payment secrets
31+
*/
1332
LDKSemanticError_MultiplePaymentSecrets,
33+
/**
34+
* The invoice's features are invalid
35+
*/
1436
LDKSemanticError_InvalidFeatures,
37+
/**
38+
* The recovery id doesn't fit the signature/pub key
39+
*/
1540
LDKSemanticError_InvalidRecoveryId,
41+
/**
42+
* The invoice's signature is invalid
43+
*/
1644
LDKSemanticError_InvalidSignature,
45+
/**
46+
* The invoice's amount was not a whole number of millisatoshis
47+
*/
1748
LDKSemanticError_ImpreciseAmount,
1849
; static native void init();
1950
static { init(); }

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@
44
* SI prefixes for the human readable part
55
*/
66
public enum SiPrefix {
7+
/**
8+
* 10^-3
9+
*/
710
LDKSiPrefix_Milli,
11+
/**
12+
* 10^-6
13+
*/
814
LDKSiPrefix_Micro,
15+
/**
16+
* 10^-9
17+
*/
918
LDKSiPrefix_Nano,
19+
/**
20+
* 10^-12
21+
*/
1022
LDKSiPrefix_Pico,
1123
; static native void init();
1224
static { init(); }

0 commit comments

Comments
 (0)