]> git.bitcoin.ninja Git - rust-lightning/commit
Swap the dep order between `lightning` and `lightning-invoice`
authorMatt Corallo <git@bluematt.me>
Fri, 9 Aug 2024 01:29:48 +0000 (01:29 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Aug 2024 12:55:18 +0000 (12:55 +0000)
commita741a57249086d83812237ae8dc68c5d2ef6b725
treea9c4351be1c419c65d41a3b4de1c14fc28e94a25
parent1eba737f442fba62ce25a34b2a857d6b9df484fc
Swap the dep order between `lightning` and `lightning-invoice`

`lightning-invoice` previously had a dependency on the entire
`lightning` crate just because it wants to use some of the useful
types from it. This is obviously backwards and leads to some
awkwardness like the BOLT 11 invoice signing API in the `lightning`
crate taking a `[u5]` rather than a `Bolt11Invoice`.

Here we finally rectify this issue, swapping the dependency order
and making `lightning` depend on `lightning-invoice` rather than
the other way around.

This moves various utilities which were in `lightning-invoice` but
relied on `lightning` payment types to make payments to where they
belong (the `lightning` crate), but doesn't bother with integrating
them well in their new home.
lightning-invoice/Cargo.toml
lightning-invoice/src/lib.rs
lightning-invoice/src/payment.rs [deleted file]
lightning-invoice/src/utils.rs [deleted file]
lightning-invoice/tests/ser_de.rs
lightning/Cargo.toml
lightning/src/ln/bolt11_payment.rs [new file with mode: 0644]
lightning/src/ln/invoice_utils.rs [new file with mode: 0644]
lightning/src/ln/mod.rs