Skip to content

Commit 18b3e41

Browse files
committed
Update auto-generated bindings to LDK 0.1.8
1 parent 4411b11 commit 18b3e41

File tree

7 files changed

+47
-19
lines changed

7 files changed

+47
-19
lines changed

c_sharp/src/org/ldk/structs/ChannelManager.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ namespace org { namespace ldk { namespace structs {
723723
* [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
724724
* [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
725725
* [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
726-
* [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
726+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
727727
* [`list_channels`]: Self::list_channels
728728
* [`list_usable_channels`]: Self::list_usable_channels
729729
* [`create_channel`]: Self::create_channel
@@ -1014,7 +1014,7 @@ public org.ldk.structs.Result_NoneAPIErrorZ close_channel(org.ldk.structs.Channe
10141014
*
10151015
* The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction.
10161016
* Will fail if a shutdown script has already been set for this channel by
1017-
* ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
1017+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
10181018
* also be compatible with our and the counterparty's features.
10191019
*
10201020
* May generate a [`SendShutdown`] message event on success, which should be relayed.
@@ -1026,6 +1026,7 @@ public org.ldk.structs.Result_NoneAPIErrorZ close_channel(org.ldk.structs.Channe
10261026
*
10271027
* [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
10281028
* [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
1029+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey
10291030
* [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
10301031
*
10311032
* Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
@@ -2011,7 +2012,7 @@ public org.ldk.structs.Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_p
20112012

20122013
/**
20132014
* Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
2014-
* resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
2015+
* resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
20152016
*
20162017
* If the wallet supports paying on-chain schemes, you should instead use
20172018
* [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
@@ -2029,27 +2030,33 @@ public org.ldk.structs.Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_p
20292030
*
20302031
* To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
20312032
* invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
2032-
* payment will fail with an [`Event::InvoiceRequestFailed`].
2033+
* payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
2034+
* [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
20332035
*
20342036
* # Privacy
20352037
*
20362038
* For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
2037-
* to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
2039+
* to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the
20382040
* docs of the parameterized [`Router`], which implements [`MessageRouter`].
20392041
*
20402042
* # Limitations
20412043
*
20422044
* Requires a direct connection to the given [`Destination`] as well as an introduction node in
2043-
* [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
2045+
* [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to
20442046
* the responding [`Bolt12Invoice::payment_paths`].
20452047
*
20462048
* # Errors
20472049
*
20482050
* Errors if:
20492051
* - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
20502052
*
2053+
* [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
2054+
* [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
20512055
* [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
20522056
* [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
2057+
* [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
2058+
* [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
2059+
* [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
20532060
*/
20542061
public org.ldk.structs.Result_NoneNoneZ pay_for_offer_from_human_readable_name(org.ldk.structs.HumanReadableName name, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat, Destination[] dns_resolvers) {
20552062
long ret = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, name.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(dns_resolvers, dns_resolvers_conv_13 => dns_resolvers_conv_13.ptr)));

c_sharp/src/org/ldk/structs/PeerManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ public org.ldk.structs.Result_boolPeerHandleErrorZ read_event(org.ldk.structs.So
233233
* [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
234234
* [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards
235235
* [`send_data`]: SocketDescriptor::send_data
236+
* [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio
237+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
236238
*/
237239
public void process_events() {
238240
bindings.PeerManager_process_events(this.ptr);

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@
725725
* [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
726726
* [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
727727
* [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
728-
* [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
728+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
729729
* [`list_channels`]: Self::list_channels
730730
* [`list_usable_channels`]: Self::list_usable_channels
731731
* [`create_channel`]: Self::create_channel
@@ -1011,7 +1011,7 @@ public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id,
10111011
*
10121012
* The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction.
10131013
* Will fail if a shutdown script has already been set for this channel by
1014-
* ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
1014+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
10151015
* also be compatible with our and the counterparty's features.
10161016
*
10171017
* May generate a [`SendShutdown`] message event on success, which should be relayed.
@@ -1023,6 +1023,7 @@ public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id,
10231023
*
10241024
* [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
10251025
* [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
1026+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey
10261027
* [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
10271028
*
10281029
* Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
@@ -2006,7 +2007,7 @@ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.s
20062007

20072008
/**
20082009
* Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
2009-
* resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
2010+
* resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
20102011
*
20112012
* If the wallet supports paying on-chain schemes, you should instead use
20122013
* [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
@@ -2024,27 +2025,33 @@ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.s
20242025
*
20252026
* To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
20262027
* invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
2027-
* payment will fail with an [`Event::InvoiceRequestFailed`].
2028+
* payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
2029+
* [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
20282030
*
20292031
* # Privacy
20302032
*
20312033
* For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
2032-
* to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
2034+
* to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the
20332035
* docs of the parameterized [`Router`], which implements [`MessageRouter`].
20342036
*
20352037
* # Limitations
20362038
*
20372039
* Requires a direct connection to the given [`Destination`] as well as an introduction node in
2038-
* [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
2040+
* [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to
20392041
* the responding [`Bolt12Invoice::payment_paths`].
20402042
*
20412043
* # Errors
20422044
*
20432045
* Errors if:
20442046
* - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
20452047
*
2048+
* [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
2049+
* [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
20462050
* [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
20472051
* [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
2052+
* [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
2053+
* [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
2054+
* [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
20482055
*/
20492056
public Result_NoneNoneZ pay_for_offer_from_human_readable_name(org.ldk.structs.HumanReadableName name, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat, Destination[] dns_resolvers) {
20502057
long ret = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, name.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr, dns_resolvers != null ? Arrays.stream(dns_resolvers).mapToLong(dns_resolvers_conv_13 -> dns_resolvers_conv_13.ptr).toArray() : null);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) {
14381438
* To accept the request (and in the case of a dual-funded channel, not contribute funds),
14391439
* call [`ChannelManager::accept_inbound_channel`].
14401440
* To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`].
1441-
* Note that a ['ChannelClosed`] event will _not_ be triggered if the channel is rejected.
1441+
* Note that a [`ChannelClosed`] event will _not_ be triggered if the channel is rejected.
14421442
*
14431443
* The event is only triggered when a new open channel request is received and the
14441444
* [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
@@ -1448,6 +1448,7 @@ private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) {
14481448
* returning `Err(ReplayEvent ())`) and won't be persisted across restarts.
14491449
*
14501450
* [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1451+
* [`ChannelClosed`]: Event::ChannelClosed
14511452
* [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
14521453
* [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
14531454
*/

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ public Result_boolPeerHandleErrorZ read_event(org.ldk.structs.SocketDescriptor p
237237
* [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
238238
* [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards
239239
* [`send_data`]: SocketDescriptor::send_data
240+
* [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio
241+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
240242
*/
241243
public void process_events() {
242244
bindings.PeerManager_process_events(this.ptr);

ts/structs/ChannelManager.mts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ import * as bindings from '../bindings.mjs'
15161516
* [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
15171517
* [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
15181518
* [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
1519-
* [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
1519+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
15201520
* [`list_channels`]: Self::list_channels
15211521
* [`list_usable_channels`]: Self::list_usable_channels
15221522
* [`create_channel`]: Self::create_channel
@@ -1771,7 +1771,7 @@ export class ChannelManager extends CommonBase {
17711771
*
17721772
* The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction.
17731773
* Will fail if a shutdown script has already been set for this channel by
1774-
* ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
1774+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
17751775
* also be compatible with our and the counterparty's features.
17761776
*
17771777
* May generate a [`SendShutdown`] message event on success, which should be relayed.
@@ -1783,6 +1783,7 @@ export class ChannelManager extends CommonBase {
17831783
*
17841784
* [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
17851785
* [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
1786+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey
17861787
* [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
17871788
*
17881789
* Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
@@ -2622,7 +2623,7 @@ export class ChannelManager extends CommonBase {
26222623

26232624
/**
26242625
* Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
2625-
* resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
2626+
* resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
26262627
*
26272628
* If the wallet supports paying on-chain schemes, you should instead use
26282629
* [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
@@ -2640,27 +2641,33 @@ export class ChannelManager extends CommonBase {
26402641
*
26412642
* To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
26422643
* invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
2643-
* payment will fail with an [`Event::InvoiceRequestFailed`].
2644+
* payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
2645+
* [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
26442646
*
26452647
* # Privacy
26462648
*
26472649
* For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
2648-
* to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
2650+
* to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the
26492651
* docs of the parameterized [`Router`], which implements [`MessageRouter`].
26502652
*
26512653
* # Limitations
26522654
*
26532655
* Requires a direct connection to the given [`Destination`] as well as an introduction node in
2654-
* [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
2656+
* [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to
26552657
* the responding [`Bolt12Invoice::payment_paths`].
26562658
*
26572659
* # Errors
26582660
*
26592661
* Errors if:
26602662
* - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
26612663
*
2664+
* [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
2665+
* [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
26622666
* [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
26632667
* [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
2668+
* [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
2669+
* [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
2670+
* [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
26642671
*/
26652672
public pay_for_offer_from_human_readable_name(name: HumanReadableName, amount_msats: bigint, payment_id: Uint8Array, retry_strategy: Retry, max_total_routing_fee_msat: Option_u64Z, dns_resolvers: Destination[]): Result_NoneNoneZ {
26662673
const ret: bigint = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, CommonBase.get_ptr_of(name), amount_msats, bindings.encodeUint8Array(payment_id), CommonBase.get_ptr_of(retry_strategy), CommonBase.get_ptr_of(max_total_routing_fee_msat), bindings.encodeUint64Array(dns_resolvers.map(dns_resolvers_conv_13 => CommonBase.get_ptr_of(dns_resolvers_conv_13))));

ts/structs/PeerManager.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,8 @@ export class PeerManager extends CommonBase {
996996
* [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
997997
* [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards
998998
* [`send_data`]: SocketDescriptor::send_data
999+
* [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio
1000+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
9991001
*/
10001002
public process_events(): void {
10011003
bindings.PeerManager_process_events(this.ptr);

0 commit comments

Comments
 (0)