Skip to content

Commit be52bc0

Browse files
Introduce PaymentMetadata, PaymentMetadataStore, and PaymentDataWithFallback
- Add PaymentMetadata to represent metadata for inbound payments - Add PaymentMetadataStore for persisting PaymentMetadata - Add PaymentDataWithFallback to handle backward compatibility during the transition from legacy bolt11/bolt12 pending payments to the new PaymentMetadata format Issue #425
1 parent a98747d commit be52bc0

File tree

3 files changed

+643
-2
lines changed

3 files changed

+643
-2
lines changed

src/io/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub(crate) const PEER_INFO_PERSISTENCE_KEY: &str = "peers";
2626
/// The payment information will be persisted under this prefix.
2727
pub(crate) const PAYMENT_INFO_PERSISTENCE_PRIMARY_NAMESPACE: &str = "payments";
2828
pub(crate) const PAYMENT_INFO_PERSISTENCE_SECONDARY_NAMESPACE: &str = "";
29+
/// The metadata information will be persisted under this prefix.
30+
pub(crate) const PAYMENT_METADATA_INFO_PERSISTENCE_SECONDARY_NAMESPACE: &str = "metadata";
2931

3032
/// The spendable output information used to persisted under this prefix until LDK Node v0.3.0.
3133
pub(crate) const DEPRECATED_SPENDABLE_OUTPUT_INFO_PERSISTENCE_PRIMARY_NAMESPACE: &str =

src/payment/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ pub use bolt12::Bolt12Payment;
1919
pub use onchain::OnchainPayment;
2020
pub use spontaneous::SpontaneousPayment;
2121
pub use store::{
22-
ConfirmationStatus, LSPFeeLimits, PaymentDetails, PaymentDirection, PaymentKind, PaymentStatus,
22+
ConfirmationStatus, JitChannelFeeLimits, LSPFeeLimits, PaymentDetails, PaymentDirection,
23+
PaymentKind, PaymentMetadata, PaymentMetadataDetail, PaymentStatus,
2324
};
2425
pub use unified_qr::{QrPaymentResult, UnifiedQrPayment};
2526

0 commit comments

Comments
 (0)