diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index 1cb720275..8430cf432 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -54,7 +54,7 @@ interface Node { PublicKey node_id(); sequence? listening_addresses(); Bolt11Payment bolt11_payment(); - Bolt12PaymentHandler bolt12_payment(); + Bolt12Payment bolt12_payment(); SpontaneousPayment spontaneous_payment(); OnchainPayment onchain_payment(); [Throws=NodeError] @@ -100,7 +100,7 @@ interface Bolt11Payment { Bolt11Invoice receive_variable_amount_via_jit_channel([ByRef]string description, u32 expiry_secs, u64? max_proportional_lsp_fee_limit_ppm_msat); }; -interface Bolt12PaymentHandler { +interface Bolt12Payment { }; interface SpontaneousPayment { diff --git a/src/lib.rs b/src/lib.rs index a50e17c1b..75f63e613 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,9 +130,7 @@ use event::{EventHandler, EventQueue}; use gossip::GossipSource; use liquidity::LiquiditySource; use payment::payment_store::PaymentStore; -use payment::{ - Bolt11Payment, Bolt12PaymentHandler, OnchainPayment, PaymentDetails, SpontaneousPayment, -}; +use payment::{Bolt11Payment, Bolt12Payment, OnchainPayment, PaymentDetails, SpontaneousPayment}; use peer_store::{PeerInfo, PeerStore}; use types::{ Broadcaster, ChainMonitor, ChannelManager, DynStore, FeeEstimator, KeysManager, NetworkGraph, @@ -852,8 +850,8 @@ impl Node { /// /// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md #[cfg(not(feature = "uniffi"))] - pub fn bolt12_payment(&self) -> Arc { - Arc::new(Bolt12PaymentHandler::new( + pub fn bolt12_payment(&self) -> Arc { + Arc::new(Bolt12Payment::new( Arc::clone(&self.runtime), Arc::clone(&self.channel_manager), Arc::clone(&self.connection_manager), @@ -869,8 +867,8 @@ impl Node { /// /// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md #[cfg(feature = "uniffi")] - pub fn bolt12_payment(&self) -> Arc { - Arc::new(Bolt12PaymentHandler::new( + pub fn bolt12_payment(&self) -> Arc { + Arc::new(Bolt12Payment::new( Arc::clone(&self.runtime), Arc::clone(&self.channel_manager), Arc::clone(&self.connection_manager), diff --git a/src/payment/bolt12.rs b/src/payment/bolt12.rs index c04a783df..c5488b028 100644 --- a/src/payment/bolt12.rs +++ b/src/payment/bolt12.rs @@ -17,7 +17,7 @@ use std::sync::{Arc, RwLock}; /// /// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md /// [`Node::bolt12_payment`]: crate::Node::bolt12_payment -pub struct Bolt12PaymentHandler { +pub struct Bolt12Payment { runtime: Arc>>, channel_manager: Arc, connection_manager: Arc>>, @@ -28,7 +28,7 @@ pub struct Bolt12PaymentHandler { logger: Arc, } -impl Bolt12PaymentHandler { +impl Bolt12Payment { pub(crate) fn new( runtime: Arc>>, channel_manager: Arc, diff --git a/src/payment/mod.rs b/src/payment/mod.rs index b83ba4570..820c0e9ff 100644 --- a/src/payment/mod.rs +++ b/src/payment/mod.rs @@ -7,7 +7,7 @@ pub(crate) mod payment_store; mod spontaneous; pub use bolt11::Bolt11Payment; -pub use bolt12::Bolt12PaymentHandler; +pub use bolt12::Bolt12Payment; pub use onchain::OnchainPayment; pub use payment_store::{LSPFeeLimits, PaymentDetails, PaymentDirection, PaymentStatus}; pub use spontaneous::SpontaneousPayment;