Skip to content

Commit 1903144

Browse files
committed
rename UnifiedQRPayment to UnifiedPayment, rename QRPaymentResult to PaymentResult
These renamings are necessary to reflect the expanded responsibilities for this module.
1 parent 8e190ee commit 1903144

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

bindings/ldk_node.udl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ interface Node {
127127
Bolt12Payment bolt12_payment();
128128
SpontaneousPayment spontaneous_payment();
129129
OnchainPayment onchain_payment();
130-
UnifiedQrPayment unified_qr_payment();
130+
UnifiedPayment unified_payment();
131131
LSPS1Liquidity lsps1_liquidity();
132132
[Throws=NodeError]
133133
void connect(PublicKey node_id, SocketAddress address, boolean persist);
@@ -235,11 +235,11 @@ interface FeeRate {
235235
u64 to_sat_per_vb_ceil();
236236
};
237237

238-
interface UnifiedQrPayment {
238+
interface UnifiedPayment {
239239
[Throws=NodeError]
240240
string receive(u64 amount_sats, [ByRef]string message, u32 expiry_sec);
241241
[Throws=NodeError]
242-
QrPaymentResult send([ByRef]string uri_str);
242+
PaymentResult send([ByRef]string uri_str);
243243
};
244244

245245
interface LSPS1Liquidity {
@@ -409,7 +409,7 @@ interface PaymentKind {
409409
};
410410

411411
[Enum]
412-
interface QrPaymentResult {
412+
interface PaymentResult {
413413
Onchain(Txid txid);
414414
Bolt11(PaymentId payment_id);
415415
Bolt12(PaymentId payment_id);

src/ffi/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub use crate::logger::{LogLevel, LogRecord, LogWriter};
2020
pub use crate::payment::store::{
2121
ConfirmationStatus, LSPFeeLimits, PaymentDirection, PaymentKind, PaymentStatus,
2222
};
23-
pub use crate::payment::{MaxTotalRoutingFeeLimit, QrPaymentResult, SendingParameters};
23+
pub use crate::payment::{MaxTotalRoutingFeeLimit, PaymentResult, SendingParameters};
2424

2525
pub use lightning::chain::channelmonitor::BalanceSource;
2626
pub use lightning::events::{ClosureReason, PaymentFailureReason};

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ use io::utils::write_node_metrics;
138138
use liquidity::{LSPS1Liquidity, LiquiditySource};
139139
use payment::{
140140
Bolt11Payment, Bolt12Payment, OnchainPayment, PaymentDetails, SpontaneousPayment,
141-
UnifiedQrPayment,
141+
UnifiedPayment,
142142
};
143143
use peer_store::{PeerInfo, PeerStore};
144144
use types::{
@@ -935,8 +935,8 @@ impl Node {
935935
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
936936
/// [BIP 21]: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
937937
#[cfg(not(feature = "uniffi"))]
938-
pub fn unified_qr_payment(&self) -> UnifiedQrPayment {
939-
UnifiedQrPayment::new(
938+
pub fn unified_payment(&self) -> UnifiedPayment {
939+
UnifiedPayment::new(
940940
self.onchain_payment().into(),
941941
self.bolt11_payment().into(),
942942
self.bolt12_payment().into(),
@@ -952,8 +952,8 @@ impl Node {
952952
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
953953
/// [BIP 21]: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
954954
#[cfg(feature = "uniffi")]
955-
pub fn unified_qr_payment(&self) -> Arc<UnifiedQrPayment> {
956-
Arc::new(UnifiedQrPayment::new(
955+
pub fn unified_payment(&self) -> Arc<UnifiedPayment> {
956+
Arc::new(UnifiedPayment::new(
957957
self.onchain_payment(),
958958
self.bolt11_payment(),
959959
self.bolt12_payment(),

src/payment/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub use spontaneous::SpontaneousPayment;
2121
pub use store::{
2222
ConfirmationStatus, LSPFeeLimits, PaymentDetails, PaymentDirection, PaymentKind, PaymentStatus,
2323
};
24-
pub use unified::{QrPaymentResult, UnifiedQrPayment};
24+
pub use unified::{PaymentResult, UnifiedPayment};
2525

2626
/// Represents information used to send a payment.
2727
#[derive(Clone, Debug, PartialEq)]

src/payment/unified.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ struct Extras {
4646
/// [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
4747
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
4848
/// [`Node::unified_qr_payment`]: crate::Node::unified_qr_payment
49-
pub struct UnifiedQrPayment {
49+
pub struct UnifiedPayment {
5050
onchain_payment: Arc<OnchainPayment>,
5151
bolt11_invoice: Arc<Bolt11Payment>,
5252
bolt12_payment: Arc<Bolt12Payment>,
5353
config: Arc<Config>,
5454
logger: Arc<Logger>,
5555
}
5656

57-
impl UnifiedQrPayment {
57+
impl UnifiedPayment {
5858
pub(crate) fn new(
5959
onchain_payment: Arc<OnchainPayment>, bolt11_invoice: Arc<Bolt11Payment>,
6060
bolt12_payment: Arc<Bolt12Payment>, config: Arc<Config>, logger: Arc<Logger>,
@@ -189,7 +189,7 @@ impl UnifiedQrPayment {
189189
/// [`PaymentId`]: lightning::ln::channelmanager::PaymentId
190190
/// [`Txid`]: bitcoin::hash_types::Txid
191191
#[derive(Debug)]
192-
pub enum QrPaymentResult {
192+
pub enum PaymentResult {
193193
/// An on-chain payment.
194194
Onchain {
195195
/// The transaction ID (txid) of the on-chain payment.

0 commit comments

Comments
 (0)