Skip to content

Commit

Permalink
f Rename Bolt12PaymentHandler to Bolt12Payment
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Mar 7, 2024
1 parent 7d18266 commit 76fa6fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface Node {
PublicKey node_id();
sequence<SocketAddress>? listening_addresses();
Bolt11Payment bolt11_payment();
Bolt12PaymentHandler bolt12_payment();
Bolt12Payment bolt12_payment();
SpontaneousPayment spontaneous_payment();
OnchainPayment onchain_payment();
[Throws=NodeError]
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 5 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<Bolt12PaymentHandler> {
Arc::new(Bolt12PaymentHandler::new(
pub fn bolt12_payment(&self) -> Arc<Bolt12Payment> {
Arc::new(Bolt12Payment::new(
Arc::clone(&self.runtime),
Arc::clone(&self.channel_manager),
Arc::clone(&self.connection_manager),
Expand All @@ -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<Bolt12PaymentHandler> {
Arc::new(Bolt12PaymentHandler::new(
pub fn bolt12_payment(&self) -> Arc<Bolt12Payment> {
Arc::new(Bolt12Payment::new(
Arc::clone(&self.runtime),
Arc::clone(&self.channel_manager),
Arc::clone(&self.connection_manager),
Expand Down
4 changes: 2 additions & 2 deletions src/payment/bolt12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RwLock<Option<tokio::runtime::Runtime>>>,
channel_manager: Arc<ChannelManager>,
connection_manager: Arc<ConnectionManager<Arc<FilesystemLogger>>>,
Expand All @@ -28,7 +28,7 @@ pub struct Bolt12PaymentHandler {
logger: Arc<FilesystemLogger>,
}

impl Bolt12PaymentHandler {
impl Bolt12Payment {
pub(crate) fn new(
runtime: Arc<RwLock<Option<tokio::runtime::Runtime>>>,
channel_manager: Arc<ChannelManager>,
Expand Down
2 changes: 1 addition & 1 deletion src/payment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 76fa6fc

Please sign in to comment.