Skip to content

Commit a4eb1a8

Browse files
committed
Update auto-generated bindings to LDK 0.1.8
1 parent d31c8f6 commit a4eb1a8

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

lightning-c-bindings/include/lightning.h

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13500,7 +13500,7 @@ typedef struct LDKMessageRouter {
1350013500
* [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
1350113501
* [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
1350213502
* [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
13503-
* [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
13503+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
1350413504
* [`list_channels`]: Self::list_channels
1350513505
* [`list_usable_channels`]: Self::list_usable_channels
1350613506
* [`create_channel`]: Self::create_channel
@@ -20711,7 +20711,7 @@ typedef enum LDKEvent_Tag {
2071120711
* To accept the request (and in the case of a dual-funded channel, not contribute funds),
2071220712
* call [`ChannelManager::accept_inbound_channel`].
2071320713
* To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`].
20714-
* Note that a ['ChannelClosed`] event will _not_ be triggered if the channel is rejected.
20714+
* Note that a [`ChannelClosed`] event will _not_ be triggered if the channel is rejected.
2071520715
*
2071620716
* The event is only triggered when a new open channel request is received and the
2071720717
* [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
@@ -20721,6 +20721,7 @@ typedef enum LDKEvent_Tag {
2072120721
* returning `Err(ReplayEvent ())`) and won't be persisted across restarts.
2072220722
*
2072320723
* [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
20724+
* [`ChannelClosed`]: Event::ChannelClosed
2072420725
* [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
2072520726
* [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
2072620727
*/
@@ -42796,7 +42797,7 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const
4279642797
*
4279742798
* The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction.
4279842799
* Will fail if a shutdown script has already been set for this channel by
42799-
* ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
42800+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
4280042801
* also be compatible with our and the counterparty's features.
4280142802
*
4280242803
* May generate a [`SendShutdown`] message event on success, which should be relayed.
@@ -42808,6 +42809,7 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const
4280842809
*
4280942810
* [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
4281042811
* [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
42812+
* [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey
4281142813
* [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
4281242814
*
4281342815
* Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
@@ -43604,7 +43606,7 @@ MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_
4360443606

4360543607
/**
4360643608
* Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
43607-
* resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
43609+
* resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
4360843610
*
4360943611
* If the wallet supports paying on-chain schemes, you should instead use
4361043612
* [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
@@ -43622,27 +43624,33 @@ MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_
4362243624
*
4362343625
* To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
4362443626
* invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
43625-
* payment will fail with an [`Event::InvoiceRequestFailed`].
43627+
* payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
43628+
* [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
4362643629
*
4362743630
* # Privacy
4362843631
*
4362943632
* For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
43630-
* to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
43633+
* to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the
4363143634
* docs of the parameterized [`Router`], which implements [`MessageRouter`].
4363243635
*
4363343636
* # Limitations
4363443637
*
4363543638
* Requires a direct connection to the given [`Destination`] as well as an introduction node in
43636-
* [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
43639+
* [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to
4363743640
* the responding [`Bolt12Invoice::payment_paths`].
4363843641
*
4363943642
* # Errors
4364043643
*
4364143644
* Errors if:
4364243645
* - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
4364343646
*
43647+
* [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
43648+
* [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
4364443649
* [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
4364543650
* [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
43651+
* [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
43652+
* [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
43653+
* [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
4364643654
*/
4364743655
MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelManager_pay_for_offer_from_human_readable_name(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKHumanReadableName name, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat, struct LDKCVec_DestinationZ dns_resolvers);
4364843656

@@ -50845,6 +50853,8 @@ MUST_USE_RES struct LDKCResult_boolPeerHandleErrorZ PeerManager_read_event(const
5084550853
* [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
5084650854
* [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards
5084750855
* [`send_data`]: SocketDescriptor::send_data
50856+
* [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio
50857+
* [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
5084850858
*/
5084950859
void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
5085050860

lightning-c-bindings/src/lightning/events/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,7 @@ pub enum Event {
25662566
/// To accept the request (and in the case of a dual-funded channel, not contribute funds),
25672567
/// call [`ChannelManager::accept_inbound_channel`].
25682568
/// To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`].
2569-
/// Note that a ['ChannelClosed`] event will _not_ be triggered if the channel is rejected.
2569+
/// Note that a [`ChannelClosed`] event will _not_ be triggered if the channel is rejected.
25702570
///
25712571
/// The event is only triggered when a new open channel request is received and the
25722572
/// [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
@@ -2576,6 +2576,7 @@ pub enum Event {
25762576
/// returning `Err(ReplayEvent ())`) and won't be persisted across restarts.
25772577
///
25782578
/// [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
2579+
/// [`ChannelClosed`]: Event::ChannelClosed
25792580
/// [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
25802581
/// [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
25812582
OpenChannelRequest {

lightning-c-bindings/src/lightning/ln/channelmanager.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ pub(crate) type nativeChannelManager = nativeChannelManagerImport<crate::lightni
18281828
/// [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
18291829
/// [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
18301830
/// [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
1831-
/// [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
1831+
/// [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
18321832
/// [`list_channels`]: Self::list_channels
18331833
/// [`list_usable_channels`]: Self::list_usable_channels
18341834
/// [`create_channel`]: Self::create_channel
@@ -2607,7 +2607,7 @@ pub extern "C" fn ChannelManager_close_channel(this_arg: &crate::lightning::ln::
26072607
///
26082608
/// The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction.
26092609
/// Will fail if a shutdown script has already been set for this channel by
2610-
/// ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
2610+
/// [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must
26112611
/// also be compatible with our and the counterparty's features.
26122612
///
26132613
/// May generate a [`SendShutdown`] message event on success, which should be relayed.
@@ -2619,6 +2619,7 @@ pub extern "C" fn ChannelManager_close_channel(this_arg: &crate::lightning::ln::
26192619
///
26202620
/// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
26212621
/// [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
2622+
/// [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey
26222623
/// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
26232624
///
26242625
/// Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
@@ -3622,7 +3623,7 @@ pub extern "C" fn ChannelManager_request_refund_payment(this_arg: &crate::lightn
36223623
}
36233624

36243625
/// Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
3625-
/// resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
3626+
/// resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32].
36263627
///
36273628
/// If the wallet supports paying on-chain schemes, you should instead use
36283629
/// [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
@@ -3640,27 +3641,33 @@ pub extern "C" fn ChannelManager_request_refund_payment(this_arg: &crate::lightn
36403641
///
36413642
/// To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
36423643
/// invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
3643-
/// payment will fail with an [`Event::InvoiceRequestFailed`].
3644+
/// payment will fail with an [`PaymentFailureReason::UserAbandoned`] or
3645+
/// [`PaymentFailureReason::InvoiceRequestExpired`], respectively.
36443646
///
36453647
/// # Privacy
36463648
///
36473649
/// For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
3648-
/// to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
3650+
/// to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the
36493651
/// docs of the parameterized [`Router`], which implements [`MessageRouter`].
36503652
///
36513653
/// # Limitations
36523654
///
36533655
/// Requires a direct connection to the given [`Destination`] as well as an introduction node in
3654-
/// [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
3656+
/// [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to
36553657
/// the responding [`Bolt12Invoice::payment_paths`].
36563658
///
36573659
/// # Errors
36583660
///
36593661
/// Errors if:
36603662
/// - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
36613663
///
3664+
/// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
3665+
/// [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md
36623666
/// [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
36633667
/// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
3668+
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
3669+
/// [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned
3670+
/// [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected
36643671
#[must_use]
36653672
#[no_mangle]
36663673
pub extern "C" fn ChannelManager_pay_for_offer_from_human_readable_name(this_arg: &crate::lightning::ln::channelmanager::ChannelManager, mut name: crate::lightning::onion_message::dns_resolution::HumanReadableName, mut amount_msats: u64, mut payment_id: crate::c_types::ThirtyTwoBytes, mut retry_strategy: crate::lightning::ln::outbound_payment::Retry, mut max_total_routing_fee_msat: crate::c_types::derived::COption_u64Z, mut dns_resolvers: crate::c_types::derived::CVec_DestinationZ) -> crate::c_types::derived::CResult_NoneNoneZ {

lightning-c-bindings/src/lightning/ln/peer_handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,8 @@ pub extern "C" fn PeerManager_read_event(this_arg: &crate::lightning::ln::peer_h
17431743
/// [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
17441744
/// [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards
17451745
/// [`send_data`]: SocketDescriptor::send_data
1746+
/// [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio
1747+
/// [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor
17461748
#[no_mangle]
17471749
pub extern "C" fn PeerManager_process_events(this_arg: &crate::lightning::ln::peer_handler::PeerManager) {
17481750
unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.process_events()

0 commit comments

Comments
 (0)