Cdk ldk node (#904)

* feat: add LDK Node Lightning backend with comprehensive integration

- Add new cdk-ldk-node crate implementing Lightning backend using LDK Node
- Extend MintPayment trait with start/stop methods for processor lifecycle management
- Add LDK Node configuration support to cdk-mintd with chain source and gossip options
- Enhance mint startup/shutdown to properly manage payment processor lifecycle

---------

Co-authored-by: Erik <78821053+swedishfrenchpress@users.noreply.github.com>
This commit is contained in:
thesimplekid
2025-08-25 22:06:00 +01:00
committed by GitHub
parent 61411afde0
commit 9ab86fabfe
71 changed files with 7368 additions and 418 deletions

View File

@@ -546,6 +546,11 @@ where
amount_paid: Amount,
payment_id: String,
) -> Result<Amount, Self::Err> {
if amount_paid == Amount::ZERO {
tracing::warn!("Amount payments of zero amount should not be recorded.");
return Err(Error::Duplicate);
}
// Check if payment_id already exists in mint_quote_payments
let exists = query(
r#"
@@ -592,6 +597,13 @@ where
.checked_add(amount_paid)
.ok_or_else(|| database::Error::AmountOverflow)?;
tracing::debug!(
"Mint quote {} amount paid was {} is now {}.",
quote_id,
current_amount_paid,
new_amount_paid
);
// Update the amount_paid
query(
r#"