]> git.bitcoin.ninja Git - rust-lightning/commit
Move `Payment{Hash,Preimage,Secret}` into a new crate
authorMatt Corallo <git@bluematt.me>
Fri, 9 Aug 2024 00:13:41 +0000 (00:13 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Aug 2024 12:54:59 +0000 (12:54 +0000)
commit4624caf5a20b0329160e872259911a57eb451634
tree97f2b7127053c1f07c1f6ac8d911f76521b1510a
parentbc1c026712d8ce2d78e729ed98ae9bbea267ed6c
Move `Payment{Hash,Preimage,Secret}` into a new crate

`lightning-invoice` currently has 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`.

This is the first step towards fixing that - moving the common
types we need into a new `lightning-types` crate which both can
depend on.

Since we're using a new crate and can't depend on the existing
`lightning` hex utility to implement `Display`, we also take this
opportunity to switch to the new `Display` impl macro in
`hex_conservative`.
Cargo.toml
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning-types/Cargo.toml [new file with mode: 0644]
lightning-types/src/lib.rs [new file with mode: 0644]
lightning-types/src/payment.rs [new file with mode: 0644]
lightning/Cargo.toml
lightning/src/lib.rs
lightning/src/ln/mod.rs
lightning/src/ln/types.rs